]>
Commit | Line | Data |
---|---|---|
6dc9348d | 1 | #ifndef ALITOFCALIB_H |
2 | #define ALITOFCALIB_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 | // class for TOF calibration:: simulation of uncalibrated data // | |
9 | ////////////////////////////////////////////////////////////////// | |
10 | ||
0a749fa5 | 11 | #define CHENTRIESSMALL 300 // number of entries per TOF channel per run |
12 | // (to be divided by 3 to get the | |
13 | // real number of entries), smallarray | |
14 | #define MAXCHENTRIESSMALL 10000 // max number of entries per TOF channel | |
15 | // (to be divided by 3 to get the | |
16 | // real number of entries), smallarray | |
17 | ||
18 | #define NIDXSMALL 3 // number of values stored | |
19 | // after Comb PID per ESD track | |
20 | #define DELTAIDXTOT 0 // index for ToT in bigarray | |
21 | #define DELTAIDXTIME 1 // index for TOF time in big/smallarray | |
22 | #define DELTAIDXPID 2 // index for Exp Time after Comb PID | |
23 | // in smallarray | |
24 | #define MEANENTRIES 15 // Mean number of entries per channel | |
25 | // to perform calibration | |
26 | ||
6dc9348d | 27 | #include "TTask.h" |
0e46b9ae | 28 | |
29 | class TArrayF; | |
30 | class TF1; | |
31 | class TH1F; | |
32 | class TObjArray; | |
0a749fa5 | 33 | class TTree; |
296591ad | 34 | class TChain; |
0e46b9ae | 35 | |
5c7c93fa | 36 | //class AliESD; |
0e46b9ae | 37 | |
38 | class AliTOFCal; | |
7037bd93 | 39 | class AliTOFRecoParam; |
6dc9348d | 40 | |
41 | class AliTOFcalib:public TTask{ | |
42 | public: | |
43 | AliTOFcalib(); // ctor | |
7aeeaf38 | 44 | AliTOFcalib(const AliTOFcalib & calib); // copy constructor |
45 | AliTOFcalib& operator=(const AliTOFcalib & calib); // assignment operator | |
6dc9348d | 46 | virtual ~AliTOFcalib() ; // dtor |
0a749fa5 | 47 | void CreateCalArrays(); |
0a749fa5 | 48 | TObjArray * GetTOFCalArrayOnline() const {return fTOFCalOnline;} |
7fffa85b | 49 | TObjArray * GetTOFCalArrayOnlinePulser() const {return fTOFCalOnlinePulser;} |
50 | TObjArray * GetTOFCalArrayOnlineNoise() const {return fTOFCalOnlineNoise;} | |
51 | TObjArray * GetTOFCalArrayOnlineHW() const {return fTOFCalOnlineHW;} | |
0a749fa5 | 52 | TObjArray * GetTOFCalArrayOffline() const {return fTOFCalOffline;} |
d4ad0d6b | 53 | TH1F * GetTOFSimToT() const {return fTOFSimToT;} |
0a749fa5 | 54 | TTree * GetTOFCalibTree() const {return fTree;} |
296591ad | 55 | TChain * GetTOFCalibChain() const {return fChain;} |
0a749fa5 | 56 | const char * GetOfflineValidity() const {return fkValidity;} |
57 | void SetOfflineValidity(const char* validity) {fkValidity = validity;} | |
d4ad0d6b | 58 | Int_t NChannels()const{return fNChannels;} |
d4ad0d6b | 59 | // Methods to retrieve/write parameters from/on CDB |
40212801 | 60 | void WriteSimHistoOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, TH1F *histo); |
0a749fa5 | 61 | void WriteParOnlineOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun); |
7fffa85b | 62 | void WriteParOnlinePulserOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun); |
63 | void WriteParOnlineNoiseOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun); | |
64 | void WriteParOnlineHWOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun); | |
0a749fa5 | 65 | void WriteParOfflineOnCDB(Char_t *sel, const Char_t *validity, Int_t minrun, Int_t maxrun); |
0cb9d099 | 66 | void WriteParOnlineOnCDB(Char_t *sel); |
7fffa85b | 67 | void WriteParOnlinePulserOnCDB(Char_t *sel); |
68 | void WriteParOnlineNoiseOnCDB(Char_t *sel); | |
69 | void WriteParOnlineHWOnCDB(Char_t *sel); | |
0cb9d099 | 70 | void WriteParOfflineOnCDB(Char_t *sel, const Char_t *validity); |
40212801 | 71 | Bool_t ReadSimHistoFromCDB(Char_t *sel, Int_t nrun); |
0a749fa5 | 72 | Bool_t ReadParOnlineFromCDB(Char_t *sel, Int_t nrun); |
7fffa85b | 73 | Bool_t ReadParOnlinePulserFromCDB(Char_t *sel, Int_t nrun); |
74 | Bool_t ReadParOnlineNoiseFromCDB(Char_t *sel, Int_t nrun); | |
75 | Bool_t ReadParOnlineHWFromCDB(Char_t *sel, Int_t nrun); | |
0a749fa5 | 76 | Bool_t ReadParOfflineFromCDB(Char_t *sel, Int_t nrun); |
7037bd93 | 77 | void WriteRecParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFRecoParam *param); |
78 | AliTOFRecoParam * ReadRecParFromCDB(Char_t *sel, Int_t nrun); | |
0a749fa5 | 79 | void CreateTreeFromCDB(Int_t minrun, Int_t maxrun); |
80 | void CreateTreeFromFile(Int_t minrun, Int_t maxrun); | |
81 | void CreateTreeFromGrid(Int_t minrun, Int_t maxrun); | |
296591ad | 82 | void CreateChainFromGrid(Int_t minrun, Int_t maxrun); |
0a749fa5 | 83 | Int_t Calibrate(Option_t *optionSave="", Option_t *optionFit="RQ"); |
84 | Int_t Calibrate(Int_t nch,Int_t *ich, Option_t *optionSave="", Option_t *optionFit="RQ"); | |
85 | Int_t Calibrate(Int_t ichmin, Int_t ichmax, Option_t *optionSave="", Option_t *optionFit="RQ"); | |
86 | Int_t Calibrate(Int_t ich, Option_t *optionSave="", Option_t *optionFit="RQ"); | |
87 | Int_t CalibrateFromProfile(Int_t ich, Option_t *optionSave="", Option_t *optionFit="RQ"); | |
88 | TH1F* Profile(Int_t i); | |
89 | Int_t FindBins (TH1F* h, Double_t *bins) const; | |
90 | void SetNruns(Int_t nruns) {fNruns=nruns;} | |
91 | Int_t GetNruns() const {return fNruns;} | |
0cb9d099 | 92 | void SetFirstRun(Int_t firstRun) {fFirstRun=firstRun;} |
93 | Int_t GetFirstRun() const {return fFirstRun;} | |
94 | void SetLastRun(Int_t lastRun) {fLastRun=lastRun;} | |
95 | Int_t GetLastRun() const {return fLastRun;} | |
6dc9348d | 96 | |
97 | private: | |
d4ad0d6b | 98 | Int_t fNChannels; // number of TOF channels |
0a749fa5 | 99 | TObjArray *fTOFCalOnline; // array of AliTOFChannels storing calib parameters |
7fffa85b | 100 | TObjArray *fTOFCalOnlinePulser; // array of AliTOFChannels storing calib status from pulser |
101 | TObjArray *fTOFCalOnlineNoise; // array of AliTOFChannels storing calib status from noise | |
102 | TObjArray *fTOFCalOnlineHW; // array of AliTOFChannels storing calib status from hardware | |
0a749fa5 | 103 | TObjArray *fTOFCalOffline; // array of AliTOFChannels storing calib parameters |
d4ad0d6b | 104 | TH1F *fTOFSimToT; // histo with realistic ToT signal from TB Data |
0a749fa5 | 105 | const char *fkValidity; // validity for offline calibration object |
106 | TTree *fTree; // tree for TOF calibration | |
296591ad | 107 | TChain *fChain; // chain for TOF calibration |
0a749fa5 | 108 | Int_t fNruns; // number of runs to be processed |
0cb9d099 | 109 | Int_t fFirstRun; // first run for calibration obj validity |
110 | Int_t fLastRun; // last run for calib obj validity | |
111 | ||
7fffa85b | 112 | ClassDef(AliTOFcalib,6); |
6dc9348d | 113 | }; |
114 | ||
115 | #endif // AliTOFcalib_H | |
116 |