]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAODPidHF.h
c87f683f1fadb621dc2798db2e1b75f7a1877a7c
[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 "AliTPCPIDResponse.h"
18
19 class AliAODPidHF : public AliAODPid{
20
21  public:
22
23  AliAODPidHF();
24  AliAODPidHF(const AliAODPidHF& pid);
25  AliAODPidHF& operator=(const AliAODPidHF& pid);
26  virtual ~AliAODPidHF();
27
28  //Setters
29  void SetSigma(Double_t *sigma){
30     for(Int_t i=0; i<fnNSigma; i++) fnSigma[i]=sigma[i];
31      }
32  void SetSigma(Int_t idet,Double_t sigma){fnSigma[idet]=sigma;return;}
33  void SetSigmaForTPC(Double_t *sigma){for(Int_t i=0;i<3;i++) fnSigma[i]=sigma[i];return;}
34  void SetSigmaForTPCCompat(Double_t sigma){fnSigmaCompat[0]=sigma;return;}
35  void SetSigmaForTOFCompat(Double_t sigma){fnSigmaCompat[1]=sigma;return;}
36  void SetSigmaForTOF(Double_t sigma){fnSigma[3]=sigma;return;}
37  void SetSigmaForITS(Double_t sigma){fnSigma[4]=sigma;return;}
38  void SetTofSigma(Double_t sigma){fTOFSigma=sigma;return;}
39  void SetPriors(Double_t *priors){fPriors=priors;return;}
40  void SetPLimit(Double_t *plim){for(Int_t i=0;i<fnPLimit;i++) fPLimit[i]=plim[i];return;}
41  void SetPLimit(Double_t *plim,Int_t npLim){fnPLimit=npLim;for(Int_t i=0;i<fnPLimit;i++) fPLimit[i]=plim[i];return;}
42  void SetAsym(Bool_t asym){fAsym=asym;return;}
43  void SetTPC(Bool_t tpc){fTPC=tpc;return;}
44  void SetTOF(Bool_t tof){fTOF=tof;return;}
45  void SetITS(Bool_t its){fITS=its;return;}
46  void SetTRD(Bool_t trd){fTRD=trd;return;}
47  void SetMatch(Int_t match){fMatch=match;return;}
48  void SetCompat(Bool_t comp){fCompat=comp;return;}
49  void SetMC(Bool_t mc){fMC=mc;return;}
50  void SetMClowenpp2011(Bool_t mc){fMCLowEn2011=mc;return;}
51  void SetOnePad(Bool_t onepad){fOnePad=onepad;return;}
52  void SetPbPb(Bool_t pbpb){fPbPb=pbpb;return;}
53  void SetPCompatTOF(Double_t pTOF){fPCompatTOF=pTOF;return;}
54  
55  //Getters
56  Double_t GetSigma(Int_t idet) const{return fnSigma[idet];}
57  Double_t GetTofSigma() const{return fTOFSigma;}
58  //void GetPriors(Double_t *priors) const{priors=fPriors;return;}
59  //void GetPLimit(Double_t *plim) const{plim=fPLimit;}
60  void GetPriors(Double_t *priors) const{for(Int_t i=0;i<fnPriors;i++){priors[i]=fPriors[i];}return;}
61  void GetPLimit(Double_t *plim) const{for(Int_t i=0;i<fnPLimit;i++){plim[i]=fPLimit[i];}return;}
62  Bool_t GetAsym() const{return fAsym;}
63  Bool_t GetTPC() const{return fTPC;}
64  Bool_t GetTOF() const{return fTOF;}
65  Bool_t GetITS() const{return fITS;}
66  Bool_t GetTRD() const{return fTRD;}
67  Int_t GetMatch() const{return fMatch;}
68  Bool_t GetCompat() const{return fCompat;}
69  Bool_t GetMC() const{return fMC;}
70  Bool_t GetOnePad() const{return fOnePad;}
71  Bool_t GetMCLowEn2011() const {return fMCLowEn2011;}
72  Bool_t GetPbPb() const{return fPbPb;}
73  Double_t GetPCompatTOF() const{return fPCompatTOF;}
74  Double_t GetnSigmaCompatTPC() const{return fnSigmaCompat[0];}
75  Double_t GetnSigmaCompatTOF() const{return fnSigmaCompat[1];}
76
77  Int_t RawSignalPID (AliAODTrack *track, TString detector) const;
78  Bool_t IsKaonRaw (AliAODTrack *track, TString detector) const;
79  Bool_t IsPionRaw (AliAODTrack *track, TString detector) const;
80  Bool_t IsProtonRaw (AliAODTrack *track, TString detector) const;
81  Bool_t IsElectronRaw (AliAODTrack *track, TString detector) const;
82  void BayesianProbability(AliAODTrack *track,Double_t *pid) const;
83  void CombinedProbability(AliAODTrack *track,Bool_t *type) const; //0 = pion, 1 = kaon, 2 = proton
84  Bool_t CheckStatus(AliAODTrack *track,TString detectors) const;
85
86  Bool_t TPCRawAsym(AliAODTrack* track,Int_t specie) const;
87  Int_t MatchTPCTOF(AliAODTrack *track,Int_t mode,Int_t specie,Bool_t compat);
88
89  Int_t MakeRawPid(AliAODTrack *track,Int_t specie); //general method to perform PID using raw signals
90
91  Bool_t IsTOFPiKexcluded(AliAODTrack *track,Double_t nsigmaK);
92
93  void SetBetheBloch(AliTPCPIDResponse &tpcResp) const;
94
95  protected:
96
97  Int_t ApplyPidTPCRaw(AliAODTrack *track,Int_t specie) const;
98  Int_t ApplyPidTOFRaw(AliAODTrack *track,Int_t specie) const;
99  Int_t ApplyPidITSRaw(AliAODTrack *track,Int_t specie) const;
100  void BayesianProbabilityITS(AliAODTrack *track,Double_t *prob) const;
101  void BayesianProbabilityTPC(AliAODTrack *track,Double_t *prob) const;
102  void BayesianProbabilityTOF(AliAODTrack *track,Double_t *prob) const;
103  void BayesianProbabilityTRD(AliAODTrack *track,Double_t *prob) const;
104
105  private:
106  Int_t fnNSigma; // number of sigmas
107  Double_t *fnSigma; // [fnNSigma], sigma for the raw signal PID: 0-2 for TPC, 3 for TOF, 4 for ITS
108  Double_t fTOFSigma; // TOF precision 
109  Int_t fnPriors; //number of priors
110  Double_t *fPriors; // [fnPriors], set of priors
111  Int_t fnPLimit; //number of Plimit
112  Double_t *fPLimit; // [fnPLimit], limit of p intervals for asimmetric PID: fPLimit<p[0], fPLimit[0]<p<fPLimit[1], p>fPLimit[1]
113  Bool_t fAsym; // asimmetric PID required
114  Bool_t fTPC; //switch to include or exclude TPC 
115  Bool_t fTOF; // switch to include or exclude TOF
116  Bool_t fITS; //switch to include or exclude ITS
117  Bool_t fTRD; // switch to include or exclude TRD
118  Int_t fMatch; //switch to combine the info from more detectors: 1 = || , 2 = &, 3 = p region
119  Bool_t fCompat; // compatibility region : useful only if fMatch=1
120  Double_t fPCompatTOF; //  compatibility p limit for TOF  
121  Int_t fnNSigmaCompat; // number of sigmas
122  Double_t *fnSigmaCompat; //[fnNSigmaCompat]  0: n sigma for TPC compatibility band, 1: for TOF  
123  Bool_t fMC; // MC(kTRUE) or real data (kFALSE, default option)
124  Bool_t fOnePad; //  real data with one pad clusters 
125  Bool_t fMCLowEn2011; //  MC for low energy MC
126  Bool_t fPbPb; //  real data PbPb 
127  
128
129
130  ClassDef(AliAODPidHF,10) // AliAODPid for heavy flavor PID
131
132 };
133
134 #endif
135