]>
Commit | Line | Data |
---|---|---|
7ce8802c | 1 | #ifndef ALIAODPIDHF_H |
2 | #define ALIAODPIDHF_H | |
3 | ||
4 | /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * | |
27de2dfb | 5 | * See cxx source for full Copyright notice */ |
6 | ||
7 | /* $Id$ */ | |
7ce8802c | 8 | |
9 | //*********************************************************** | |
10 | //// Class AliAODPidHF | |
11 | //// class for PID with AliAODRecoDecayHF | |
228f3aba | 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 |
7ce8802c | 13 | ////*********************************************************** |
14 | ||
15 | #include "AliAODPid.h" | |
16 | #include "AliAODTrack.h" | |
b79bfc3e | 17 | #include "AliPIDResponse.h" |
11690a06 | 18 | #include "AliPIDCombined.h" |
7ce8802c | 19 | |
228f3aba | 20 | class AliAODPidHF : public AliAODPid{ |
7ce8802c | 21 | |
22 | public: | |
23 | ||
24 | AliAODPidHF(); | |
25 | AliAODPidHF(const AliAODPidHF& pid); | |
26 | AliAODPidHF& operator=(const AliAODPidHF& pid); | |
27 | virtual ~AliAODPidHF(); | |
28 | ||
29 | //Setters | |
79f3c225 | 30 | void SetSigma(Double_t *sigma){ |
31 | for(Int_t i=0; i<fnNSigma; i++) fnSigma[i]=sigma[i]; | |
32 | } | |
228f3aba | 33 | void SetSigma(Int_t idet,Double_t sigma){fnSigma[idet]=sigma;return;} |
79f3c225 | 34 | void SetSigmaForTPC(Double_t *sigma){for(Int_t i=0;i<3;i++) fnSigma[i]=sigma[i];return;} |
ad42e35b | 35 | void SetSigmaForTPCCompat(Double_t sigma){fnSigmaCompat[0]=sigma;return;} |
36 | void SetSigmaForTOFCompat(Double_t sigma){fnSigmaCompat[1]=sigma;return;} | |
79f3c225 | 37 | void SetSigmaForTOF(Double_t sigma){fnSigma[3]=sigma;return;} |
38 | void SetSigmaForITS(Double_t sigma){fnSigma[4]=sigma;return;} | |
228f3aba | 39 | void SetTofSigma(Double_t sigma){fTOFSigma=sigma;return;} |
7ce8802c | 40 | void SetPriors(Double_t *priors){fPriors=priors;return;} |
79f3c225 | 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;} | |
228f3aba | 43 | void SetAsym(Bool_t asym){fAsym=asym;return;} |
cdac45d3 | 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;} | |
79f3c225 | 48 | void SetMatch(Int_t match){fMatch=match;return;} |
cdac45d3 | 49 | void SetCompat(Bool_t comp){fCompat=comp;return;} |
913d1957 | 50 | void SetMC(Bool_t mc){fMC=mc;return;} |
5821ea5b | 51 | void SetMClowenpp2011(Bool_t mc){fMCLowEn2011=mc;return;} |
12141139 | 52 | void SetOnePad(Bool_t onepad){fOnePad=onepad;return;} |
67a82ef2 | 53 | void SetppLowEn2011(Bool_t opt){fppLowEn2011=opt;return;} |
17c4a8d5 | 54 | void SetPbPb(Bool_t pbpb){fPbPb=pbpb;return;} |
ad42e35b | 55 | void SetPCompatTOF(Double_t pTOF){fPCompatTOF=pTOF;return;} |
439d61b7 | 56 | void SetTOFdecide(Bool_t tOFdecide){fTOFdecide=tOFdecide;return;} |
b79bfc3e | 57 | void SetOldPid(Bool_t oldPid){fOldPid=oldPid;return;} |
2c9eefd4 | 58 | void SetPtThresholdTPC(Double_t ptThresholdTPC){fPtThresholdTPC=ptThresholdTPC;return;} |
b79bfc3e | 59 | void SetPidResponse(AliPIDResponse *pidResp) {fPidResponse=pidResp;return;} |
7ce8802c | 60 | |
79f3c225 | 61 | //Getters |
1cb0f658 | 62 | Double_t GetSigma(Int_t idet) const{return fnSigma[idet];} |
63 | Double_t GetTofSigma() const{return fTOFSigma;} | |
4fc75076 | 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;} | |
1cb0f658 | 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;} | |
913d1957 | 75 | Bool_t GetMC() const{return fMC;} |
17c4a8d5 | 76 | Bool_t GetOnePad() const{return fOnePad;} |
67a82ef2 | 77 | Bool_t GetppLowEn2011() const {return fppLowEn2011;} |
5821ea5b | 78 | Bool_t GetMCLowEn2011() const {return fMCLowEn2011;} |
17c4a8d5 | 79 | Bool_t GetPbPb() const{return fPbPb;} |
439d61b7 | 80 | Bool_t GetTOFdecide() const{return fTOFdecide;} |
ad42e35b | 81 | Double_t GetPCompatTOF() const{return fPCompatTOF;} |
82 | Double_t GetnSigmaCompatTPC() const{return fnSigmaCompat[0];} | |
83 | Double_t GetnSigmaCompatTOF() const{return fnSigmaCompat[1];} | |
b79bfc3e | 84 | Bool_t GetOldPid(){return fOldPid;} |
2c9eefd4 | 85 | Double_t GetPtThresholdTPC(){return fPtThresholdTPC;} |
11690a06 | 86 | AliPIDResponse *GetPidResponse() const {return fPidResponse;} |
87 | AliPIDCombined *GetPidCombined() const {return fPidCombined;} | |
7ce8802c | 88 | |
228f3aba | 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; | |
cdac45d3 | 94 | void BayesianProbability(AliAODTrack *track,Double_t *pid) const; |
228f3aba | 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 | ||
cdac45d3 | 101 | Int_t MakeRawPid(AliAODTrack *track,Int_t specie); //general method to perform PID using raw signals |
102 | ||
d50b25df | 103 | Bool_t IsTOFPiKexcluded(AliAODTrack *track,Double_t nsigmaK); |
104 | ||
bad87dce | 105 | void SetBetheBloch(AliTPCPIDResponse &tpcResp) const; |
7ce8802c | 106 | |
64e39959 | 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 | ||
7ce8802c | 112 | protected: |
113 | ||
228f3aba | 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; | |
7ce8802c | 121 | |
122 | private: | |
cdac45d3 | 123 | Int_t fnNSigma; // number of sigmas |
ad42e35b | 124 | Double_t *fnSigma; // [fnNSigma], sigma for the raw signal PID: 0-2 for TPC, 3 for TOF, 4 for ITS |
228f3aba | 125 | Double_t fTOFSigma; // TOF precision |
cdac45d3 | 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] | |
228f3aba | 130 | Bool_t fAsym; // asimmetric PID required |
cdac45d3 | 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 | |
79f3c225 | 135 | Int_t fMatch; //switch to combine the info from more detectors: 1 = || , 2 = &, 3 = p region |
cdac45d3 | 136 | Bool_t fCompat; // compatibility region : useful only if fMatch=1 |
ad42e35b | 137 | Double_t fPCompatTOF; // compatibility p limit for TOF |
02baac36 | 138 | Int_t fnNSigmaCompat; // number of sigmas |
139 | Double_t *fnSigmaCompat; //[fnNSigmaCompat] 0: n sigma for TPC compatibility band, 1: for TOF | |
913d1957 | 140 | Bool_t fMC; // MC(kTRUE) or real data (kFALSE, default option) |
12141139 | 141 | Bool_t fOnePad; // real data with one pad clusters |
5821ea5b | 142 | Bool_t fMCLowEn2011; // MC for low energy MC |
67a82ef2 | 143 | Bool_t fppLowEn2011; // Data for low energy pp 2011 |
17c4a8d5 | 144 | Bool_t fPbPb; // real data PbPb |
439d61b7 | 145 | Bool_t fTOFdecide; // real data PbPb |
b79bfc3e | 146 | Bool_t fOldPid; // old PID method implemented |
2c9eefd4 | 147 | Double_t fPtThresholdTPC; // pT threshold to use TPC PID |
b79bfc3e | 148 | AliPIDResponse *fPidResponse; //pid response |
11690a06 | 149 | AliPIDCombined* fPidCombined; //combined PID object |
7ce8802c | 150 | |
151 | ||
67a82ef2 | 152 | ClassDef(AliAODPidHF,15) // AliAODPid for heavy flavor PID |
7ce8802c | 153 | |
154 | }; | |
155 | ||
156 | #endif | |
d50b25df | 157 |