]>
Commit | Line | Data |
---|---|---|
c88234ad | 1 | #ifndef ALISPECTRAAODEVENTCUTS_H |
2 | #define ALISPECTRAAODEVENTCUTS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // AliSpectraAODEventCuts | |
8 | // | |
9 | // | |
10 | // | |
11 | // | |
12 | // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU | |
13 | //------------------------------------------------------------------------- | |
14 | ||
15 | class AliAODEvent; | |
f6a38178 | 16 | class AliSpectraAODTrackCuts; |
93db93de | 17 | class TProfile; |
c88234ad | 18 | |
19 | #include "TNamed.h" | |
93db93de | 20 | #include "TFile.h" |
21 | #include "TKey.h" | |
22 | #include "AliOADBContainer.h" | |
31579941 | 23 | #include "AliVEvent.h" |
c88234ad | 24 | |
25 | class AliSpectraAODEventCuts : public TNamed | |
26 | { | |
f6a38178 | 27 | public: |
decf69d9 | 28 | enum { kProcessedEvents = 0,kPhysSelEvents,kAcceptedEvents, kVtxRange, kVtxCentral, kVtxNoEvent, kQVector, kNVtxCuts}; |
c88234ad | 29 | |
f6a38178 | 30 | // Constructors |
93db93de | 31 | AliSpectraAODEventCuts() : |
32 | TNamed(), | |
33 | fAOD(0), | |
34 | fSelectBit(AliVEvent::kMB), | |
35 | fCentralityMethod(), | |
36 | fTrackBits(1), | |
37 | fIsMC(0), | |
48c4d28e | 38 | fIsLHC10h(0), |
93db93de | 39 | fTrackCuts(0), |
40 | fIsSelected(0), | |
41 | fCentralityCutMin(0.), | |
42 | fCentralityCutMax(999), | |
43 | fQVectorCutMin(-999.), | |
44 | fQVectorCutMax(999.), | |
a162b3e2 | 45 | fVertexCutMin(-10.), |
46 | fVertexCutMax(10.), | |
93db93de | 47 | fMultiplicityCutMin(-999.), |
48 | fMultiplicityCutMax(99999.), | |
48c4d28e | 49 | fqV0C(-999.), |
50 | fqV0A(-999.), | |
4fd2f0ad LM |
51 | fqV0Cx(-999.), |
52 | fqV0Ax(-999.), | |
53 | fqV0Cy(-999.), | |
54 | fqV0Ay(-999.), | |
fdbff5a1 | 55 | fPsiV0C(-999.), |
56 | fPsiV0A(-999.), | |
48c4d28e | 57 | fCent(-999.), |
93db93de | 58 | fOutput(0), |
59 | fCalib(0), | |
60 | fRun(-1), | |
61 | fMultV0(0), | |
62 | fV0Cpol1(-1), | |
63 | fV0Cpol2(-1), | |
64 | fV0Cpol3(-1), | |
65 | fV0Cpol4(-1), | |
66 | fV0Apol1(-1), | |
67 | fV0Apol2(-1), | |
68 | fV0Apol3(-1), | |
350fc4a5 | 69 | fV0Apol4(-1), |
70 | fQvecIntList(0), | |
71 | fQvecIntegral(0), | |
72 | fSplineArrayV0A(0), | |
73 | fSplineArrayV0C(0) | |
98d5a286 | 74 | { |
75 | for (Int_t i = 0; i<10; i++){ | |
76 | fMeanQxa2[i] = -1; | |
77 | fMeanQya2[i] = -1; | |
78 | fMeanQxc2[i] = -1; | |
79 | fMeanQyc2[i] = -1; | |
80 | } | |
81 | } | |
f6a38178 | 82 | AliSpectraAODEventCuts(const char *name); |
83 | virtual ~AliSpectraAODEventCuts() {} | |
972a21ad | 84 | |
93db93de | 85 | void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; } |
86 | void SetCentralityMethod(const char* method) { fCentralityMethod = method; } | |
87 | void SetTrackBits(UInt_t TrackBits) {fTrackBits=TrackBits;} | |
88 | void SetIsMC(Bool_t isMC = kFALSE) {fIsMC = isMC; }; | |
48c4d28e | 89 | void SetIsLHC10h(Bool_t isLHC10h = kFALSE) {fIsLHC10h = isLHC10h; }; |
93db93de | 90 | void SetCentralityCutMin(Float_t cut) { fCentralityCutMin = cut; } |
91 | void SetCentralityCutMax(Float_t cut) { fCentralityCutMax = cut; } | |
92 | void SetQVectorCut(Float_t min,Float_t max) { fQVectorCutMin = min; fQVectorCutMax = max; } | |
93 | void SetVertexCut(Float_t min,Float_t max) { fVertexCutMin = min; fVertexCutMax = max; } | |
94 | void SetMultiplicityCut(Float_t min,Float_t max) { fMultiplicityCutMin = min; fMultiplicityCutMax = max; } | |
972a21ad | 95 | |
93db93de | 96 | UInt_t GetEventSelectionBit() const { return fSelectBit;} |
97 | TString GetCentralityMethod() const { return fCentralityMethod;} | |
98 | UInt_t GetTrackType() const { return fTrackBits;} | |
99 | Bool_t GetIsMC() const { return fIsMC;} | |
48c4d28e | 100 | Bool_t GetIsLHC10h() const { return fIsLHC10h;} |
93db93de | 101 | Float_t GetCentralityMin() const { return fCentralityCutMin; } |
102 | Float_t GetCentralityMax() const { return fCentralityCutMax; } | |
103 | Float_t GetQVectorCutMin() const { return fQVectorCutMin; } | |
104 | Float_t GetQVectorCutMax() const { return fQVectorCutMax; } | |
105 | Float_t GetVertexCutMin() const { return fVertexCutMin; } | |
106 | Float_t GetVertexCutMax() const { return fVertexCutMax; } | |
107 | Float_t GetMultiplicityCutMin() const { return fMultiplicityCutMin; } | |
108 | Float_t GetMultiplicityCutMax() const { return fMultiplicityCutMax; } | |
48c4d28e | 109 | Double_t GetqV0C() const { return fqV0C; } |
110 | Double_t GetqV0A() const { return fqV0A; } | |
4fd2f0ad LM |
111 | Double_t GetqV0Cx() const { return fqV0Cx; } |
112 | Double_t GetqV0Ax() const { return fqV0Ax; } | |
113 | Double_t GetqV0Cy() const { return fqV0Cy; } | |
114 | Double_t GetqV0Ay() const { return fqV0Ay; } | |
115 | Double_t GetPsiV0C() const { return fPsiV0C; } | |
116 | Double_t GetPsiV0A() const { return fPsiV0A; } | |
48c4d28e | 117 | Double_t GetCent() const { return fCent; } |
93db93de | 118 | TList *GetOutputList() {return fOutput;}; |
119 | TList *GetCalibList() {return fCalib;}; | |
120 | void SetCalibFile(TFile *f) { | |
121 | TIter next(f->GetListOfKeys()); | |
122 | TKey *key; | |
123 | while ((key = (TKey*)next())) { | |
124 | AliOADBContainer * obj=(AliOADBContainer*)key->ReadObj(); | |
125 | fCalib->Add(obj); | |
126 | } | |
127 | }; | |
936e2842 | 128 | |
350fc4a5 | 129 | void SetQvecIntegralFile(TFile *f) { |
130 | TIter next(f->GetListOfKeys()); | |
131 | TKey *key; | |
132 | while ((key = (TKey*)next())) { | |
133 | TH2F * h=(TH2F*)key->ReadObj(); | |
134 | fQvecIntList->Add(h); | |
135 | } | |
136 | }; | |
137 | ||
f6a38178 | 138 | // Methods |
139 | Bool_t IsSelected(AliAODEvent * aod,AliSpectraAODTrackCuts *trackcuts); | |
140 | Bool_t CheckVtxRange(); | |
141 | Bool_t CheckCentralityCut(); | |
10a8ccbe | 142 | Bool_t CheckMultiplicityCut(); |
decf69d9 | 143 | Bool_t CheckQVectorCut(); |
93db93de | 144 | Double_t CalculateQVectorLHC10h(); |
f6a38178 | 145 | void PrintCuts(); |
93db93de | 146 | Bool_t OpenInfoCalbration(Int_t run); |
147 | Short_t GetCentrCode(AliVEvent* ev); | |
148 | ||
149 | Float_t NumberOfEvents() { return ((TH1I*)fOutput->FindObject("fHistoCuts"))->GetBinContent(kAcceptedEvents+1); } | |
150 | Float_t NumberOfProcessedEvents() { return ((TH1I*)fOutput->FindObject("fHistoCuts"))->GetBinContent(kProcessedEvents+1); } | |
151 | Float_t NumberOfPhysSelEvents() { return ((TH1I*)fOutput->FindObject("fHistoCuts"))->GetBinContent(kPhysSelEvents+1); } | |
c88234ad | 152 | |
153 | Long64_t Merge(TCollection* list); | |
350fc4a5 | 154 | |
155 | Double_t GetQvecPercentile(Int_t v0side); | |
156 | Bool_t CheckSplineArray(TObjArray * splarr); | |
157 | TObjArray *GetSplineArrayV0A() { return fSplineArrayV0A; } | |
158 | TObjArray *GetSplineArrayV0C() { return fSplineArrayV0C; } | |
c88234ad | 159 | |
f6a38178 | 160 | private: |
161 | ||
162 | AliAODEvent *fAOD; //! AOD event | |
93db93de | 163 | UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps |
164 | TString fCentralityMethod; // Method to determine centrality | |
829b5a81 | 165 | UInt_t fTrackBits; // Type of track to be used in the Qvector calculation |
48c4d28e | 166 | Bool_t fIsMC; // true if processing MC |
167 | Bool_t fIsLHC10h; // for LHC10h | |
f6a38178 | 168 | AliSpectraAODTrackCuts *fTrackCuts; //! track cuts |
169 | Bool_t fIsSelected; // True if cuts are selected | |
170 | Float_t fCentralityCutMin; // minimum centrality percentile | |
c88234ad | 171 | Float_t fCentralityCutMax; // maximum centrality percentile |
16ee3540 | 172 | Float_t fQVectorCutMin; // minimum qvecPos |
173 | Float_t fQVectorCutMax; // maximum qvecPos | |
10a8ccbe | 174 | Float_t fVertexCutMin; // minimum vertex position |
175 | Float_t fVertexCutMax; // maximum vertex position | |
176 | Float_t fMultiplicityCutMin; // minimum multiplicity position | |
177 | Float_t fMultiplicityCutMax; // maximum multiplicity position | |
48c4d28e | 178 | Double_t fqV0C; //q vector in the VZERO-C |
179 | Double_t fqV0A; //q vector in the VZERO-A | |
4fd2f0ad LM |
180 | Double_t fqV0Cx; //q vector in the VZERO-C, x-comp |
181 | Double_t fqV0Ax; //q vector in the VZERO-A, x-comp | |
182 | Double_t fqV0Cy; //q vector in the VZERO-C, y-comp | |
183 | Double_t fqV0Ay; //q vector in the VZERO-A, y-comp | |
184 | Double_t fPsiV0C; //EP from VZERO-C | |
185 | Double_t fPsiV0A; //EP from VZERO-A | |
48c4d28e | 186 | Double_t fCent; //centrality according to fCentralityMethod |
93db93de | 187 | TList *fOutput; // output list |
188 | TList *fCalib; // output list | |
189 | Int_t fRun; // run number - for calibration | |
190 | TProfile* fMultV0; //! profile from V0 multiplicity | |
191 | Float_t fV0Cpol1; // mean V0C multiplicity - from fit profile - ring 1 | |
192 | Float_t fV0Cpol2; // mean V0C multiplicity - from fit profile - ring 2 | |
193 | Float_t fV0Cpol3; // mean V0C multiplicity - from fit profile - ring 3 | |
194 | Float_t fV0Cpol4; // mean V0C multiplicity - from fit profile - ring 4 | |
195 | Float_t fV0Apol1; // mean V0A multiplicity - from fit profile - ring 1 | |
196 | Float_t fV0Apol2; // mean V0A multiplicity - from fit profile - ring 2 | |
197 | Float_t fV0Apol3; // mean V0A multiplicity - from fit profile - ring 3 | |
198 | Float_t fV0Apol4; // mean V0A multiplicity - from fit profile - ring 4 | |
199 | Float_t fMeanQxa2[10]; // mean Qxa values for centr - recentering | |
200 | Float_t fMeanQya2[10]; // mean Qya values for centr - recentering | |
201 | Float_t fMeanQxc2[10]; // mean Qxc values for centr - recentering | |
202 | Float_t fMeanQyc2[10]; // mean Qyc values for centr - recentering | |
203 | ||
350fc4a5 | 204 | TList *fQvecIntList; // List with Qvec Integrated vs centrality distribution |
205 | TH2D * fQvecIntegral; // ! Integrated Qvec distribution | |
206 | TObjArray * fSplineArrayV0A; // TSpline array for VZERO-A | |
207 | TObjArray * fSplineArrayV0C; // TSpline array for VZERO-C | |
208 | ||
f6a38178 | 209 | AliSpectraAODEventCuts(const AliSpectraAODEventCuts&); |
210 | AliSpectraAODEventCuts& operator=(const AliSpectraAODEventCuts&); | |
211 | ||
350fc4a5 | 212 | ClassDef(AliSpectraAODEventCuts, 6); |
f6a38178 | 213 | |
c88234ad | 214 | }; |
215 | #endif | |
216 |