]>
Commit | Line | Data |
---|---|---|
32bd3eb5 | 1 | void AliTOFhits2sdigits(Int_t firstEvent=0,Int_t nEvents=1) |
ea7a588a | 2 | { |
3 | ||
4 | ///////////////////////////////////////////////////////////////////////// | |
5 | // | |
6 | // Creates TOF summable digits from the hit information. | |
7 | // | |
8 | // Report problems to pierella@bo.infn.it | |
9 | // | |
10 | // Use case: | |
11 | // start root | |
12 | // // load the macro | |
13 | // root[0] .L AliTOFhits2sdigits.C | |
32bd3eb5 | 14 | // root[1] AliTOFhits2sdigits() |
15 | // | |
16 | // Updated to the new I/O: C. Zampolli | |
17 | // | |
ea7a588a | 18 | ///////////////////////////////////////////////////////////////////////// |
19 | ||
20 | // Dynamically link some shared libs | |
32bd3eb5 | 21 | |
ea7a588a | 22 | if (gClassTable->GetID("AliRun") < 0) { |
23 | gROOT->LoadMacro("loadlibs.C"); | |
24 | loadlibs(); | |
25 | cout << "Loaded shared libraries" << endl; | |
32bd3eb5 | 26 | } |
27 | ||
28 | if (gAlice) | |
29 | { | |
30 | delete gAlice->GetRunLoader(); | |
31 | delete gAlice; | |
32 | gAlice = 0x0; | |
33 | } | |
34 | ||
ea7a588a | 35 | // Create the TOF sdigitzer and sdigitize by default the first event |
36 | // (in fact by default Int_t firstEvent=0,Int_t nEvents=1) | |
32bd3eb5 | 37 | AliTOFSDigitizer *sdigitizer = new AliTOFSDigitizer("galice.root",firstEvent,nEvents); // it is the same nevents numbering |
ea7a588a | 38 | |
39 | // Activate this line if you want to print the parameters | |
40 | // used in sdigitization | |
41 | // sdigitizer->PrintParameters(); | |
42 | ||
55991c8b | 43 | // e.g. Activate this line if you want to sdigitize only hits from plate 3 |
44 | // in sector 15 | |
45 | // pay attention that sector must be in the range [1,18] | |
46 | // and plate must be in the range [1,5] | |
47 | // by default we sdigitize hits of all plates in all sectors | |
48 | // sdigitizer->SelectSectorAndPlate(15,3); | |
49 | ||
50 | ||
ea7a588a | 51 | // performs sdigitization of the above events with "all" verbose option |
52 | // "tim" option is also available for benchmarking only | |
32bd3eb5 | 53 | //sdigitizer->Exec("all"); |
ea7a588a | 54 | |
55 | // N.B.: in order to maintain the functionality to sdigitize | |
56 | // all events in current file add a second option | |
32bd3eb5 | 57 | sdigitizer->Exec("all","all"); |
ea7a588a | 58 | // the second "all" option overrides the previous settings for |
59 | // lower and upper bounds for event to sdigitize and allow | |
60 | // the sdigitization for ALL events in fileNameHits | |
32bd3eb5 | 61 | |
62 | sdigitizer = 0x0; | |
63 | delete sdigitizer; | |
64 | ||
65 | if (gAlice) | |
66 | { | |
67 | delete gAlice->GetRunLoader(); | |
68 | delete gAlice; | |
69 | gAlice = 0x0; | |
70 | } | |
71 | ||
ea7a588a | 72 | } |