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