5 |
example1 - Example to integrate all detector info and solve the y-view tracks ambiguity |
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 |
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 |
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 |
Loop - 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. |
output file with histograms (My-Histos.cpp) and/or trees. |
10 |
|
|
11 |
In order to run the scripts: |
In order to run the scripts: |
20 |
|
|
21 |
[] .x load.C |
[] .x load.C |
22 |
[] .L example1.C |
[] .L example1.C |
23 |
[] example1("level2-data-path/level2-file.root") |
[] example1("level2-data-path/level2-file, execute the command.root") |
24 |
Tracker : set branch address TrkLevel2 |
Tracker : set branch address TrkLevel2 |
25 |
Calorimeter : set branch address CaloLevel2 |
Calorimeter : set branch address CaloLevel2 |
26 |
ToF : set branch address ToFLevel2 |
ToF : set branch address ToFLevel2 |
37 |
counts time. It is usefull to check processing time. |
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 |
5) To create Loop.exe execute the command (you need the PAMELA environment variables): |
41 |
|
|
42 |
|
> make Loop.exe |
43 |
|
|
44 |
|
The executable is create by compiling and linking the files: |
45 |
|
|
46 |
|
Loop.cpp |
47 |
|
My-Selection.cpp |
48 |
|
My-Histos.cpp |
49 |
|
|
50 |
|
You can use My-Selection.cpp and My-Histos.cpp as a template to inplement your own |
51 |
|
selection cuts and analysis. |
52 |
|
More generally, you can compile and link Loop.cpp with your own source files (you need |
53 |
|
to edit also the Makefile), where you should implement at least the following functions: |
54 |
|
|
55 |
|
bool Select(PamLevel2*); |
56 |
|
void CreateHistos(TFile*); |
57 |
|
void FillHistos(PamLevel2*); |
58 |
|
void SaveHistos(TFile*); |
59 |
|
|
60 |
|
To know how to use Loop.exe, issue: |
61 |
./Loop.exe --help |
./Loop.exe --help |
62 |
|
|
63 |
|
(If you execute "make Loop-0.exe" the old example code, previously posted on the cvs, |
64 |
|
is compiled and linked. This is not a very general example, better use the new one) |