]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEpidTPC.h
Updates for TRD HFE analysis
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEpidTPC.h
CommitLineData
809a4336 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
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**************************************************************************/
50685501 15//
16// Class for TPC PID
17// Does electron selection based on dE/dx
18// For more information please check the implementation file
19//
c2690925 20#ifndef ALIHFEPIDTPC_H
21#define ALIHFEPIDTPC_H
22
75d81601 23#ifndef ALIHFEPIDBASE_H
809a4336 24#include "AliHFEpidBase.h"
25#endif
26
27#ifndef ALIPID_H
28#include "AliPID.h"
29#endif
30
31class TList;
722347d8 32class AliAODTrack;
33class AliAODMCParticle;
809a4336 34class AliESDtrack;
722347d8 35class AliMCParticle;
809a4336 36class AliVParticle;
70da6c5a 37class AliHFEcollection;
3a72645a 38class AliHFEpidQAmanager;
809a4336 39
40class AliHFEpidTPC : public AliHFEpidBase{
809a4336 41 public:
3a72645a 42 AliHFEpidTPC();
809a4336 43 AliHFEpidTPC(const Char_t *name);
44 AliHFEpidTPC(const AliHFEpidTPC &ref);
45 AliHFEpidTPC &operator=(const AliHFEpidTPC &ref);
46 virtual ~AliHFEpidTPC();
47
8c1c76e9 48 virtual Bool_t InitializePID(Int_t /*run*/);
6555e2ad 49 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
9bcfd1ab 50
75d81601 51 void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma);
722347d8 52 Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);}
0792aa82 53 Bool_t HasParticleRejection() const { return TestBit(kRejection); }
809a4336 54 void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; };
cedf0381 55 void SetUseOnlyOROC(Bool_t useOnlyOROC) { fUseOnlyOROC = useOnlyOROC; };
722347d8 56 inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax);
0792aa82 57 inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax);
809a4336 58
e156c3bb 59 void SetUpperSigmaCutDefault(const TF1 * const model) { fkUpperSigmaCut[0] = model; fHasCutModel = kTRUE; }
60 void SetUpperSigmaCutCentrality(const TF1 * const model, Int_t centralityBin) { if(centralityBin < 11) fkUpperSigmaCut[centralityBin+1] = model; fHasCutModel = kTRUE; }
61 void SetLowerSigmaCutDefault(const TF1 * const model) { fkLowerSigmaCut[0] = model; fHasCutModel = kTRUE; }
62 void SetLowerSigmaCutCentrality(const TF1 * const model, Int_t centralityBin) { if(centralityBin < 11) fkLowerSigmaCut[centralityBin+1] = model; fHasCutModel = kTRUE; }
11ff28c5 63 void SetEtaCorrection(const TF1 *const param) { fkEtaCorrection = param; }
959ea9d8 64 void SetCentralityCorrection(const TF1 *const param){ fkCentralityCorrection = param; }
11ff28c5 65 Bool_t HasEtaCorrection() const { return fkEtaCorrection != NULL; }
959ea9d8 66 Bool_t HasCentralityCorrection() const { return fkCentralityCorrection != NULL; }
faee3b18 67
6555e2ad 68 Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
11ff28c5 69 void ApplyEtaCorrection(AliVTrack *track, AliHFEpidObject::AnalysisType_t anatype) const;
959ea9d8 70 void ApplyCentralityCorrection(AliVTrack *track, Double_t centralityEstimator, AliHFEpidObject::AnalysisType_t anatype) const;
cedf0381 71 void UseOROC(AliVTrack *track, AliHFEpidObject::AnalysisType_t anatype) const;
6555e2ad 72
809a4336 73 protected:
74 void Copy(TObject &o) const;
6555e2ad 75 Int_t Reject(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
722347d8 76
e156c3bb 77 Bool_t CutSigmaModel(const AliHFEpidObject *anaType) const;
faee3b18 78
809a4336 79 private:
50685501 80 enum{
81 kAsymmetricSigmaCut = BIT(20),
82 kRejection = BIT(21)
83 };
809a4336 84 Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point
85 UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set
e156c3bb 86 const TF1 *fkUpperSigmaCut[12]; // Upper Sigma Cut
87 const TF1 *fkLowerSigmaCut[12]; // Lower Sigma Cut
11ff28c5 88 const TF1 *fkEtaCorrection; // Correction for the eta dependence
959ea9d8 89 const TF1 *fkCentralityCorrection; // Correction for the centrality dependence
e156c3bb 90 Bool_t fHasCutModel; // Has cut model functions
cedf0381 91 Bool_t fUseOnlyOROC; // Use only OROC
722347d8 92 Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut
93 Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band
809a4336 94 Short_t fNsigmaTPC; // TPC sigma band
0792aa82 95 Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax
96 UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection
809a4336 97
70da6c5a 98 ClassDef(AliHFEpidTPC, 1) // TPC Electron ID class
809a4336 99};
722347d8 100
101inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) {
102 fPAsigCut[0] = pmin;
103 fPAsigCut[1] = pmax;
104 fNAsigmaTPC[0] = sigmaMin;
105 fNAsigmaTPC[1] = sigmaMax;
106 SetBit(kAsymmetricSigmaCut, kTRUE);
107}
0792aa82 108
109inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){
110 if(species < 0 || species >= AliPID::kSPECIES) return;
111 fRejection[4*species] = pmin;
112 fRejection[4*species+1] = sigmaMin;
113 fRejection[4*species+2] = pmax;
114 fRejection[4*species+3] = sigmaMax;
115 SETBIT(fRejectionEnabled, species);
116 SetBit(kRejection, kTRUE);
117}
722347d8 118
809a4336 119#endif