1 #ifndef ALIRDHFCUTSD0TOKPI_H
2 #define ALIRDHFCUTSD0TOKPI_H
3 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //***********************************************************
9 // Class AliRDHFCutsD0toKpi
10 // class for cuts on AOD reconstructed D0->Kpi
11 // Author: A.Dainese, andrea.dainese@pd.infn.it
12 //***********************************************************
14 #include "AliRDHFCuts.h"
17 class AliAODRecoDecayHF;
18 class AliAODRecoDecayHF2Prong;
20 class AliRDHFCutsD0toKpi : public AliRDHFCuts
25 AliRDHFCutsD0toKpi(const char* name="CutsD0toKpi");
27 virtual ~AliRDHFCutsD0toKpi();
29 AliRDHFCutsD0toKpi(const AliRDHFCutsD0toKpi& source);
30 AliRDHFCutsD0toKpi& operator=(const AliRDHFCutsD0toKpi& source);
32 using AliRDHFCuts::GetCutVarsForOpt;
33 virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters){
34 return GetCutVarsForOpt(d,vars,nvars,pdgdaughters,0x0);
36 virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters,AliAODEvent *aod);
38 using AliRDHFCuts::IsSelected;
39 virtual Int_t IsSelected(TObject* obj,Int_t selectionLevel)
40 {return IsSelected(obj,selectionLevel,0);}
41 virtual Int_t IsSelected(TObject* obj,Int_t selectionLevel,AliAODEvent* aod);
43 virtual Int_t IsSelectedCombPID(AliAODRecoDecayHF* d);
44 virtual void CalculateBayesianWeights(AliAODRecoDecayHF* d);
46 Float_t GetMassCut(Int_t iPtBin=0) const { return (GetCuts() ? fCutsRD[GetGlobalIndex(0,iPtBin)] : 1.e6);}
47 Float_t GetDCACut(Int_t iPtBin=0) const { return (GetCuts() ? fCutsRD[GetGlobalIndex(1,iPtBin)] : 1.e6);}
48 Int_t CombineSelectionLevels(Int_t selectionvalTrack,Int_t selectionvalCand,Int_t selectionvalPID)const;
49 virtual Bool_t IsInFiducialAcceptance(Double_t pt,Double_t y) const;
50 virtual void SetStandardCutsPP2010();
51 virtual void SetStandardCutsPP2011_276TeV();
52 virtual void SetStandardCutsPbPb2010();
53 virtual void SetStandardCutsPbPb2011();
54 void SetStandardCutsPbPb2010Peripherals();
55 virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd);
56 Int_t IsSelectedPIDdefault(AliAODRecoDecayHF *rd);
57 Int_t IsSelectedSpecialCuts(AliAODRecoDecayHF *d) const;
58 void SetUseSpecialCuts(Bool_t useSpecialCuts) {fUseSpecialCuts=useSpecialCuts;}
59 void SetMaximumPtSpecialCuts(Double_t pt) { fPtMaxSpecialCuts=pt; }
60 void SetMaximumPforPID(Double_t p){fmaxPtrackForPID=p;}
61 Double_t GetMaximumPforPID(){return fmaxPtrackForPID;}
62 Double_t GetMaximumPtSpecialCuts() const { return fPtMaxSpecialCuts; }
63 void SetLowPt(Bool_t lowpt,Double_t ptlow=2.) {fLowPt=lowpt;fPtLowPID=ptlow;}
64 Bool_t GetUseSpecialCuts() const {return fUseSpecialCuts;}
65 void SetUseDefaultPID(Bool_t defPID){fDefaultPID=defPID;}
66 Bool_t GetIsUsedDefPID(){return fDefaultPID;}
67 Double_t GetPtForPIDtight()const {return fPtLowPID;}
68 void SetUseKF(Bool_t useKF);
69 Bool_t GetIsUsedKF() const {return fUseKF;}
70 void SetWeightsPositive(Double_t* weights){
71 for (Int_t i = 0; i<AliPID::kSPECIES; i++) {
72 fWeightsPositive[i] = weights[i];
75 Double_t *GetWeightsPositive() const {return fWeightsPositive;}
76 void SetWeightsNegative(Double_t* weights){
77 for (Int_t i = 0; i<AliPID::kSPECIES; i++) {
78 fWeightsNegative[i] = weights[i];
81 Double_t *GetWeightsNegative() const {return fWeightsNegative;}
82 void SetBayesianStrategy(Int_t strat) {fBayesianStrategy=strat;}
83 Int_t GetBayesianStrategy() const {return fBayesianStrategy;}
85 enum EBayesianStrategy {
93 enum EBayesianCondition {
99 void SetBayesianCondition(Int_t cond) {fBayesianCondition=cond;}
100 Int_t GetBayesianCondition() const {return fBayesianCondition;}
101 void SetCombPID(Bool_t CombPID){fCombPID=CombPID;}
102 Bool_t GetCombPID() const {return fCombPID;}
103 void SetBayesProbThreshold(Double_t thresh){fProbThreshold=thresh;}
104 Double_t GetBayesProbThreshold() const {return fProbThreshold;}
109 Int_t IsSelectedKF(AliAODRecoDecayHF2Prong* d,AliAODEvent* aod) const;
111 Bool_t fUseSpecialCuts; // flag to switch on/off special cuts
112 Bool_t fLowPt; // flag to switch on/off different pid for low pt D0
113 Bool_t fDefaultPID; // flag to switch on/off the default pid
115 Bool_t fUseKF; // flag to switch on/off D0 selection via KF
116 Double_t fPtLowPID; // transverse momentum below which the strong PID is applied
117 Double_t fPtMaxSpecialCuts; // transverse momentum below which the special cuts are applied
119 // if set to zero, used for all pt
120 Double_t fmaxPtrackForPID; // max momentum for applying PID
122 Bool_t fCombPID; //switch for Bayesian
123 Int_t fnSpecies; //number of species (used only for array declaration)
124 Double_t* fWeightsPositive; //[fnSpecies] Bayesian weights for positive track
125 Double_t* fWeightsNegative; //[fnSpecies] Bayesian weights for negative track
127 Double_t fProbThreshold; //Probability threshold for kaon to be accepted in Bayesian method (only applied if fBayesianCondition==kThreshold)
129 Int_t fBayesianStrategy; // Switch for which Bayesian PID strategy to use
130 Int_t fBayesianCondition; //Switch for conition applied to kaons
132 ClassDef(AliRDHFCutsD0toKpi,11); // class for cuts on AOD reconstructed D0->Kpi