AliPhysics  88b7ad0 (88b7ad0)
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),
72 fDausDCA(src.fDausDCA),
77 fP3Pos(src.fP3Pos),
78 fP3Neg(src.fP3Neg),
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 //_____________________________________________________________________________
124 Bool_t AliPicoV0::IsKa(const Double_t dCutMinV0Radius,
125  const Double_t dCutMinV0CosPA,
126  const Double_t dCutMaxV0Ctau,
127  const Double_t dCutMaxDausDCA,
128  const Double_t dCutMinPosDCAtoPV,
129  const Double_t dCutMinNegDCAtoPV,
130  const Float_t dCutMinDauXrowsTPC,
131  const Double_t dCutMinDauXrowsOverFindableClusTPC,
132  const Double_t dCutMinDauDeltaM) const
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 //_____________________________________________________________________________
152 Bool_t AliPicoV0::IsLa(const Double_t dCutMinV0Radius,
153  const Double_t dCutMinV0CosPA,
154  const Double_t dCutMaxV0Ctau,
155  const Double_t dCutMaxDausDCA,
156  const Double_t dCutMinPosDCAtoPV,
157  const Double_t dCutMinNegDCAtoPV,
158  const Float_t dCutMinDauXrowsTPC,
159  const Double_t dCutMinDauXrowsOverFindableClusTPC,
160  const Double_t dCutMinDauDeltaM) const
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(const Double_t dCutMaxV0Ctau, const Double_t dCutMinDauDeltaM) const
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(const Double_t dCutMaxV0Ctau, const Double_t dCutMinDauDeltaM) const
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  const Double_t dCutMinV0CosPA,
218  const Double_t dCutMaxDausDCA,
219  const Double_t dCutMinPosDCAtoPV,
220  const Double_t dCutMinNegDCAtoPV,
221  const Float_t dCutMinDauXrowsTPC,
222  const Double_t dCutMinDauXrowsOverFindableClusTPC) const
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 //_____________________________________________________________________________
242 void AliPicoV0::FillKshortPtInvM(TH2D* const h, const Double_t *dCuts) const
243 {
244 //
245 // AliPicoV0::FillKshortPtInvM
246 //
247 
248  if (!h) return;
249  if (!IsKshort(dCuts)) 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 //_____________________________________________________________________________
260 void AliPicoV0::FillLambdaPtInvM(TH2D* const h, const Double_t *dCuts) const
261 {
262 //
263 // AliPicoV0::FillLambdaPtInvM
264 //
265 
266  if (!h) return;
267  if (!IsLambda(dCuts)) 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 //_____________________________________________________________________________
278 void AliPicoV0::FillAntiLaPtInvM(TH2D* const h, const Double_t *dCuts) const
279 {
280 //
281 // AliPicoV0::FillAntiLaPtInvM
282 //
283 
284  if (!h) return;
285  if (!IsAntiLa(dCuts)) 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  Double_t dRap = RapidityKa(); return ((dRap>=dMin) && (dRap<dMax));
303 }
304 
305 //_____________________________________________________________________________
307 {
308 //
309 // AliPicoV0::IsLaInRapAcc
310 //
311 
312  Double_t dRap = RapidityLa(); return ((dRap>=dMin) && (dRap<dMax));
313 }
314 
315 //_____________________________________________________________________________
317 {
318 //
319 // AliPicoV0::IsV0InEtaAcc
320 //
321 
322  Double_t dEta = KineRD().Eta();
323  if ((dEta<dMin) || (dEta>=dMax)) return kFALSE;
324 
325  return kTRUE;
326 }
327 
328 //_____________________________________________________________________________
330 {
331 //
332 // AliPicoV0::IsDausInEtaAcc
333 //
334 
335  Double_t dPosEta = fP3Pos.Eta(); if ((dPosEta<dMin) || (dPosEta>=dMax)) return kFALSE;
336  Double_t dNegEta = fP3Neg.Eta(); if ((dNegEta<dMin) || (dNegEta>=dMax)) return kFALSE;
337 
338  return kTRUE;
339 }
340 
341 //_____________________________________________________________________________
343 {
344 //
345 // AliPicoV0::RapidityKa
346 //
347 
348  TLorentzVector v; v.SetVectM(KineRD(), AliPicoBase::MassKshort());
349  return v.Rapidity();
350 }
351 
352 //_____________________________________________________________________________
354 {
355 //
356 // AliPicoV0::RapidityLa
357 //
358 
359  TLorentzVector v; v.SetVectM(KineRD(), AliPicoBase::MassLambda());
360  return v.Rapidity();
361 }
362 
363 //_____________________________________________________________________________
364 const TLorentzVector AliPicoV0::KineKshort() const
365 {
366 //
367 // AliPicoV0::KineKshort
368 //
369 
370  TLorentzVector vPos; vPos.SetVectM(fP3Pos, AliPicoBase::MassPion());
371  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, AliPicoBase::MassPion());
372 
373  return (vPos + vNeg);
374 }
375 
376 //_____________________________________________________________________________
377 const TLorentzVector AliPicoV0::KineLambda() const
378 {
379 //
380 // AliPicoV0::KineLambda
381 //
382 
383  TLorentzVector vPos; vPos.SetVectM(fP3Pos, AliPicoBase::MassProton());
384  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, AliPicoBase::MassPion());
385 
386  return (vPos + vNeg);
387 }
388 
389 //_____________________________________________________________________________
390 const TLorentzVector AliPicoV0::KineAntiLa() const
391 {
392 //
393 // AliPicoV0::KineAntiLa
394 //
395 
396  TLorentzVector vPos; vPos.SetVectM(fP3Pos, AliPicoBase::MassPion());
397  TLorentzVector vNeg; vNeg.SetVectM(fP3Neg, AliPicoBase::MassProton());
398 
399  return (vPos + vNeg);
400 }
virtual Bool_t IsKshort(Double_t const *=nullptr) const
Definition: AliPicoV0.h:46
void FillLambdaPtInvM(TH2D *const h, Double_t const *dCuts=nullptr) const
Definition: AliPicoV0.cxx:260
const TLorentzVector KineAntiLa() const
Definition: AliPicoV0.cxx:390
Double_t fV0DistToPVoverP
Definition: AliPicoV0.h:114
Bool_t IsLaInRapAcc(Double_t dMin, Double_t dMax)
Definition: AliPicoV0.cxx:306
AliPicoV0 & operator=(const AliPicoV0 &src)
Definition: AliPicoV0.cxx:88
double Double_t
Definition: External.C:58
void FillKshortPtInvM(TH2D *const h, Double_t const *dCuts=nullptr) const
Definition: AliPicoV0.cxx:242
Bool_t IsKaSelected(const Double_t dCutMaxV0Ctau, const Double_t dCutMinDauDeltaM) const
Definition: AliPicoV0.cxx:180
Double_t fNegDCAtoPV
Definition: AliPicoV0.h:119
UInt_t fMask
Definition: AliPicoV0.h:110
TVector3 fP3Pos
Definition: AliPicoV0.h:124
Bool_t IsKaInRapAcc(Double_t dMin, Double_t dMax)
Definition: AliPicoV0.cxx:296
Double_t MassLambda()
Definition: AliPicoBase.h:44
Bool_t IsV0InEtaAcc(Double_t dMin, Double_t dMax)
Definition: AliPicoV0.cxx:316
TVector3 fP3Neg
Definition: AliPicoV0.h:125
virtual ~AliPicoV0()
Definition: AliPicoV0.cxx:116
Double_t MassPion()
Definition: AliPicoBase.h:41
Double_t fDauXrowsOverFindableClusTPC
Definition: AliPicoV0.h:122
Float_t fDauXrowsTPC
Definition: AliPicoV0.h:121
Double_t MassProton()
Definition: AliPicoBase.h:43
Double_t MassKshort()
Definition: AliPicoBase.h:42
const TLorentzVector KineLambda() const
Definition: AliPicoV0.cxx:377
const Double_t RapidityLa() const
Definition: AliPicoV0.cxx:353
void FillAntiLaPtInvM(TH2D *const h, Double_t const *dCuts=nullptr) const
Definition: AliPicoV0.cxx:278
Bool_t IsCandidateSelected(const Double_t dCutMinV0Radius, const Double_t dCutMinV0CosPA, const Double_t dCutMaxDausDCA, const Double_t dCutMinPosDCAtoPV, const Double_t dCutMinNegDCAtoPV, const Float_t dCutMinDauXrowsTPC, const Double_t dCutMinDauXrowsOverFindableClusTPC) const
Definition: AliPicoV0.cxx:216
unsigned int UInt_t
Definition: External.C:33
const TVector3 KineRD() const
Definition: AliPicoV0.h:36
float Float_t
Definition: External.C:68
Definition: External.C:228
Double_t fPosDCAtoPV
Definition: AliPicoV0.h:118
Bool_t fIsNegInJC
Definition: AliPicoV0.h:128
Double_t fDausDCA
Definition: AliPicoV0.h:116
virtual Bool_t IsAntiLa(Double_t const *=nullptr) const
Definition: AliPicoV0.h:54
const Double_t RapidityKa() const
Definition: AliPicoV0.cxx:342
virtual Bool_t IsLambda(Double_t const *=nullptr) const
Definition: AliPicoV0.h:50
Bool_t fIsPosInJC
Definition: AliPicoV0.h:127
Double_t fV0Radius
Definition: AliPicoV0.h:112
Double_t fV0CosPA
Definition: AliPicoV0.h:113
Bool_t IsDausInEtaAcc(Double_t dMin, Double_t dMax)
Definition: AliPicoV0.cxx:329
Bool_t IsLaSelected(const Double_t dCutMaxV0Ctau, const Double_t dCutMinDauDeltaM) const
Definition: AliPicoV0.cxx:199
Bool_t IsKa(const Double_t dCutMinV0Radius=0.5, const Double_t dCutMinV0CosPA=0.97, const Double_t dCutMaxV0Ctau=20., const Double_t dCutMaxDausDCA=1., const Double_t dCutMinPosDCAtoPV=0.06, const Double_t dCutMinNegDCAtoPV=0.06, const Float_t dCutMinDauXrowsTPC=70., const Double_t dCutMinDauXrowsOverFindableClusTPC=0.8, const Double_t dCutMinDauDeltaM=0.005) const
Definition: AliPicoV0.cxx:124
Bool_t IsLa(const Double_t dCutMinV0Radius=0.5, const Double_t dCutMinV0CosPA=0.995, const Double_t dCutMaxV0Ctau=30., const Double_t dCutMaxDausDCA=1., const Double_t dCutMinPosDCAtoPV=0.06, const Double_t dCutMinNegDCAtoPV=0.06, const Float_t dCutMinDauXrowsTPC=70., const Double_t dCutMinDauXrowsOverFindableClusTPC=0.8, const Double_t dCutMinDauDeltaM=0.01) const
Definition: AliPicoV0.cxx:152
bool Bool_t
Definition: External.C:53
const TLorentzVector KineKshort() const
Definition: AliPicoV0.cxx:364