AliPhysics  2c6b7ad (2c6b7ad)
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 
57  virtual Int_t SelectPID(AliAODTrack *track, Int_t type);
58  virtual Bool_t IsInFiducialAcceptance(Double_t pt,Double_t y) const;
59 
60  void SetMaxPtPid(Float_t maxPt){fMaxPtPid = maxPt;}
61 
62  void SetOffHighPtPIDinTPC(Float_t TPCrem =999.){fTPCflag = TPCrem;}
63 
64  //Pion from Bplus not really soft, but re-using code from Dstar (hence the name)
65  void AddTrackCutsSoftPi(const AliESDtrackCuts *cuts){ fTrackCutsSoftPi = new AliESDtrackCuts(*cuts); return;}
66  virtual AliESDtrackCuts *GetTrackCutsSoftPi() const {return fTrackCutsSoftPi;}
67 
68  void SetGetCutInfo(Bool_t value){fGetCutInfo = value;}
69  void InitializeCuts();
70  void InitializeCutsForCutOptimization(Int_t nCutsForOptimization, Int_t nVariables);
71  void SetCutsForCutOptimization(Int_t glIndex,Float_t *cutsRDForCutOptimization);
72 
74  void SetCircRadius(Double_t radius) { fCircRadius = radius; }
75 
77 
78  void SetCutsD0forD0ptbin(Int_t nVars,Int_t nPtBins,Float_t **cutsRDD0forD0ptbin);
79  void SetCutsD0forD0ptbin(Int_t glIndex,Float_t *cutsRDD0forD0ptbin);
81  void SetPtBinsD0forD0ptbin(Int_t nPtBinLimits,Float_t *ptBinLimits);
82 
86  Int_t GetGlobalIndexD0forD0ptbin(Int_t iVar,Int_t iPtBin) const{return iPtBin*fnVarsD0forD0ptbin+iVar;}
88  void SetNPtBinsD0forD0ptbin(Int_t nptBins){fnPtBinsD0forD0ptbin=nptBins; return;}
89  void SetNVarsD0forD0ptbin(Int_t nVars){fnVarsD0forD0ptbin=nVars; return;}
90 
91  void SetIsUpperCut(Int_t nCutIndex, Bool_t isUpperCut){fIsUpperCut[nCutIndex] = isUpperCut; return;}
92  void SetIsUpperCutD0forD0ptbin(Int_t nCutIndex, Bool_t isUpperCut){fIsUpperCutD0forD0ptbin[nCutIndex] = isUpperCut; return;}
93 
94  Bool_t GetIsUpperCut(Int_t nCutIndex){return fIsUpperCut[nCutIndex];}
96 
97  void SetIsCutUsed(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed){fIsCutUsed[GetGlobalIndex(nCutIndex,ptbin)] = isCutUsed; return;}
98  void SetIsCutUsedD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Bool_t isCutUsed){fIsCutUsedD0forD0ptbin[GetGlobalIndexD0forD0ptbin(nCutIndex,ptbin)] = isCutUsed; return;}
99 
100  Bool_t GetIsCutUsed(Int_t nCutIndex, Int_t ptbin) const {return fIsCutUsed[GetGlobalIndex(nCutIndex,ptbin)];}
102 
103  //Last two for MVA, first two for standard analysis (TBD: Merge them?)
104  Int_t ApplyCutOnVariable(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[68]);
105  Int_t ApplyCutOnVariableD0forD0ptbin(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[29]);
106  Int_t ApplyCutOnVariableMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue);
107  Int_t ApplyCutOnVariableD0forD0ptbinMVA(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue);
108 
109  void SetVarNamesD0forD0ptbin(Int_t nVars,TString *varNames,Bool_t *isUpperCut);
110 
119  void GetHardSelectionArrayITSD0FirstDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSD0FirstDaughter[i];} return;}
120  void GetSoftSelectionArrayITSD0FirstDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSD0FirstDaughter[i];} return;}
122 
131  void SetHardSelectionArrayITSD0FirstDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSD0FirstDaughter[i] = array[i];} return;}
132  void SetSoftSelectionArrayITSD0FirstDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSD0FirstDaughter[i] = array[i];} return;}
134 
143  void GetHardSelectionArrayITSD0SecondDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSD0SecondDaughter[i];} return;}
144  void GetSoftSelectionArrayITSD0SecondDaughter(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSD0SecondDaughter[i];} return;}
146 
155  void SetHardSelectionArrayITSD0SecondDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSD0SecondDaughter[i] = array[i];} return;}
156  void SetSoftSelectionArrayITSD0SecondDaughter(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSD0SecondDaughter[i] = array[i];} return;}
158 
167  void GetHardSelectionArrayITSBPlusPion(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fHardSelectionArrayITSBPlusPion[i];} return;}
168  void GetSoftSelectionArrayITSBPlusPion(Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){array[i] = fSoftSelectionArrayITSBPlusPion[i];} return;}
170 
171  void SetMinITSNclsBPlusPion(Int_t value){fMinITSNclsBPlusPion = value; return;}
172  void SetMinTPCNclsBPlusPion(Int_t value){fMinTPCNclsBPlusPion = value; return;}
173  void SetUseITSRefitBPlusPion(Bool_t option){fUseITSRefitBPlusPion = option; return;}
174  void SetUseTPCRefitBPlusPion(Bool_t option){fUseTPCRefitBPlusPion = option; return;}
176  void SetFilterBitBPlusPion(Int_t value){fFilterBitBPlusPion = value; return;}
177  void SetMinPtBPlusPion(Double_t value){fMinPtBPlusPion = value; return;}
178  void SetMaxAbsEtaBPlusPion(Double_t value){fMaxAbsEtaBPlusPion = value; return;}
179  void SetHardSelectionArrayITSBPlusPion(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fHardSelectionArrayITSBPlusPion[i] = array[i];}}
180  void SetSoftSelectionArrayITSBPlusPion(const Bool_t array[7] = 0){for(Int_t i=0;i<7;i++){fSoftSelectionArrayITSBPlusPion[i] = array[i];}}
182 
183  void SetCut(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue);
184  void SetCutD0forD0ptbin(Int_t nCutIndex, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t cutValue);
185  void SetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin, AliRDHFCutsBPlustoD0Pi::EUpperCut cutDirection, Float_t * cutValues);
186  Float_t GetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin){return fCutsRDForCutOptimization[GetGlobalIndexForCutOptimization(nCutIndex,nVariable,ptBin)];}
187 
192 
195  void SetMind0BPlusPion(Double_t value){fMind0BPlusPion = value; return;}
196  void SetFiducialYCut(Double_t value){fFiducialYCut = value; return;}
197 
200 
203 
206 
207  void SetIsUpperCutForCutOptimization(Int_t nVariable, Bool_t isUpperCut){fIsUpperCutForCutOptimization[nVariable] = isUpperCut; return;}
209 
210  void SetCutIndexForCutOptimization(Int_t nVariable, Int_t nCutIndex){fCutIndexForCutOptimization[nVariable] = nCutIndex; return;}
212 
213  void SetSigmaForCutOptimization(Double_t value, Int_t iPtBin){fSigmaForCutOptimization[iPtBin] = value; return;}
215 
216  protected:
217 
218  //Pion from Bplus not really soft, but re-using code from Dstar
219  AliESDtrackCuts * fTrackCutsSoftPi;
220 
225 
226  Bool_t * fIsCutUsed; //[fGlobalIndex]
227 
231  Float_t * fCutsRDD0forD0ptbin; //[fGlobalIndexD0forD0ptbin]
233  Float_t * fPtBinLimitsD0forD0ptbin; //[fnPtBinLimitsD0forD0ptbin]
234  Bool_t * fIsUpperCutD0forD0ptbin; //[fnVarsD0forD0ptbin]
235  Bool_t * fIsCutUsedD0forD0ptbin; //[fGlobalIndexD0forD0ptbin]
236  TString * fVarNamesD0forD0ptbin; //[fnVarsD0forD0ptbin]
237 
249 
261 
273 
278 
282  Float_t * fCutsRDForCutOptimization; //[fGlobalIndexCutOptimization]
283  Bool_t * fIsUpperCutForCutOptimization; //[fnVariablesForCutOptimization]
284  Int_t * fCutIndexForCutOptimization; //[fnVariablesForCutOptimization]
286 
288  ClassDef(AliRDHFCutsBPlustoD0Pi,3)
289 };
291 
292 #endif
293 
294 
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:433
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)
Bool_t IsSelected(TObject *obj)
Definition: AliRDHFCuts.h:292
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:424
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)