AliPhysics  master (68a99cd)
Go to the documentation of this file.
4 #include "AliAODpidUtil.h"
7 #include "AliAODTrack.h"
8 #include "AliESDtrack.h"
9 #include "AliVTrack.h"
10 #include "AliAODTrack.h"
11 #include "AliMCEvent.h"
12 #include "AliAnalysisCuts.h"
13 #include "TH1F.h"
14 #include "TF1.h"
15 #include "TProfile.h"
16 #include "AliAnalysisUtils.h"
17 #include "AliAnalysisManager.h"
18 #include "AliDalitzAODESDMC.h"
19 #include "AliDalitzEventMC.h"
22 class AliESDEvent;
23 class AliAODEvent;
25 class AliPIDResponse;
26 class AliKFVertex;
27 class TH1F;
28 class TH2F;
29 class TF1;
30 class TProfile;
31 class AliAnalysisCuts;
32 class iostream;
33 class TList;
34 class AliAnalysisManager;
35 class AliAODMCParticle;
78 class AliConversionPhotonCuts : public AliAnalysisCuts {
80  public:
81  enum cutIds {
109  };
111  enum photonCuts {
122  };
125  Bool_t SetCutIds(TString cutString);
127  Bool_t SetCut(cutIds cutID, Int_t cut);
130  static const char * fgkCutNames[kNCuts];
132  Double_t GetCosineOfPointingAngle(const AliConversionPhotonBase * photon, AliVEvent * event) const;
133  Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
135  void SetPreSelectionCutFlag(Bool_t preSelFlag){fPreSelCut = preSelFlag;}
137  AliConversionPhotonCuts(const char *name="V0Cuts", const char * title="V0 Cuts");
141  virtual ~AliConversionPhotonCuts(); //virtual destructor
147  void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
148  AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
151  virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
152  virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
156  Float_t GetKappaTPC(AliConversionPhotonBase *gamma, AliVEvent *event);
158  // Cut Selection
159  Bool_t PhotonIsSelected(AliConversionPhotonBase * photon, AliVEvent * event);
160  Bool_t PhotonIsSelectedMC(TParticle *particle,AliMCEvent *mcEvent,Bool_t checkForConvertedGamma=kTRUE);
161  Bool_t PhotonIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray,Bool_t checkForConvertedGamma=kTRUE);
162  Bool_t PhotonIsSelectedMCAODESD(AliDalitzAODESDMC *particle,AliDalitzEventMC *mcEvent,Bool_t checkForConvertedGamma);
163  //Bool_t ElectronIsSelectedMC(TParticle *particle,AliMCEvent *mcEvent);
164  Bool_t TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack);
165  //Bool_t MesonIsSelected(AliAODConversionMother *pi0,Bool_t IsSignal=kTRUE);
166  //Bool_t MesonIsSelectedMC(TParticle *fMCMother,AliMCEvent *mcEvent, Bool_t bMCDaughtersInAcceptance=kFALSE);
168  void PrintCuts();
169  void PrintCutsWithValues();
171  void SetLightOutput( Bool_t flag ){fDoLightOutput = flag; return;}
172  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE);
173  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE){if(!fHistograms){InitCutHistograms(name,preCut);};}
175  void FillPhotonCutIndex(Int_t photoncut){if(fHistoCutIndex)fHistoCutIndex->Fill(photoncut);}
179  void SetV0ReaderName(TString name){fV0ReaderName = name; return;}
180  void SetProcessAODCheck(Bool_t flag){fProcessAODCheck = flag; return;}
182  AliVTrack * GetTrack(AliVEvent * event, Int_t label);
183  AliESDtrack *GetESDTrack(AliESDEvent * event, Int_t label);
186  Bool_t SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex);
187  Bool_t SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex);
189  Bool_t AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg);
191  // Bool_t dEdxCuts(AliVTrack * track);
192  Bool_t dEdxCuts(AliVTrack * track, AliConversionPhotonBase * photon);
193  Bool_t KappaCuts(AliConversionPhotonBase * photon,AliVEvent *event);
195  Bool_t AsymmetryCut(AliConversionPhotonBase *photon,AliVEvent *event);
196  Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event);
198  if(onfly == fUseOnFlyV0Finder) return kTRUE;
199  else return kFALSE;
200  }
201  Bool_t PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event);
202  Bool_t CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event);
203  Bool_t PsiPairCut(const AliConversionPhotonBase * photon) const;
204  Bool_t CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const;
206  Bool_t RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0);
209  Bool_t InPlaneOutOfPlaneCut(Double_t photonPhi, Double_t eventPlaneAngle = -100, Bool_t fill = kTRUE);
212  // Set Individual Cuts
213  Bool_t SetRCut(Int_t RCut);
214  Bool_t SetV0Finder(Int_t v0FinderType);
215  Bool_t SetChi2GammaCut(Int_t chi2GammaCut);
216  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
217  Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut);
218  Bool_t SetSinglePtCut(Int_t singlePtCut);
219  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
220  Bool_t SetEtaCut(Int_t etaCut);
221  Bool_t SetEtaForPhiCut(Int_t etaPhiCut);
222  Bool_t SetMinPhiSectorCut(Int_t minPhiCut);
223  Bool_t SetMaxPhiSectorCut(Int_t maxPhiCut);
224  Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut);
225  Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut);
226  Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut);
227  Bool_t SetQtMaxCut(Int_t QtMaxCut);
228  Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID);
229  Bool_t SetTRDElectronCut(Int_t TRDElectronCut);
230  Bool_t SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut);
231  Bool_t SetCosPAngleCut(Int_t cosCut);
232  Bool_t SetPsiPairCut(Int_t psiCut);
233  Bool_t SetSharedElectronCut(Int_t sharedElec);
234  Bool_t SetToCloseV0sCut(Int_t toClose);
235  Bool_t SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx);
236  Bool_t SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx);
237  Bool_t SetInPlaneOutOfPlane(Int_t inOutPlane);
238  Bool_t SetKappaTPCCut(Int_t kappaCut);
239  void SetIsHeavyIon(Int_t isHeavyIon){fIsHeavyIon=isHeavyIon;}
240  Int_t GetFirstTPCRow(Double_t radius);
242  Bool_t SetITSElectronPIDCut(Int_t ITSelectronPID);
243  Bool_t SetTRDElectronPIDCut(Int_t TRDelectronPID);
245  // Request Flags
263  protected:
265  AliPIDResponse* fPIDResponse;
270  //cuts
340  TRandom3 fRandom;
342  Int_t* fElectronLabelArray; //[fElectronArraySize]
349  TObjString* fCutString;
366  // Histograms
398  TH2F** fHistoEleMapMean; //[fnRBins]
399  TH2F** fHistoEleMapWidth; //[fnRBins]
400  TH2F** fHistoPosMapMean; //[fnRBins]
401  TH2F** fHistoPosMapWidth; //[fnRBins]
403  private:
405  ClassDef(AliConversionPhotonCuts,20)
407 };
409 #endif
Int_t charge
Double_t fTofPIDnSigmaAboveElectronLine
sigma cut RRnewTOF
Double_t fMinRDC
Min R for Double Counting Cut.
Bool_t SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx)
const char * filename
Definition: TestFCM.C:1
TH2F * fHistoTOFSigafter
TOF Sigma after cuts.
Bool_t SetQtMaxCut(Int_t QtMaxCut)
Float_t fMaxPhiCut
phi sector cut
Bool_t fPreSelCut
Flag for preselection cut used in V0Reader.
Double_t fMinPPhotonAsymmetryCut
Min Momentum for Asymmetry Cut.
TH2F * fHistoAcceptanceCuts
bookkeeping for acceptance cuts
#define P(T, U, S)
Double_t fPIDTRDEfficiency
required electron efficiency for TRD PID
double Double_t
Definition: External.C:58
TH2F * fHistodEdxCuts
bookkeeping for dEdx cuts
virtual Bool_t IsSelected(TObject *)
Bool_t RejectSharedElectronV0s(AliAODConversionPhoton *photon, Int_t nV0, Int_t nV0s)
Double_t fOpenAngle
Opening Angle for Double Counting Cut.
TH2F * fHistoPhotonCuts
bookkeeping for photon specific cuts
Double_t fPIDnSigmaAbovePionLine
sigma cut
Definition: External.C:236
Bool_t fDodEdxSigmaCut
flag to use the dEdxCut based on sigmas
TObjString * fCutString
cut number used for analysis
Double_t fMinClsTPC
minimum clusters in the TPC
const char * title
Definition: MakeQAPdf.C:27
Int_t GetFirstTPCRow(Double_t radius)
static const char * fgkCutNames[kNCuts]
Bool_t InitializeElecDeDxPostCalibration(TString filename)
Double_t fDCAZPrimVtxCut
cut value for the maximum distance in Z between the photon & the primary vertex [cm] ...
Bool_t fSwitchToKappa
switches from standard dEdx nSigma TPC cuts to Kappa TPC
void FillV0EtaBeforedEdxCuts(Float_t v0Eta)
TH1F * fHistoCutIndex
bookkeeping for cuts
Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut)
TH2F * fHistoTPCdEdxSigafter
TPC Sigm dEdx after cuts.
Double_t fMinPhotonAsymmetry
Asymmetry Cut.
Double_t fTRDPIDAboveCut
TRD cut range.
Float_t fEtaForPhiCutMin
eta cut for phi sector selection
void SetProcessAODCheck(Bool_t flag)
Bool_t SetSinglePtCut(Int_t singlePtCut)
Bool_t fMaterialBudgetWeightsInitialized
weights for conversions photons due due deviating material budget in MC compared to data ...
TH2F * fHistoTPCdEdxafter
TPC dEdx after cuts.
Double_t fDeltaR
Delta R for Double Counting Cut.
virtual Bool_t IsSelected(TList *)
Int_t fInPlaneOutOfPlane
In-Plane Out-Of Plane Analysis.
TH2F * fHistoArmenterosafter
armenteros podolanski plot after cuts
AliPIDResponse * fPIDResponse
PID response.
Bool_t AsymmetryCut(AliConversionPhotonBase *photon, AliVEvent *event)
Double_t fPIDMinPPionRejectionLowP
Momentum limit to apply proton rejection.
TH2F * fHistoPsiPairDeltaPhiafter
TOF Sigma after cuts.
TH2F * fHistoArmenterosbefore
armenteros podolanski plot before cuts
Bool_t SetToCloseV0sCut(Int_t toClose)
void InitCutHistograms(TString name="", Bool_t preCut=kTRUE)
TH2F * fHistoTOFbefore
TOF before cuts.
Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID)
Bool_t fDoShrinkTPCAcceptance
Flag for shrinking the TPC acceptance due to different reasons.
Bool_t PhotonIsSelectedAODMC(AliAODMCParticle *particle, TClonesArray *aodmcArray, Bool_t checkForConvertedGamma=kTRUE)
AliConversionPhotonCuts(const char *name="V0Cuts", const char *title="V0 Cuts")
Float_t fMinPhiCut
phi sector cut
TH1F * fHistoInvMassafter
e+e- inv mass distribution after cuts
AliConversionPhotonCuts & operator=(const AliConversionPhotonCuts &)
Bool_t SetMinPhiSectorCut(Int_t minPhiCut)
void FillElectonLabelArray(AliAODConversionPhoton *photon, Int_t nV0)
Double_t fSinglePtCut2
second pt cut for electron/positron if asymmetric cut is chosen
Double_t GetCorrectedElectronTPCResponse(Short_t charge, Double_t nsig, Double_t P, Double_t Eta, Double_t R)
AliESDtrack * GetESDTrack(AliESDEvent *event, Int_t label)
TH2F * fHistoITSSigafter
ITS Sigma after cuts.
static AliConversionPhotonCuts * GetStandardCuts2010PbPb()
Double_t fDoKaonRejectionLowP
Kaon rejection at low p.
Int_t fElectronArraySize
Size of electron array.
TH2F * fHistoTOFSigbefore
TOF Sigma before cuts.
Int_t fIsHeavyIon
flag for pp (0), PbPb (1), pPb (2)
Bool_t RejectToCloseV0s(AliAODConversionPhoton *photon, TList *photons, Int_t nV0)
Bool_t InPlaneOutOfPlaneCut(Double_t photonPhi, Double_t eventPlaneAngle=-100, Bool_t fill=kTRUE)
Bool_t fElecDeDxPostCalibrationInitialized
flag to check that initialization worked
Bool_t PhotonCuts(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetChi2GammaCut(Int_t chi2GammaCut)
int Int_t
Definition: External.C:63
Bool_t SetCut(cutIds cutID, Int_t cut)
Double_t fDoPionRejectionLowP
Pion rejection at low p.
void SetDoElecDeDxPostCalibration(Bool_t k=kTRUE)
TH1F * fHistoInvMassbefore
e+e- inv mass distribution before cuts
TH1F * fHistoEventPlanePhi
EventPlaneAngle Minus Photon Angle.
float Float_t
Definition: External.C:68
Bool_t fUseITSpid
flag to use tof pid
TH1F * fHistoEtaDistV0sAfterdEdxCuts
eta-distribution of all V0s after Finder selection after dEdx cuts
Float_t fConversionPointYArray
Array with conversion Point y.
Double_t fTRDPIDBelowCut
TRD cut range.
Double_t fPIDMaxPnSigmaAbovePionLine
sigma cut
Double_t fITSPIDnSigmaAboveElectronLine
sigma cut RRnewTOF
Double_t fDCARPrimVtxCut
cut value for the maximum distance in R between the photon & the primary vertex [cm] ...
Bool_t SetITSElectronPIDCut(Int_t ITSelectronPID)
Bool_t SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut)
TH2F * fHistoITSSigbefore
ITS Sigma before cuts.
Double_t fPIDnSigmaAtLowPAroundKaonLine
sigma cut
Bool_t SetKappaTPCCut(Int_t kappaCut)
Double_t fPIDnSigmaAtLowPAroundPionLine
sigma cut
Bool_t fDoTOFsigmaCut
flag to use TOF pid cut RRnewTOF
Bool_t SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx)
Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut)
Double_t fPIDMinPnSigmaAbovePionLine
sigma cut
Double_t fPIDnSigmaBelowElectronLine
sigma cut
Bool_t PhotonIsSelectedMC(TParticle *particle, AliMCEvent *mcEvent, Bool_t checkForConvertedGamma=kTRUE)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Bool_t fDoPhotonAsymmetryCut
flag to use the PhotonAsymetryCut
TString fV0ReaderName
Name of the V0 reader.
TH2F * fHistoAsymmetryafter
asymmetry plot after cuts
Bool_t fDoPhotonPDependentAsymCut
flag to use the PhotonAsymetryCut with P dependent cut
TProfile * fProfileContainingMaterialBudgetWeights
Bool_t InitializeCutsFromCutString(const TString analysisCutSelection)
Bool_t SetCosPAngleCut(Int_t cosCut)
void SetV0ReaderName(TString name)
Bool_t SetEtaForPhiCut(Int_t etaPhiCut)
Bool_t SetTPCClusterCut(Int_t clsTPCCut)
Bool_t InitializeMaterialBudgetWeights(Int_t flag, TString filename)
Bool_t fUseTOFpid
flag to use tof pid
short Short_t
Definition: External.C:23
void SetPIDResponse(AliPIDResponse *pidResponse)
Float_t GetMaterialBudgetCorrectingWeightForTrueGamma(AliAODConversionPhoton *gamma)
TList * fHistograms
List of QA histograms.
Bool_t fDoQtGammaSelection
Select gammas using qtMax.
Float_t fKappaMinCut
maximum Kappa cut
TH2F * fHistoTPCdEdxbefore
TPC dEdx before cuts.
Bool_t PhotonIsSelectedMCAODESD(AliDalitzAODESDMC *particle, AliDalitzEventMC *mcEvent, Bool_t checkForConvertedGamma)
Bool_t fProcessAODCheck
Flag for processing check for AOD to be contained in AliAODs.root and AliAODGammaConversion.root.
TH2F * fHistoKappaafter
Kappa vs photon pt after cuts.
Float_t fKappaMaxCut
maximum Kappa cut
Bool_t SetTRDElectronCut(Int_t TRDElectronCut)
void FillPhotonCutIndex(Int_t photoncut)
Double_t fSinglePtCut
pt cut for electron/positron
Bool_t SetPsiPairCut(Int_t psiCut)
TH2F * fHistoTPCdEdxSigbefore
TPC Sigma dEdx before cuts.
Bool_t SpecificTrackCuts(AliAODTrack *negTrack, AliAODTrack *posTrack, Int_t &cutIndex)
Cut functions.
Double_t fQtMax
Maximum Qt from Armenteros to select Gammas.
Double_t fTofPIDnSigmaBelowElectronLine
sigma cut RRnewTOF
Float_t fOpeningAngle
min opening angle for meson
UChar_t DeterminePhotonQualityAOD(AliAODConversionPhoton *, AliVEvent *)
Bool_t SelectV0Finder(Bool_t onfly)
TH1F * fHistoEtaDistV0s
eta-distribution of all V0s after Finder selection
Bool_t fDo2DQt
Select gammas using ellipse cut.
void SetFillCutHistograms(TString name="", Bool_t preCut=kTRUE)
void FillV0EtaAfterdEdxCuts(Float_t v0Eta)
Bool_t AcceptanceCuts(AliConversionPhotonBase *photon)
Bool_t fDoDoubleCountingCut
Flag to reject double counting.
Double_t fMinClsTPCToF
minimum clusters to findable clusters
Float_t GetKappaTPC(AliConversionPhotonBase *gamma, AliVEvent *event)
AliVTrack * GetTrack(AliVEvent *event, Int_t label)
Bool_t CosinePAngleCut(const AliConversionPhotonBase *photon, AliVEvent *event) const
void SetPreSelectionCutFlag(Bool_t preSelFlag)
void SetDodEdxSigmaCut(Bool_t k=kTRUE)
void SetSwitchToKappaInsteadOfNSigdEdxTPC(Bool_t k=kTRUE)
Int_t fUseOnFlyV0FinderSameSign
int to set same sign pairing
Double_t fPIDnSigmaAbovePionLineHighPt
sigma cut
Double_t fPIDMinPProtonRejectionLowP
Momentum limit to apply proton rejection.
Float_t fConversionPointXArray
Array with conversion Point x.
static AliConversionPhotonCuts * GetStandardCuts2010pp()
Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut)
Double_t fPIDnSigmaAtLowPAroundProtonLine
sigma cut
Bool_t PsiPairCut(const AliConversionPhotonBase *photon) const
Double_t fMaxPtPIDITS
max pt for ITS PID
Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut)
bool Bool_t
Definition: External.C:53
Bool_t dEdxCuts(AliVTrack *track, AliConversionPhotonBase *photon)
void SetIsHeavyIon(Int_t isHeavyIon)
Bool_t fUseCorrectedTPCClsInfo
flag to use corrected tpc cl info
Double_t fPIDnSigmaAboveElectronLine
sigma cut
Bool_t TracksAreSelected(AliVTrack *negTrack, AliVTrack *posTrack)
Bool_t KappaCuts(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetInPlaneOutOfPlane(Int_t inOutPlane)
Bool_t SetMaxPhiSectorCut(Int_t maxPhiCut)
Bool_t fDoTRDPID
flag to use TRD pid
Bool_t SetSharedElectronCut(Int_t sharedElec)
Double_t fITSPIDnSigmaBelowElectronLine
sigma cut RRnewTOF
Bool_t SetV0Finder(Int_t v0FinderType)
Bool_t AcceptanceCut(TParticle *particle, TParticle *ePos, TParticle *eNeg)
Bool_t SetCutIds(TString cutString)
Bool_t SetTRDElectronPIDCut(Int_t TRDelectronPID)
Bool_t fDoLightOutput
switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
Bool_t fDoAsymPtCut
Flag for setting asymmetric pT cut on electron/positron.
TH1F * fHistoTrackCuts
bookkeeping for track cuts
Double_t GetCosineOfPointingAngle(const AliConversionPhotonBase *photon, AliVEvent *event) const
Bool_t ArmenterosQtCut(AliConversionPhotonBase *photon)
Bool_t CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent *event)
Float_t fEtaForPhiCutMax
eta cut for phi sector selection
Double_t fDoProtonRejectionLowP
Proton rejection at low p.
Double_t fPIDMinPKaonRejectionLowP
Momentum limit to apply kaon rejection.
Bool_t PhotonIsSelected(AliConversionPhotonBase *photon, AliVEvent *event)
Float_t fConversionPointZArray
Array with conversion Point z.
Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
TH2F * fHistoAsymmetrybefore
asymmetry plot after cuts
Bool_t PhiSectorCut(AliConversionPhotonBase *photon)