]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFCalibTask.h
Do not include from subdirectories
[u/mrichter/AliRoot.git] / TOF / AliTOFCalibTask.h
1 #ifndef ALITOFCALIBTASK_H
2 #define ALITOFCALIBTASK_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice     */
6
7 ////////////////////////////////////////////
8 //    task for TOF calibration            //
9 //         C.Zampolli                     //
10 ////////////////////////////////////////////
11
12 /* $Id$ */
13
14 #define TOFCHANNELS       157248   // number TOF channels 
15 #define CHENTRIES            500   // number of entries per TOF channel per run
16                                    // (to be divided by 5 to get the 
17                                    // real number of entries), bigarray 
18 #define LOWERMOMBOUND        1.0   // [GeV/c] default value Pb-Pb
19 #define UPPERMOMBOUND        1.8   // [GeV/c] default value Pb-Pb
20 #define MINTIME                5   // min delta time of flight value (ns)
21 #define NIDX                   5   // number of values stored 
22                                    // in big/smallarray per ESD track
23 #define NIDXSMALL              3   // number of values stored 
24                                    // after Comb PID per ESD track
25 #define DELTAIDXTOT            0   // index for ToT in bigarray
26 #define DELTAIDXTIME           1   // index for TOF time in big/smallarray
27 #define DELTAIDXEXTIMEPI       2   // index for Exp Time Pi in bigarray, will
28                                    // be the same element in the array where 
29                                    // the assigned time after Comb PID will
30                                    // be stored
31 #define DELTAIDXEXTIMEKA       3   // index for Exp Time Ka in bigarray
32 #define DELTAIDXEXTIMEPR       4   // index for Exp Time Pr in bigarray
33 #define TRACKERROR       90*1E-3   // error on the tracks for 
34                                    // Combinatorial PID (ns)
35
36 #include "AliAnalysisTaskSE.h"  
37
38 class TTree;
39 class AliESDtrack ;  
40 class TFile; 
41 class TH1F ;
42 class TH1I ;
43 class TH1D ;
44 class TH2F ;
45 class AliESDEvent ; 
46 class TList ; 
47 class AliTOFArray;
48
49 class AliTOFCalibTask : public AliAnalysisTaskSE {
50
51 public:
52         //  AliTOFCalibTask() ; //ctor
53   AliTOFCalibTask(const char *name = "TOFCalibTask") ; //ctor
54   AliTOFCalibTask(const AliTOFCalibTask & calibtask); // copy constructor
55   AliTOFCalibTask& operator=(const AliTOFCalibTask & calibtask); // assignment operator
56   virtual ~AliTOFCalibTask(); //dtor
57   virtual void UserExec(Option_t * opt="") ;
58   virtual void UserCreateOutputObjects();
59   virtual void Terminate(Option_t * opt = "") ;
60
61 private:
62   Bool_t  Select(AliESDtrack *t);
63   Int_t   SelectOnTime(Float_t *charray, Int_t ntracks, Int_t ich);
64   Bool_t  CombPID(Float_t *smallarray, Int_t size);
65   void    BookHistos();
66   void    DrawHistos();
67   Float_t LoopCombPID(Int_t itrkinset, Int_t ntrkinset, Float_t **exptof, Float_t *texp, Float_t *timeofflight, Int_t *index, Float_t chisquarebest);
68
69   //leaf types
70   AliESDEvent* fESD ;              //! Declaration of leave types
71   Float_t fToT;                 // Time over Threshold, ns
72   Float_t fTime;                // TOF time, ns
73   Float_t fExpTimePi;           // exp time, Pions, ns
74   Float_t fExpTimeKa;           // exp time, Kaons, ns
75   Float_t fExpTimePr;           // exp time, Protons, ns
76   Float_t fMinTime;             // min TOF time for track selection; not used
77   AliTOFArray* fTOFArray;       //! object for TOF signal, arranged per channel
78   Int_t fnESD;                  // number of analyzed ESD tracks 
79   Int_t fnESDselected;          // number of selected ESD tracks 
80   Int_t fnESDkTOFout;           // number of ESD tracks with kTOFout
81   Int_t fnESDkTIME;             // number of ESD tracks with kTIME
82   Int_t fnESDassTOFcl;          // number of ESD tracks with assigned TOF cluster
83   Int_t fnESDTIMEcut;           // number of ESD tracks with TOF time < 17 ns
84   Int_t fnESDTRDcut;            // number of ESD tracks with TRD ok
85
86   // Histos
87   TH1F* fhToT;                  // ToT histo
88   TH1F* fhTime;                 // Time histo
89   TH1F* fhExpTimePi;            // Exp Time Pi histo                  
90   TH1F* fhExpTimeKa;            // Exp Time Ka histo                  
91   TH1F* fhExpTimePr;            // Exp Time Pr histo                  
92   TH1I* fhPID;                  // PID histo                  
93   TH1D* fhch;                   // TOF channel histo               
94   TH1I* fhESD;                  // n. of analyzed histo               
95   TH1I* fhESDselected;          // n. of selected ESD tracks histo            
96   TH1I* fhESDkTOFout;           // n. of ESD tracks with kTOFout histo            
97   TH1I* fhESDkTIME;             // n. of ESD tracks with kTIME histo             
98   TH1I* fhESDassTOFcl;          // n. of ESD tracks with assTOFcl histo               
99   TH1I* fhESDTIMEcut;           // n. of ESD tracks with TIMEcut histo               
100   TH1I* fhESDTRDcut;            // n. of ESD tracks with TRDcut histo               
101
102   Int_t fassparticle[11];       // array for assigned identities
103
104   TList *fListOfHistos;         //! list of Histos to be stored in the output container 1
105   TList *fListArray;            //! list of Array for output container 2
106
107   ClassDef(AliTOFCalibTask, 2); //  TOF Calib task 
108 };
109 #endif // ALITOFCALIBTASK_H
110