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{
43 kStepMCInAcceptance = 2,
45 kStepRecKineITSTPC = 4,
52 kEventStepGenerated = 0,
53 kEventStepRecNoCut = 1,
54 kEventStepReconstructed = 2
59 kNcutStepsESDtrack = 6
60 }; // Additional constants
63 AliHFEcuts(const Char_t *name, const Char_t *title);
64 AliHFEcuts(const AliHFEcuts &c);
65 AliHFEcuts &operator=(const AliHFEcuts &c);
66 void Copy(TObject &o) const;
69 void Initialize(AliCFManager *cfm);
72 Bool_t CheckParticleCuts(CutStep_t step, TObject *o);
74 TList *GetQAhistograms() const { return fHistQA; }
76 void SetQAOn() {SetBit(kDebugMode, kTRUE); };
77 void UnsetQA() {SetBit(kDebugMode, kFALSE); };
78 Bool_t IsQAOn() const { return TestBit(kDebugMode); };
79 void SetAOD() { SetBit(kAOD, kTRUE); }
80 void SetESD() { SetBit(kAOD, kFALSE); }
81 Bool_t IsAOD() const { return TestBit(kAOD); }
82 Bool_t IsESD() const { return !TestBit(kAOD); }
85 Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); };
86 Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); };
87 Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); };
88 Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); };
89 Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); };
90 Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); };
91 Bool_t IsRequireKineMCCuts() const {return TESTBIT(fRequirements, kKineMCCuts); };
94 inline void SetCutITSpixel(UChar_t cut);
95 void SetCheckITSLayerStatus(Bool_t checkITSLayerStatus) { fCheckITSLayerStatus = checkITSLayerStatus; }
96 void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; }
97 void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; }
98 void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; };
99 inline void SetMaxImpactParam(Double_t radial, Double_t z);
100 void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; };
101 void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;};
102 inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
103 inline void SetSigmaToVertex(Double_t sig);
105 inline void CreateStandardCuts();
108 void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); };
109 void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); };
110 void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); }
111 void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); };
112 void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); };
113 void SetRequireKineMCCuts() { SETBIT(fRequirements, kKineMCCuts); };
115 void SetDebugLevel(Int_t level) { fDebugLevel = level; };
116 Int_t GetDebugLevel() const { return fDebugLevel; };
120 kDebugMode = BIT(14),
125 kProductionVertex = 1,
132 void SetParticleGenCutList();
133 void SetAcceptanceCutList();
134 void SetRecKineITSTPCCutList();
135 void SetRecPrimaryCutList();
136 void SetHFElectronITSCuts();
137 void SetHFElectronTRDCuts();
138 void SetEventCutList(Int_t istep);
140 ULong64_t fRequirements; // Bitmap for requirements
141 Double_t fDCAtoVtx[2]; // DCA to Vertex
142 Double_t fProdVtx[4]; // Production Vertex
143 Double_t fPtRange[2]; // pt range
144 UChar_t fMinClustersTPC; // Min.Number of TPC clusters
145 UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets
146 UChar_t fCutITSPixel; // Cut on ITS pixel
147 Bool_t fCheckITSLayerStatus; // Check ITS layer status
148 Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster
149 Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters
150 Double_t fSigmaToVtx; // Sigma To Vertex
152 TList *fHistQA; //! QA Histograms
153 TObjArray *fCutList; //! List of cut objects(Correction Framework Manager)
155 Int_t fDebugLevel; // Debug Level
157 ClassDef(AliHFEcuts, 1) // Container for HFE cuts
160 //__________________________________________________________________
161 void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){
162 // Set the production vertex constraint
163 SetRequireProdVertex();
170 //__________________________________________________________________
171 void AliHFEcuts::SetSigmaToVertex(Double_t sig){
172 SetRequireSigmaToVertex();
176 //__________________________________________________________________
177 void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){
178 SetRequireDCAToVertex();
179 fDCAtoVtx[0] = radial;
183 //__________________________________________________________________
184 void AliHFEcuts::SetCutITSpixel(UChar_t cut){
185 SetRequireITSPixel();
189 //__________________________________________________________________
190 void AliHFEcuts::CreateStandardCuts(){
192 // Standard Cuts defined by the HFE Group
194 SetRequireProdVertex();
199 //SetRequireDCAToVertex();
200 //fDCAtoVtx[0] = 0.5;
201 //fDCAtoVtx[1] = 1.5;
202 fMinClustersTPC = 80;
203 fMinTrackletsTRD = 0;
204 SetRequireITSPixel();
205 fCutITSPixel = AliHFEextraCuts::kFirst;
206 fMaxChi2clusterTPC = 3.5;
207 fMinClusterRatioTPC = 0.6;
210 SetRequireKineMCCuts();