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
75 void SetfRemoveTracksT0Fill(Bool_t tof){fRemoveTracksT0Fill=tof;}//fRemoveTracksT0Fill
76 Bool_t GetfRemoveTracksT0Fill(){return fRemoveTracksT0Fill;}//fRemoveTracksT0Fill
78 void SetfUseExclusiveNSigma(Bool_t nsigEx){fUseExclusiveNSigma=nsigEx;}//fUseExclusiveNSigma
79 Bool_t GetfUseExclusiveNSigma(){return fUseExclusiveNSigma;}//fUseExclusiveNSigma
80 //lower pt fot TOF PID
81 Double_t SetPtTOFPID(){return fPtTOFPID;}
82 void SetfPtTOFPID(Double_t pttof){fPtTOFPID=pttof;}
83 //getters of the other data members
84 TList * GetOutputList() {return fOutputList;}//get the TList with histos
85 Double_t* GetNSigmas(AliHelperParticleSpecies_t species) {return fnsigmas[species];}//get nsigma[ipart][idet], calculated in CalculateNSigmas(trk)
86 Bool_t* GetfHasDoubleCounting() {return fHasDoubleCounting;}//get fHasDoubleCounting[ipart], calculated in GetDoubleCounting(trk)
87 //getter of histo "name" from fOutput
88 TH2F* GetHistogram2D(const char * name);//return histogram "name" from fOutputList
91 Int_t GetParticleSpecies(AliVTrack * trk, Bool_t FIllQAHistos);//calculate the PID according to the minimum sigma
92 void CalculateNSigmas(AliVTrack * trk, Bool_t FIllQAHistos);//Calcuate nsigma[ipart][idet], fill NSigma histos
93 Int_t FindMinNSigma(AliVTrack * trk, Bool_t FIllQAHistos);//retun the minimum Nsigma
94 Bool_t* GetDoubleCounting(AliVTrack * trk, Bool_t FIllQAHistos);//if a particle has double counting set fHasDoubleCounting[ipart]=kTRUE
95 Int_t GetMCParticleSpecie(AliVEvent* event, AliVTrack * trk, Bool_t FIllQAHistos);//calculate the PID according to MC truth
96 void CheckTOF(AliVTrack * trk);//check the TOF matching and set fHasTOFPID
97 Long64_t Merge(TCollection* list);
102 PIDType_t fPIDType; // PID type
103 Double_t fNSigmaPID; // number of sigma for PID cut
104 AliPIDResponse *fPIDResponse; // ! PID response object
105 TList *fOutputList; // List Histo's
106 Double_t fnsigmas[kNSpecies][kNSigmaPIDType+1]; //nsigma values
107 Bool_t fHasDoubleCounting[kNSpecies];//array with compatible identities
108 Bool_t fRequestTOFPID;//if true returns kSpUndefined if the TOF signal is missing
109 Bool_t fRemoveTracksT0Fill;//if true remove tracks for which only StartTime from To-Fill is available (worst resolution)
110 Bool_t fUseExclusiveNSigma;//if true returns the identity only if no double counting
111 Double_t fPtTOFPID; //lower pt bound for the TOF pid
115 AliHelperPID(const AliHelperPID&);
116 AliHelperPID& operator=(const AliHelperPID&);
118 ClassDef(AliHelperPID, 3);