AliPhysics  b555aef (b555aef)
AliV0ParticleStrange.cxx
Go to the documentation of this file.
1 #include "AliAODMCParticle.h"
2 #include "AliAODMCHeader.h"
3 #include "AliV0ParticleStrange.h"
5 
6 using namespace std;
7 
8 ClassImp(AliV0ParticleStrange)
9 
12 fDCArPrimVtx(0),
13 fDCAzPrimVtx(0),
14 fInvMassPair(0)
15 {
16  //Standard constructor
17 }
18 
19 AliV0ParticleStrange::AliV0ParticleStrange(AliKFParticle *kfparticle) :
20 AliAODConversionParticle(kfparticle),
21 fDCArPrimVtx(0),
22 fDCAzPrimVtx(0),
23 fInvMassPair(0)
24 {
25 
26  // puts the mass to zero and store dilepton mass
27  SetMass(kfparticle->GetMass());
28 
29  //SetE(P());
30 
31 }
32 
36 fDCArPrimVtx(0),
37 fDCAzPrimVtx(0),
38 fInvMassPair(0)
39 {
40  //Constructor from TLorentzVector
41 }
42 
43 
44 
46 AliAODConversionParticle(original),
47 AliConversionPhotonBase(original),
48 fDCArPrimVtx(original.fDCArPrimVtx),
49 fDCAzPrimVtx(original.fDCAzPrimVtx),
50 fInvMassPair(original.fInvMassPair)
51 {
52  //Copy constructor
53 }
54 
56 {
57  // empty standard destructor
58 }
59 
61 {
62  // assignment operator
63  return *this;
64 }
65 
68 
69  Double_t primCo[3] = {primVertex->GetX(),primVertex->GetY(),primVertex->GetZ()};
70 
71  Double_t absoluteP = TMath::Sqrt(TMath::Power(GetPx(),2) + TMath::Power(GetPy(),2) + TMath::Power(GetPz(),2));
72  Double_t p[3] = {GetPx()/absoluteP,GetPy()/absoluteP,GetPz()/absoluteP};
73  Double_t CP[3];
74 
75  CP[0] = fConversionPoint[0] - primCo[0];
76  CP[1] = fConversionPoint[1] - primCo[1];
77  CP[2] = fConversionPoint[2] - primCo[2];
78 
79  Double_t Lambda = - (CP[0]*p[0]+CP[1]*p[1]+CP[2]*p[2])/(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
80 
81  Double_t S[3];
82  S[0] = fConversionPoint[0] + p[0]*Lambda;
83  S[1] = fConversionPoint[1] + p[1]*Lambda;
84  S[2] = fConversionPoint[2] + p[2]*Lambda;
85 
86  fDCArPrimVtx = TMath::Sqrt( TMath::Power(primCo[0]-S[0],2) + TMath::Power(primCo[1]-S[1],2));
87  fDCAzPrimVtx = primCo[2]-S[2];
88 
89  return;
90 }
virtual Double_t GetPy() const
double Double_t
Definition: External.C:58
AliV0ParticleStrange & operator=(const AliV0ParticleStrange &g)
virtual Double_t GetPz() const
virtual Double_t GetPx() const
void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex *primVertex)