Fix in the last caall to CleanOwnPrimaryVertex
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAODPidHF.h
CommitLineData
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 20class 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;}
17c4a8d5 53 void SetPbPb(Bool_t pbpb){fPbPb=pbpb;return;}
ad42e35b 54 void SetPCompatTOF(Double_t pTOF){fPCompatTOF=pTOF;return;}
439d61b7 55 void SetTOFdecide(Bool_t tOFdecide){fTOFdecide=tOFdecide;return;}
b79bfc3e 56 void SetOldPid(Bool_t oldPid){fOldPid=oldPid;return;}
2c9eefd4 57 void SetPtThresholdTPC(Double_t ptThresholdTPC){fPtThresholdTPC=ptThresholdTPC;return;}
b79bfc3e 58 void SetPidResponse(AliPIDResponse *pidResp) {fPidResponse=pidResp;return;}
7ce8802c 59
79f3c225 60 //Getters
1cb0f658 61 Double_t GetSigma(Int_t idet) const{return fnSigma[idet];}
62 Double_t GetTofSigma() const{return fTOFSigma;}
4fc75076 63 //void GetPriors(Double_t *priors) const{priors=fPriors;return;}
64 //void GetPLimit(Double_t *plim) const{plim=fPLimit;}
65 void GetPriors(Double_t *priors) const{for(Int_t i=0;i<fnPriors;i++){priors[i]=fPriors[i];}return;}
66 void GetPLimit(Double_t *plim) const{for(Int_t i=0;i<fnPLimit;i++){plim[i]=fPLimit[i];}return;}
1cb0f658 67 Bool_t GetAsym() const{return fAsym;}
68 Bool_t GetTPC() const{return fTPC;}
69 Bool_t GetTOF() const{return fTOF;}
70 Bool_t GetITS() const{return fITS;}
71 Bool_t GetTRD() const{return fTRD;}
72 Int_t GetMatch() const{return fMatch;}
73 Bool_t GetCompat() const{return fCompat;}
913d1957 74 Bool_t GetMC() const{return fMC;}
17c4a8d5 75 Bool_t GetOnePad() const{return fOnePad;}
5821ea5b 76 Bool_t GetMCLowEn2011() const {return fMCLowEn2011;}
17c4a8d5 77 Bool_t GetPbPb() const{return fPbPb;}
439d61b7 78 Bool_t GetTOFdecide() const{return fTOFdecide;}
ad42e35b 79 Double_t GetPCompatTOF() const{return fPCompatTOF;}
80 Double_t GetnSigmaCompatTPC() const{return fnSigmaCompat[0];}
81 Double_t GetnSigmaCompatTOF() const{return fnSigmaCompat[1];}
b79bfc3e 82 Bool_t GetOldPid(){return fOldPid;}
2c9eefd4 83 Double_t GetPtThresholdTPC(){return fPtThresholdTPC;}
11690a06 84 AliPIDResponse *GetPidResponse() const {return fPidResponse;}
85 AliPIDCombined *GetPidCombined() const {return fPidCombined;}
7ce8802c 86
228f3aba 87 Int_t RawSignalPID (AliAODTrack *track, TString detector) const;
88 Bool_t IsKaonRaw (AliAODTrack *track, TString detector) const;
89 Bool_t IsPionRaw (AliAODTrack *track, TString detector) const;
90 Bool_t IsProtonRaw (AliAODTrack *track, TString detector) const;
91 Bool_t IsElectronRaw (AliAODTrack *track, TString detector) const;
cdac45d3 92 void BayesianProbability(AliAODTrack *track,Double_t *pid) const;
228f3aba 93 void CombinedProbability(AliAODTrack *track,Bool_t *type) const; //0 = pion, 1 = kaon, 2 = proton
94 Bool_t CheckStatus(AliAODTrack *track,TString detectors) const;
95
96 Bool_t TPCRawAsym(AliAODTrack* track,Int_t specie) const;
97 Int_t MatchTPCTOF(AliAODTrack *track,Int_t mode,Int_t specie,Bool_t compat);
98
cdac45d3 99 Int_t MakeRawPid(AliAODTrack *track,Int_t specie); //general method to perform PID using raw signals
100
d50b25df 101 Bool_t IsTOFPiKexcluded(AliAODTrack *track,Double_t nsigmaK);
102
bad87dce 103 void SetBetheBloch(AliTPCPIDResponse &tpcResp) const;
7ce8802c 104
64e39959 105 // method for AliPIDCombined object
106 void SetSelectedSpecies(Int_t ispecies = AliPID::kSPECIES){GetPidCombined()->SetSelectedSpecies(ispecies);};
107 void SetPriorDistribution(AliPID::EParticleType type,TH1F *prior);
108 void DrawPrior(AliPID::EParticleType type);
109
7ce8802c 110 protected:
111
228f3aba 112 Int_t ApplyPidTPCRaw(AliAODTrack *track,Int_t specie) const;
113 Int_t ApplyPidTOFRaw(AliAODTrack *track,Int_t specie) const;
114 Int_t ApplyPidITSRaw(AliAODTrack *track,Int_t specie) const;
115 void BayesianProbabilityITS(AliAODTrack *track,Double_t *prob) const;
116 void BayesianProbabilityTPC(AliAODTrack *track,Double_t *prob) const;
117 void BayesianProbabilityTOF(AliAODTrack *track,Double_t *prob) const;
118 void BayesianProbabilityTRD(AliAODTrack *track,Double_t *prob) const;
7ce8802c 119
120 private:
cdac45d3 121 Int_t fnNSigma; // number of sigmas
ad42e35b 122 Double_t *fnSigma; // [fnNSigma], sigma for the raw signal PID: 0-2 for TPC, 3 for TOF, 4 for ITS
228f3aba 123 Double_t fTOFSigma; // TOF precision
cdac45d3 124 Int_t fnPriors; //number of priors
125 Double_t *fPriors; // [fnPriors], set of priors
126 Int_t fnPLimit; //number of Plimit
127 Double_t *fPLimit; // [fnPLimit], limit of p intervals for asimmetric PID: fPLimit<p[0], fPLimit[0]<p<fPLimit[1], p>fPLimit[1]
228f3aba 128 Bool_t fAsym; // asimmetric PID required
cdac45d3 129 Bool_t fTPC; //switch to include or exclude TPC
130 Bool_t fTOF; // switch to include or exclude TOF
131 Bool_t fITS; //switch to include or exclude ITS
132 Bool_t fTRD; // switch to include or exclude TRD
79f3c225 133 Int_t fMatch; //switch to combine the info from more detectors: 1 = || , 2 = &, 3 = p region
cdac45d3 134 Bool_t fCompat; // compatibility region : useful only if fMatch=1
ad42e35b 135 Double_t fPCompatTOF; // compatibility p limit for TOF
02baac36 136 Int_t fnNSigmaCompat; // number of sigmas
137 Double_t *fnSigmaCompat; //[fnNSigmaCompat] 0: n sigma for TPC compatibility band, 1: for TOF
913d1957 138 Bool_t fMC; // MC(kTRUE) or real data (kFALSE, default option)
12141139 139 Bool_t fOnePad; // real data with one pad clusters
5821ea5b 140 Bool_t fMCLowEn2011; // MC for low energy MC
17c4a8d5 141 Bool_t fPbPb; // real data PbPb
439d61b7 142 Bool_t fTOFdecide; // real data PbPb
b79bfc3e 143 Bool_t fOldPid; // old PID method implemented
2c9eefd4 144 Double_t fPtThresholdTPC; // pT threshold to use TPC PID
b79bfc3e 145 AliPIDResponse *fPidResponse; //pid response
11690a06 146 AliPIDCombined* fPidCombined; //combined PID object
7ce8802c 147
148
11690a06 149 ClassDef(AliAODPidHF,14) // AliAODPid for heavy flavor PID
7ce8802c 150
151};
152
153#endif
d50b25df 154