AliPhysics  2c8507d (2c8507d)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliPicoV0Base.cxx
Go to the documentation of this file.
1 #include <TH2D.h>
2 #include <TMath.h>
3 #include <TLorentzVector.h>
4 
5 #include "AliPicoV0Base.h"
6 
8 
9 //_____________________________________________________________________________
10 const Double_t AliPicoV0Base::fgkMassPion = 0.13957;
11 const Double_t AliPicoV0Base::fgkMassKshort = 0.497614;
12 const Double_t AliPicoV0Base::fgkMassProton = 0.938272;
13 const Double_t AliPicoV0Base::fgkMassLambda = 1.11568;
14 
15 //_____________________________________________________________________________
17 TObject(),
18 fMask(0),
19 fV0Radius(0.),
20 fV0CosPA(0.),
21 fV0DistToPVoverP(0.),
22 fDausDCA(0.),
23 fPosDCAtoPV(0.),
24 fNegDCAtoPV(0.),
25 fDauXrowsTPC(0.),
26 fDauXrowsOverFindableClusTPC(0.),
27 fP3Pos(),
28 fP3Neg(),
29 fIsPosInJC(kFALSE),
30 fIsNegInJC(kFALSE)
31 {
32 //
33 // AliPicoV0Base::AliPicoV0Base
34 //
35 }
36 
37 //_____________________________________________________________________________
39  Double_t dV0Radius,
40  Double_t dV0CosPA,
41  Double_t dV0DistToPVoverP,
42  Double_t dDausDCA,
43  Double_t dPosDCAtoPV,
44  Double_t dNegDCAtoPV,
45  Float_t dDauXrowsTPC,
46  Double_t dDauXrowsOverFindableClusTPC,
47  Double_t dPosPx, Double_t dPosPy, Double_t dPosPz,
48  Double_t dNegPx, Double_t dNegPy, Double_t dNegPz,
49  Bool_t bPosInJC,
50  Bool_t bNegInJC) :
51 TObject(),
52 fMask(wMask),
53 fV0Radius(dV0Radius),
54 fV0CosPA(dV0CosPA),
55 fV0DistToPVoverP(dV0DistToPVoverP),
56 fDausDCA(dDausDCA),
57 fPosDCAtoPV(dPosDCAtoPV),
58 fNegDCAtoPV(dNegDCAtoPV),
59 fDauXrowsTPC(dDauXrowsTPC),
60 fDauXrowsOverFindableClusTPC(dDauXrowsOverFindableClusTPC),
61 fP3Pos(dPosPx, dPosPy, dPosPz),
62 fP3Neg(dNegPx, dNegPy, dNegPz),
63 fIsPosInJC(bPosInJC),
64 fIsNegInJC(bNegInJC)
65 {
66 //
67 // AliPicoV0Base::AliPicoV0Base
68 //
69 }
70 
71 //_____________________________________________________________________________
73 TObject(src),
74 fMask(src.fMask),
75 fV0Radius(src.fV0Radius),
76 fV0CosPA(src.fV0CosPA),
77 fV0DistToPVoverP(src.fV0DistToPVoverP),
78 fDausDCA(src.fDausDCA),
79 fPosDCAtoPV(src.fPosDCAtoPV),
80 fNegDCAtoPV(src.fNegDCAtoPV),
81 fDauXrowsTPC(src.fDauXrowsTPC),
82 fDauXrowsOverFindableClusTPC(src.fDauXrowsOverFindableClusTPC),
83 fP3Pos(src.fP3Pos),
84 fP3Neg(src.fP3Neg),
85 fIsPosInJC(src.fIsPosInJC),
86 fIsNegInJC(src.fIsNegInJC)
87 {
88 //
89 // AliPicoV0Base::AliPicoV0Base
90 //
91 }
92 
93 //_____________________________________________________________________________
95 {
96 //
97 // AliPicoV0Base::operator=
98 //
99 
100  if (&src==this) return *this;
101 
102  TObject::operator=(src);
103 
104  fMask = src.fMask;
105  fV0Radius = src.fV0Radius;
106  fV0CosPA = src.fV0CosPA;
108  fDausDCA = src.fDausDCA;
109  fPosDCAtoPV = src.fPosDCAtoPV;
110  fNegDCAtoPV = src.fNegDCAtoPV;
113  fP3Pos = src.fP3Pos;
114  fP3Neg = src.fP3Neg;
115  fIsPosInJC = src.fIsPosInJC;
116  fIsNegInJC = src.fIsNegInJC;
117 
118  return *this;
119 }
120 
121 //_____________________________________________________________________________
123 {
124 //
125 // AliPicoV0Base::~AliPicoV0Base
126 //
127 }
128 
129 //_____________________________________________________________________________
131  Double_t dCutMinV0CosPA,
132  Double_t dCutMaxV0Ctau,
133  Double_t dCutMaxDausDCA,
134  Double_t dCutMinPosDCAtoPV,
135  Double_t dCutMinNegDCAtoPV,
136  Float_t dCutMinDauXrowsTPC,
137  Double_t dCutMinDauXrowsOverFindableClusTPC,
138  Double_t dCutMinDauDeltaM)
139 {
140 //
141 // AliPicoV0Base::IsKa
142 //
143 
144  if (!IsCandidateSelected(dCutMinV0Radius,
145  dCutMinV0CosPA,
146  dCutMaxDausDCA,
147  dCutMinPosDCAtoPV,
148  dCutMinNegDCAtoPV,
149  dCutMinDauXrowsTPC,
150  dCutMinDauXrowsOverFindableClusTPC)) return kFALSE;
151 
152  if (!IsKaSelected(dCutMaxV0Ctau, dCutMinDauDeltaM)) return kFALSE;
153 
154  return kTRUE;
155 }
156 
157 //_____________________________________________________________________________
159  Double_t dCutMinV0CosPA,
160  Double_t dCutMaxV0Ctau,
161  Double_t dCutMaxDausDCA,
162  Double_t dCutMinPosDCAtoPV,
163  Double_t dCutMinNegDCAtoPV,
164  Float_t dCutMinDauXrowsTPC,
165  Double_t dCutMinDauXrowsOverFindableClusTPC,
166  Double_t dCutMinDauDeltaM)
167 {
168 //
169 // AliPicoV0Base::IsLa
170 //
171 
172  if (!IsCandidateSelected(dCutMinV0Radius,
173  dCutMinV0CosPA,
174  dCutMaxDausDCA,
175  dCutMinPosDCAtoPV,
176  dCutMinNegDCAtoPV,
177  dCutMinDauXrowsTPC,
178  dCutMinDauXrowsOverFindableClusTPC)) return kFALSE;
179 
180  if (!IsLaSelected(dCutMaxV0Ctau, dCutMinDauDeltaM)) return kFALSE;
181 
182  return kTRUE;
183 }
184 
185 //_____________________________________________________________________________
186 Bool_t AliPicoV0Base::IsKaSelected(Double_t dCutMaxV0Ctau, Double_t dCutMinDauDeltaM)
187 {
188 //
189 // AliPicoV0Base::IsKaSelected
190 //
191 
192  if ((fV0DistToPVoverP*fgkMassKshort)>dCutMaxV0Ctau) return kFALSE;
193 
194  if (dCutMinDauDeltaM>0.) {
195  Double_t dMassLambda = KineLambda().M();
196  Double_t dMassAntiLa = KineAntiLa().M();
197  if ((TMath::Abs(dMassLambda-fgkMassLambda)<dCutMinDauDeltaM) ||
198  (TMath::Abs(dMassAntiLa-fgkMassLambda)<dCutMinDauDeltaM)) return kFALSE;
199  }
200 
201  return kTRUE;
202 }
203 
204 //_____________________________________________________________________________
205 Bool_t AliPicoV0Base::IsLaSelected(Double_t dCutMaxV0Ctau, Double_t dCutMinDauDeltaM)
206 {
207 //
208 // AliPicoV0Base::IsLaSelected
209 //
210 
211  if ((fV0DistToPVoverP*fgkMassLambda)>dCutMaxV0Ctau) return kFALSE;
212 
213  if (dCutMinDauDeltaM>0.) {
214  Double_t dMassKshort = KineKshort().M();
215  if (TMath::Abs(dMassKshort-fgkMassKshort)<dCutMinDauDeltaM) return kFALSE;
216  }
217 
218  return kTRUE;
219 }
220 
221 //_____________________________________________________________________________
223  Double_t dCutMinV0CosPA,
224  Double_t dCutMaxDausDCA,
225  Double_t dCutMinPosDCAtoPV,
226  Double_t dCutMinNegDCAtoPV,
227  Float_t dCutMinDauXrowsTPC,
228  Double_t dCutMinDauXrowsOverFindableClusTPC)
229 {
230 //
231 // AliPicoV0Base::IsCandidateSelected
232 //
233 
234  if (fV0Radius<dCutMinV0Radius) return kFALSE;
235  if (fV0CosPA <dCutMinV0CosPA) return kFALSE;
236 
237  if (fDausDCA>dCutMaxDausDCA) return kFALSE;
238  if (fPosDCAtoPV<dCutMinPosDCAtoPV) return kFALSE;
239  if (fNegDCAtoPV<dCutMinNegDCAtoPV) return kFALSE;
240 
241  if (fDauXrowsTPC<dCutMinDauXrowsTPC) return kFALSE;
242  if (fDauXrowsOverFindableClusTPC<dCutMinDauXrowsOverFindableClusTPC) return kFALSE;
243 
244  return kTRUE;
245 }
246 
247 //_____________________________________________________________________________
249 {
250 //
251 // AliPicoV0Base::FillKshortPtInvM
252 //
253 
254  if (!h) return;
255  if (!IsKshort()) return;
256 //=============================================================================
257 
258  TLorentzVector v = KineKshort();
259  Double_t dPt = v.Pt(); if (dPt<h->GetXaxis()->GetBinLowEdge(1)) return;
260 
261  h->Fill(dPt, v.M());
262  return;
263 }
264 
265 //_____________________________________________________________________________
267 {
268 //
269 // AliPicoV0Base::FillLambdaPtInvM
270 //
271 
272  if (!h) return;
273  if (!IsLambda()) return;
274 //=============================================================================
275 
276  TLorentzVector v = KineLambda();
277  Double_t dPt = v.Pt(); if (dPt<h->GetXaxis()->GetBinLowEdge(1)) return;
278 
279  h->Fill(dPt, v.M());
280  return;
281 }
282 
283 //_____________________________________________________________________________
285 {
286 //
287 // AliPicoV0Base::FillAntiLaPtInvM
288 //
289 
290  if (!h) return;
291  if (!IsAntiLa()) return;
292 //=============================================================================
293 
294  TLorentzVector v = KineAntiLa();
295  Double_t dPt = v.Pt(); if (dPt<h->GetXaxis()->GetBinLowEdge(1)) return;
296 
297  h->Fill(dPt, v.M());
298  return;
299 }
300 
301 //_____________________________________________________________________________
303 {
304 //
305 // AliPicoV0Base::IsKaInRapAcc
306 //
307 
308  if (!IsKshort()) return kFALSE;
309  Double_t dRap = RapidityKa(); return ((dRap>=dMin) && (dRap<dMax));
310 }
311 
312 //_____________________________________________________________________________
314 {
315 //
316 // AliPicoV0Base::IsLaInRapAcc
317 //
318 
319  if (!(IsLambda() || IsAntiLa())) return kFALSE;
320  Double_t dRap = RapidityLa(); return ((dRap>=dMin) && (dRap<dMax));
321 }
322 
323 //_____________________________________________________________________________
325 {
326 //
327 // AliPicoV0Base::IsV0InEtaAcc
328 //
329 
330  Double_t dEta = KineRD().Eta();
331  if ((dEta<dMin) || (dEta>=dMax)) return kFALSE;
332 
333  return kTRUE;
334 }
335 
336 //_____________________________________________________________________________
338 {
339 //
340 // AliPicoV0Base::IsDausInEtaAcc
341 //
342 
343  Double_t dPosEta = fP3Pos.Eta(); if ((dPosEta<dMin) || (dPosEta>=dMax)) return kFALSE;
344  Double_t dNegEta = fP3Neg.Eta(); if ((dNegEta<dMin) || (dNegEta>=dMax)) return kFALSE;
345 
346  return kTRUE;
347 }
348 
349 //_____________________________________________________________________________
351 {
352 //
353 // AliPicoV0Base::RapidityKa
354 //
355 
356  TLorentzVector v; v.SetVectM(KineRD(), fgkMassKshort);
357  return v.Rapidity();
358 }
359 
360 //_____________________________________________________________________________
362 {
363 //
364 // AliPicoV0Base::RapidityLa
365 //
366 
367  TLorentzVector v; v.SetVectM(KineRD(), fgkMassLambda);
368  return v.Rapidity();
369 }
370 
371 //_____________________________________________________________________________
373 {
374 //
375 // AliPicoV0Base::KineKshort
376 //
377 
378  TLorentzVector vPos; vPos.SetVectM(fP3Pos, fgkMassPion);
379  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, fgkMassPion);
380 
381  return (vPos + vNeg);
382 }
383 
384 //_____________________________________________________________________________
386 {
387 //
388 // AliPicoV0Base::KineLambda
389 //
390 
391  TLorentzVector vPos; vPos.SetVectM(fP3Pos, fgkMassProton);
392  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, fgkMassPion);
393 
394  return (vPos + vNeg);
395 }
396 
397 //_____________________________________________________________________________
399 {
400 //
401 // AliPicoV0Base::KineAntiLa
402 //
403 
404  TLorentzVector vPos; vPos.SetVectM(fP3Pos, fgkMassPion);
405  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, fgkMassProton);
406 
407  return (vPos + vNeg);
408 }
Bool_t IsCandidateSelected(Double_t dCutMinV0Radius, Double_t dCutMinV0CosPA, Double_t dCutMaxDausDCA, Double_t dCutMinPosDCAtoPV, Double_t dCutMinNegDCAtoPV, Float_t dCutMinDauXrowsTPC, Double_t dCutMinDauXrowsOverFindableClusTPC)
Bool_t IsKaInRapAcc(Double_t dMin, Double_t dMax)
Bool_t IsKa(Double_t dCutMinV0Radius=0.5, Double_t dCutMinV0CosPA=0.97, Double_t dCutMaxV0Ctau=20., Double_t dCutMaxDausDCA=1., Double_t dCutMinPosDCAtoPV=0.06, Double_t dCutMinNegDCAtoPV=0.06, Float_t dCutMinDauXrowsTPC=70., Double_t dCutMinDauXrowsOverFindableClusTPC=0.8, Double_t dCutMinDauDeltaM=0.005)
double Double_t
Definition: External.C:58
void FillAntiLaPtInvM(TH2D *h)
TLorentzVector KineAntiLa()
Bool_t IsDausInEtaAcc(Double_t dMin, Double_t dMax)
TLorentzVector KineKshort()
Float_t fDauXrowsTPC
Double_t RapidityKa()
Bool_t IsKshort() const
Definition: AliPicoV0Base.h:46
AliPicoV0Base & operator=(const AliPicoV0Base &src)
Bool_t IsLaInRapAcc(Double_t dMin, Double_t dMax)
static const Double_t fgkMassProton
Double_t fV0Radius
static const Double_t fgkMassLambda
TVector3 fP3Pos
static const Double_t fgkMassKshort
Double_t RapidityLa()
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Double_t fDausDCA
Bool_t IsKaSelected(Double_t dCutMaxV0Ctau, Double_t dCutMinDauDeltaM)
Double_t fNegDCAtoPV
Double_t fV0CosPA
Definition: External.C:228
TVector3 KineRD() const
Definition: AliPicoV0Base.h:36
Bool_t IsAntiLa() const
Definition: AliPicoV0Base.h:48
Bool_t IsLaSelected(Double_t dCutMaxV0Ctau, Double_t dCutMinDauDeltaM)
TVector3 fP3Neg
static const Double_t fgkMassPion
Double_t fDauXrowsOverFindableClusTPC
Double_t fPosDCAtoPV
TLorentzVector KineLambda()
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void FillLambdaPtInvM(TH2D *h)
Bool_t IsV0InEtaAcc(Double_t dMin, Double_t dMax)
Double_t fV0DistToPVoverP
Bool_t IsLa(Double_t dCutMinV0Radius=0.5, Double_t dCutMinV0CosPA=0.995, Double_t dCutMaxV0Ctau=30., Double_t dCutMaxDausDCA=1., Double_t dCutMinPosDCAtoPV=0.06, Double_t dCutMinNegDCAtoPV=0.06, Float_t dCutMinDauXrowsTPC=70., Double_t dCutMinDauXrowsOverFindableClusTPC=0.8, Double_t dCutMinDauDeltaM=0.01)
void FillKshortPtInvM(TH2D *h)
bool Bool_t
Definition: External.C:53
Bool_t IsLambda() const
Definition: AliPicoV0Base.h:47
virtual ~AliPicoV0Base()