17 namespace AliHelperPIDNameSpace {
23 kNSigmaTPCTOF, // squared sum
24 kNSigmaPIDType=kNSigmaTPCTOF
28 enum AliHelperDetectorType_t
36 enum AliHelperParticleSpecies_t
43 }; // Particle species used in plotting
46 enum AliHelperCharge_t
54 using namespace AliHelperPIDNameSpace;
56 class AliHelperPID : public TNamed
61 virtual ~AliHelperPID() {}
64 Bool_t GetisMC(){return fisMC;}
65 void SetisMC(Bool_t mc){fisMC=mc;}
67 void SetPIDType(PIDType_t PIDType) { fPIDType = PIDType; }
68 PIDType_t GetPIDType() {return fPIDType; }
70 void SetNSigmaCut(Double_t nsigma) { fNSigmaPID = nsigma; }
71 Double_t GetNSigmaCut() {return fNSigmaPID; }
73 void SetfRequestTOFPID(Bool_t tof){fRequestTOFPID=tof;}//fRequestTOFPID
74 Bool_t GetfRequestTOFPID(){return fRequestTOFPID;}//fRequestTOFPID
76 void SetfUseExclusiveNSigma(Bool_t nsigEx){fUseExclusiveNSigma=nsigEx;}//fUseExclusiveNSigma
77 Bool_t GetfUseExclusiveNSigma(){return fUseExclusiveNSigma;}//fUseExclusiveNSigma
78 //lower pt fot TOF PID
79 Double_t SetPtTOFPID(){return fPtTOFPID;}
80 void SetfPtTOFPID(Double_t pttof){fPtTOFPID=pttof;}
81 //getters of the other data members
82 TList * GetOutputList() {return fOutputList;}//get the TList with histos
83 Double_t* GetNSigmas() {return *fnsigmas;}//get nsigma[ipart][idet], calculated in CalculateNSigmas(trk)
84 Bool_t* GetfHasDoubleCounting() {return fHasDoubleCounting;}//get fHasDoubleCounting[ipart], calculated in GetDoubleCounting(trk)
85 //getter of histo "name" from fOutput
86 TH2F* GetHistogram2D(const char * name);//return histogram "name" from fOutputList
89 Int_t GetParticleSpecies(AliVTrack * trk, Bool_t FIllQAHistos);//calculate the PID according to the minimum sigma
90 void CalculateNSigmas(AliVTrack * trk, Bool_t FIllQAHistos);//Calcuate nsigma[ipart][idet], fill NSigma histos
91 Int_t FindMinNSigma(AliVTrack * trk, Bool_t FIllQAHistos);//retun the minimum Nsigma
92 Bool_t* GetDoubleCounting(AliVTrack * trk, Bool_t FIllQAHistos);//if a particle has double counting set fHasDoubleCounting[ipart]=kTRUE
93 Int_t GetMCParticleSpecie(AliVEvent* event, AliVTrack * trk, Bool_t FIllQAHistos);//calculate the PID according to MC truth
94 void CheckTOF(AliVTrack * trk);//check the TOF matching and set fHasTOFPID
95 Long64_t Merge(TCollection* list);
100 PIDType_t fPIDType; // PID type
101 Double_t fNSigmaPID; // number of sigma for PID cut
102 AliPIDResponse *fPIDResponse; // ! PID response object
103 TList *fOutputList; // List Histo's
104 Double_t fnsigmas[kNSpecies][kNSigmaPIDType+1]; //nsigma values
105 Bool_t fHasDoubleCounting[kNSpecies];//array with compatible identities
106 Bool_t fRequestTOFPID;//if true returns kSpUndefined if the TOF signal is missing
107 Bool_t fUseExclusiveNSigma;//if true returns the identity only if no double counting
108 Double_t fPtTOFPID; //lower pt bound for the TOF pid
112 AliHelperPID(const AliHelperPID&);
113 AliHelperPID& operator=(const AliHelperPID&);
115 ClassDef(AliHelperPID, 2);