]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFhits2sdigits.C
Fixed (ininfluential) bug on TestHit method
[u/mrichter/AliRoot.git] / TOF / AliTOFhits2sdigits.C
1 void AliTOFhits2sdigits(TString fileNameHits, Int_t firstEvent=0,Int_t nEvents=1) 
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
14   // root[1] AliTOFhits2sdigits("galice.root",0,1)
15   /////////////////////////////////////////////////////////////////////////
16
17   // Dynamically link some shared libs
18   if (gClassTable->GetID("AliRun") < 0) {
19     gROOT->LoadMacro("loadlibs.C");
20     loadlibs();
21     cout << "Loaded shared libraries" << endl;
22   }
23
24
25   // Create the TOF sdigitzer and sdigitize by default the first event
26   // (in fact by default Int_t firstEvent=0,Int_t nEvents=1)
27   AliTOFSDigitizer *sdigitizer = new AliTOFSDigitizer(fileNameHits.Data(),firstEvent,nEvents); // it is the same nevents numbering
28   // scheme used by STEER/AliHits2SDigits.C
29
30   // Activate this line if you want to print the parameters
31   // used in sdigitization
32   // sdigitizer->PrintParameters();
33
34   // e.g. Activate this line if you want to sdigitize only hits from plate 3
35   // in sector 15
36   // pay attention that sector must be in the range [1,18]
37   //                and plate  must be in the range [1,5]
38   // by default we sdigitize hits of all plates in all sectors
39   // sdigitizer->SelectSectorAndPlate(15,3);
40
41
42   // performs sdigitization of the above events with "all" verbose option
43   // "tim" option is also available for benchmarking only
44   sdigitizer->Exec("all");  
45
46   // N.B.: in order to maintain the functionality to sdigitize 
47   // all events in current file add a second option
48   // sdigitizer->Exec("all","all");
49   // the second "all" option overrides the previous settings for 
50   // lower and upper  bounds for event to sdigitize and allow
51   // the sdigitization for ALL events in fileNameHits
52 }