4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
23 // Does electron selection based on dE/dx
24 // For more information please check the implementation file
26 #ifndef ALIHFEPIDBASE_H
27 #include "AliHFEpidBase.h"
36 class AliAODMCParticle;
40 class AliHFEcollection;
41 class AliHFEpidQAmanager;
43 class AliHFEpidTPC : public AliHFEpidBase{
46 AliHFEpidTPC(const Char_t *name);
47 AliHFEpidTPC(const AliHFEpidTPC &ref);
48 AliHFEpidTPC &operator=(const AliHFEpidTPC &ref);
49 virtual ~AliHFEpidTPC();
51 virtual Bool_t InitializePID();
52 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
54 void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma);
55 Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);}
56 Bool_t HasParticleRejection() const { return TestBit(kRejection); }
57 void SetElectronMeanCorrection(TF1 *electronLineCorrection) { fElectronMeanCorrection = electronLineCorrection; }
58 void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; };
59 inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax);
60 inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax);
62 void SetUpperSigmaCut(TF1 * const model) { fUpperSigmaCut = model; }
63 void SetLowerSigmaCut(TF1 * const model) { fLowerSigmaCut = model; }
65 Double_t NumberOfSigmas(const AliVParticle *track, AliPID::EParticleType species, AliHFEpidObject::AnalysisType_t) const;
66 Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
69 void Copy(TObject &o) const;
70 Int_t Reject(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
72 Bool_t CutSigmaModel(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
76 kAsymmetricSigmaCut = BIT(20),
79 Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point
80 UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set
81 TF1 *fUpperSigmaCut; // Upper Sigma Cut
82 TF1 *fLowerSigmaCut; // Lower Sigma Cut
83 TF1 *fElectronMeanCorrection; // Correct the mean of the electron line position as function of the momentum
84 Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut
85 Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band
86 Short_t fNsigmaTPC; // TPC sigma band
87 Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax
88 UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection
89 AliPID *fPID; //! PID Object
91 ClassDef(AliHFEpidTPC, 1) // TPC Electron ID class
94 inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) {
97 fNAsigmaTPC[0] = sigmaMin;
98 fNAsigmaTPC[1] = sigmaMax;
99 SetBit(kAsymmetricSigmaCut, kTRUE);
102 inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){
103 if(species < 0 || species >= AliPID::kSPECIES) return;
104 fRejection[4*species] = pmin;
105 fRejection[4*species+1] = sigmaMin;
106 fRejection[4*species+2] = pmax;
107 fRejection[4*species+3] = sigmaMax;
108 SETBIT(fRejectionEnabled, species);
109 SetBit(kRejection, kTRUE);