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 |
|
9 |
|
10 |
In order to run the scripts: |
11 |
|
12 |
1) Copy the magnetic field maps into the magnetic-field/ directory. |
13 |
You can find them in the CVS repository, inside DarthVader/param/trk-param/field_param-0/ |
14 |
|
15 |
2) Add the path of the directory containing the DarthVader libraries and the PamLevel2 library to the |
16 |
shell variable LD_LIBRARY_PATH |
17 |
|
18 |
3) Open a root session and execute the following commands: |
19 |
|
20 |
[] .x load.C |
21 |
[] .L example1.C |
22 |
[] example1("level2-data-path/level2-file.root") |
23 |
Tracker : set branch address TrkLevel2 |
24 |
Calorimeter : set branch address CaloLevel2 |
25 |
ToF : set branch address ToFLevel2 |
26 |
Trigger : set branch address TrigLevel2 |
27 |
S4 : set branch address S4Level2 |
28 |
NeutronD : set branch address NDLevel2 |
29 |
Anticounter : set branch address AcLevel2 |
30 |
|
31 |
Start loop over events |
32 |
|
33 |
Done |
34 |
|
35 |
4) Macros example1 and example2 produce some histograms. Example3 just loop over events and tracks and |
36 |
counts time. It is usefull to check processing time. |