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 **************************************************************************/
15 #ifndef __ALIHFECUTS_H__
16 #define __ALIHFECUTS_H__
22 #ifndef __ALIHFELECTRONEXTRACUTS_H__
23 #include "AliHFEextraCuts.h"
33 class AliHFEcuts : public TObject{
39 kProductionVertex = 1,
49 kStepMCInAcceptance = 1,
55 static const Int_t kNcutSteps;
58 AliHFEcuts(const AliHFEcuts &c);
59 AliHFEcuts &operator=(const AliHFEcuts &c);
62 void Initialize(AliCFManager *cfm);
65 Bool_t CheckParticleCuts(CutStep_t step, TObject *o);
67 TList *GetQAhistograms() const { return fHistQA; }
70 void UnsetDebugMode() { SetBit(kDebugMode, kFALSE); }
71 Bool_t IsInDebugMode() const { return TestBit(kDebugMode); };
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); };
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);
92 inline void CreateStandardCuts();
95 void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); };
96 void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); };
97 void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); }
98 void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); };
99 void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); };
102 void SetParticleGenCutList();
103 void SetAcceptanceCutList();
104 void SetRecKineCutList();
105 void SetRecPrimaryCutList();
106 void SetHFElectronCuts();
108 ULong64_t fRequirements; // Bitmap for requirements
109 Double_t fDCAtoVtx[2]; // DCA to Vertex
110 Double_t fProdVtx[4]; // Production Vertex
111 Double_t fPtRange[2]; // pt range
112 UChar_t fMinClustersTPC; // Min.Number of TPC clusters
113 UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets
114 UChar_t fCutITSPixel; // Cut on ITS pixel
115 Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster
116 Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters
117 Double_t fSigmaToVtx; // Sigma To Vertex
119 TList *fHistQA; //! QA Histograms
120 TObjArray *fCutList; //! List of cut objects(Correction Framework Manager)
122 ClassDef(AliHFEcuts, 1) // Container for HFE cuts
125 //__________________________________________________________________
126 void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){
127 // Set the production vertex constraint
128 SetRequireProdVertex();
135 //__________________________________________________________________
136 void AliHFEcuts::SetSigmaToVertex(Double_t sig){
137 SetRequireSigmaToVertex();
141 //__________________________________________________________________
142 void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){
143 SetRequireDCAToVertex();
144 fDCAtoVtx[0] = radial;
148 //__________________________________________________________________
149 void AliHFEcuts::SetCutITSpixel(UChar_t cut){
150 SetRequireITSPixel();
154 //__________________________________________________________________
155 void AliHFEcuts::CreateStandardCuts(){
157 // Standard Cuts defined by the HFE Group
159 SetRequireProdVertex();
164 SetRequireDCAToVertex();
167 fMinClustersTPC = 50;
168 fMinTrackletsTRD = 6;
169 fCutITSPixel = AliHFEextraCuts::kAny;
170 fMaxChi2clusterTPC = 3.5;
171 fMinClusterRatioTPC = 0.6;