]>
Commit | Line | Data |
---|---|---|
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 CHENTRIESSMALL 300 // number of entries per TOF channel per run | |
19 | // (to be divided by 3 to get the | |
20 | // real number of entries), smallarray | |
21 | #define LOWERMOMBOUND 1.0 // [GeV/c] default value Pb-Pb | |
22 | #define UPPERMOMBOUND 1.8 // [GeV/c] default value Pb-Pb | |
23 | #define MINTIME 5 // min delta time of flight value (ns) | |
24 | #define NIDX 5 // number of values stored | |
25 | // in big/smallarray per ESD track | |
26 | #define NIDXSMALL 3 // number of values stored | |
27 | // after Comb PID per ESD track | |
28 | #define DELTAIDXTOT 0 // index for ToT in bigarray | |
29 | #define DELTAIDXTIME 1 // index for TOF time in big/smallarray | |
30 | #define DELTAIDXEXTIMEPI 2 // index for Exp Time Pi in bigarray, will | |
31 | // be the same element in the array where | |
32 | // the assigned time after Comb PID will | |
33 | // be stored | |
34 | #define DELTAIDXEXTIMEKA 3 // index for Exp Time Ka in bigarray | |
35 | #define DELTAIDXEXTIMEPR 4 // index for Exp Time Pr in bigarray | |
36 | #define TRACKERROR 90*1E-3 // error on the tracks for | |
37 | // Combinatorial PID (ns) | |
38 | ||
39 | #include "AliAnalysisTask.h" | |
40 | ||
41 | class TTree; | |
42 | class AliESDtrack ; | |
43 | class TFile; | |
44 | class TH1F ; | |
45 | class TH1I ; | |
46 | class TH1D ; | |
47 | class TH2F ; | |
48 | class AliESDEvent ; | |
49 | ||
50 | class AliTOFCalibTask : public AliAnalysisTask { | |
51 | ||
52 | public: | |
53 | AliTOFCalibTask(const char *name) ; //ctor | |
54 | AliTOFCalibTask(const AliTOFCalibTask & calibtask); // copy constructor | |
55 | AliTOFCalibTask& operator=(const AliTOFCalibTask & calibtask); // assignment operator | |
56 | virtual ~AliTOFCalibTask(); //dtor | |
57 | virtual void Exec(Option_t * opt="") ; | |
58 | virtual void ConnectInputData(Option_t *) ; | |
59 | virtual void CreateOutputObjects(); | |
60 | virtual void Terminate(Option_t * opt = "") ; | |
61 | virtual Bool_t Notify(); | |
62 | void SetRun(Int_t irun){frun=irun;} | |
63 | Int_t GetRun() const {return frun;} | |
64 | ||
65 | private: | |
66 | Bool_t Select(AliESDtrack *t); | |
67 | Int_t SelectOnTime(Float_t *charray, Int_t ntracks, Int_t ich); | |
68 | Bool_t CombPID(Float_t *smallarray, Int_t size); | |
69 | void BookHistos(); | |
70 | void DrawHistos(); | |
71 | Float_t LoopCombPID(Int_t itrkinset, Int_t ntrkinset, Float_t **exptof, Float_t *texp, Float_t *timeofflight, Int_t *index, Float_t chisquarebest); | |
72 | ||
73 | const Char_t *fdir; // initial directory | |
74 | TTree* fChain ; //!pointer to the analyzed TTree or TChain | |
75 | //leaf types | |
76 | AliESDEvent* fESD ; //! Declaration of leave types | |
77 | Float_t fToT; // Time over Threshold, ns | |
78 | Float_t fTime; // TOF time, ns | |
79 | Float_t fExpTimePi; // exp time, Pions, ns | |
80 | Float_t fExpTimeKa; // exp time, Kaons, ns | |
81 | Float_t fExpTimePr; // exp time, Protons, ns | |
82 | Float_t fMinTime; // min TOF time for track selection; not used | |
83 | Float_t** fbigarray; // big array for calibration | |
84 | Int_t* findexarray; // array for entry index in each channel | |
85 | Int_t fnESD; // number of analyzed ESD tracks | |
86 | Int_t fnESDselected; // number of selected ESD tracks | |
87 | Int_t fnESDkTOFout; // number of ESD tracks with kTOFout | |
88 | Int_t fnESDkTIME; // number of ESD tracks with kTIME | |
89 | Int_t fnESDassTOFcl; // number of ESD tracks with assigned TOF cluster | |
90 | Int_t fnESDTIMEcut; // number of ESD tracks with TOF time < 17 ns | |
91 | Int_t fnESDTRDcut; // number of ESD tracks with TRD ok | |
92 | ||
93 | // Histos | |
94 | TH1F* fhToT; // ToT histo | |
95 | TH1F* fhTime; // Time histo | |
96 | TH1F* fhExpTimePi; // Exp Time Pi histo | |
97 | TH1F* fhExpTimeKa; // Exp Time Ka histo | |
98 | TH1F* fhExpTimePr; // Exp Time Pr histo | |
99 | TH1I* fhPID; // PID histo | |
100 | TH1D* fhch; // TOF channel histo | |
101 | ||
102 | TObjArray * fOutputContainer ; //! output data container | |
103 | Int_t frun; // number of current run | |
104 | Int_t fassparticle[11]; // array for assigned identities | |
105 | ||
106 | ClassDef(AliTOFCalibTask, 2); // TOF Calib task | |
107 | }; | |
108 | #endif // ALITOFCALIBTASK_H | |
109 |