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