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