ANALYSIS and ANALYSIScalib
[u/mrichter/AliRoot.git] / ANALYSIS / AliESDv0KineCuts.h
CommitLineData
a65a7e70 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3/*
4 * plesae see source file for more details
5 */
6#ifndef ALIESDV0KINECUTS_H
7#define ALIESDV0KINECUTS_H
8
9#include <TObject.h>
10
11class AliESDv0;
12class AliESDEvent;
13class AliVEvent;
14class AliESDtrack;
15class AliVTrack;
16class AliKFParticle;
17class AliKFVertex;
18
19class AliESDv0KineCuts : public TObject{
20 public:
21 enum{ // Reconstructed V0
22 kUndef = -1,
23 kGamma = 0,
24 kK0 = 1,
25 kLambda = 2,
26 kALambda = 3
27 };
28 enum{ // data types
29 kPP = 0,
30 kPbPb = 1, // not yet implemented
31 };
32 enum{ // operation modes
33 kPurity = 0, // purely kinematical selection
34 kEffGamma = 1 // !!! involves TPC dEdx or nSimga cuts !!!
35 };
36
37 AliESDv0KineCuts();
38 virtual ~AliESDv0KineCuts();
39
40 AliESDv0KineCuts(const AliESDv0KineCuts &ref);
41 AliESDv0KineCuts &operator=(const AliESDv0KineCuts &ref);
42
43 // main selection function - called once per V0 candidate
44 Bool_t ProcessV0(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;
45 Bool_t ProcessV0(AliESDv0* const v0, Int_t &pdgP, Int_t &pdgN) const;
46
47 // must be called by the user
48 void SetEvent(AliESDEvent* const event);
49 void SetEvent(AliVEvent* const event);
50 void SetPrimaryVertex(AliKFVertex* const v);
51
52 // user can select an operation modes [see .cxx for details]
53 void SetMode(Int_t mode, Int_t type);
54 void SetMode(Int_t mode, const char* type);
55 void UseExternalVertex(Bool_t use_external=kTRUE);
56 AliKFParticle *CreateMotherParticle(const AliVTrack* const pdaughter, const AliVTrack* const ndaughter, Int_t pspec, Int_t nspec) const;
57 void SetCuts(); // setup cuts for selected fMode and fType, see source file for details
58 //
59 // setter functions for V0 cut values
60 // for default values see the constructor
61 // see the default contructor for comments
62 //
63
64 // single track cuts
65 void SetNTPCclusters(Int_t n) { fTPCNcls = n; };
66 void SetTPCrefit(Bool_t r = kTRUE) { fTPCrefit = r; };
67 void SetTPCchi2perCls(Float_t chi2) { fTPCchi2perCls = chi2; };
68 void SetTPCclusterratio(Float_t r) { fTPCclsRatio = r; };
69 void SetNoKinks(Bool_t k = kTRUE) { fNoKinks = k; };
70
71 // gamma cuts
72 void SetGammaCutChi2NDF(Float_t val) { fGcutChi2NDF = val; };
73 void SetGammaCutCosPoint(Float_t * const val) {
74 fGcutCosPoint[0] = val[0];
75 fGcutCosPoint[1] = val[1];
76 };
77 void SetGammaCutDCA(Float_t * const val){
78 fGcutDCA[0] = val[0];
79 fGcutDCA[1] = val[1];
80 };
81 void SetGammaCutVertexR(Float_t * const val){
82 fGcutVertexR[0] = val[0];
83 fGcutVertexR[1] = val[1];
84 };
85 void SetGammaCutPsiPair(Float_t * const val){
86 fGcutPsiPair[0] = val[0];
87 fGcutPsiPair[1] = val[1];
88 };
89 void SetGammaCutInvMass(Float_t val){
90 fGcutInvMass = val;
91 };
92 // K0 cuts
93 void SetK0CutChi2NDF(Float_t val) { fK0cutChi2NDF = val; };
94 void SetK0CutCosPoint(Float_t * const val) {
95 fK0cutCosPoint[0] = val[0];
96 fK0cutCosPoint[1] = val[1];
97 };
98 void SetK0CutDCA(Float_t * const val){
99 fK0cutDCA[0] = val[0];
100 fK0cutDCA[1] = val[1];
101 };
102 void SetK0CutVertexR(Float_t * const val){
103 fK0cutVertexR[0] = val[0];
104 fK0cutVertexR[1] = val[1];
105 };
106 void SetK0CutInvMass(Float_t * const val){
107 fK0cutInvMass[0] = val[0];
108 fK0cutInvMass[1] = val[1];
109 };
110 // lambda & anti-lambda cuts
111 void SetLambdaCutChi2NDF(Float_t val) { fLcutChi2NDF = val; };
112 void SetLambdaCutCosPoint(Float_t * const val) {
113 fLcutCosPoint[0] = val[0];
114 fLcutCosPoint[1] = val[1];
115 };
116 void SetLambdaCutDCA(Float_t * const val){
117 fLcutDCA[0] = val[0];
118 fLcutDCA[1] = val[1];
119 };
120 void SetLambdaCutVertexR(Float_t * const val){
121 fLcutVertexR[0] = val[0];
122 fLcutVertexR[1] = val[1];
123 };
124 void SetLambdaCutInvMass(Float_t * const val){
125 fLcutInvMass[0] = val[0];
126 fLcutInvMass[1] = val[1];
127 };
128
129
130 Int_t PreselectV0(AliESDv0* const v0) const;
131
132 Bool_t CaseGamma(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;
133 Bool_t CaseK0(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;
134 Bool_t CaseLambda(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN, Int_t id) const;
135
136 Bool_t V0CutsCommon(const AliESDv0 * const v0) const;
137 Bool_t SingleTrackCuts(AliESDv0 * const v0) const;
138 void Armenteros(AliESDv0* const v0, Float_t val[2]) const;
139 Bool_t CheckSigns(AliESDv0* const v0) const;
140
141 Double_t PsiPair(AliESDv0* const v0) const;
142 Bool_t GetConvPosXY(AliESDtrack * const ptrack, AliESDtrack * const ntrack, Double_t convpos[2]) const;
143 Bool_t GetHelixCenter(AliESDtrack * const track, Double_t b, Int_t charge, Double_t center[2]) const;
144
145 protected:
146 void Copy(TObject &ref) const;
147
148 private:
149 Bool_t GammaEffCuts(AliESDv0 * const v0); // set of cuts optimized for high gamma efficiency
150
151 private:
152 AliESDEvent *fEvent; // current event
153 AliKFVertex *fPrimaryVertex; // primary vertex
154
155 Int_t fType; // data type: p-p or Pb-Pb
156 Int_t fMode; // current operation mode
157
158 // single track cuts
159 Int_t fTPCNcls; // number of TPC clusters
160 Bool_t fTPCrefit; // TPC refit - yes [kTRUE] or do not care [kFALSE]
161 Float_t fTPCchi2perCls; // max. chi2 per TPC cluster
162 Float_t fTPCclsRatio; // min. TPC cluster ratio
163 Bool_t fNoKinks; // kinks - no [kTRUE] or do not care [kFalse]
164
165 // gamma cut values
166 Float_t fGcutChi2NDF; // Chi2NF cut value for the AliKFparticle gamma
167 Float_t fGcutCosPoint[2]; // cos of the pointing angle [min, max]
168 Float_t fGcutDCA[2]; // DCA between the daughter tracks [min, max]
169 Float_t fGcutVertexR[2]; // radius of the conversion point [min, max]
170 Float_t fGcutPsiPair[2]; // value of the psi pair cut [min, max]
171 Float_t fGcutInvMass; // upper value on the gamma invariant mass
172 // K0 cut values
173 Float_t fK0cutChi2NDF; // Chi2NF cut value for the AliKFparticle K0
174 Float_t fK0cutCosPoint[2]; // cos of the pointing angle [min, max]
175 Float_t fK0cutDCA[2]; // DCA between the daughter tracks [min, max]
176 Float_t fK0cutVertexR[2]; // radius of the decay point [min, max]
177 Float_t fK0cutInvMass[2]; // invariant mass window
178 // Lambda & anti-Lambda cut values
179 Float_t fLcutChi2NDF; // Chi2NF cut value for the AliKFparticle K0
180 Float_t fLcutCosPoint[2]; // cos of the pointing angle [min, max]
181 Float_t fLcutDCA[2]; // DCA between the daughter tracks [min, max]
182 Float_t fLcutVertexR[2]; // radius of the decay point [min, max]
183 Float_t fLcutInvMass[2]; // invariant mass window
184 Bool_t fUseExternalVertex; // Is kTRUE if Vertex is set via SetPrimaryVertex()
185 Bool_t fDeleteVertex; // Is kTRUE if Vertex has been created in SetEvent() function
186
187 ClassDef(AliESDv0KineCuts, 0);
188
189};
190
191#endif