]>
Commit | Line | Data |
---|---|---|
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 | ||
31 | class TList; | |
4437a0d2 | 32 | class TF1; |
1a319cb5 | 33 | class TH2D; |
722347d8 | 34 | class AliAODTrack; |
35 | class AliAODMCParticle; | |
809a4336 | 36 | class AliESDtrack; |
722347d8 | 37 | class AliMCParticle; |
809a4336 | 38 | class AliVParticle; |
70da6c5a | 39 | class AliHFEcollection; |
3a72645a | 40 | class AliHFEpidQAmanager; |
809a4336 | 41 | |
42 | class AliHFEpidTPC : public AliHFEpidBase{ | |
809a4336 | 43 | public: |
3a72645a | 44 | AliHFEpidTPC(); |
809a4336 | 45 | AliHFEpidTPC(const Char_t *name); |
46 | AliHFEpidTPC(const AliHFEpidTPC &ref); | |
47 | AliHFEpidTPC &operator=(const AliHFEpidTPC &ref); | |
48 | virtual ~AliHFEpidTPC(); | |
49 | ||
8c1c76e9 | 50 | virtual Bool_t InitializePID(Int_t /*run*/); |
6555e2ad | 51 | virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const; |
9bcfd1ab | 52 | |
75d81601 | 53 | void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma); |
722347d8 | 54 | Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);} |
0792aa82 | 55 | Bool_t HasParticleRejection() const { return TestBit(kRejection); } |
809a4336 | 56 | void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; }; |
cedf0381 | 57 | void SetUseOnlyOROC(Bool_t useOnlyOROC) { fUseOnlyOROC = useOnlyOROC; }; |
722347d8 | 58 | inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax); |
0792aa82 | 59 | inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax); |
809a4336 | 60 | |
e156c3bb | 61 | void SetUpperSigmaCutDefault(const TF1 * const model) { fkUpperSigmaCut[0] = model; fHasCutModel = kTRUE; } |
62 | void SetUpperSigmaCutCentrality(const TF1 * const model, Int_t centralityBin) { if(centralityBin < 11) fkUpperSigmaCut[centralityBin+1] = model; fHasCutModel = kTRUE; } | |
63 | void SetLowerSigmaCutDefault(const TF1 * const model) { fkLowerSigmaCut[0] = model; fHasCutModel = kTRUE; } | |
64 | void SetLowerSigmaCutCentrality(const TF1 * const model, Int_t centralityBin) { if(centralityBin < 11) fkLowerSigmaCut[centralityBin+1] = model; fHasCutModel = kTRUE; } | |
11ff28c5 | 65 | void SetEtaCorrection(const TF1 *const param) { fkEtaCorrection = param; } |
959ea9d8 | 66 | void SetCentralityCorrection(const TF1 *const param){ fkCentralityCorrection = param; } |
1a319cb5 | 67 | void SetEtaCorrections(const TF1 *const mean, const TF1 *const wdth) { fkEtaMeanCorrection = mean; fkEtaWidthCorrection = wdth; } |
68 | void SetCentralityCorrections(const TF1 *const mean, const TF1 *const wdth) { fkCentralityMeanCorrection = mean; fkCentralityWidthCorrection = wdth; } | |
69 | void SetJpsiCorrections(const TH2D *const mean, const TH2D *const wdth) { fkCentralityEtaCorrectionMeanJpsi = mean; fkCentralityEtaCorrectionWidthJpsi = wdth; } | |
4437a0d2 | 70 | void UsedEdx() { fUsedEdx = kTRUE; } |
71 | void UseNSigma() { fUsedEdx = kFALSE; } | |
11ff28c5 | 72 | Bool_t HasEtaCorrection() const { return fkEtaCorrection != NULL; } |
959ea9d8 | 73 | Bool_t HasCentralityCorrection() const { return fkCentralityCorrection != NULL; } |
4437a0d2 | 74 | Bool_t IsUsingdEdx() const { return fUsedEdx; } |
faee3b18 | 75 | |
6555e2ad | 76 | Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const; |
11ff28c5 | 77 | void ApplyEtaCorrection(AliVTrack *track, AliHFEpidObject::AnalysisType_t anatype) const; |
959ea9d8 | 78 | void ApplyCentralityCorrection(AliVTrack *track, Double_t centralityEstimator, AliHFEpidObject::AnalysisType_t anatype) const; |
38be5083 | 79 | Double_t GetCorrectedTPCnSigma(Double_t eta, Double_t centralityEstimator, Double_t tpcNsigma) const; |
1a319cb5 | 80 | Double_t GetCorrectedTPCnSigmaJpsi(Double_t eta, Double_t centralityEstimator, Double_t tpcNsigma) const; |
cedf0381 | 81 | void UseOROC(AliVTrack *track, AliHFEpidObject::AnalysisType_t anatype) const; |
6555e2ad | 82 | |
809a4336 | 83 | protected: |
84 | void Copy(TObject &o) const; | |
6555e2ad | 85 | Int_t Reject(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const; |
722347d8 | 86 | |
e156c3bb | 87 | Bool_t CutSigmaModel(const AliHFEpidObject *anaType) const; |
faee3b18 | 88 | |
809a4336 | 89 | private: |
50685501 | 90 | enum{ |
91 | kAsymmetricSigmaCut = BIT(20), | |
92 | kRejection = BIT(21) | |
93 | }; | |
809a4336 | 94 | Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point |
95 | UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set | |
e156c3bb | 96 | const TF1 *fkUpperSigmaCut[12]; // Upper Sigma Cut |
97 | const TF1 *fkLowerSigmaCut[12]; // Lower Sigma Cut | |
11ff28c5 | 98 | const TF1 *fkEtaCorrection; // Correction for the eta dependence |
959ea9d8 | 99 | const TF1 *fkCentralityCorrection; // Correction for the centrality dependence |
38be5083 | 100 | const TF1 *fkEtaMeanCorrection; // Correct eta dependence of the mean of the TPC n sigma |
101 | const TF1 *fkEtaWidthCorrection; // Correct eta dependence of the width of the TPC n sigma | |
102 | const TF1 *fkCentralityMeanCorrection; // Correct centrality dependence of the mean of the TPC n sigma | |
103 | const TF1 *fkCentralityWidthCorrection; // Correct centrality dependence of the width of the TPC n sigma | |
1a319cb5 | 104 | const TH2D *fkCentralityEtaCorrectionMeanJpsi; // Correction from J/psi group for the mean |
105 | const TH2D *fkCentralityEtaCorrectionWidthJpsi; // Correction from J/psi group for the width | |
e156c3bb | 106 | Bool_t fHasCutModel; // Has cut model functions |
cedf0381 | 107 | Bool_t fUseOnlyOROC; // Use only OROC |
722347d8 | 108 | Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut |
109 | Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band | |
809a4336 | 110 | Short_t fNsigmaTPC; // TPC sigma band |
0792aa82 | 111 | Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax |
112 | UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection | |
4437a0d2 | 113 | Bool_t fUsedEdx; // Apply cut on dE/dx instead of number of sigmas |
809a4336 | 114 | |
1a319cb5 | 115 | ClassDef(AliHFEpidTPC, 3) // TPC Electron ID class |
809a4336 | 116 | }; |
722347d8 | 117 | |
118 | inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) { | |
119 | fPAsigCut[0] = pmin; | |
120 | fPAsigCut[1] = pmax; | |
121 | fNAsigmaTPC[0] = sigmaMin; | |
122 | fNAsigmaTPC[1] = sigmaMax; | |
123 | SetBit(kAsymmetricSigmaCut, kTRUE); | |
124 | } | |
0792aa82 | 125 | |
126 | inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){ | |
127 | if(species < 0 || species >= AliPID::kSPECIES) return; | |
128 | fRejection[4*species] = pmin; | |
129 | fRejection[4*species+1] = sigmaMin; | |
130 | fRejection[4*species+2] = pmax; | |
131 | fRejection[4*species+3] = sigmaMax; | |
132 | SETBIT(fRejectionEnabled, species); | |
133 | SetBit(kRejection, kTRUE); | |
134 | } | |
722347d8 | 135 | |
809a4336 | 136 | #endif |