]>
Commit | Line | Data |
---|---|---|
d61f73d9 | 1 | void AliTOFhits2sdigits(Int_t evNumber1=-1, Int_t numberOfEvents=0) |
ea7a588a | 2 | { |
3 | ||
4 | ///////////////////////////////////////////////////////////////////////// | |
5 | // | |
d61f73d9 | 6 | // Creates TOF summable digits from the hits for all event in the header file |
ea7a588a | 7 | // |
8 | // Use case: | |
9 | // start root | |
10 | // // load the macro | |
11 | // root[0] .L AliTOFhits2sdigits.C | |
32bd3eb5 | 12 | // root[1] AliTOFhits2sdigits() |
13 | // | |
d61f73d9 | 14 | // By default, it creates sdigits for all the events in the header file. |
15 | // | |
16 | // If you want create sdigits only the 3th event (existing in the header file) | |
17 | // you can use the following line: | |
18 | // | |
19 | // root[0] .L AliTOFhits2sdigits.C | |
20 | // root[1] AliTOFhits2sdigits(3,1) | |
21 | // | |
22 | // Created by: F. Pierella | |
32bd3eb5 | 23 | // Updated to the new I/O: C. Zampolli |
24 | // | |
d61f73d9 | 25 | // Report problems to decaro@sa.infn.it |
26 | // | |
ea7a588a | 27 | ///////////////////////////////////////////////////////////////////////// |
28 | ||
29 | // Dynamically link some shared libs | |
32bd3eb5 | 30 | |
ea7a588a | 31 | if (gClassTable->GetID("AliRun") < 0) { |
32 | gROOT->LoadMacro("loadlibs.C"); | |
33 | loadlibs(); | |
34 | cout << "Loaded shared libraries" << endl; | |
32bd3eb5 | 35 | } |
36 | ||
37 | if (gAlice) | |
38 | { | |
33c3c91a | 39 | delete AliRunLoader::Instance(); |
32bd3eb5 | 40 | delete gAlice; |
41 | gAlice = 0x0; | |
42 | } | |
43 | ||
d61f73d9 | 44 | // Create the TOF sdigitzer and sdigitize all events by default |
45 | AliTOFSDigitizer *sdigitizer = new AliTOFSDigitizer("galice.root",evNumber1,numberOfEvents); | |
ea7a588a | 46 | |
47 | // Activate this line if you want to print the parameters | |
48 | // used in sdigitization | |
49 | // sdigitizer->PrintParameters(); | |
50 | ||
d61f73d9 | 51 | // e.g. Activate this line if you want to sdigitize only hits |
52 | // with the plate number 3 and the sector number 15 | |
da3d3acd | 53 | // pay attention that sector must be in the range [0,17] |
54 | // and plate must be in the range [0,4] | |
55991c8b | 55 | // by default we sdigitize hits of all plates in all sectors |
56 | // sdigitizer->SelectSectorAndPlate(15,3); | |
57 | ||
d61f73d9 | 58 | // performs sdigitization with "all" verbose option |
ea7a588a | 59 | // "tim" option is also available for benchmarking only |
ea7a588a | 60 | |
d61f73d9 | 61 | sdigitizer->Exec("all"); |
62 | ||
63 | sdigitizer = 0x0; | |
64 | delete sdigitizer; | |
65 | ||
66 | if (gAlice) | |
67 | { | |
33c3c91a | 68 | delete AliRunLoader::Instance(); |
d61f73d9 | 69 | delete gAlice; |
70 | gAlice = 0x0; | |
71 | } | |
32bd3eb5 | 72 | |
ea7a588a | 73 | } |