]>
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 | |
d501ffec | 54 | |
55 | /* static setters */ | |
56 | static void SetMinVertexIntegral(Double_t value) {fgMinVertexIntegral = value;}; // setter | |
57 | static void SetMinDeltatIntegal(Double_t value) {fgMinDeltatIntegral = value;}; // setter | |
58 | static void SetMinVertexIntegralSample (Double_t value) {fgMinVertexIntegralSample = value;}; // setter | |
59 | static void SetMinDeltatIntegralSample (Double_t value) {fgMinDeltatIntegralSample = value;}; // setter | |
3c8efc07 | 60 | |
61 | protected: | |
62 | ||
63 | AliTOFAnalysisTaskCalibPass0(const AliTOFAnalysisTaskCalibPass0 &); // copy constructor | |
64 | AliTOFAnalysisTaskCalibPass0 &operator=(const AliTOFAnalysisTaskCalibPass0 &); // operator= | |
65 | ||
07901ecf | 66 | /* status codes */ |
67 | enum EStatusCode_t { | |
68 | kOk, | |
69 | kInputError, /* open file error, missing histos */ | |
70 | kDataError, /* problems with histo information */ | |
71 | kNotActive, /* not active in data taking and/or reconstruction */ | |
72 | kLowStatistics, /* too low statistics */ | |
73 | kNoMeasurement, /* no measurement performed */ | |
74 | kStoreError, /* problems storing OCDB */ | |
75 | kNStatusCodes | |
76 | }; | |
77 | Int_t fStatus; /* status code */ | |
78 | static const Char_t *fgkStatusCodeName[kNStatusCodes]; | |
79 | ||
3c8efc07 | 80 | /* methods */ |
81 | Bool_t InitRun(); // init run | |
82 | Bool_t InitEvent(); // init event | |
83 | Bool_t HasTOFMeasurement(const AliESDtrack *track) const ; // has TOF measurement | |
84 | ||
85 | /* post-processing methods */ | |
86 | Bool_t CheckMatchingPerformance(const TH2F *histoDeltazEta, const TH2F *histoAcceptedTracksEtaPt, const TH2F *histoMatchedTracksEtaPt) const; // check matching efficiency | |
87 | Bool_t CalibrateAndStore(TH2F *histoVertexTimestamp, TH2F *histoDeltatTimestamp, const Char_t *dbString); // calibrate and store | |
88 | Int_t FitPeak(TF1 *fitFunc, TH1D *h, Float_t startSigma, Float_t nSigmaMin, Float_t nSigmaMax); // fit peak | |
89 | ||
90 | /* flags and cuts */ | |
91 | Bool_t fInitFlag; // init flag | |
92 | Bool_t fEventSelectionFlag; // event selection flag | |
93 | Bool_t fVertexSelectionFlag; // vertex selection flag | |
94 | Double_t fVertexCut; // vertex cut | |
95 | ||
96 | /* ESD analysis */ | |
97 | Int_t fRunNumber; // run number | |
98 | AliESDEvent *fESDEvent; // ESD event | |
99 | AliPhysicsSelection *fEventCuts; // event cuts | |
100 | AliESDtrackCuts *fTrackCuts; // track cuts | |
101 | UInt_t fStartTime; // start time | |
102 | UInt_t fEndTime; // end time | |
103 | UInt_t fEventTime; // event time | |
104 | UInt_t fElapsedTime; // event time since start | |
105 | const AliESDVertex *fkVertex; // vertex | |
106 | ||
107 | /* GRP related stuff */ | |
108 | AliGRPManager *fGRPManager; // GRP manager | |
109 | const AliGRPObject *fkGRPObject; // GRP object | |
110 | ||
111 | /* TOF related stuff */ | |
112 | AliTOFcalib *fTOFcalib; // TOF calib | |
113 | ||
114 | /* lists and histos */ | |
115 | TList *fHistoList; // list of histograms | |
116 | TH2F *fHistoVertexTimestamp; // vertex-timestamp histo | |
117 | TH2F *fHistoDeltatTimestamp; // deltat-timestamp histo | |
118 | TH2F *fHistoDeltazEta; // deltaz-eta histo | |
119 | TH2F *fHistoDeltazCosTheta; // deltaz-costheta histo | |
120 | TH2F *fHistoAcceptedTracksEtaPt; // accepted tracks eta-pt histo | |
121 | TH2F *fHistoMatchedTracksEtaPt; // matched tracks eta-pt histo | |
122 | ||
123 | /* post-processing variables */ | |
124 | static const Int_t fgkMaxNumberOfPoints; // max number of points | |
d501ffec | 125 | static Double_t fgMinVertexIntegral; // min vertex integral |
126 | static Double_t fgMinDeltatIntegral; // min vertex integral | |
127 | static Double_t fgMinVertexIntegralSample; // min vertex integral sample | |
128 | static Double_t fgMinDeltatIntegralSample; // min vertex integral sample | |
3c8efc07 | 129 | |
130 | ||
131 | ClassDef(AliTOFAnalysisTaskCalibPass0, 1); | |
132 | }; | |
133 | ||
134 | #endif /* ALIANALYSISTASKEVENTTIME_H */ |