1 #ifndef ALICONVERSIONCUTS_H
2 #define ALICONVERSIONCUTS_H
4 // Class handling all kinds of selection cuts for Gamma Conversion analysis
5 // Authors: Svein Lindal, Daniel Lohner *
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"
15 #include "AliAnalysisCuts.h"
20 class AliConversionPhotonBase;
25 class AliAnalysisCuts;
28 class AliAnalysisManager;
33 class AliConversionCuts : public AliAnalysisCuts {
50 kLowPRejectionSigmaCut,
52 kpiMaxMomdedxSigmaCut,
57 kDegreesForRotationMethod,
67 kdoPhotonAsymmetryCut,
72 // kHBTmultiplicityBin,
75 // kdalitzelectronsPID,
77 // kdalitzBackgroundType,
94 Bool_t SetCutIds(TString cutString);
96 Bool_t SetCut(cutIds cutID, Int_t cut);
97 Bool_t UpdateCutString(cutIds cutID, Int_t value);
100 static const char * fgkCutNames[kNCuts];
102 Double_t GetCosineOfPointingAngle(const AliConversionPhotonBase * photon, AliVEvent * event) const;
105 Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
106 void SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB) {fOfflineTriggerMask = offlineTriggerMask;}
107 void FillElectonLabelArray(AliAODConversionPhoton* photon, Int_t nV0);
109 Int_t GetEventQuality(){return fEventQuality;}
111 AliConversionCuts(const char *name="V0Cuts", const char * title="V0 Cuts");
112 virtual ~AliConversionCuts(); //virtual destructor
114 virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
115 virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
117 TString GetCutNumber();
119 void GetCentralityRange(Double_t range[2]){range[0]=10*fCentralityMin;range[1]=10*fCentralityMax;};
122 Bool_t EventIsSelected(AliVEvent *fInputEvent, AliVEvent *fMCEvent);
123 Bool_t PhotonIsSelected(AliConversionPhotonBase * photon, AliVEvent * event);
124 Bool_t PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma=kTRUE);
125 Bool_t ElectronIsSelectedMC(TParticle *particle,AliStack *fMCStack);
126 Bool_t TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack);
127 Bool_t MesonIsSelected(AliAODConversionMother *pi0,Bool_t IsSignal=kTRUE);
128 Bool_t MesonIsSelectedMC(TParticle *fMCMother,AliStack *fMCStack, Bool_t bMCDaughtersInAcceptance=kFALSE);
130 void InitAODpidUtil(Int_t type);
131 Bool_t InitPIDResponse();
133 void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
134 AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
138 void InitCutHistograms(TString name="",Bool_t preCut = kTRUE);
139 void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE){if(!fHistograms){InitCutHistograms(name,preCut);};}
140 TList *GetCutHistograms(){return fHistograms;}
141 void FillPhotonCutIndex(Int_t photoncut){if(hCutIndex)hCutIndex->Fill(photoncut);}
143 static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
145 void SmearParticle(AliAODConversionPhoton * photon);
148 Bool_t SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex);
149 Bool_t SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex);
150 Bool_t AcceptanceCuts(AliConversionPhotonBase *photon);
151 Bool_t AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg);
152 Bool_t dEdxCuts(AliVTrack * track);
153 Bool_t ArmenterosQtCut(AliConversionPhotonBase *photon);
154 Bool_t AsymmetryCut(AliConversionPhotonBase *photon,AliVEvent *event);
155 Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event);
156 Bool_t SelectV0Finder(Bool_t onfly){
157 if(onfly == fUseOnFlyV0Finder) return kTRUE;
160 Bool_t PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event);
161 Bool_t CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event);
162 Bool_t PsiPairCut(const AliConversionPhotonBase * photon) const;
163 Bool_t CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const;
164 Bool_t RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s);
165 Bool_t RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0);
167 Bool_t IsCentralitySelected(AliVEvent *fInputEvent);
168 Double_t GetCentrality(AliVEvent *event);
169 Int_t GetNumberOfContributorsVtx(AliVEvent *event);
170 Bool_t VertexZCut(AliVEvent *fInputEvent);
171 Bool_t IsTriggerSelected();
173 // Set Individual Cuts
174 Bool_t SetRCut(Int_t RCut);
175 Bool_t SetV0Finder(Int_t v0FinderType);
176 Bool_t SetElectronProbCut(Int_t eProbCut);
177 Bool_t SetChi2GammaCut(Int_t chi2GammaCut);
178 Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
179 Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut);
180 Bool_t SetSinglePtCut(Int_t singlePtCut);
181 Bool_t SetTPCClusterCut(Int_t clsTPCCut);
182 Bool_t SetEtaCut(Int_t etaCut);
183 Bool_t SetChi2MesonCut(Int_t chi2MesonCut);
184 Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut);
185 Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut);
186 Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut);
187 Bool_t SetQtMaxCut(Int_t QtMaxCut);
188 Bool_t SetAlphaMesonCut(Int_t alphaMesonCut);
189 Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID);
190 Bool_t SetTRDElectronCut(Int_t TRDElectronCut);
191 Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut);
192 Bool_t SetCentralityMin(Int_t useCentrality);
193 Bool_t SetIsHeavyIon(Int_t isHeavyIon);
194 Bool_t SetCentralityMax(Int_t centralityBin);
195 Bool_t SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut);
196 Bool_t SetRemovePileUp(Int_t removePileUp);
197 Bool_t SetBackgroundScheme(Int_t BackgroundScheme);
198 Bool_t SetNDegreesForRotationMethod(Int_t DegreesForRotationMethod);
199 Bool_t SetNumberOfRotations(Int_t NumberOfRotations);
200 Bool_t SetMCPSmearing(Int_t useMCPSmearing);
201 Bool_t SetMultiplicityMethod(Int_t multiplicityMethod);
202 Bool_t SetSelectV0AND(Int_t selectV0AND);
203 Bool_t SetCosPAngleCut(Int_t cosCut);
204 Bool_t SetPsiPairCut(Int_t psiCut);
205 Bool_t SetSharedElectronCut(Int_t sharedElec);
206 Bool_t SetToCloseV0sCut(Int_t toClose);
211 Bool_t UseRotationMethod(){return fUseRotationMethodInBG;}
212 Int_t NumberOfRotationEvents(){return fnumberOfRotationEventsForBG;}
213 Int_t NDegreesRotation(){return fnDegreeRotationPMForBG;}
214 Bool_t IsHeavyIon(){return fIsHeavyIon;}
215 Bool_t UseTrackMultiplicity(){return fUseTrackMultiplicityForBG;}
216 Bool_t DoBGProbability(){return fdoBGProbability;}
217 Int_t GetFirstTPCRow(Double_t radius);
218 Bool_t UseMCPSmearing(){return fUseMCPSmearing;}
219 Bool_t UseElecSharingCut(){return fDoSharedElecCut;}
220 Bool_t UseToCloseV0sCut(){return fDoToCloseV0sCut;}
221 Int_t GetMultiplicityMethod(){return fMultiplicityMethod;}
222 Double_t GetEtaCut(){return fEtaCut;}
226 AliPIDResponse *fPIDResponse;
229 Int_t fEventQuality; // EventQuality
231 Double_t fMaxR; //r cut
232 Double_t fMinR; //r cut
233 Double_t fEtaCut; //eta cut
234 Double_t fEtaCutMin; //eta cut
235 Double_t fPtCut; // pt cut
236 Double_t fSinglePtCut; // pt cut for electron/positron
237 Double_t fMaxZ; //z cut
238 Double_t fMinClsTPC; // minimum clusters in the TPC
239 Double_t fMinClsTPCToF; // minimum clusters to findable clusters
240 Double_t fLineCutZRSlope; //linecut
241 Double_t fLineCutZValue; //linecut
242 Double_t fLineCutZRSlopeMin; //linecut
243 Double_t fLineCutZValueMin; //linecut
244 Double_t fChi2CutConversion; //chi2cut
245 Double_t fChi2CutMeson; //chicut meson
246 Double_t fPIDProbabilityCutNegativeParticle;
247 Double_t fPIDProbabilityCutPositiveParticle;
248 Bool_t fDodEdxSigmaCut; // flag to use the dEdxCut based on sigmas
249 Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
250 Double_t fPIDTRDEfficiency; // required electron efficiency for TRD PID
251 Bool_t fDoTRDPID; // flag to use TRD pid
252 Double_t fPIDnSigmaAboveElectronLine; // sigma cut
253 Double_t fPIDnSigmaBelowElectronLine; // sigma cut
254 Double_t fTofPIDnSigmaAboveElectronLine; // sigma cut RRnewTOF
255 Double_t fTofPIDnSigmaBelowElectronLine; // sigma cut RRnewTOF
256 Double_t fPIDnSigmaAbovePionLine; // sigma cut
257 Double_t fPIDnSigmaAbovePionLineHighPt; // sigma cut
258 Double_t fPIDMinPnSigmaAbovePionLine; // sigma cut
259 Double_t fPIDMaxPnSigmaAbovePionLine; // sigma cut
260 Double_t fDoKaonRejectionLowP; // Kaon rejection at low p
261 Double_t fDoProtonRejectionLowP; // Proton rejection at low p
262 Double_t fDoPionRejectionLowP; // Pion rejection at low p
263 Double_t fPIDnSigmaAtLowPAroundKaonLine; // sigma cut
264 Double_t fPIDnSigmaAtLowPAroundProtonLine; // sigma cut
265 Double_t fPIDnSigmaAtLowPAroundPionLine; // sigma cut
266 Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
267 Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
268 Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
269 Bool_t fDoQtGammaSelection; // Select gammas using qtMax
270 Bool_t fDoHighPtQtGammaSelection; // RRnew Select gammas using qtMax for high pT
271 Double_t fQtMax; // Maximum Qt from Armenteros to select Gammas
272 Double_t fHighPtQtMax; // RRnew Maximum Qt for High pT from Armenteros to select Gammas
273 Double_t fPtBorderForQt; // RRnew
274 Double_t fXVertexCut; //vertex cut
275 Double_t fYVertexCut; //vertex cut
276 Double_t fZVertexCut; // vertexcut
277 Double_t fNSigmaMass; //nsigma cut
278 Bool_t fUseEtaMinCut; //flag
279 Bool_t fUseOnFlyV0Finder; //flag
280 Bool_t fDoPhotonAsymmetryCut; // flag to use the PhotonAsymetryCut
281 Double_t fMinPPhotonAsymmetryCut; // Min Momentum for Asymmetry Cut
282 Double_t fMinPhotonAsymmetry; // Asymmetry Cut
283 Bool_t fIsHeavyIon; // flag for heavy ion
284 Int_t fDetectorCentrality; // centrality detecotor V0M or CL1
285 Int_t fModCentralityClass; // allows to select smaller centrality classes
286 Double_t fMaxVertexZ; // max z offset of vertex
287 Int_t fCentralityMin; // centrality selection lower bin value
288 Int_t fCentralityMax; // centrality selection upper bin value
289 Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
290 Bool_t fUseTOFpid; // flag to use tof pid
291 Double_t fAlphaMinCutMeson; // min value for meson alpha cut
292 Double_t fAlphaCutMeson; // max value for meson alpha cut
293 Double_t fRapidityCutMeson; // max value for meson rapidity
294 Bool_t fUseRotationMethodInBG; // flag to apply rotation method for meson bg estimation
295 Bool_t fdoBGProbability; // flag to use probability method for meson bg estimation
296 Bool_t fUseTrackMultiplicityForBG; // flag to use track multiplicity for meson bg estimation (else V0 mult)
297 Int_t fnDegreeRotationPMForBG; //
298 Int_t fnumberOfRotationEventsForBG; //
299 Bool_t fUseMCPSmearing; // flag
300 Double_t fPBremSmearing;//
301 Double_t fPSigSmearing; //
302 Double_t fPSigSmearingCte; //
304 Int_t fMultiplicityMethod; // selected multiplicity method
305 Bool_t fSelectV0AND; // flag
306 Bool_t fRemovePileUp; //flag
307 Float_t fOpeningAngle; // min opening angle for meson
309 Float_t fCosPAngleCut;
310 Bool_t fDoToCloseV0sCut; //
311 Double_t fminV0Dist; //
312 Bool_t fDoSharedElecCut; //
313 UInt_t fOfflineTriggerMask; // Task processes collision candidates only
315 Int_t *fElectronLabelArray; // Array with elec/pos v0 label
316 Float_t fConversionPointXArray; // Array with conversion Point x
317 Float_t fConversionPointYArray; // Array with conversion Point y
318 Float_t fConversionPointZArray; // Array with conversion Point z
321 TObjString *fCutString; // cut number used for analysis
322 TH1F *hdEdxCuts; // bookkeeping for dEdx cuts
323 TH2F *hTPCdEdxbefore; // TPC dEdx before cuts
324 TH2F *hTPCdEdxafter; // TPC dEdx after cuts
325 TH2F *hTOFbefore; // TOF after cuts
326 TH2F *hTOFafter; // TOF after cuts
327 TH1F *hTrackCuts; // bookkeeping for track cuts
328 TH1F *hPhotonCuts; // bookkeeping for photon specific cuts
329 TH1F *hInvMassbefore; // e+e- inv mass distribution before cuts
330 TH2F *hArmenterosbefore; // armenteros podolanski plot before cuts
331 TH1F *hInvMassafter; // e+e- inv mass distribution after cuts
332 TH2F *hArmenterosafter; // armenteros podolanski plot after cuts
333 TH1F *hAcceptanceCuts; // bookkeeping for acceptance cuts
334 TH1F *hCutIndex; // bookkeeping for cuts
335 TH1F *hV0EventCuts; // bookkeeping for event selection cuts
336 TH1F *hCentrality; // centrality distribution for selected events
337 TH1F *hVertexZ; // vertex z distribution for selected events
338 TH1F *hTriggerClass; //fired offline trigger class
339 TH1F *hMesonCuts; // bookkeeping for meson cuts
340 TH1F *hMesonBGCuts; // bookkeeping for meson bg cuts
345 AliConversionCuts(const AliConversionCuts&); // not implemented
346 AliConversionCuts& operator=(const AliConversionCuts&); // not implemented
349 ClassDef(AliConversionCuts,2)
353 inline void AliConversionCuts::InitAODpidUtil(Int_t type) {
354 if (!fPIDResponse) fPIDResponse = new AliAODpidUtil();
355 Double_t alephParameters[5];
357 alephParameters[0] = 2.15898e+00/50.;
358 alephParameters[1] = 1.75295e+01;
359 alephParameters[2] = 3.40030e-09;
360 alephParameters[3] = 1.96178e+00;
361 alephParameters[4] = 3.91720e+00;
362 fPIDResponse->GetTOFResponse().SetTimeResolution(80.);
366 alephParameters[0] = 0.0283086/0.97;
367 alephParameters[1] = 2.63394e+01;
368 alephParameters[2] = 5.04114e-11;
369 alephParameters[3] = 2.12543e+00;
370 alephParameters[4] = 4.88663e+00;
371 fPIDResponse->GetTOFResponse().SetTimeResolution(130.);
372 fPIDResponse->GetTPCResponse().SetMip(50.);
375 fPIDResponse->GetTPCResponse().SetBetheBlochParameters(
376 alephParameters[0],alephParameters[1],alephParameters[2],
377 alephParameters[3],alephParameters[4]);
379 fPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);