]>
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 | // Cut container class for the ALICE HFE group | |
17 | // Serves also as interface to the correction Framework | |
18 | // Provides a set of standard cuts | |
19 | // | |
75d81601 | 20 | #ifndef ALIHFECUTS_H |
21 | #define ALIHFECUTS_H | |
809a4336 | 22 | |
23 | #ifndef ROOT_TObject | |
24 | #include <TObject.h> | |
25 | #endif | |
26 | ||
75d81601 | 27 | #ifndef ALIHFEEXTRACUTS_H |
809a4336 | 28 | #include "AliHFEextraCuts.h" |
29 | #endif | |
30 | ||
31 | class AliCFManager; | |
32 | class AliESDtrack; | |
33 | class AliMCParticle; | |
34 | ||
35 | class TObjArray; | |
36 | class TList; | |
37 | ||
38 | class AliHFEcuts : public TObject{ | |
75d81601 | 39 | public: |
40 | typedef enum{ | |
41 | kStepMCGenerated = 0, | |
722347d8 | 42 | kStepMCsignal = 1, |
43 | kStepMCInAcceptance = 2, | |
70da6c5a | 44 | kStepRecNoCut = 3, |
45 | kStepRecKineITSTPC = 4, | |
46 | kStepRecPrim = 5, | |
47 | kStepHFEcutsITS = 6, | |
48 | kStepHFEcutsTRD = 7, | |
49 | kStepPID = 8 | |
75d81601 | 50 | } CutStep_t; |
0792aa82 | 51 | typedef enum{ |
52 | kEventStepGenerated = 0, | |
53 | kEventStepReconstructed = 1 | |
54 | } EventCutStep_t; | |
75d81601 | 55 | enum{ |
70da6c5a | 56 | kNcutStepsEvent = 2, |
57 | kNcutStepsTrack = 9, | |
58 | kNcutStepsESDtrack = 6 | |
75d81601 | 59 | }; // Additional constants |
809a4336 | 60 | |
75d81601 | 61 | AliHFEcuts(); |
62 | AliHFEcuts(const AliHFEcuts &c); | |
63 | AliHFEcuts &operator=(const AliHFEcuts &c); | |
64 | ~AliHFEcuts(); | |
809a4336 | 65 | |
75d81601 | 66 | void Initialize(AliCFManager *cfm); |
67 | void Initialize(); | |
809a4336 | 68 | |
75d81601 | 69 | Bool_t CheckParticleCuts(CutStep_t step, TObject *o); |
70 | ||
71 | TList *GetQAhistograms() const { return fHistQA; } | |
809a4336 | 72 | |
75d81601 | 73 | void SetDebugMode(); |
9bcfd1ab | 74 | void SetAOD() { SetBit(kAOD, kTRUE); } |
75 | void SetESD() { SetBit(kAOD, kFALSE); } | |
75d81601 | 76 | void UnsetDebugMode() { SetBit(kDebugMode, kFALSE); } |
77 | Bool_t IsInDebugMode() const { return TestBit(kDebugMode); }; | |
9bcfd1ab | 78 | Bool_t IsAOD() const { return TestBit(kAOD); } |
79 | Bool_t IsESD() const { return !TestBit(kAOD); } | |
809a4336 | 80 | |
75d81601 | 81 | // Getters |
82 | Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); }; | |
83 | Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); }; | |
84 | Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); }; | |
85 | Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); }; | |
86 | Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); }; | |
87 | Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); }; | |
809a4336 | 88 | |
75d81601 | 89 | // Setters |
90 | inline void SetCutITSpixel(UChar_t cut); | |
0792aa82 | 91 | void SetCheckITSLayerStatus(Bool_t checkITSLayerStatus) { fCheckITSLayerStatus = checkITSLayerStatus; } |
75d81601 | 92 | void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; } |
93 | void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; } | |
94 | void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; }; | |
95 | inline void SetMaxImpactParam(Double_t radial, Double_t z); | |
96 | void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; }; | |
97 | void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;}; | |
98 | inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax); | |
99 | inline void SetSigmaToVertex(Double_t sig); | |
809a4336 | 100 | |
75d81601 | 101 | inline void CreateStandardCuts(); |
809a4336 | 102 | |
75d81601 | 103 | // Requirements |
104 | void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); }; | |
105 | void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); }; | |
106 | void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); } | |
107 | void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); }; | |
108 | void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); }; | |
dbe3abbe | 109 | |
75d81601 | 110 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
111 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
112 | ||
113 | private: | |
50685501 | 114 | enum{ |
9bcfd1ab | 115 | kDebugMode = BIT(14), |
116 | kAOD = BIT(15) | |
50685501 | 117 | }; |
118 | typedef enum{ | |
119 | kPrimary = 0, | |
120 | kProductionVertex = 1, | |
121 | kSigmaToVertex = 2, | |
122 | kDCAToVertex = 3, | |
123 | kITSPixel = 4, | |
124 | kMaxImpactParam = 5 | |
125 | } Require_t; | |
75d81601 | 126 | void SetParticleGenCutList(); |
127 | void SetAcceptanceCutList(); | |
722347d8 | 128 | void SetRecKineITSTPCCutList(); |
75d81601 | 129 | void SetRecPrimaryCutList(); |
130 | void SetHFElectronITSCuts(); | |
75d81601 | 131 | void SetHFElectronTRDCuts(); |
0792aa82 | 132 | void SetEventCutList(Int_t istep); |
dbe3abbe | 133 | |
75d81601 | 134 | ULong64_t fRequirements; // Bitmap for requirements |
135 | Double_t fDCAtoVtx[2]; // DCA to Vertex | |
136 | Double_t fProdVtx[4]; // Production Vertex | |
137 | Double_t fPtRange[2]; // pt range | |
138 | UChar_t fMinClustersTPC; // Min.Number of TPC clusters | |
139 | UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets | |
140 | UChar_t fCutITSPixel; // Cut on ITS pixel | |
0792aa82 | 141 | Bool_t fCheckITSLayerStatus; // Check ITS layer status |
75d81601 | 142 | Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster |
143 | Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters | |
144 | Double_t fSigmaToVtx; // Sigma To Vertex | |
809a4336 | 145 | |
75d81601 | 146 | TList *fHistQA; //! QA Histograms |
147 | TObjArray *fCutList; //! List of cut objects(Correction Framework Manager) | |
dbe3abbe | 148 | |
75d81601 | 149 | Int_t fDebugLevel; // Debug Level |
809a4336 | 150 | |
75d81601 | 151 | ClassDef(AliHFEcuts, 1) // Container for HFE cuts |
152 | }; | |
809a4336 | 153 | |
75d81601 | 154 | //__________________________________________________________________ |
155 | void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){ | |
156 | // Set the production vertex constraint | |
157 | SetRequireProdVertex(); | |
158 | fProdVtx[0] = xmin; | |
159 | fProdVtx[1] = xmax; | |
160 | fProdVtx[2] = ymin; | |
161 | fProdVtx[3] = ymax; | |
162 | } | |
809a4336 | 163 | |
164 | //__________________________________________________________________ | |
165 | void AliHFEcuts::SetSigmaToVertex(Double_t sig){ | |
166 | SetRequireSigmaToVertex(); | |
167 | fSigmaToVtx = sig; | |
168 | } | |
169 | ||
170 | //__________________________________________________________________ | |
171 | void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){ | |
ad75027f | 172 | SetRequireDCAToVertex(); |
173 | fDCAtoVtx[0] = radial; | |
174 | fDCAtoVtx[1] = z; | |
809a4336 | 175 | } |
176 | ||
177 | //__________________________________________________________________ | |
178 | void AliHFEcuts::SetCutITSpixel(UChar_t cut){ | |
179 | SetRequireITSPixel(); | |
180 | fCutITSPixel = cut; | |
181 | } | |
182 | ||
183 | //__________________________________________________________________ | |
184 | void AliHFEcuts::CreateStandardCuts(){ | |
185 | // | |
186 | // Standard Cuts defined by the HFE Group | |
187 | // | |
ad75027f | 188 | SetRequireProdVertex(); |
722347d8 | 189 | fProdVtx[0] = -3; |
190 | fProdVtx[1] = 3; | |
191 | fProdVtx[2] = -3; | |
192 | fProdVtx[3] = 3; | |
809a4336 | 193 | SetRequireDCAToVertex(); |
0792aa82 | 194 | fDCAtoVtx[0] = 2.; |
809a4336 | 195 | fDCAtoVtx[1] = 10.; |
196 | fMinClustersTPC = 50; | |
722347d8 | 197 | fMinTrackletsTRD = 0; |
dbe3abbe | 198 | SetRequireITSPixel(); |
722347d8 | 199 | fCutITSPixel = AliHFEextraCuts::kFirst; |
809a4336 | 200 | fMaxChi2clusterTPC = 3.5; |
201 | fMinClusterRatioTPC = 0.6; | |
202 | fPtRange[0] = 0.1; | |
203 | fPtRange[1] = 20.; | |
809a4336 | 204 | } |
205 | #endif |