]>
Commit | Line | Data |
---|---|---|
59e49925 | 1 | #ifndef ALIANALYSISEVENT_H |
2 | #define ALIANALYSISEVENT_H | |
3 | ||
4 | #include "TObject.h" | |
5 | #include "AliTOFPIDResponse.h" | |
6 | #include "TF1.h" | |
7 | ||
8 | class AliAnalysisEvent : | |
9 | public TObject | |
10 | { | |
11 | ||
12 | public: | |
13 | ||
14 | AliAnalysisEvent(); // default constructor | |
15 | AliAnalysisEvent(const AliAnalysisEvent &source); // copy constructor | |
16 | AliAnalysisEvent &operator=(const AliAnalysisEvent &source); // operator= | |
17 | virtual ~AliAnalysisEvent(); // default destructor | |
18 | ||
19 | Bool_t IsCollisionCandidate() const {return fIsCollisionCandidate;}; // getter | |
20 | Bool_t HasVertex() const {return fHasVertex;}; // getter | |
21 | Float_t GetVertexZ() const {return fVertexZ;}; // getter | |
22 | UChar_t GetCentralityQuality() const {return fCentralityQuality;}; // getter | |
23 | Float_t GetCentralityPercentile(Int_t i) const {return i < kNCentralityEstimators ? fCentralityPercentile[i] : (Float_t)GetReferenceMultiplicity();}; // getter | |
24 | Int_t GetReferenceMultiplicity() const {return fReferenceMultiplicity;}; // getter | |
25 | Float_t *GetTimeZeroTOF() {return fTimeZeroTOF;}; // getter | |
26 | Float_t *GetTimeZeroTOFSigma() {return fTimeZeroTOFSigma;}; // getter | |
27 | Float_t *GetTimeZeroT0() {return fTimeZeroT0;}; // getter | |
28 | Float_t GetTimeZeroTOF(Int_t i) {return i < 10 ? fTimeZeroTOF[i] : 0.;}; // getter | |
29 | Float_t GetTimeZeroTOFSigma(Int_t i) {return i < 10 ? fTimeZeroTOFSigma[i] : 0.;}; // getter | |
30 | Float_t GetTimeZeroT0(Int_t i) {return i < 3 ? fTimeZeroT0[i] : 0.;}; // getter | |
31 | Float_t GetMCTimeZero() const {return fMCTimeZero;}; // getter | |
32 | ||
33 | void SetIsCollisionCandidate(Bool_t value) {fIsCollisionCandidate = value;}; // setter | |
34 | void SetIsEventSelected(UInt_t value) {fIsEventSelected = value;}; // setter | |
35 | void SetIsPileupFromSPD(Bool_t value) {fIsPileupFromSPD = value;}; // setter | |
36 | void SetHasVertex(Bool_t value) {fHasVertex = value;}; // setter | |
37 | void SetVertexZ(Float_t value) {fVertexZ = value;}; // setter | |
38 | void SetCentralityQuality(UChar_t value) {fCentralityQuality = value;}; // setter | |
39 | void SetCentralityPercentile(Int_t icent, Float_t value) {if (icent < kNCentralityEstimators) fCentralityPercentile[icent] = value;}; // setter | |
40 | void SetReferenceMultiplicity(Int_t value) {fReferenceMultiplicity = value;}; // setter | |
41 | void SetMCMultiplicity(Int_t value) {fMCMultiplicity = value;}; // setter | |
42 | void SetTimeZeroTOF(Int_t i, Float_t value) {fTimeZeroTOF[i] = value;}; // setter | |
43 | void SetTimeZeroTOFSigma(Int_t i, Float_t value) {fTimeZeroTOFSigma[i] = value;}; // setter | |
44 | void SetTimeZeroT0(Int_t i, Float_t value) {fTimeZeroT0[i] = value;}; // setter | |
45 | void SetMCTimeZero(Float_t value) {fMCTimeZero = value;}; // setter | |
46 | ||
47 | void Reset(); // reset | |
48 | Bool_t CheckLimits(Float_t value, Float_t *params, Float_t nSigma = 3.) const; // check limits | |
49 | ||
50 | Bool_t AcceptEvent(Int_t type = 0) const; // accept event proton-proton | |
51 | Bool_t AcceptVertex() const; // accept vertex | |
52 | Bool_t HasTimeZeroT0_AND() const; // has time-zero T0-AND | |
53 | Bool_t HasTimeZeroT0_XOR() const; // has time-zero T0-XOR | |
54 | Bool_t HasTimeZeroT0_OR() const; // has time-zero T0-OR | |
55 | Bool_t HasTimeZeroTOF(Float_t momentum) const; // has time-zero TOF | |
56 | Bool_t HasTimeZeroBest(Float_t momentum) const; // has time-zero TOF | |
57 | Bool_t HasTimeZeroSafe(Float_t momentum) const; // has time-zero safe | |
58 | ||
59 | Float_t GetTimeZeroT0_AND() const; // get time-zero T0-AND | |
60 | Float_t GetTimeZeroT0_XOR() const; // get time-zero T0-XOR | |
61 | Float_t GetTimeZeroT0_OR() const; // get time-zero T0-OR | |
62 | Float_t GetTimeZeroTOF(Float_t momentum) const; // get time-zero TOF | |
63 | Float_t GetTimeZeroBest(Float_t momentum) const; // get time-zero best | |
64 | Float_t GetTimeZeroSafe(Float_t momentum) const; // get time-zero safe | |
65 | ||
66 | Float_t GetTimeZeroT0Sigma_AND() const; // get time-zero T0-AND sigma | |
67 | Float_t GetTimeZeroT0Sigma_XOR() const; // get time-zero T0-XOR sigma | |
68 | Float_t GetTimeZeroT0Sigma_OR() const; // get time-zero T0-OR sigma | |
69 | Float_t GetTimeZeroTOFSigma(Float_t momentum) const; // get time-zero TOF sigma | |
70 | Float_t GetTimeZeroBestSigma(Float_t momentum) const; // get time-zero best sigma | |
71 | Float_t GetTimeZeroSafeSigma(Float_t momentum) const; // get time-zero safe sigma | |
72 | ||
73 | enum ECentralityEstimator_t { | |
74 | kCentEst_V0M, /* V0 multiplicity */ | |
75 | kCentEst_V0A, /* V0A multiplicity */ | |
76 | kCentEst_V0C, /* V0C multiplicity */ | |
77 | kCentEst_TRK, /* N. of tracks */ | |
78 | kCentEst_TKL, /* N. of tracklets */ | |
79 | kCentEst_CL1, /* N. of clusters in layer 1 */ | |
80 | kCentEst_ZNA, /* ZNA */ | |
81 | kNCentralityEstimators | |
82 | }; | |
83 | static const Char_t *fgkCentralityEstimatorName[kNCentralityEstimators]; // centrality estimator name | |
84 | ||
85 | static void SetVertexZCuts(Float_t min, Float_t max) {fgVertexZ_cuts[0] = min; fgVertexZ_cuts[1] = max;}; // setter | |
86 | ||
87 | void ApplyTimeZeroTOFCorrection(); | |
88 | Double_t GetTimeZeroTOFCorrection() {return fgTimeZeroTOFCentCorrFunc->Eval(fCentralityPercentile[kCentEst_V0M]);}; | |
89 | ||
90 | private: | |
91 | ||
92 | /*** global event info ***/ | |
93 | Bool_t fIsCollisionCandidate; // is collision candidate | |
94 | UInt_t fIsEventSelected; // is event selected | |
95 | Bool_t fIsPileupFromSPD; // is pile-up from SPD | |
96 | Bool_t fHasVertex; // has vertex | |
97 | Float_t fVertexZ; // vertex z | |
98 | UChar_t fCentralityQuality; // centrality quality | |
99 | Float_t fCentralityPercentile[kNCentralityEstimators]; // centrality percentile | |
100 | Int_t fReferenceMultiplicity; // reference multiplicity | |
101 | Int_t fMCMultiplicity; // MC multiplicity | |
102 | /*** TPC event info ***/ | |
103 | /*** TOF event info ***/ | |
104 | Float_t fTimeZeroTOF[10]; // time-zero TOF | |
105 | Float_t fTimeZeroTOFSigma[10]; // time-zero TOF sigma | |
106 | /*** T0 event info ***/ | |
107 | Float_t fTimeZeroT0[3]; // time-zero T0 | |
108 | /*** MC info ***/ | |
109 | Float_t fMCTimeZero; // MC time-zero | |
110 | ||
111 | /*** tools ***/ | |
112 | static AliTOFPIDResponse fgTOFResponse; // TOF PID response | |
113 | ||
114 | /*** cuts ***/ | |
115 | static Float_t fgVertexZ_cuts[2]; // min,max | |
116 | static Float_t fgTimeZeroT0_AND_params[2]; // mean,sigma | |
117 | static Float_t fgTimeZeroT0_A_params[2]; | |
118 | static Float_t fgTimeZeroT0_C_params[2]; | |
119 | static Float_t fgTimeZeroT0_ACdiff_params[2]; | |
120 | static Float_t fgTimeZero_TOFT0diff_params[2]; | |
121 | ||
122 | /*** other ***/ | |
123 | static Float_t fgTimeZeroSpread; | |
124 | static Float_t fgTimeZeroT0_AND_sigma; | |
125 | static Float_t fgTimeZeroT0_A_sigma; | |
126 | static Float_t fgTimeZeroT0_C_sigma; | |
127 | ||
128 | /*** corrections ***/ | |
129 | static Bool_t fgInitCorrections; | |
130 | static const Char_t *fgTimeZeroTOFCentCorrFormula; | |
131 | static Double_t fgTimeZeroTOFCentCorrParams[3]; | |
132 | static TF1 *fgTimeZeroTOFCentCorrFunc; | |
133 | ||
134 | ClassDef(AliAnalysisEvent, 6); | |
135 | }; | |
136 | ||
137 | #endif /* ALIANALYSISEVENT_H */ |