]>
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 | // | |
75d81601 | 20 | #ifndef ALIHFEPIDTPC_H |
21 | #define ALIHFEPIDTPC_H | |
809a4336 | 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; | |
722347d8 | 32 | class AliAODTrack; |
33 | class AliAODMCParticle; | |
809a4336 | 34 | class AliESDtrack; |
722347d8 | 35 | class AliMCParticle; |
10d100d4 | 36 | class AliESDpid; |
809a4336 | 37 | class AliVParticle; |
70da6c5a | 38 | class AliHFEcollection; |
809a4336 | 39 | |
40 | class AliHFEpidTPC : public AliHFEpidBase{ | |
809a4336 | 41 | public: |
42 | AliHFEpidTPC(const Char_t *name); | |
43 | AliHFEpidTPC(const AliHFEpidTPC &ref); | |
44 | AliHFEpidTPC &operator=(const AliHFEpidTPC &ref); | |
45 | virtual ~AliHFEpidTPC(); | |
46 | ||
47 | virtual Bool_t InitializePID(); | |
722347d8 | 48 | virtual Int_t IsSelected(AliHFEpidObject *track); |
809a4336 | 49 | virtual Bool_t HasQAhistos() const { return kTRUE; }; |
50 | ||
9bcfd1ab | 51 | Int_t GetCrossingType() const {return fLineCrossingType; } |
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; }; |
722347d8 | 57 | inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax); |
0792aa82 | 58 | inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax); |
809a4336 | 59 | |
faee3b18 | 60 | void SetUpperSigmaCut(TF1 * const model) { fUpperSigmaCut = model; } |
61 | void SetLowerSigmaCut(TF1 * const model) { fLowerSigmaCut = model; } | |
62 | ||
809a4336 | 63 | protected: |
64 | void Copy(TObject &o) const; | |
65 | void AddQAhistograms(TList *qaList); | |
faee3b18 | 66 | void FillTPChistograms(const AliESDtrack *track, const AliMCParticle *mctrack, Bool_t stepSelected = kFALSE); |
722347d8 | 67 | Int_t MakePIDaod(AliAODTrack *aodTrack, AliAODMCParticle *mcTrack); |
68 | Int_t MakePIDesd(AliESDtrack *esdTrack, AliMCParticle *mcTrack); | |
0792aa82 | 69 | Int_t Reject(AliESDtrack *track); |
722347d8 | 70 | Double_t Likelihood(const AliESDtrack *track, Int_t species, Float_t rsig = 2.); |
71 | Double_t Suppression(const AliESDtrack *track, Int_t species); | |
72 | ||
faee3b18 | 73 | Bool_t CutSigmaModel(AliESDtrack *track); |
74 | ||
809a4336 | 75 | private: |
50685501 | 76 | enum{ |
77 | kAsymmetricSigmaCut = BIT(20), | |
78 | kRejection = BIT(21) | |
79 | }; | |
809a4336 | 80 | Double_t fLineCrossingSigma[AliPID::kSPECIES]; // with of the exclusion point |
9bcfd1ab | 81 | Int_t fLineCrossingType; // 0 for no line crossing, otherwise AliPID of the particle crossing the electron dEdx band |
809a4336 | 82 | UChar_t fLineCrossingsEnabled; // Bitmap showing which line crossing is set |
faee3b18 | 83 | TF1 *fUpperSigmaCut; // Upper Sigma Cut |
84 | TF1 *fLowerSigmaCut; // Lower Sigma Cut | |
722347d8 | 85 | Float_t fPAsigCut[2]; // Momentum region where to perform asymmetric sigma cut |
86 | Float_t fNAsigmaTPC[2]; // Asymmetric TPC Sigma band | |
809a4336 | 87 | Short_t fNsigmaTPC; // TPC sigma band |
0792aa82 | 88 | Float_t fRejection[4*AliPID::kSPECIES]; // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax |
89 | UChar_t fRejectionEnabled; // Bitmap for enabled particle rejection | |
809a4336 | 90 | AliPID *fPID; //! PID Object |
70da6c5a | 91 | AliHFEcollection *fQAList; //! QA histograms |
809a4336 | 92 | |
70da6c5a | 93 | ClassDef(AliHFEpidTPC, 1) // TPC Electron ID class |
809a4336 | 94 | }; |
722347d8 | 95 | |
96 | inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) { | |
97 | fPAsigCut[0] = pmin; | |
98 | fPAsigCut[1] = pmax; | |
99 | fNAsigmaTPC[0] = sigmaMin; | |
100 | fNAsigmaTPC[1] = sigmaMax; | |
101 | SetBit(kAsymmetricSigmaCut, kTRUE); | |
102 | } | |
0792aa82 | 103 | |
104 | inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){ | |
105 | if(species < 0 || species >= AliPID::kSPECIES) return; | |
106 | fRejection[4*species] = pmin; | |
107 | fRejection[4*species+1] = sigmaMin; | |
108 | fRejection[4*species+2] = pmax; | |
109 | fRejection[4*species+3] = sigmaMax; | |
110 | SETBIT(fRejectionEnabled, species); | |
111 | SetBit(kRejection, kTRUE); | |
112 | } | |
722347d8 | 113 | |
809a4336 | 114 | #endif |