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