1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 #ifndef ALIHFEPIDTPC_H
16 #define ALIHFEPIDTPC_H
18 #ifndef ALIHFEPIDBASE_H
19 #include "AliHFEpidBase.h"
28 class AliAODMCParticle;
34 class AliHFEpidTPC : public AliHFEpidBase{
51 kHistTPCsuppressPi = 15,
52 kHistTPCsuppressMu = 16,
53 kHistTPCsuppressKa = 17,
54 kHistTPCsuppressPro = 18,
55 kHistTPCenhanceElPi = 19,
56 kHistTPCenhanceElMu = 20,
57 kHistTPCenhanceElKa = 21,
58 kHistTPCenhanceElPro = 22,
59 kHistTPCElprobPi = 23,
60 kHistTPCElprobMu = 24,
61 kHistTPCElprobKa = 25,
62 kHistTPCElprobPro = 26
65 kAsymmetricSigmaCut = BIT(20),
69 AliHFEpidTPC(const Char_t *name);
70 AliHFEpidTPC(const AliHFEpidTPC &ref);
71 AliHFEpidTPC &operator=(const AliHFEpidTPC &ref);
72 virtual ~AliHFEpidTPC();
74 virtual Bool_t InitializePID();
75 virtual Int_t IsSelected(AliHFEpidObject *track);
76 virtual Bool_t HasQAhistos() const { return kTRUE; };
78 void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma);
79 Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);}
80 Bool_t HasParticleRejection() const { return TestBit(kRejection); }
81 void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; };
82 inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax);
83 inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax);
86 void Copy(TObject &o) const;
87 void AddQAhistograms(TList *qaList);
88 void FillTPChistograms(const AliESDtrack *track, const AliMCParticle *mctrack);
89 Int_t MakePIDaod(AliAODTrack *aodTrack, AliAODMCParticle *mcTrack);
90 Int_t MakePIDesd(AliESDtrack *esdTrack, AliMCParticle *mcTrack);
91 Int_t Reject(AliESDtrack *track);
92 Double_t Likelihood(const AliESDtrack *track, Int_t species, Float_t rsig = 2.);
93 Double_t Suppression(const AliESDtrack *track, Int_t species);
96 Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point
97 UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set
98 Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut
99 Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band
100 Short_t fNsigmaTPC; // TPC sigma band
101 Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax
102 UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection
103 AliPID *fPID; //! PID Object
104 AliTPCpidESD *fPIDtpcESD; //! TPC PID object
105 TList *fQAList; //! QA histograms
107 ClassDef(AliHFEpidTPC, 1) // TPC Electron ID class
110 inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) {
113 fNAsigmaTPC[0] = sigmaMin;
114 fNAsigmaTPC[1] = sigmaMax;
115 SetBit(kAsymmetricSigmaCut, kTRUE);
118 inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){
119 if(species < 0 || species >= AliPID::kSPECIES) return;
120 fRejection[4*species] = pmin;
121 fRejection[4*species+1] = sigmaMin;
122 fRejection[4*species+2] = pmax;
123 fRejection[4*species+3] = sigmaMax;
124 SETBIT(fRejectionEnabled, species);
125 SetBit(kRejection, kTRUE);