1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
27 #ifndef ALIHFEEXTRACUTS_H
28 #include "AliHFEextraCuts.h"
38 class AliHFEcuts : public TNamed{
42 kStepRecKineITSTPC = 1,
46 kNcutStepsRecTrack = 5
54 kStepMCGeneratedZOutNoPileUp = 1,
55 kStepMCGeneratedEventCut = 2,
56 kStepMCInAcceptance = 3,
60 kEventStepGenerated = 0,
61 kEventStepRecNoCut = 1,
62 kEventStepRecNoPileUp = 2,
64 kEventStepReconstructed = 4,
69 AliHFEcuts(const Char_t *name, const Char_t *title);
70 AliHFEcuts(const AliHFEcuts &c);
71 AliHFEcuts &operator=(const AliHFEcuts &c);
72 void Copy(TObject &o) const;
75 void Initialize(AliCFManager *cfm);
78 Bool_t CheckParticleCuts(UInt_t step, TObject *o);
80 TList *GetQAhistograms() const { return fHistQA; }
82 void SetQAOn() {SetBit(kDebugMode, kTRUE); };
83 void UnsetQA() {SetBit(kDebugMode, kFALSE); };
84 Bool_t IsQAOn() const { return TestBit(kDebugMode); };
85 void SetAOD() { SetBit(kAOD, kTRUE); }
86 void SetESD() { SetBit(kAOD, kFALSE); }
87 Bool_t IsAOD() const { return TestBit(kAOD); }
88 Bool_t IsESD() const { return !TestBit(kAOD); }
91 static const Char_t *MCCutName(UInt_t step){
92 if(step >= kNcutStepsMCTrack) return fgkUndefined;
93 return fgkMCCutName[step];
95 static const Char_t *RecoCutName(UInt_t step){
96 if(step >= kNcutStepsRecTrack) return fgkUndefined;
97 return fgkRecoCutName[step];
99 static const Char_t *DECutName(UInt_t step){
100 if(step >= kNcutStepsDETrack) return fgkUndefined;
101 return fgkDECutName[step];
103 static const Char_t *EventCutName(UInt_t step){
104 if(step >= kNcutStepsEvent) return fgkUndefined;
105 return fgkEventCutName[step];
109 Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); };
110 Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); };
111 Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); };
112 Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); };
113 Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); };
114 Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); };
115 Bool_t IsRequireKineMCCuts() const {return TESTBIT(fRequirements, kKineMCCuts); };
116 Double_t GetVertexRange() const {return fVertexRangeZ; };
119 inline void SetCutITSpixel(UChar_t cut);
120 void SetCheckITSLayerStatus(Bool_t checkITSLayerStatus) { fCheckITSLayerStatus = checkITSLayerStatus; }
121 void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; }
122 void SetMinNClustersITS(UChar_t minClustersITS) { fMinClustersITS = minClustersITS; }
123 void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; }
124 void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; };
125 inline void SetMaxImpactParam(Double_t radial, Double_t z);
126 void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; };
127 void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;};
128 inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
129 inline void SetSigmaToVertex(Double_t sig);
130 void SetTPCiter1(Bool_t iter1) { fTPCiter1 = iter1; }
131 void SetVertexRange(Double_t zrange){fVertexRangeZ = zrange;};
133 inline void CreateStandardCuts();
136 void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); CLRBIT(fRequirements, kSigmaToVertex); };
137 void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); };
138 void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); }
139 void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); };
140 void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); CLRBIT(fRequirements, kDCAToVertex); };
141 void UnsetVertexRequirement() { CLRBIT(fRequirements, kDCAToVertex); CLRBIT(fRequirements, kSigmaToVertex); }
142 void SetRequireKineMCCuts() { SETBIT(fRequirements, kKineMCCuts); };
144 void SetDebugLevel(Int_t level) { fDebugLevel = level; };
145 Int_t GetDebugLevel() const { return fDebugLevel; };
149 kDebugMode = BIT(14),
154 kProductionVertex = 1,
161 void SetParticleGenCutList();
162 void SetAcceptanceCutList();
163 void SetRecKineITSTPCCutList();
164 void SetRecPrimaryCutList();
165 void SetHFElectronITSCuts();
166 void SetHFElectronTRDCuts();
167 void SetHFElectronDcaCuts();
168 void SetEventCutList(Int_t istep);
170 static const Char_t* fgkMCCutName[kNcutStepsMCTrack]; // Cut step names for MC single Track cuts
171 static const Char_t* fgkRecoCutName[kNcutStepsRecTrack]; // Cut step names for Rec single Track cuts
172 static const Char_t* fgkDECutName[kNcutStepsDETrack]; // Cut step names for impact parameter cuts
173 static const Char_t* fgkEventCutName[kNcutStepsEvent]; // Cut step names for Event cuts
174 static const Char_t* fgkUndefined; // Name for undefined (overflow)
176 ULong64_t fRequirements; // Bitmap for requirements
177 Bool_t fTPCiter1; // TPC iter1
178 Double_t fDCAtoVtx[2]; // DCA to Vertex
179 Double_t fProdVtx[4]; // Production Vertex
180 Double_t fPtRange[2]; // pt range
181 UChar_t fMinClustersTPC; // Min.Number of TPC clusters
182 UChar_t fMinClustersITS; // Min.Number of TPC clusters
183 UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets
184 UChar_t fCutITSPixel; // Cut on ITS pixel
185 Bool_t fCheckITSLayerStatus; // Check ITS layer status
186 Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster
187 Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters
188 Double_t fSigmaToVtx; // Sigma To Vertex
189 Double_t fVertexRangeZ; // Vertex Range reconstructed
192 TList *fHistQA; //! QA Histograms
193 TObjArray *fCutList; //! List of cut objects(Correction Framework Manager)
195 Int_t fDebugLevel; // Debug Level
197 ClassDef(AliHFEcuts, 2) // Container for HFE cuts
200 //__________________________________________________________________
201 void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){
202 // Set the production vertex constraint
203 SetRequireProdVertex();
210 //__________________________________________________________________
211 void AliHFEcuts::SetSigmaToVertex(Double_t sig){
212 SetRequireSigmaToVertex();
216 //__________________________________________________________________
217 void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){
218 SetRequireDCAToVertex();
219 fDCAtoVtx[0] = radial;
223 //__________________________________________________________________
224 void AliHFEcuts::SetCutITSpixel(UChar_t cut){
225 SetRequireITSPixel();
229 //__________________________________________________________________
230 void AliHFEcuts::CreateStandardCuts(){
232 // Standard Cuts defined by the HFE Group
234 SetRequireProdVertex();
239 //SetRequireDCAToVertex();
240 //fDCAtoVtx[0] = 0.5;
241 //fDCAtoVtx[1] = 1.5;
242 fMinClustersTPC = 80;
244 fMinTrackletsTRD = 0;
245 SetRequireITSPixel();
246 fCutITSPixel = AliHFEextraCuts::kFirst;
247 fMaxChi2clusterTPC = 4.;
248 fMinClusterRatioTPC = 0.6;
251 SetRequireKineMCCuts();