Exercise 2

In this exercise I should try to understand the code: http://projects.hepforge.org/rivet/code/dev/a00318_source.html

For the lines where I did a little research to find out what the code meant or where I just thought that a comment would be appropriate I wrote the following lines:

line comment
14 Creates a class which is derived from the class Analysis.
19 Constructor; initialize Analysis.
31 Creates a Zfinder object.
33 Add a projection named Zfinder for the object zfinder
35 _h_yZ initialized in line 71, booking a histogram with 1,1,1 and the default parameters for the rest.
40 Do the analysis, get an Event as e the & ensures that the function will not change e since it is set to const.
41 Set weight.
43 Initialize zfinder to be the projection defined above applied to e.
44 If there is one Z-particle:
45 Initialize a ParticleVector object with the particles from zfinder. The & makes it a reference to the object.
46 If one of the transverse momenta is large enough:
47 Put the rapidity of the first particle in zfinder into _h_yZ.
51 Else write to log.
61 Normalize the histogram to have an area of 0.5 because rapidity is symmetric, and all have been taken positive, which gives 2 times the intended.

-- RasmusSlothHansen - 05-Jul-2011

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2011-07-05 - RasmusSlothHansen
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback