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