]>
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 | **************************************************************************/ | |
15 | #ifndef __ALIHFECUTS_H__ | |
16 | #define __ALIHFECUTS_H__ | |
17 | ||
18 | #ifndef ROOT_TObject | |
19 | #include <TObject.h> | |
20 | #endif | |
21 | ||
22 | #ifndef __ALIHFELECTRONEXTRACUTS_H__ | |
23 | #include "AliHFEextraCuts.h" | |
24 | #endif | |
25 | ||
26 | class AliCFManager; | |
27 | class AliESDtrack; | |
28 | class AliMCParticle; | |
29 | ||
30 | class TObjArray; | |
31 | class TList; | |
32 | ||
33 | class AliHFEcuts : public TObject{ | |
34 | enum{ | |
35 | kDebugMode = BIT(14) | |
36 | }; | |
37 | typedef enum{ | |
38 | kPrimary = 0, | |
39 | kProductionVertex = 1, | |
40 | kSigmaToVertex = 2, | |
41 | kDCAToVertex = 3, | |
42 | kITSPixel = 4, | |
43 | kMaxImpactParam = 5 | |
44 | } Require_t; | |
45 | public: | |
46 | ||
47 | typedef enum{ | |
48 | kStepMCGenerated = 0, | |
49 | kStepMCInAcceptance = 1, | |
50 | kStepRecKine = 2, | |
51 | kStepRecPrim = 3, | |
52 | kStepHFEcuts = 4 | |
53 | } CutStep_t; | |
54 | ||
55 | static const Int_t kNcutSteps; | |
56 | ||
57 | AliHFEcuts(); | |
58 | AliHFEcuts(const AliHFEcuts &c); | |
59 | AliHFEcuts &operator=(const AliHFEcuts &c); | |
60 | ~AliHFEcuts(); | |
61 | ||
62 | void Initialize(AliCFManager *cfm); | |
63 | void Initialize(); | |
64 | ||
65 | Bool_t CheckParticleCuts(CutStep_t step, TObject *o); | |
66 | ||
67 | TList *GetQAhistograms() const { return fHistQA; } | |
68 | ||
69 | void SetDebugMode(); | |
70 | void UnsetDebugMode() { SetBit(kDebugMode, kFALSE); } | |
71 | Bool_t IsInDebugMode() const { return TestBit(kDebugMode); }; | |
72 | ||
73 | // Getters | |
74 | Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); }; | |
75 | Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); }; | |
76 | Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); }; | |
77 | Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); }; | |
78 | Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); }; | |
79 | Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); }; | |
80 | ||
81 | // Setters | |
82 | inline void SetCutITSpixel(UChar_t cut); | |
83 | void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; } | |
84 | void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; } | |
85 | void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; }; | |
86 | inline void SetMaxImpactParam(Double_t radial, Double_t z); | |
87 | void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; }; | |
88 | void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;}; | |
89 | inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax); | |
90 | inline void SetSigmaToVertex(Double_t sig); | |
91 | ||
92 | inline void CreateStandardCuts(); | |
93 | ||
94 | // Requirements | |
95 | void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); }; | |
96 | void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); }; | |
97 | void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); } | |
98 | void SetRequireMaxImpactParam() { SETBIT(fRequirements, kMaxImpactParam); }; | |
99 | void SetRequireProdVetrex() { SETBIT(fRequirements, kProductionVertex); }; | |
100 | void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); }; | |
101 | ||
102 | private: | |
103 | void SetParticleGenCutList(); | |
104 | void SetAcceptanceCutList(); | |
105 | void SetRecKineCutList(); | |
106 | void SetRecPrimaryCutList(); | |
107 | void SetHFElectronCuts(); | |
108 | ||
109 | ULong64_t fRequirements; // Bitmap for requirements | |
110 | Double_t fDCAtoVtx[2]; // DCA to Vertex | |
111 | Double_t fProdVtx[4]; // Production Vertex | |
112 | Double_t fPtRange[2]; // pt range | |
113 | UChar_t fMinClustersTPC; // Min.Number of TPC clusters | |
114 | UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets | |
115 | UChar_t fCutITSPixel; // Cut on ITS pixel | |
116 | Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster | |
117 | Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters | |
118 | Double_t fSigmaToVtx; // Sigma To Vertex | |
119 | Double_t fMaxImpactParamR; // Max. Impact Parameter in Radial Direction | |
120 | Double_t fMaxImpactParamZ; // Max. Impact Parameter in Z Direction | |
121 | ||
122 | TList *fHistQA; //! QA Histograms | |
123 | TObjArray *fCutList; //! List of cut objects(Correction Framework Manager) | |
124 | ||
125 | ClassDef(AliHFEcuts, 1) // Container for HFE cuts | |
126 | }; | |
127 | ||
128 | //__________________________________________________________________ | |
129 | void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){ | |
130 | // Set the production vertex constraint | |
131 | SetRequireProdVetrex(); | |
132 | fProdVtx[0] = xmin; | |
133 | fProdVtx[1] = xmax; | |
134 | fProdVtx[2] = ymin; | |
135 | fProdVtx[3] = ymax; | |
136 | } | |
137 | ||
138 | //__________________________________________________________________ | |
139 | void AliHFEcuts::SetSigmaToVertex(Double_t sig){ | |
140 | SetRequireSigmaToVertex(); | |
141 | fSigmaToVtx = sig; | |
142 | } | |
143 | ||
144 | //__________________________________________________________________ | |
145 | void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){ | |
146 | SetRequireMaxImpactParam(); | |
147 | fMaxImpactParamR = radial; | |
148 | fMaxImpactParamZ = z; | |
149 | } | |
150 | ||
151 | //__________________________________________________________________ | |
152 | void AliHFEcuts::SetCutITSpixel(UChar_t cut){ | |
153 | SetRequireITSPixel(); | |
154 | fCutITSPixel = cut; | |
155 | } | |
156 | ||
157 | //__________________________________________________________________ | |
158 | void AliHFEcuts::CreateStandardCuts(){ | |
159 | // | |
160 | // Standard Cuts defined by the HFE Group | |
161 | // | |
162 | SetRequireProdVetrex(); | |
163 | fProdVtx[0] = -1; | |
164 | fProdVtx[1] = 1; | |
165 | fProdVtx[2] = -1; | |
166 | fProdVtx[3] = 1; | |
167 | SetRequireDCAToVertex(); | |
168 | fDCAtoVtx[0] = 4.; | |
169 | fDCAtoVtx[1] = 10.; | |
170 | fMinClustersTPC = 50; | |
171 | fMinTrackletsTRD = 6; | |
172 | fCutITSPixel = AliHFEextraCuts::kAny; | |
173 | fMaxChi2clusterTPC = 3.5; | |
174 | fMinClusterRatioTPC = 0.6; | |
175 | fPtRange[0] = 0.1; | |
176 | fPtRange[1] = 20.; | |
177 | fSigmaToVtx = 4.; | |
178 | SetRequireMaxImpactParam(); | |
179 | fMaxImpactParamR = 3.; | |
180 | fMaxImpactParamZ = 12.; | |
181 | } | |
182 | #endif |