]>
Commit | Line | Data |
---|---|---|
3c8efc07 | 1 | #ifndef ALITOFANALYSISTASKCALIBPASS0_H |
2 | #define ALITOFANALYSISTASKCALIBPASS0_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 | // // | |
9 | // This class provides TOF pass0/passX calibration tools // | |
10 | // // | |
11 | /////////////////////////////////////////////////////////////// | |
12 | ||
13 | #include "AliAnalysisTaskSE.h" | |
14 | ||
15 | class AliESDtrack; | |
16 | class AliESDEvent; | |
17 | class AliPhysicsSelection; | |
18 | class AliESDtrackCuts; | |
19 | class AliESDVertex; | |
20 | class AliGRPManager; | |
21 | class AliGRPObject; | |
22 | class AliTOFcalib; | |
23 | class TList; | |
24 | class TH2F; | |
25 | class TF1; | |
26 | class TH1D; | |
27 | ||
28 | class AliTOFAnalysisTaskCalibPass0 : | |
29 | public AliAnalysisTaskSE | |
30 | { | |
31 | ||
32 | public: | |
33 | ||
34 | AliTOFAnalysisTaskCalibPass0(); // default constructor | |
35 | virtual ~AliTOFAnalysisTaskCalibPass0(); // default destructor | |
36 | ||
37 | virtual void UserCreateOutputObjects(); // user create output objects | |
38 | virtual void UserExec(Option_t *); // user exec | |
39 | ||
40 | /* getters */ | |
41 | AliPhysicsSelection *GetEventCuts() const {return fEventCuts;}; // getter | |
42 | AliESDtrackCuts *GetTrackCuts() const {return fTrackCuts;}; // getter | |
43 | AliTOFcalib *GetTOFcalib() const {return fTOFcalib;}; // getter | |
44 | ||
45 | /* setters */ | |
46 | void SetEventSelectionFlag(Bool_t value = kTRUE) {fEventSelectionFlag = value;}; // setter | |
47 | void SetVertexSelectionFlag(Bool_t value = kTRUE) {fVertexSelectionFlag = value;}; // setter | |
48 | void SetVertexCut(Double_t value) {fVertexCut = value;}; // setter | |
49 | ||
50 | /* post-processing methods */ | |
51 | Bool_t ProcessOutput(const Char_t *filename, const Char_t *dbString); // process output | |
07901ecf | 52 | Bool_t DoProcessOutput(const Char_t *filename, const Char_t *dbString); // process output |
53 | Int_t GetStatus(); // get status | |
74739444 | 54 | void PrintStatus(); // print status |
d501ffec | 55 | |
56 | /* static setters */ | |
57 | static void SetMinVertexIntegral(Double_t value) {fgMinVertexIntegral = value;}; // setter | |
58 | static void SetMinDeltatIntegal(Double_t value) {fgMinDeltatIntegral = value;}; // setter | |
59 | static void SetMinVertexIntegralSample (Double_t value) {fgMinVertexIntegralSample = value;}; // setter | |
60 | static void SetMinDeltatIntegralSample (Double_t value) {fgMinDeltatIntegralSample = value;}; // setter | |
3c8efc07 | 61 | |
62 | protected: | |
63 | ||
64 | AliTOFAnalysisTaskCalibPass0(const AliTOFAnalysisTaskCalibPass0 &); // copy constructor | |
65 | AliTOFAnalysisTaskCalibPass0 &operator=(const AliTOFAnalysisTaskCalibPass0 &); // operator= | |
66 | ||
07901ecf | 67 | /* status codes */ |
68 | enum EStatusCode_t { | |
69 | kOk, | |
70 | kInputError, /* open file error, missing histos */ | |
71 | kDataError, /* problems with histo information */ | |
72 | kNotActive, /* not active in data taking and/or reconstruction */ | |
73 | kLowStatistics, /* too low statistics */ | |
74 | kNoMeasurement, /* no measurement performed */ | |
75 | kStoreError, /* problems storing OCDB */ | |
76 | kNStatusCodes | |
77 | }; | |
78 | Int_t fStatus; /* status code */ | |
79 | static const Char_t *fgkStatusCodeName[kNStatusCodes]; | |
80 | ||
3c8efc07 | 81 | /* methods */ |
82 | Bool_t InitRun(); // init run | |
83 | Bool_t InitEvent(); // init event | |
84 | Bool_t HasTOFMeasurement(const AliESDtrack *track) const ; // has TOF measurement | |
85 | ||
86 | /* post-processing methods */ | |
87 | Bool_t CheckMatchingPerformance(const TH2F *histoDeltazEta, const TH2F *histoAcceptedTracksEtaPt, const TH2F *histoMatchedTracksEtaPt) const; // check matching efficiency | |
88 | Bool_t CalibrateAndStore(TH2F *histoVertexTimestamp, TH2F *histoDeltatTimestamp, const Char_t *dbString); // calibrate and store | |
89 | Int_t FitPeak(TF1 *fitFunc, TH1D *h, Float_t startSigma, Float_t nSigmaMin, Float_t nSigmaMax); // fit peak | |
90 | ||
91 | /* flags and cuts */ | |
92 | Bool_t fInitFlag; // init flag | |
93 | Bool_t fEventSelectionFlag; // event selection flag | |
94 | Bool_t fVertexSelectionFlag; // vertex selection flag | |
95 | Double_t fVertexCut; // vertex cut | |
96 | ||
97 | /* ESD analysis */ | |
98 | Int_t fRunNumber; // run number | |
99 | AliESDEvent *fESDEvent; // ESD event | |
100 | AliPhysicsSelection *fEventCuts; // event cuts | |
101 | AliESDtrackCuts *fTrackCuts; // track cuts | |
102 | UInt_t fStartTime; // start time | |
103 | UInt_t fEndTime; // end time | |
104 | UInt_t fEventTime; // event time | |
105 | UInt_t fElapsedTime; // event time since start | |
106 | const AliESDVertex *fkVertex; // vertex | |
107 | ||
108 | /* GRP related stuff */ | |
109 | AliGRPManager *fGRPManager; // GRP manager | |
110 | const AliGRPObject *fkGRPObject; // GRP object | |
111 | ||
112 | /* TOF related stuff */ | |
113 | AliTOFcalib *fTOFcalib; // TOF calib | |
114 | ||
115 | /* lists and histos */ | |
116 | TList *fHistoList; // list of histograms | |
117 | TH2F *fHistoVertexTimestamp; // vertex-timestamp histo | |
118 | TH2F *fHistoDeltatTimestamp; // deltat-timestamp histo | |
119 | TH2F *fHistoDeltazEta; // deltaz-eta histo | |
120 | TH2F *fHistoDeltazCosTheta; // deltaz-costheta histo | |
121 | TH2F *fHistoAcceptedTracksEtaPt; // accepted tracks eta-pt histo | |
122 | TH2F *fHistoMatchedTracksEtaPt; // matched tracks eta-pt histo | |
123 | ||
124 | /* post-processing variables */ | |
125 | static const Int_t fgkMaxNumberOfPoints; // max number of points | |
d501ffec | 126 | static Double_t fgMinVertexIntegral; // min vertex integral |
127 | static Double_t fgMinDeltatIntegral; // min vertex integral | |
128 | static Double_t fgMinVertexIntegralSample; // min vertex integral sample | |
129 | static Double_t fgMinDeltatIntegralSample; // min vertex integral sample | |
3c8efc07 | 130 | |
131 | ||
132 | ClassDef(AliTOFAnalysisTaskCalibPass0, 1); | |
133 | }; | |
134 | ||
135 | #endif /* ALIANALYSISTASKEVENTTIME_H */ |