]>
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" |
7ce8802c | 18 | |
228f3aba | 19 | class AliAODPidHF : public AliAODPid{ |
7ce8802c | 20 | |
21 | public: | |
22 | ||
23 | AliAODPidHF(); | |
24 | AliAODPidHF(const AliAODPidHF& pid); | |
25 | AliAODPidHF& operator=(const AliAODPidHF& pid); | |
26 | virtual ~AliAODPidHF(); | |
27 | ||
28 | //Setters | |
79f3c225 | 29 | void SetSigma(Double_t *sigma){ |
30 | for(Int_t i=0; i<fnNSigma; i++) fnSigma[i]=sigma[i]; | |
31 | } | |
228f3aba | 32 | void SetSigma(Int_t idet,Double_t sigma){fnSigma[idet]=sigma;return;} |
79f3c225 | 33 | void SetSigmaForTPC(Double_t *sigma){for(Int_t i=0;i<3;i++) fnSigma[i]=sigma[i];return;} |
ad42e35b | 34 | void SetSigmaForTPCCompat(Double_t sigma){fnSigmaCompat[0]=sigma;return;} |
35 | void SetSigmaForTOFCompat(Double_t sigma){fnSigmaCompat[1]=sigma;return;} | |
79f3c225 | 36 | void SetSigmaForTOF(Double_t sigma){fnSigma[3]=sigma;return;} |
37 | void SetSigmaForITS(Double_t sigma){fnSigma[4]=sigma;return;} | |
228f3aba | 38 | void SetTofSigma(Double_t sigma){fTOFSigma=sigma;return;} |
7ce8802c | 39 | void SetPriors(Double_t *priors){fPriors=priors;return;} |
79f3c225 | 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;} | |
228f3aba | 42 | void SetAsym(Bool_t asym){fAsym=asym;return;} |
cdac45d3 | 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;} | |
79f3c225 | 47 | void SetMatch(Int_t match){fMatch=match;return;} |
cdac45d3 | 48 | void SetCompat(Bool_t comp){fCompat=comp;return;} |
913d1957 | 49 | void SetMC(Bool_t mc){fMC=mc;return;} |
5821ea5b | 50 | void SetMClowenpp2011(Bool_t mc){fMCLowEn2011=mc;return;} |
12141139 | 51 | void SetOnePad(Bool_t onepad){fOnePad=onepad;return;} |
17c4a8d5 | 52 | void SetPbPb(Bool_t pbpb){fPbPb=pbpb;return;} |
ad42e35b | 53 | void SetPCompatTOF(Double_t pTOF){fPCompatTOF=pTOF;return;} |
439d61b7 | 54 | void SetTOFdecide(Bool_t tOFdecide){fTOFdecide=tOFdecide;return;} |
b79bfc3e | 55 | void SetOldPid(Bool_t oldPid){fOldPid=oldPid;return;} |
2c9eefd4 | 56 | void SetPtThresholdTPC(Double_t ptThresholdTPC){fPtThresholdTPC=ptThresholdTPC;return;} |
b79bfc3e | 57 | void SetPidResponse(AliPIDResponse *pidResp) {fPidResponse=pidResp;return;} |
7ce8802c | 58 | |
79f3c225 | 59 | //Getters |
1cb0f658 | 60 | Double_t GetSigma(Int_t idet) const{return fnSigma[idet];} |
61 | Double_t GetTofSigma() const{return fTOFSigma;} | |
4fc75076 | 62 | //void GetPriors(Double_t *priors) const{priors=fPriors;return;} |
63 | //void GetPLimit(Double_t *plim) const{plim=fPLimit;} | |
64 | void GetPriors(Double_t *priors) const{for(Int_t i=0;i<fnPriors;i++){priors[i]=fPriors[i];}return;} | |
65 | void GetPLimit(Double_t *plim) const{for(Int_t i=0;i<fnPLimit;i++){plim[i]=fPLimit[i];}return;} | |
1cb0f658 | 66 | Bool_t GetAsym() const{return fAsym;} |
67 | Bool_t GetTPC() const{return fTPC;} | |
68 | Bool_t GetTOF() const{return fTOF;} | |
69 | Bool_t GetITS() const{return fITS;} | |
70 | Bool_t GetTRD() const{return fTRD;} | |
71 | Int_t GetMatch() const{return fMatch;} | |
72 | Bool_t GetCompat() const{return fCompat;} | |
913d1957 | 73 | Bool_t GetMC() const{return fMC;} |
17c4a8d5 | 74 | Bool_t GetOnePad() const{return fOnePad;} |
5821ea5b | 75 | Bool_t GetMCLowEn2011() const {return fMCLowEn2011;} |
17c4a8d5 | 76 | Bool_t GetPbPb() const{return fPbPb;} |
439d61b7 | 77 | Bool_t GetTOFdecide() const{return fTOFdecide;} |
ad42e35b | 78 | Double_t GetPCompatTOF() const{return fPCompatTOF;} |
79 | Double_t GetnSigmaCompatTPC() const{return fnSigmaCompat[0];} | |
80 | Double_t GetnSigmaCompatTOF() const{return fnSigmaCompat[1];} | |
b79bfc3e | 81 | Bool_t GetOldPid(){return fOldPid;} |
2c9eefd4 | 82 | Double_t GetPtThresholdTPC(){return fPtThresholdTPC;} |
b79bfc3e | 83 | AliPIDResponse *GetPidResponse() const{return fPidResponse;} |
7ce8802c | 84 | |
228f3aba | 85 | Int_t RawSignalPID (AliAODTrack *track, TString detector) const; |
86 | Bool_t IsKaonRaw (AliAODTrack *track, TString detector) const; | |
87 | Bool_t IsPionRaw (AliAODTrack *track, TString detector) const; | |
88 | Bool_t IsProtonRaw (AliAODTrack *track, TString detector) const; | |
89 | Bool_t IsElectronRaw (AliAODTrack *track, TString detector) const; | |
cdac45d3 | 90 | void BayesianProbability(AliAODTrack *track,Double_t *pid) const; |
228f3aba | 91 | void CombinedProbability(AliAODTrack *track,Bool_t *type) const; //0 = pion, 1 = kaon, 2 = proton |
92 | Bool_t CheckStatus(AliAODTrack *track,TString detectors) const; | |
93 | ||
94 | Bool_t TPCRawAsym(AliAODTrack* track,Int_t specie) const; | |
95 | Int_t MatchTPCTOF(AliAODTrack *track,Int_t mode,Int_t specie,Bool_t compat); | |
96 | ||
cdac45d3 | 97 | Int_t MakeRawPid(AliAODTrack *track,Int_t specie); //general method to perform PID using raw signals |
98 | ||
d50b25df | 99 | Bool_t IsTOFPiKexcluded(AliAODTrack *track,Double_t nsigmaK); |
100 | ||
bad87dce | 101 | void SetBetheBloch(AliTPCPIDResponse &tpcResp) const; |
7ce8802c | 102 | |
103 | protected: | |
104 | ||
228f3aba | 105 | Int_t ApplyPidTPCRaw(AliAODTrack *track,Int_t specie) const; |
106 | Int_t ApplyPidTOFRaw(AliAODTrack *track,Int_t specie) const; | |
107 | Int_t ApplyPidITSRaw(AliAODTrack *track,Int_t specie) const; | |
108 | void BayesianProbabilityITS(AliAODTrack *track,Double_t *prob) const; | |
109 | void BayesianProbabilityTPC(AliAODTrack *track,Double_t *prob) const; | |
110 | void BayesianProbabilityTOF(AliAODTrack *track,Double_t *prob) const; | |
111 | void BayesianProbabilityTRD(AliAODTrack *track,Double_t *prob) const; | |
7ce8802c | 112 | |
113 | private: | |
cdac45d3 | 114 | Int_t fnNSigma; // number of sigmas |
ad42e35b | 115 | Double_t *fnSigma; // [fnNSigma], sigma for the raw signal PID: 0-2 for TPC, 3 for TOF, 4 for ITS |
228f3aba | 116 | Double_t fTOFSigma; // TOF precision |
cdac45d3 | 117 | Int_t fnPriors; //number of priors |
118 | Double_t *fPriors; // [fnPriors], set of priors | |
119 | Int_t fnPLimit; //number of Plimit | |
120 | Double_t *fPLimit; // [fnPLimit], limit of p intervals for asimmetric PID: fPLimit<p[0], fPLimit[0]<p<fPLimit[1], p>fPLimit[1] | |
228f3aba | 121 | Bool_t fAsym; // asimmetric PID required |
cdac45d3 | 122 | Bool_t fTPC; //switch to include or exclude TPC |
123 | Bool_t fTOF; // switch to include or exclude TOF | |
124 | Bool_t fITS; //switch to include or exclude ITS | |
125 | Bool_t fTRD; // switch to include or exclude TRD | |
79f3c225 | 126 | Int_t fMatch; //switch to combine the info from more detectors: 1 = || , 2 = &, 3 = p region |
cdac45d3 | 127 | Bool_t fCompat; // compatibility region : useful only if fMatch=1 |
ad42e35b | 128 | Double_t fPCompatTOF; // compatibility p limit for TOF |
02baac36 | 129 | Int_t fnNSigmaCompat; // number of sigmas |
130 | Double_t *fnSigmaCompat; //[fnNSigmaCompat] 0: n sigma for TPC compatibility band, 1: for TOF | |
913d1957 | 131 | Bool_t fMC; // MC(kTRUE) or real data (kFALSE, default option) |
12141139 | 132 | Bool_t fOnePad; // real data with one pad clusters |
5821ea5b | 133 | Bool_t fMCLowEn2011; // MC for low energy MC |
17c4a8d5 | 134 | Bool_t fPbPb; // real data PbPb |
439d61b7 | 135 | Bool_t fTOFdecide; // real data PbPb |
b79bfc3e | 136 | Bool_t fOldPid; // old PID method implemented |
2c9eefd4 | 137 | Double_t fPtThresholdTPC; // pT threshold to use TPC PID |
b79bfc3e | 138 | AliPIDResponse *fPidResponse; //pid response |
228f3aba | 139 | |
7ce8802c | 140 | |
141 | ||
2c9eefd4 | 142 | ClassDef(AliAODPidHF,13) // AliAODPid for heavy flavor PID |
7ce8802c | 143 | |
144 | }; | |
145 | ||
146 | #endif | |
d50b25df | 147 |