| 1 |
This directory contains some very simple macros, just to show how to use the PamLevel2 class. |
| 2 |
The macros need as input the name of a Level2 .root file produced by DarthVader |
| 3 |
(example1 and example2) or a list of files (see example3). |
| 4 |
|
| 5 |
example1 - Example to integrate all detector info and solve the y-view tracks ambiguity |
| 6 |
example2 - Example to get pamela tracks and integrate the trajectory in the apparatus |
| 7 |
example3 - Example to loop over events, reading more than one file |
| 8 |
Loop.cpp - Example to loop over events, apply some selection cuts (My-Selection.cpp) and filling an |
| 9 |
output file with histograms (My-Histos.cpp) and/or trees. |
| 10 |
|
| 11 |
In order to run the scripts: |
| 12 |
|
| 13 |
1) Copy the magnetic field maps into the magnetic-field/ directory. |
| 14 |
You can find them in the CVS repository, inside DarthVader/param/trk-param/field_param-0/ |
| 15 |
|
| 16 |
2) Add the path of the directory containing the DarthVader libraries and the PamLevel2 library to the |
| 17 |
shell variable LD_LIBRARY_PATH |
| 18 |
|
| 19 |
3) Open a root session and execute the following commands: |
| 20 |
|
| 21 |
[] .x load.C |
| 22 |
[] .L example1.C |
| 23 |
[] example1("level2-data-path/level2-file.root") |
| 24 |
Tracker : set branch address TrkLevel2 |
| 25 |
Calorimeter : set branch address CaloLevel2 |
| 26 |
ToF : set branch address ToFLevel2 |
| 27 |
Trigger : set branch address TrigLevel2 |
| 28 |
S4 : set branch address S4Level2 |
| 29 |
NeutronD : set branch address NDLevel2 |
| 30 |
Anticounter : set branch address AcLevel2 |
| 31 |
|
| 32 |
Start loop over events |
| 33 |
|
| 34 |
Done |
| 35 |
|
| 36 |
4) Macros example1 and example2 produce some histograms. Example3 just loop over events and tracks and |
| 37 |
counts time. It is usefull to check processing time. |
| 38 |
|
| 39 |
|
| 40 |
5) To run the Loop.cpp compile it (see the Makefile) and run |
| 41 |
./Loop.exe --help |