]>
Commit | Line | Data |
---|---|---|
3b77b2d1 | 1 | #ifndef ALICONVERSIONCUTS_H |
2 | #define ALICONVERSIONCUTS_H | |
3 | ||
4 | // Class handling all kinds of selection cuts for Gamma Conversion analysis | |
5 | // Authors: Svein Lindal, Daniel Lohner * | |
6 | ||
7 | #include "AliAODpidUtil.h" | |
8 | #include "AliConversionPhotonBase.h" | |
9 | #include "AliAODConversionMother.h" | |
10 | #include "AliAODTrack.h" | |
11 | #include "AliESDtrack.h" | |
12 | #include "AliVTrack.h" | |
13 | #include "AliAODTrack.h" | |
14 | #include "AliStack.h" | |
15 | #include "AliAnalysisCuts.h" | |
d008165e | 16 | #include "TH1F.h" |
3b77b2d1 | 17 | |
18 | class AliESDEvent; | |
19 | class AliAODEvent; | |
20 | class AliConversionPhotonBase; | |
21 | class AliKFVertex; | |
22 | class TH1F; | |
23 | class TH2F; | |
24 | class AliPIDResponse; | |
25 | class AliAnalysisCuts; | |
26 | class iostream; | |
27 | class TList; | |
28 | class AliAnalysisManager; | |
29 | ||
30 | ||
31 | using namespace std; | |
32 | ||
33 | class AliConversionCuts : public AliAnalysisCuts { | |
34 | ||
35 | public: | |
36 | ||
37 | ||
38 | enum cutIds { | |
39 | kgoodId=0, | |
40 | kv0FinderType, | |
41 | keProbCut, | |
42 | kededxSigmaCut, | |
43 | kpidedxSigmaCut, | |
44 | kpiMomdedxSigmaCut, | |
45 | kchi2GammaCut, | |
46 | ksinglePtCut, | |
47 | kclsTPCCut, | |
48 | ketaCut, | |
49 | kchi2MesonCut, | |
50 | kLowPRejectionSigmaCut, | |
51 | kQtMaxCut, | |
52 | kpiMaxMomdedxSigmaCut, | |
53 | kalphaMesonCut, | |
54 | kminRCut, | |
55 | kRapidityMesonCut, | |
56 | kBackgroundScheme, | |
57 | kDegreesForRotationMethod, | |
58 | kNumberOfRotations, | |
59 | kremovePileUp, | |
60 | kselectV0AND, | |
61 | kmultiplicityBin, | |
62 | kisHeavyIon, | |
63 | kuseCentrality, | |
64 | kcentralityBin, | |
65 | kTOFelectronPID, | |
66 | kuseMCPSmearing, | |
67 | kdoPhotonAsymmetryCut, | |
68 | kPsiPair, | |
69 | kCosPAngle, | |
70 | // kHBTmultiplicityBin, | |
71 | // kprimaryCutNumber, | |
72 | // kuseBayesPID, | |
73 | // kdalitzelectronsPID, | |
74 | // kpsiCutNumber, | |
75 | // kdalitzBackgroundType, | |
76 | // keleclsTPCCut, | |
77 | kNCuts | |
78 | }; | |
79 | ||
d008165e | 80 | enum photonCuts { |
81 | kPhotonIn=0, | |
82 | kOnFly, | |
83 | kNoTracks, | |
84 | kTrackCuts, | |
85 | kdEdxCuts, | |
86 | kPhotonCuts, | |
87 | kPhotonOut | |
88 | }; | |
89 | ||
90 | ||
3b77b2d1 | 91 | Bool_t SetCutIds(TString cutString); |
92 | Int_t fCuts[kNCuts]; | |
93 | Bool_t SetCut(cutIds cutID, Int_t cut); | |
94 | Bool_t UpdateCutString(cutIds cutID, Int_t value); | |
95 | ||
96 | ||
97 | static const char * fgkCutNames[kNCuts]; | |
98 | ||
99 | Double_t GetPsiPair(const AliESDv0* v0, const AliESDEvent * event) const; | |
100 | Double_t GetCosineOfPointingAngle(const AliConversionPhotonBase * photon, const AliVEvent * event) const; | |
101 | ||
102 | ||
103 | Bool_t InitializeCutsFromCutString(const TString analysisCutSelection); | |
104 | ||
105 | AliConversionCuts(const char *name="V0Cuts", const char * title="V0 Cuts"); | |
106 | virtual ~AliConversionCuts(); //virtual destructor | |
107 | ||
108 | virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;} | |
109 | virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;} | |
110 | ||
111 | TString GetCutNumber(); | |
112 | ||
113 | // Cut Selection | |
114 | Bool_t EventIsSelected(AliVEvent *fInputEvent); | |
d008165e | 115 | Bool_t PhotonIsSelected(AliConversionPhotonBase * photon, AliVEvent * event); |
3b77b2d1 | 116 | Bool_t PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack); |
117 | Bool_t TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack); | |
118 | Bool_t MesonIsSelected(AliAODConversionMother *pi0,Bool_t IsSignal=kTRUE); | |
119 | Bool_t MesonIsSelectedMC(TParticle *fMCMother,AliStack *fMCStack,Bool_t bMCDaughtersInAcceptance=kFALSE); | |
120 | ||
121 | void InitAODpidUtil(Int_t type); | |
122 | static AliConversionCuts * GetStandardCuts2010PbPb(); | |
123 | Bool_t InitPIDResponse(); | |
124 | ||
125 | void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;} | |
126 | AliPIDResponse * GetPIDResponse() { return fPIDResponse;} | |
127 | ||
128 | void PrintCuts(); | |
129 | ||
130 | void InitCutHistograms(); | |
131 | void SetFillCutHistograms(){if(!fHistograms){InitCutHistograms();};} | |
132 | TList *GetCutHistograms(){return fHistograms;} | |
d008165e | 133 | void FillPhotonCutIndex(Int_t photoncut){if(hCutIndex)hCutIndex->Fill(photoncut);} |
3b77b2d1 | 134 | |
135 | AliVTrack * GetTrack(AliVEvent * event, Int_t label) const; | |
136 | ||
137 | ///Cut functions | |
138 | Bool_t SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex); | |
139 | Bool_t SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex); | |
140 | Bool_t AcceptanceCuts(AliConversionPhotonBase *photon); | |
141 | Bool_t AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg); | |
142 | Bool_t dEdxCuts(AliVTrack * track); | |
143 | Bool_t ArmenterosQtCut(AliConversionPhotonBase *photon); | |
144 | Bool_t AsymmetryCut(AliConversionPhotonBase *photon,AliVEvent *event); | |
145 | Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event); | |
146 | Bool_t SelectV0Finder(Bool_t onfly){return onfly&&fUseOnFlyV0Finder;} | |
147 | Bool_t PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event); | |
148 | Bool_t CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event); | |
149 | Bool_t PsiPairCut(const AliConversionPhotonBase * photon, const AliVEvent * event) const; | |
150 | Bool_t CosinePAngleCut(const AliConversionPhotonBase * photon, const AliVEvent * event) const; | |
151 | // Event Cuts | |
152 | Bool_t IsCentralitySelected(AliVEvent *fInputEvent); | |
153 | Double_t GetCentrality(AliVEvent *event); | |
154 | Int_t GetNumberOfContributorsVtx(AliVEvent *event); | |
155 | Bool_t VertexZCut(AliVEvent *fInputEvent); | |
156 | ||
157 | // Set Individual Cuts | |
158 | Bool_t SetRCut(Int_t RCut); | |
159 | Bool_t SetV0Finder(Int_t v0FinderType); | |
160 | Bool_t SetElectronProbCut(Int_t eProbCut); | |
161 | Bool_t SetChi2GammaCut(Int_t chi2GammaCut); | |
162 | Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut); | |
163 | Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut); | |
164 | Bool_t SetSinglePtCut(Int_t singlePtCut); | |
165 | Bool_t SetTPCClusterCut(Int_t clsTPCCut); | |
166 | Bool_t SetEtaCut(Int_t etaCut); | |
167 | Bool_t SetChi2MesonCut(Int_t chi2MesonCut); | |
168 | Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut); | |
169 | Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut); | |
170 | Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut); | |
171 | Bool_t SetQtMaxCut(Int_t QtMaxCut); | |
172 | Bool_t SetAlphaMesonCut(Int_t alphaMesonCut); | |
173 | Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID); | |
174 | Bool_t SetTRDElectronCut(Int_t TRDElectronCut); | |
175 | Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut); | |
176 | Bool_t SetUseCentrality(Int_t useCentrality); | |
177 | Bool_t SetIsHeavyIon(Int_t isHeavyIon); | |
178 | Bool_t SetCentralityBin(Int_t centralityBin); | |
179 | Bool_t SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut); | |
180 | Bool_t SetRemovePileUp(Int_t removePileUp); | |
181 | Bool_t SetBackgroundScheme(Int_t BackgroundScheme); | |
182 | Bool_t SetNDegreesForRotationMethod(Int_t DegreesForRotationMethod); | |
183 | Bool_t SetNumberOfRotations(Int_t NumberOfRotations); | |
184 | Bool_t SetMCPSmearing(Int_t useMCPSmearing); | |
185 | Bool_t SetMultiplicityBin(Int_t multiplicityBin); | |
186 | Bool_t SetSelectV0AND(Int_t selectV0AND); | |
187 | Bool_t SetCosPAngleCut(Int_t cosCut); | |
188 | Bool_t SetPsiPairCut(Int_t psiCut); | |
189 | ||
190 | // Request Flags | |
191 | ||
192 | Bool_t UseRotationMethod(){return fUseRotationMethodInBG;} | |
193 | Int_t NumberOfRotationEvents(){return fnumberOfRotationEventsForBG;} | |
194 | Int_t NDegreesRotation(){return fnDegreeRotationPMForBG;} | |
195 | Bool_t IsHeavyIon(){return fIsHeavyIon;} | |
196 | Bool_t UseTrackMultiplicity(){return fUseTrackMultiplicityForBG;} | |
197 | ||
198 | ||
199 | Int_t GetFirstTPCRow(Double_t radius); | |
200 | ||
201 | ||
202 | protected: | |
203 | TList *fHistograms; | |
204 | AliPIDResponse *fPIDResponse; | |
205 | ||
206 | //cuts | |
207 | Double_t fMaxR; //r cut | |
208 | Double_t fMinR; //r cut | |
209 | Double_t fEtaCut; //eta cut | |
210 | Double_t fEtaCutMin; //eta cut | |
211 | Double_t fPtCut; // pt cut | |
212 | Double_t fSinglePtCut; // pt cut for electron/positron | |
213 | Double_t fMaxZ; //z cut | |
214 | Double_t fMinClsTPC; // minimum clusters in the TPC | |
215 | Double_t fMinClsTPCToF; // minimum clusters to findable clusters | |
216 | Double_t fLineCutZRSlope; //linecut | |
217 | Double_t fLineCutZValue; //linecut | |
218 | Double_t fLineCutZRSlopeMin; //linecut | |
219 | Double_t fLineCutZValueMin; //linecut | |
220 | Double_t fChi2CutConversion; //chi2cut | |
221 | Double_t fChi2CutMeson; //chicut meson | |
222 | Double_t fPIDProbabilityCutNegativeParticle; | |
223 | Double_t fPIDProbabilityCutPositiveParticle; | |
224 | Bool_t fDodEdxSigmaCut; // flag to use the dEdxCut based on sigmas | |
225 | Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF | |
226 | Double_t fPIDTRDEfficiency; // required electron efficiency for TRD PID | |
227 | Bool_t fDoTRDPID; // flag to use TRD pid | |
228 | Double_t fPIDnSigmaAboveElectronLine; // sigma cut | |
229 | Double_t fPIDnSigmaBelowElectronLine; // sigma cut | |
230 | Double_t fTofPIDnSigmaAboveElectronLine; // sigma cut RRnewTOF | |
231 | Double_t fTofPIDnSigmaBelowElectronLine; // sigma cut RRnewTOF | |
232 | Double_t fPIDnSigmaAbovePionLine; // sigma cut | |
233 | Double_t fPIDnSigmaAbovePionLineHighPt; // sigma cut | |
234 | Double_t fPIDMinPnSigmaAbovePionLine; // sigma cut | |
235 | Double_t fPIDMaxPnSigmaAbovePionLine; // sigma cut | |
236 | Double_t fDoKaonRejectionLowP; // Kaon rejection at low p | |
237 | Double_t fDoProtonRejectionLowP; // Proton rejection at low p | |
238 | Double_t fDoPionRejectionLowP; // Pion rejection at low p | |
239 | Double_t fPIDnSigmaAtLowPAroundKaonLine; // sigma cut | |
240 | Double_t fPIDnSigmaAtLowPAroundProtonLine; // sigma cut | |
241 | Double_t fPIDnSigmaAtLowPAroundPionLine; // sigma cut | |
242 | Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection | |
243 | Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection | |
244 | Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection | |
245 | Bool_t fDoQtGammaSelection; // Select gammas using qtMax | |
246 | Bool_t fDoHighPtQtGammaSelection; // RRnew Select gammas using qtMax for high pT | |
247 | Double_t fQtMax; // Maximum Qt from Armenteros to select Gammas | |
248 | Double_t fHighPtQtMax; // RRnew Maximum Qt for High pT from Armenteros to select Gammas | |
249 | Double_t fPtBorderForQt; // RRnew | |
250 | Double_t fXVertexCut; //vertex cut | |
251 | Double_t fYVertexCut; //vertex cut | |
252 | Double_t fZVertexCut; // vertexcut | |
253 | Double_t fNSigmaMass; //nsigma cut | |
254 | Bool_t fUseEtaMinCut; //flag | |
255 | Bool_t fUseOnFlyV0Finder; //flag | |
256 | Bool_t fDoPhotonAsymmetryCut; // flag to use the PhotonAsymetryCut | |
257 | Double_t fMinPPhotonAsymmetryCut; // Min Momentum for Asymmetry Cut | |
258 | Double_t fMinPhotonAsymmetry; // Asymmetry Cut | |
259 | Bool_t fIsHeavyIon; // flag for heavy ion | |
260 | Double_t fMaxVertexZ; // max z offset of vertex | |
d008165e | 261 | Int_t fUseCentrality; // centrality selection |
262 | Int_t fUseCentralityBin; // centrality selection with individual bins | |
3b77b2d1 | 263 | Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info |
264 | Bool_t fUseTOFpid; // flag to use tof pid | |
265 | Double_t fAlphaMinCutMeson; // min value for meson alpha cut | |
266 | Double_t fAlphaCutMeson; // max value for meson alpha cut | |
267 | Double_t fRapidityCutMeson; // max value for meson rapidity | |
268 | Bool_t fUseRotationMethodInBG; // flag to apply rotation method for meson bg estimation | |
269 | Bool_t fdoBGProbability; // flag to use probability method for meson bg estimation | |
270 | Bool_t fUseTrackMultiplicityForBG; // flag to use track multiplicity for meson bg estimation (else V0 mult) | |
271 | Int_t fnDegreeRotationPMForBG; // | |
272 | Int_t fnumberOfRotationEventsForBG; // | |
273 | Bool_t fUseMCPSmearing; // flag | |
274 | Double_t fPBremSmearing;// | |
275 | Double_t fPSigSmearing; // | |
276 | Double_t fPSigSmearingCte; // | |
277 | Bool_t fUseMultiplicity; // flag | |
278 | Int_t fUseMultiplicityBin; // selected multiplicity bin | |
279 | Bool_t fSelectV0AND; // flag | |
280 | Bool_t fRemovePileUp; //flag | |
281 | Float_t fOpeningAngle; // min opening angle for meson | |
282 | Float_t fPsiPairCut; | |
283 | Float_t fCosPAngleCut; | |
284 | ||
285 | // Histograms | |
286 | TObjString *fCutString; // cut number used for analysis | |
287 | TH1F *hdEdxCuts; // bookkeeping for dEdx cuts | |
288 | TH2F *hTPCdEdxbefore; // TPC dEdx before cuts | |
289 | TH2F *hTPCdEdxafter; // TPC dEdx after cuts | |
290 | TH1F *hTrackCuts; // bookkeeping for track cuts | |
291 | TH1F *hPhotonCuts; // bookkeeping for photon specific cuts | |
292 | TH1F *hInvMassbefore; // e+e- inv mass distribution before cuts | |
293 | TH2F *hArmenterosbefore; // armenteros podolanski plot before cuts | |
294 | TH1F *hInvMassafter; // e+e- inv mass distribution after cuts | |
295 | TH2F *hArmenterosafter; // armenteros podolanski plot after cuts | |
296 | TH1F *hAcceptanceCuts; // bookkeeping for acceptance cuts | |
297 | TH1F *hCutIndex; // bookkeeping for cuts | |
298 | TH1F *hV0EventCuts; // bookkeeping for event selection cuts | |
299 | TH1F *hCentrality; // centrality distribution for selected events | |
300 | TH1F *hVertexZ; // vertex z distribution for selected events | |
301 | TH1F *hMesonCuts; // bookkeeping for meson cuts | |
302 | TH1F *hMesonBGCuts; // bookkeeping for meson bg cuts | |
303 | ||
304 | ||
305 | private: | |
306 | ||
307 | AliConversionCuts(const AliConversionCuts&); // not implemented | |
308 | AliConversionCuts& operator=(const AliConversionCuts&); // not implemented | |
309 | ||
310 | ||
311 | ClassDef(AliConversionCuts,2) | |
312 | }; | |
313 | ||
314 | ||
315 | inline void AliConversionCuts::InitAODpidUtil(Int_t type) { | |
316 | if (!fPIDResponse) fPIDResponse = new AliAODpidUtil(); | |
317 | Double_t alephParameters[5]; | |
318 | // simulation | |
319 | alephParameters[0] = 2.15898e+00/50.; | |
320 | alephParameters[1] = 1.75295e+01; | |
321 | alephParameters[2] = 3.40030e-09; | |
322 | alephParameters[3] = 1.96178e+00; | |
323 | alephParameters[4] = 3.91720e+00; | |
324 | fPIDResponse->GetTOFResponse().SetTimeResolution(80.); | |
325 | ||
326 | // data | |
327 | if (type==1){ | |
328 | alephParameters[0] = 0.0283086/0.97; | |
329 | alephParameters[1] = 2.63394e+01; | |
330 | alephParameters[2] = 5.04114e-11; | |
331 | alephParameters[3] = 2.12543e+00; | |
332 | alephParameters[4] = 4.88663e+00; | |
333 | fPIDResponse->GetTOFResponse().SetTimeResolution(130.); | |
334 | fPIDResponse->GetTPCResponse().SetMip(50.); | |
335 | } | |
336 | ||
337 | fPIDResponse->GetTPCResponse().SetBetheBlochParameters( | |
338 | alephParameters[0],alephParameters[1],alephParameters[2], | |
339 | alephParameters[3],alephParameters[4]); | |
340 | ||
341 | fPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04); | |
342 | } | |
343 | ||
344 | ||
345 | #endif |