]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/vertexingHF/AliRDHFCutsD0toKpi.h
Added support for dylib in test mode
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliRDHFCutsD0toKpi.h
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                               */
5
6 /* $Id$ */ 
7
8 //***********************************************************
9 // Class AliRDHFCutsD0toKpi
10 // class for cuts on AOD reconstructed D0->Kpi
11 // Author: A.Dainese, andrea.dainese@pd.infn.it
12 //***********************************************************
13
14 #include "AliRDHFCuts.h"
15
16 class AliAODEvent;
17 class AliAODRecoDecayHF;
18 class AliAODRecoDecayHF2Prong;
19
20 class AliRDHFCutsD0toKpi : public AliRDHFCuts 
21 {
22  public:
23
24
25   AliRDHFCutsD0toKpi(const char* name="CutsD0toKpi");
26   
27   virtual ~AliRDHFCutsD0toKpi();
28
29   AliRDHFCutsD0toKpi(const AliRDHFCutsD0toKpi& source);
30   AliRDHFCutsD0toKpi& operator=(const AliRDHFCutsD0toKpi& source); 
31
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);
35   }
36   virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters,AliAODEvent *aod);
37
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);
42
43   virtual Int_t IsSelectedCombPID(AliAODRecoDecayHF* d); 
44   virtual void CalculateBayesianWeights(AliAODRecoDecayHF* d);
45
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 SetStandardCutsPP2010vsMult();
52   virtual void SetStandardCutsPP2011_276TeV();
53   virtual void SetStandardCutsPbPb2010();
54   virtual void SetStandardCutsPbPb2011();
55   void SetStandardCutsPbPb2010Peripherals();
56   virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd);
57   Int_t IsSelectedPIDdefault(AliAODRecoDecayHF *rd);
58   Int_t IsSelectedSpecialCuts(AliAODRecoDecayHF *d) const;
59   void SetUseSpecialCuts(Bool_t useSpecialCuts) {fUseSpecialCuts=useSpecialCuts;}
60   void SetMaximumPtSpecialCuts(Double_t pt) { fPtMaxSpecialCuts=pt; }
61   void SetMaximumPforPID(Double_t p){fmaxPtrackForPID=p;}
62   Double_t GetMaximumPforPID(){return fmaxPtrackForPID;}
63   Double_t GetMaximumPtSpecialCuts() const { return fPtMaxSpecialCuts; }
64   void SetLowPt(Bool_t lowpt,Double_t ptlow=2.) {fLowPt=lowpt;fPtLowPID=ptlow;}
65   Bool_t GetUseSpecialCuts() const {return fUseSpecialCuts;}
66   void SetUseDefaultPID(Bool_t defPID){fDefaultPID=defPID;}
67   Bool_t GetIsUsedDefPID(){return fDefaultPID;}
68   Double_t GetPtForPIDtight()const {return fPtLowPID;}
69   void SetUseKF(Bool_t useKF);
70   Bool_t GetIsUsedKF() const {return fUseKF;}
71   void SetWeightsPositive(Double_t* weights){
72      for (Int_t i = 0; i<AliPID::kSPECIES; i++) {
73          fWeightsPositive[i] = weights[i];
74      }
75 }
76   Double_t *GetWeightsPositive() const {return fWeightsPositive;}
77   void SetWeightsNegative(Double_t* weights){
78      for (Int_t i = 0; i<AliPID::kSPECIES; i++) {
79          fWeightsNegative[i] = weights[i];
80      }
81      }
82   Double_t *GetWeightsNegative() const {return fWeightsNegative;}
83   void SetBayesianStrategy(Int_t strat) {fBayesianStrategy=strat;}
84   Int_t GetBayesianStrategy() const {return fBayesianStrategy;}
85   
86   enum EBayesianStrategy {
87      kBayesMomentum,
88      kBayesWeight,
89      kBayesWeightNoFilter,
90      kBayesSimple
91   };
92
93   
94   enum EBayesianCondition {
95      kMaxProb,
96      kAbovePrior,
97      kThreshold
98   };
99   
100   void SetBayesianCondition(Int_t cond) {fBayesianCondition=cond;}
101   Int_t GetBayesianCondition() const {return fBayesianCondition;}
102   void SetCombPID(Bool_t CombPID){fCombPID=CombPID;}
103   Bool_t GetCombPID() const {return fCombPID;}
104   void SetBayesProbThreshold(Double_t thresh){fProbThreshold=thresh;}
105   Double_t GetBayesProbThreshold() const {return fProbThreshold;}
106   
107
108  protected:
109   
110   Int_t IsSelectedKF(AliAODRecoDecayHF2Prong* d,AliAODEvent* aod) const;
111
112   Bool_t fUseSpecialCuts;  // flag to switch on/off special cuts
113   Bool_t fLowPt;           // flag to switch on/off different pid for low pt D0
114   Bool_t fDefaultPID;      // flag to switch on/off the default pid
115   
116   Bool_t fUseKF;           // flag to switch on/off D0 selection via KF 
117   Double_t fPtLowPID;      // transverse momentum below which the strong PID is applied
118   Double_t fPtMaxSpecialCuts; // transverse momentum below which the special cuts are applied
119   
120                               //  if set to zero, used for all pt
121   Double_t  fmaxPtrackForPID; // max momentum for applying PID
122
123   Bool_t fCombPID;              //switch for Bayesian
124   Int_t fnSpecies;   //number of species (used only for array declaration)
125   Double_t* fWeightsPositive; //[fnSpecies] Bayesian weights for positive track
126   Double_t* fWeightsNegative; //[fnSpecies] Bayesian weights for negative track
127
128   Double_t fProbThreshold; //Probability threshold for kaon to be accepted in Bayesian method (only applied if fBayesianCondition==kThreshold)
129   
130   Int_t fBayesianStrategy;    // Switch for which Bayesian PID strategy to use
131   Int_t fBayesianCondition;   //Switch for conition applied to kaons
132
133   ClassDef(AliRDHFCutsD0toKpi,11);  // class for cuts on AOD reconstructed D0->Kpi
134 };
135
136 #endif
137