AliPhysics  d3bfcb9 (d3bfcb9)
AliKFConversionMother.cxx
Go to the documentation of this file.
2 #include "AliKFParticle.h"
3 #include "TMath.h"
4 #include "TVector3.h"
5 
6 using namespace std;
7 
8 ClassImp(AliKFConversionMother)
9 
11 AliKFParticle(),
12  fMCLabel(-1),
13  fOpeningAngle(-1),
14  fAlpha(-1)
15 
16 {
17  //Default constructor
18  fLabel[0] = -1;
19  fLabel[1] = -1;
20 }
21 
22 /*AliKFConversionMother::AliKFConversionMother(const AliKFParticle& d1, const AliKFParticle& d2) :
23 AliKFParticle(d1,d2),
24 fOpeningAngle(-1),
25 fAlpha(-1)
26 
27 {
28  //Default constructor
29  fLabel[0] = -1;
30  fLabel[1] = -1;
31 
32  // Calculate Opening Angle
33  TVector3 v1(d1.GetPx(),d1.GetPy(),d1.GetPz());
34  TVector3 v2(d2.GetPx(),d2.GetPy(),d2.GetPz());
35  fOpeningAngle=v1.Angle(v2);
36  // Calculate Alpha
37  if((d1.GetE()+d2.GetE()) != 0){
38  fAlpha=TMath::Abs((d1.GetE()-d2.GetE())/(d1.GetE()+d2.GetE()));
39  }
40 }*/
41 
43 AliKFParticle(d1,d2),
44 fMCLabel(-1),
45 fOpeningAngle(-1),
46 fAlpha(-1)
47 
48 {
49  //Default constructor
50  fLabel[0] = -1;
51  fLabel[1] = -1;
52 
53  // Calculate Opening Angle
54  TVector3 v1(d1.GetPx(),d1.GetPy(),d1.GetPz());
55  TVector3 v2(d2.GetPx(),d2.GetPy(),d2.GetPz());
56  fOpeningAngle=v1.Angle(v2);
57  // Calculate Alpha
58  if((d1.GetE()+d2.GetE()) != 0){
59  fAlpha=(d1.GetE()-d2.GetE())/(d1.GetE()+d2.GetE());
60  }
61 }
62 
64 AliKFParticle(original),
65 fMCLabel(original.fMCLabel),
67 fAlpha(original.fAlpha)
68 {
69  //Copy constructor
70  fLabel[0] = original.fLabel[0];
71  fLabel[1] = original.fLabel[1];
72 }
73 
74 
76 {
77  // assignment operator
78  return *this;
79 }
80 
82 {
84  if(GetE() - GetPz() <= 0 || GetE() + GetPz() <= 0){
85  AliWarning("Error: |Pz| > E !!!! ");
86  rapidity=8.;
87  } else {
88  rapidity = 0.5*(TMath::Log((GetE() +GetPz()) / (GetE()-GetPz())));
89  }
90 
91 return rapidity;
92 }
93 
95 {
96  Double_t phi = AliKFParticle::GetPhi();
97  if (phi < 0.) phi += 2. * TMath::Pi();
98  return phi;
99 }
double Double_t
Definition: External.C:58
virtual Double_t GetPy() const
AliKFConversionMother & operator=(const AliKFConversionMother &g)
virtual Double_t GetPz() const
rapidity
Definition: HFPtSpectrum.C:47
virtual Double_t GetPx() const