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 **************************************************************************/
17 // Does electron selection based on dE/dx
18 // For more information please check the implementation file
20 #ifndef ALIHFEPIDTPC_H
21 #define ALIHFEPIDTPC_H
23 #ifndef ALIHFEPIDBASE_H
24 #include "AliHFEpidBase.h"
33 class AliAODMCParticle;
37 class AliHFEcollection;
38 class AliHFEpidQAmanager;
40 class AliHFEpidTPC : public AliHFEpidBase{
43 AliHFEpidTPC(const Char_t *name);
44 AliHFEpidTPC(const AliHFEpidTPC &ref);
45 AliHFEpidTPC &operator=(const AliHFEpidTPC &ref);
46 virtual ~AliHFEpidTPC();
48 virtual Bool_t InitializePID();
49 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
51 void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma);
52 Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);}
53 Bool_t HasParticleRejection() const { return TestBit(kRejection); }
54 void SetElectronMeanCorrection(TF1 *electronLineCorrection) { fElectronMeanCorrection = electronLineCorrection; }
55 void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; };
56 inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax);
57 inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax);
59 void SetUpperSigmaCut(TF1 * const model) { fUpperSigmaCut = model; }
60 void SetLowerSigmaCut(TF1 * const model) { fLowerSigmaCut = model; }
62 Double_t NumberOfSigmas(const AliVParticle *track, AliPID::EParticleType species, AliHFEpidObject::AnalysisType_t anatype) const;
63 Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
66 void Copy(TObject &o) const;
67 Int_t Reject(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
69 Bool_t CutSigmaModel(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
73 kAsymmetricSigmaCut = BIT(20),
76 Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point
77 UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set
78 TF1 *fUpperSigmaCut; // Upper Sigma Cut
79 TF1 *fLowerSigmaCut; // Lower Sigma Cut
80 TF1 *fElectronMeanCorrection; // Correct the mean of the electron line position as function of the momentum
81 Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut
82 Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band
83 Short_t fNsigmaTPC; // TPC sigma band
84 Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax
85 UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection
86 AliPID *fPID; //! PID Object
88 ClassDef(AliHFEpidTPC, 1) // TPC Electron ID class
91 inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) {
94 fNAsigmaTPC[0] = sigmaMin;
95 fNAsigmaTPC[1] = sigmaMax;
96 SetBit(kAsymmetricSigmaCut, kTRUE);
99 inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){
100 if(species < 0 || species >= AliPID::kSPECIES) return;
101 fRejection[4*species] = pmin;
102 fRejection[4*species+1] = sigmaMin;
103 fRejection[4*species+2] = pmax;
104 fRejection[4*species+3] = sigmaMax;
105 SETBIT(fRejectionEnabled, species);
106 SetBit(kRejection, kTRUE);