]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAODPidHF.h
Possibility to superimpose two sets of histos (Zaida)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAODPidHF.h
1 #ifndef ALIAODPIDHF_H
2 #define ALIAODPIDHF_H
3
4 /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */ 
8
9 //***********************************************************
10 //// Class AliAODPidHF
11 //// class for PID with AliAODRecoDecayHF 
12 //// Authors: D. Caffarri caffarri@pd.infn.it, A.Dainese andrea.dainese@pd.infn.it, S. Dash dash@to.infn.it, F. Prino prino@to.infn.it, R. Romita r.romita@gsi.de, Y. Wang yifei@pi0.physi.uni-heidelberg.de
13 ////***********************************************************
14
15 #include "AliAODPid.h"
16 #include "AliAODTrack.h"
17 #include "AliPIDResponse.h"
18 #include "AliPIDCombined.h"
19
20 class AliAODPidHF : public AliAODPid{
21
22  public:
23
24  AliAODPidHF();
25  AliAODPidHF(const AliAODPidHF& pid);
26  AliAODPidHF& operator=(const AliAODPidHF& pid);
27  virtual ~AliAODPidHF();
28
29  //Setters
30  void SetSigma(Double_t *sigma){
31     for(Int_t i=0; i<fnNSigma; i++) fnSigma[i]=sigma[i];
32      }
33  void SetSigma(Int_t idet,Double_t sigma){fnSigma[idet]=sigma;return;}
34  void SetSigmaForTPC(Double_t *sigma){for(Int_t i=0;i<3;i++) fnSigma[i]=sigma[i];return;}
35  void SetSigmaForTPCCompat(Double_t sigma){fnSigmaCompat[0]=sigma;return;}
36  void SetSigmaForTOFCompat(Double_t sigma){fnSigmaCompat[1]=sigma;return;}
37  void SetSigmaForTOF(Double_t sigma){fnSigma[3]=sigma;return;}
38  void SetSigmaForITS(Double_t sigma){fnSigma[4]=sigma;return;}
39  void SetTofSigma(Double_t sigma){fTOFSigma=sigma;return;}
40  void SetPriors(Double_t *priors){fPriors=priors;return;}
41  void SetPLimit(Double_t *plim){for(Int_t i=0;i<fnPLimit;i++) fPLimit[i]=plim[i];return;}
42  void SetPLimit(Double_t *plim,Int_t npLim){fnPLimit=npLim;for(Int_t i=0;i<fnPLimit;i++) fPLimit[i]=plim[i];return;}
43  void SetAsym(Bool_t asym){fAsym=asym;return;}
44  void SetTPC(Bool_t tpc){fTPC=tpc;return;}
45  void SetTOF(Bool_t tof){fTOF=tof;return;}
46  void SetITS(Bool_t its){fITS=its;return;}
47  void SetTRD(Bool_t trd){fTRD=trd;return;}
48  void SetMatch(Int_t match){fMatch=match;return;}
49  void SetCompat(Bool_t comp){fCompat=comp;return;}
50  void SetMC(Bool_t mc){fMC=mc;return;}
51  void SetMClowenpp2011(Bool_t mc){fMCLowEn2011=mc;return;}
52  void SetOnePad(Bool_t onepad){fOnePad=onepad;return;}
53  void SetppLowEn2011(Bool_t opt){fppLowEn2011=opt;return;}
54  void SetPbPb(Bool_t pbpb){fPbPb=pbpb;return;}
55  void SetPCompatTOF(Double_t pTOF){fPCompatTOF=pTOF;return;}
56  void SetTOFdecide(Bool_t tOFdecide){fTOFdecide=tOFdecide;return;}
57  void SetOldPid(Bool_t oldPid){fOldPid=oldPid;return;}
58  void SetPtThresholdTPC(Double_t ptThresholdTPC){fPtThresholdTPC=ptThresholdTPC;return;}
59  void SetPidResponse(AliPIDResponse *pidResp) {fPidResponse=pidResp;return;}
60  
61  //Getters
62  Double_t GetSigma(Int_t idet) const{return fnSigma[idet];}
63  Double_t GetTofSigma() const{return fTOFSigma;}
64  //void GetPriors(Double_t *priors) const{priors=fPriors;return;}
65  //void GetPLimit(Double_t *plim) const{plim=fPLimit;}
66  void GetPriors(Double_t *priors) const{for(Int_t i=0;i<fnPriors;i++){priors[i]=fPriors[i];}return;}
67  void GetPLimit(Double_t *plim) const{for(Int_t i=0;i<fnPLimit;i++){plim[i]=fPLimit[i];}return;}
68  Bool_t GetAsym() const{return fAsym;}
69  Bool_t GetTPC() const{return fTPC;}
70  Bool_t GetTOF() const{return fTOF;}
71  Bool_t GetITS() const{return fITS;}
72  Bool_t GetTRD() const{return fTRD;}
73  Int_t GetMatch() const{return fMatch;}
74  Bool_t GetCompat() const{return fCompat;}
75  Bool_t GetMC() const{return fMC;}
76  Bool_t GetOnePad() const{return fOnePad;}
77  Bool_t GetppLowEn2011() const {return fppLowEn2011;}
78  Bool_t GetMCLowEn2011() const {return fMCLowEn2011;}
79  Bool_t GetPbPb() const{return fPbPb;}
80  Bool_t GetTOFdecide() const{return fTOFdecide;}
81  Double_t GetPCompatTOF() const{return fPCompatTOF;}
82  Double_t GetnSigmaCompatTPC() const{return fnSigmaCompat[0];}
83  Double_t GetnSigmaCompatTOF() const{return fnSigmaCompat[1];}
84  Bool_t GetOldPid(){return fOldPid;}
85  Double_t GetPtThresholdTPC(){return fPtThresholdTPC;}
86  AliPIDResponse *GetPidResponse() const {return fPidResponse;}
87  AliPIDCombined *GetPidCombined() const {return fPidCombined;}
88
89  Int_t RawSignalPID (AliAODTrack *track, TString detector) const;
90  Bool_t IsKaonRaw (AliAODTrack *track, TString detector) const;
91  Bool_t IsPionRaw (AliAODTrack *track, TString detector) const;
92  Bool_t IsProtonRaw (AliAODTrack *track, TString detector) const;
93  Bool_t IsElectronRaw (AliAODTrack *track, TString detector) const;
94  void BayesianProbability(AliAODTrack *track,Double_t *pid) const;
95  void CombinedProbability(AliAODTrack *track,Bool_t *type) const; //0 = pion, 1 = kaon, 2 = proton
96  Bool_t CheckStatus(AliAODTrack *track,TString detectors) const;
97
98  Bool_t TPCRawAsym(AliAODTrack* track,Int_t specie) const;
99  Int_t MatchTPCTOF(AliAODTrack *track,Int_t mode,Int_t specie,Bool_t compat);
100
101  Int_t MakeRawPid(AliAODTrack *track,Int_t specie); //general method to perform PID using raw signals
102
103  Bool_t IsTOFPiKexcluded(AliAODTrack *track,Double_t nsigmaK);
104
105  void SetBetheBloch(AliTPCPIDResponse &tpcResp) const;
106
107   // method for AliPIDCombined object
108   void SetSelectedSpecies(Int_t ispecies = AliPID::kSPECIES){GetPidCombined()->SetSelectedSpecies(ispecies);};
109   void SetPriorDistribution(AliPID::EParticleType type,TH1F *prior);
110   void DrawPrior(AliPID::EParticleType type);
111
112  protected:
113
114  Int_t ApplyPidTPCRaw(AliAODTrack *track,Int_t specie) const;
115  Int_t ApplyPidTOFRaw(AliAODTrack *track,Int_t specie) const;
116  Int_t ApplyPidITSRaw(AliAODTrack *track,Int_t specie) const;
117  void BayesianProbabilityITS(AliAODTrack *track,Double_t *prob) const;
118  void BayesianProbabilityTPC(AliAODTrack *track,Double_t *prob) const;
119  void BayesianProbabilityTOF(AliAODTrack *track,Double_t *prob) const;
120  void BayesianProbabilityTRD(AliAODTrack *track,Double_t *prob) const;
121
122  private:
123  Int_t fnNSigma; // number of sigmas
124  Double_t *fnSigma; // [fnNSigma], sigma for the raw signal PID: 0-2 for TPC, 3 for TOF, 4 for ITS
125  Double_t fTOFSigma; // TOF precision 
126  Int_t fnPriors; //number of priors
127  Double_t *fPriors; // [fnPriors], set of priors
128  Int_t fnPLimit; //number of Plimit
129  Double_t *fPLimit; // [fnPLimit], limit of p intervals for asimmetric PID: fPLimit<p[0], fPLimit[0]<p<fPLimit[1], p>fPLimit[1]
130  Bool_t fAsym; // asimmetric PID required
131  Bool_t fTPC; //switch to include or exclude TPC 
132  Bool_t fTOF; // switch to include or exclude TOF
133  Bool_t fITS; //switch to include or exclude ITS
134  Bool_t fTRD; // switch to include or exclude TRD
135  Int_t fMatch; //switch to combine the info from more detectors: 1 = || , 2 = &, 3 = p region
136  Bool_t fCompat; // compatibility region : useful only if fMatch=1
137  Double_t fPCompatTOF; //  compatibility p limit for TOF  
138  Int_t fnNSigmaCompat; // number of sigmas
139  Double_t *fnSigmaCompat; //[fnNSigmaCompat]  0: n sigma for TPC compatibility band, 1: for TOF  
140  Bool_t fMC; // MC(kTRUE) or real data (kFALSE, default option)
141  Bool_t fOnePad; //  real data with one pad clusters 
142  Bool_t fMCLowEn2011; //  MC for low energy MC
143  Bool_t fppLowEn2011; //  Data for low energy pp 2011
144  Bool_t fPbPb; //  real data PbPb 
145  Bool_t fTOFdecide; //  real data PbPb 
146  Bool_t fOldPid; //  old PID method implemented
147  Double_t fPtThresholdTPC; //  pT threshold to use TPC PID
148  AliPIDResponse *fPidResponse; //pid response
149  AliPIDCombined* fPidCombined; //combined PID object 
150
151
152  ClassDef(AliAODPidHF,15) // AliAODPid for heavy flavor PID
153
154 };
155
156 #endif
157