AliPhysics  608b256 (608b256)
AliRDHFCutsBPlustoD0Pi.h
Go to the documentation of this file.
1 #ifndef AlIRDHFCUTSBPlustoD0Pi_H
2 #define AlIRDHFCUTSBPlustoD0Pi_H
3 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
11 //
12 // Author Lennart van Doremalen
13 // Utrecht University - l.v.r.vandoremalen@uu.nl
14 //
15 // Several AliPhysics classes have been used as a basis for this code
16 //
18 
19 #include "AliRDHFCuts.h"
20 
21 class AliAODEvent;
23 class AliAODRecoDecayHF;
24 
26 {
27  public:
28 
31  };
32 
33  AliRDHFCutsBPlustoD0Pi(const char* name="BPlustoD0PiCuts");
34 
35  virtual ~AliRDHFCutsBPlustoD0Pi();
36 
39 
41  virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters);
42 
43  //First two for MVA, last one for standard analysis (TBD: Merge them?)
45  virtual Int_t IsSelected(TObject* obj, Int_t selectionLevel, AliAODEvent* aod);
46  virtual Int_t IsSelected(TObject* obj, Int_t selectionLevel){ return IsSelected(obj,selectionLevel,0); }
47  virtual Int_t IsSelected(TObject* obj, Int_t selectionLevel, AliAODEvent* aod, Bool_t* bCutArray);
48 
49  //Last three for MVA, first two for standard analysis (TBD: Merge them?)
50  Int_t IsD0FromBPlusSelected(Double_t ptBPlus, TObject* obj,Int_t selectionLevel, AliAODEvent* aod, Bool_t bCutArray[68]);
51  Int_t IsD0forD0ptbinSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod, Bool_t* bCutArray);
52  Int_t IsBplusPionSelectedMVA(TObject* obj,Int_t selectionLevel, AliAODEvent* aod, AliAODVertex *primaryVertex, Double_t bz);
53  Int_t IsD0FromBPlusSelectedMVA(Double_t ptBPlus, TObject* obj,Int_t selectionLevel, AliAODEvent* aod, AliAODVertex *primaryVertex, Double_t bz);
54  Int_t IsD0forD0ptbinSelectedMVA(TObject* obj,Int_t selectionLevel, AliAODEvent* aod, AliAODVertex *primaryVertex, Double_t bz);
55  Int_t IsD0SelectedPreRecVtxMVA(AliAODRecoDecayHF2Prong* d, AliAODTrack* pion, AliAODVertex *primaryVertex, Double_t bz, Int_t selLevel);
56 
58  virtual Int_t SelectPID(AliAODTrack *track, Int_t type);
59  virtual Bool_t IsInFiducialAcceptance(Double_t pt,Double_t y) const;
60 
61  void SetMaxPtPid(Float_t maxPt){fMaxPtPid = maxPt;}
62 
63  void SetOffHighPtPIDinTPC(Float_t TPCrem =999.){fTPCflag = TPCrem;}
64 
65  //Pion from Bplus not really soft, but re-using code from Dstar (hence the name)
66  void AddTrackCutsSoftPi(const AliESDtrackCuts *cuts){ fTrackCutsSoftPi = new AliESDtrackCuts(*cuts); return;}
67  virtual AliESDtrackCuts *GetTrackCutsSoftPi() const {return fTrackCutsSoftPi;}
68 
69  void SetGetCutInfo(Bool_t value){fGetCutInfo = value;}
70  void InitializeCuts();
71  void InitializeCutsForCutOptimization(Int_t nCutsForOptimization, Int_t nVariables);
72  void SetCutsForCutOptimization(Int_t glIndex,Float_t *cutsRDForCutOptimization);
73 
75  void SetCircRadius(Double_t radius) { fCircRadius = radius; }
76 
78 
79  void SetCutsD0forD0ptbin(Int_t nVars,Int_t nPtBins,Float_t **cutsRDD0forD0ptbin);
80  void SetCutsD0forD0ptbin(Int_t glIndex,Float_t *cutsRDD0forD0ptbin);
82  void SetPtBinsD0forD0ptbin(Int_t nPtBinLimits,Float_t *ptBinLimits);
83 
87  Int_t GetGlobalIndexD0forD0ptbin(Int_t iVar,Int_t iPtBin) const{return iPtBin*fnVarsD0forD0ptbin+iVar;}
89  void SetNPtBinsD0forD0ptbin(Int_t nptBins){fnPtBinsD0forD0ptbin=nptBins; return;}
90  void SetNVarsD0forD0ptbin(Int_t nVars){fnVarsD0forD0ptbin=nVars; return;}
91 
92  void SetIsUpperCut(Int_t nCutIndex, Bool_t isUpperCut){fIsUpperCut[nCutIndex] = isUpperCut; return;}
93  void SetIsUpperCutD0forD0ptbin(Int_t nCutIndex, Bool_t isUpperCut){fIsUpperCutD0forD0ptbin[nCutIndex] = isUpperCut; return;}
94 
95  Bool_t GetIsUpperCut(Int_t nCutIndex){return fIsUpperCut[nCutIndex];}
97 
98  void SetIsCutUsed(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed){fIsCutUsed[GetGlobalIndex(nCutIndex,ptbin)] = isCutUsed; return;}
99  void SetIsCutUsedD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed){fIsCutUsedD0forD0ptbin[GetGlobalIndexD0forD0ptbin(nCutIndex,ptbin)] = isCutUsed; return;}
100 
101  Bool_t GetIsCutUsed(Int_t nCutIndex, Int_t ptbin) const {return fIsCutUsed[GetGlobalIndex(nCutIndex,ptbin)];}
103 
104  //Last two for MVA, first two for standard analysis (TBD: Merge them?)
105  Int_t ApplyCutOnVariable(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[68]);
106  Int_t ApplyCutOnVariableD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[29]);
107  Int_t ApplyCutOnVariableMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue);
108  Int_t ApplyCutOnVariableD0forD0ptbinMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue);
109 
110  void SetVarNamesD0forD0ptbin(Int_t nVars,TString *varNames,Bool_t *isUpperCut);
111 
120  void GetHardSelectionArrayITSD0FirstDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSD0FirstDaughter[i];} return;}
121  void GetSoftSelectionArrayITSD0FirstDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSD0FirstDaughter[i];} return;}
123 
132  void SetHardSelectionArrayITSD0FirstDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSD0FirstDaughter[i] = array[i];} return;}
133  void SetSoftSelectionArrayITSD0FirstDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSD0FirstDaughter[i] = array[i];} return;}
135 
144  void GetHardSelectionArrayITSD0SecondDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSD0SecondDaughter[i];} return;}
145  void GetSoftSelectionArrayITSD0SecondDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSD0SecondDaughter[i];} return;}
147 
156  void SetHardSelectionArrayITSD0SecondDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSD0SecondDaughter[i] = array[i];} return;}
157  void SetSoftSelectionArrayITSD0SecondDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSD0SecondDaughter[i] = array[i];} return;}
159 
168  void GetHardSelectionArrayITSBPlusPion(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSBPlusPion[i];} return;}
169  void GetSoftSelectionArrayITSBPlusPion(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSBPlusPion[i];} return;}
171 
172  void SetMinITSNclsBPlusPion(Int_t value){fMinITSNclsBPlusPion = value; return;}
173  void SetMinTPCNclsBPlusPion(Int_t value){fMinTPCNclsBPlusPion = value; return;}
174  void SetUseITSRefitBPlusPion(Bool_t option){fUseITSRefitBPlusPion = option; return;}
175  void SetUseTPCRefitBPlusPion(Bool_t option){fUseTPCRefitBPlusPion = option; return;}
177  void SetFilterBitBPlusPion(Int_t value){fFilterBitBPlusPion = value; return;}
178  void SetMinPtBPlusPion(Double_t value){fMinPtBPlusPion = value; return;}
179  void SetMaxAbsEtaBPlusPion(Double_t value){fMaxAbsEtaBPlusPion = value; return;}
180  void SetHardSelectionArrayITSBPlusPion(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSBPlusPion[i] = array[i];}}
181  void SetSoftSelectionArrayITSBPlusPion(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSBPlusPion[i] = array[i];}}
183 
184  void SetCut(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue);
185  void SetCutD0forD0ptbin(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue);
186  void SetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t * cutValues);
187  Float_t GetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin){return fCutsRDForCutOptimization[GetGlobalIndexForCutOptimization(nCutIndex,nVariable,ptBin)];}
188 
193 
196  void SetMind0BPlusPion(Double_t value){fMind0BPlusPion = value; return;}
197  void SetFiducialYCut(Double_t value){fFiducialYCut = value; return;}
198 
201 
204 
207 
208  void SetIsUpperCutForCutOptimization(Int_t nVariable, Bool_t isUpperCut){fIsUpperCutForCutOptimization[nVariable] = isUpperCut; return;}
210 
211  void SetCutIndexForCutOptimization(Int_t nVariable, Int_t nCutIndex){fCutIndexForCutOptimization[nVariable] = nCutIndex; return;}
213 
214  void SetSigmaForCutOptimization(Double_t value, Int_t iPtBin){fSigmaForCutOptimization[iPtBin] = value; return;}
216 
217  protected:
218 
219  //Pion from Bplus not really soft, but re-using code from Dstar
220  AliESDtrackCuts * fTrackCutsSoftPi;
221 
226 
227  Bool_t * fIsCutUsed; //[fGlobalIndex]
228 
232  Float_t * fCutsRDD0forD0ptbin; //[fGlobalIndexD0forD0ptbin]
234  Float_t * fPtBinLimitsD0forD0ptbin; //[fnPtBinLimitsD0forD0ptbin]
235  Bool_t * fIsUpperCutD0forD0ptbin; //[fnVarsD0forD0ptbin]
236  Bool_t * fIsCutUsedD0forD0ptbin; //[fGlobalIndexD0forD0ptbin]
237  TString * fVarNamesD0forD0ptbin; //[fnVarsD0forD0ptbin]
238 
250 
262 
274 
279 
283  Float_t * fCutsRDForCutOptimization; //[fGlobalIndexCutOptimization]
284  Bool_t * fIsUpperCutForCutOptimization; //[fnVariablesForCutOptimization]
285  Int_t * fCutIndexForCutOptimization; //[fnVariablesForCutOptimization]
287 
289  ClassDef(AliRDHFCutsBPlustoD0Pi,3)
290 };
292 
293 #endif
294 
295 
Bool_t GetIsCutUsed(Int_t nCutIndex, Int_t ptbin) const
void SetUseTPCRefitBPlusPion(Bool_t option)
Int_t IsD0FromBPlusSelected(Double_t ptBPlus, TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t bCutArray[68])
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)=0
double Double_t
Definition: External.C:58
Float_t * GetPtBinLimitsD0forD0ptbin() const
Bool_t GetIsCutUsedD0forD0ptbin(Int_t nCutIndex, Int_t ptbin) const
Bool_t GetIsUpperCutD0forD0ptbin(Int_t nCutIndex)
void SetMinITSNclsD0FirstDaughter(Int_t value)
void SetHardSelectionArrayITSD0SecondDaughter(const Bool_t array[7]=0)
void SetMind0BPlusPion(Double_t value)
Int_t GetGlobalIndexD0forD0ptbin(Int_t iVar, Int_t iPtBin) const
void GetSoftSelectionArrayITSD0SecondDaughter(Bool_t array[7]=0)
void SetIsUpperCutD0forD0ptbin(Int_t nCutIndex, Bool_t isUpperCut)
Bool_t * fIsUpperCut
Definition: AliRDHFCuts.h:454
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
void SetnVariablesForCutOptimization(Double_t value)
AliESDtrackCuts * fTrackCutsSoftPi
Double_t DeltaInvMassBPlusKpipi(AliAODRecoDecayHF2Prong *BPlus) const
Double_t bz
void SetVarNamesD0forD0ptbin(Int_t nVars, TString *varNames, Bool_t *isUpperCut)
void SetCircRadius(Double_t radius)
Int_t ApplyCutOnVariableMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue)
void SetnCutsForOptimization(Double_t value)
Bool_t fHardSelectionArrayITSD0SecondDaughter[7]
void SetIsCutUsedD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed)
void SetUseITSRefitD0FirstDaughter(Bool_t option)
void SetNSoftITSCutD0SecondDaughter(Int_t value)
Int_t IsD0forD0ptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
void SetMind0D0SecondDaughter(Double_t value)
void SetFilterBitD0SecondDaughter(Int_t value)
void SetNSoftITSCutD0FirstDaughter(Int_t value)
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
void AddTrackCutsSoftPi(const AliESDtrackCuts *cuts)
virtual AliESDtrackCuts * GetTrackCutsSoftPi() const
void SetMinTPCNclsBPlusPion(Int_t value)
const Int_t nPtBins
void SetUseITSRefitD0SecondDaughter(Bool_t option)
Int_t ApplyCutOnVariableD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[29])
void SetNPtBinsD0forD0ptbin(Int_t nptBins)
Int_t PtBinD0forD0ptbin(Double_t pt) const
Bool_t GetIsUpperCutForCutOptimization(Int_t nVariable) const
int Int_t
Definition: External.C:63
Int_t IsD0forD0ptbinSelectedMVA(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, AliAODVertex *primaryVertex, Double_t bz)
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd)
void GetHardSelectionArrayITSD0FirstDaughter(Bool_t array[7]=0)
void SetSoftSelectionArrayITSD0SecondDaughter(const Bool_t array[7]=0)
float Float_t
Definition: External.C:68
void SetFiducialYCut(Double_t value)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
void SetMaxAbsEtaD0SecondDaughter(Double_t value)
void SetCut(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue)
Float_t fMaxPtPid
cuts for pion from Bplus (AOD converted to ESD on the flight!)
void SetIsCutUsed(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed)
void InitializeCutsForCutOptimization(Int_t nCutsForOptimization, Int_t nVariables)
AliRDHFCutsBPlustoD0Pi(const char *name="BPlustoD0PiCuts")
virtual Int_t SelectPID(AliAODTrack *track, Int_t type)
void SetMaxAbsEtaBPlusPion(Double_t value)
void SetSoftSelectionArrayITSBPlusPion(const Bool_t array[7]=0)
void SetOffHighPtPIDinTPC(Float_t TPCrem=999.)
void SetUseFilterBitD0FirstDaughter(Bool_t option)
void GetHardSelectionArrayITSD0SecondDaughter(Bool_t array[7]=0)
Int_t ApplyCutOnVariableD0forD0ptbinMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue)
void SetMinITSNclsD0SecondDaughter(Int_t value)
void SetMaxAbsEtaD0FirstDaughter(Double_t value)
void SetUseTPCRefitD0FirstDaughter(Bool_t option)
void SetMinITSNclsBPlusPion(Int_t value)
Float_t GetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin)
Bool_t GetIsUpperCut(Int_t nCutIndex)
void SetFilterBitD0FirstDaughter(Int_t value)
Int_t IsBplusPionSelectedMVA(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, AliAODVertex *primaryVertex, Double_t bz)
void SetMinPtD0FirstDaughter(Double_t value)
void SetHardSelectionArrayITSD0FirstDaughter(const Bool_t array[7]=0)
void SetNSoftITSCutBPlusPion(Int_t value)
void SetGetCutInfo(Bool_t value)
void SetMinPtBPlusPion(Double_t value)
void GetSoftSelectionArrayITSD0FirstDaughter(Bool_t array[7]=0)
void SetMaxPtPid(Float_t maxPt)
void SetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t *cutValues)
void SetIsUpperCutForCutOptimization(Int_t nVariable, Bool_t isUpperCut)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod)
Int_t IsD0FromBPlusSelectedMVA(Double_t ptBPlus, TObject *obj, Int_t selectionLevel, AliAODEvent *aod, AliAODVertex *primaryVertex, Double_t bz)
Int_t GetGlobalIndexForCutOptimization(Int_t iCut, Int_t iVar, Int_t iPtBin)
void SetUseTPCRefitD0SecondDaughter(Bool_t option)
void GetSoftSelectionArrayITSBPlusPion(Bool_t array[7]=0)
Double_t GetFiducialYCut() const
void GetHardSelectionArrayITSBPlusPion(Bool_t array[7]=0)
void SetHardSelectionArrayITSBPlusPion(const Bool_t array[7]=0)
void SetSoftSelectionArrayITSD0FirstDaughter(const Bool_t array[7]=0)
void SetUseITSRefitBPlusPion(Bool_t option)
Int_t IsD0SelectedPreRecVtxMVA(AliAODRecoDecayHF2Prong *d, AliAODTrack *pion, AliAODVertex *primaryVertex, Double_t bz, Int_t selLevel)
Bool_t IsSelected(TObject *obj)
Definition: AliRDHFCuts.h:306
Double_t GetSigmaForCutOptimization(Int_t iPtBin) const
void SetMinPtD0SecondDaughter(Double_t value)
void SetCutsForCutOptimization(Int_t glIndex, Float_t *cutsRDForCutOptimization)
void SetNVarsD0forD0ptbin(Int_t nVars)
void SetPtBinsD0forD0ptbin(Int_t nPtBinLimits, Float_t *ptBinLimits)
AliRDHFCutsBPlustoD0Pi & operator=(const AliRDHFCutsBPlustoD0Pi &source)
Int_t GetCutIndexForCutOptimization(Int_t nVariable) const
bool Bool_t
Definition: External.C:53
Int_t fnPtBins
cuts on the candidate
Definition: AliRDHFCuts.h:445
void SetMinTPCNclsD0FirstDaughter(Int_t value)
void SetMinTPCNclsD0SecondDaughter(Int_t value)
Int_t GetNPtBinsD0forD0ptbin() const
void SetUseFilterBitD0SecondDaughter(Bool_t option)
Bool_t fSoftSelectionArrayITSD0SecondDaughter[7]
void SetSigmaForCutOptimization(Double_t value, Int_t iPtBin)
void SetFilterBitBPlusPion(Int_t value)
void SetCutD0forD0ptbin(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue)
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Int_t ApplyCutOnVariable(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[68])
void SetCutsD0forD0ptbin(Int_t nVars, Int_t nPtBins, Float_t **cutsRDD0forD0ptbin)
void SetUseFilterBitBPlusPion(Bool_t option)
Bool_t fGetCutInfo
Radius for circular PID nsigma cut.
void SetIsUpperCut(Int_t nCutIndex, Bool_t isUpperCut)
void SetCutIndexForCutOptimization(Int_t nVariable, Int_t nCutIndex)
void SetMind0D0FirstDaughter(Double_t value)