]>
Commit | Line | Data |
---|---|---|
a65a7e70 | 1 | #ifndef ALIESDPIDCUTS_H |
2 | #define ALIESDPIDCUTS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | // | |
6 | // Class for PID cuts | |
7 | // Cuts the track based on numbers of sigmas in the detectors TPC and TOF | |
8 | // The sigma cuts can be applied symmetrically or assymetrically | |
9 | // | |
10 | ||
11 | #ifndef ALIANALYSISCUTS_H | |
12 | #include "AliAnalysisCuts.h" | |
13 | #endif | |
14 | ||
15 | #ifndef ALIPID_H | |
16 | #include "AliPID.h" | |
17 | #endif | |
18 | ||
19 | class TCollection; | |
20 | class TH1F; | |
21 | class TH1I; | |
22 | class TH2I; | |
23 | class TList; | |
24 | class AliESDtrack; | |
25 | class AliESDEvent; | |
26 | class AliESDpid; | |
27 | ||
28 | class AliESDpidCuts : public AliAnalysisCuts{ | |
29 | enum{ | |
30 | kHasHistograms = BIT(17) | |
31 | }; | |
32 | public: | |
33 | AliESDpidCuts(const Char_t *name = "AliESDpidCuts", const Char_t *title = ""); | |
34 | AliESDpidCuts(const AliESDpidCuts &ref); // Copy constructor | |
35 | AliESDpidCuts &operator=(const AliESDpidCuts &ref); | |
36 | virtual ~AliESDpidCuts(); | |
37 | ||
38 | virtual void Init(); | |
39 | virtual void Copy(TObject &c) const; | |
40 | virtual Long64_t Merge(TCollection *coll); | |
41 | ||
42 | Bool_t HasHistograms() const { return TestBit(kHasHistograms); } | |
43 | void DefineHistograms(Color_t color = kRed); | |
44 | void DrawHistograms(); | |
45 | void SaveHistograms(const Char_t *location = NULL); | |
46 | virtual Bool_t IsSelected(TObject *); | |
47 | virtual Bool_t IsSelected(TList * /*lst*/) {return kTRUE; } | |
48 | virtual Bool_t AcceptTrack(const AliESDtrack *track, const AliESDEvent *event); | |
49 | ||
50 | void SetPIDResponse(AliPIDResponse * pidresponse) { fPIDresponse = pidresponse; } | |
51 | AliPIDResponse *GetPIDresponse() { return fPIDresponse; }; | |
52 | ||
53 | void SetTPCclusterRatioCut(Float_t clr) { fCutTPCclusterRatio = clr; } | |
54 | inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); | |
55 | inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); | |
56 | inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); | |
57 | inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); | |
58 | void SetMinMomentumTOF(Float_t mom) { fMinMomentumTOF = mom; } | |
59 | ||
60 | protected: | |
61 | static const Int_t kNcuts; // Number of Cuts | |
62 | AliPIDResponse *fPIDresponse; //! PID helper (n-sigma-cut) | |
63 | Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species | |
64 | Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species | |
65 | Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line | |
66 | Float_t fCutTOFnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TOF calculated time of flight line | |
67 | Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC | |
68 | Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum | |
69 | ||
70 | //------------------------------------------ | |
71 | // QA histograms | |
72 | TH1I *fHcutStatistics; // Cut Statistics | |
73 | TH2I *fHcutCorrelation; // Cut Correlation | |
74 | TH1F *fHclusterRatio[2]; // TPC cluster Ratio | |
75 | TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut | |
76 | TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut | |
77 | //------------------------------------------ | |
78 | ||
79 | ClassDef(AliESDpidCuts, 3) | |
80 | }; | |
81 | ||
82 | //_____________________________________________________________________ | |
83 | void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ | |
84 | // | |
85 | // symmetric sigma cut for TPC PID | |
86 | // | |
87 | fCutTPCnSigma[itype * 2] = -nSigma; | |
88 | fCutTPCnSigma[itype * 2 + 1] = nSigma; | |
89 | fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype); | |
90 | } | |
91 | ||
92 | //_____________________________________________________________________ | |
93 | void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ | |
94 | // | |
95 | // assymetric sigma cut for TPC PID | |
96 | // | |
97 | fCutTPCnSigma[itype * 2] = negSigma; | |
98 | fCutTPCnSigma[itype * 2 + 1] = posSigma; | |
99 | fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype); | |
100 | } | |
101 | ||
102 | //_____________________________________________________________________ | |
103 | void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ | |
104 | // | |
105 | // symmetric sigma cut for TOF PID | |
106 | // | |
107 | fCutTOFnSigma[itype * 2] = -nSigma; | |
108 | fCutTOFnSigma[itype * 2 + 1] = nSigma; | |
109 | fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype); | |
110 | } | |
111 | ||
112 | //_____________________________________________________________________ | |
113 | void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ | |
114 | // | |
115 | // assymetric sigma cut for TOF PID | |
116 | // | |
117 | fCutTOFnSigma[itype * 2] = negSigma; | |
118 | fCutTOFnSigma[itype * 2 + 1] = posSigma; | |
119 | fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype); | |
120 | } | |
121 | #endif |