AliPhysics  9b6b435 (9b6b435)
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  fOpeningAngle(-1),
13  fAlpha(-1),
14  fMCLabel(-1)
15 
16 {
17  //Default constructor
18  fLabel[0] = -1;
19  fLabel[1] = -1;
20 }
21 
23  AliKFParticle(d1,d2),
24  fOpeningAngle(-1),
25  fAlpha(-1),
26  fMCLabel(-1)
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=(d1.GetE()-d2.GetE())/(d1.GetE()+d2.GetE());
39  }
40 }
41 
43  AliKFParticle(original),
44  fOpeningAngle(original.fOpeningAngle),
45  fAlpha(original.fAlpha),
46  fMCLabel(original.fMCLabel)
47 {
48  //Copy constructor
49  fLabel[0] = original.fLabel[0];
50  fLabel[1] = original.fLabel[1];
51 }
52 
53 
55 {
56  // assignment operator
57  return *this;
58 }
59 
61 {
63  if(GetE() - GetPz() <= 0 || GetE() + GetPz() <= 0){
64  AliWarning("Error: |Pz| > E !!!! ");
65  rapidity=8.;
66  } else {
67  rapidity = 0.5*(TMath::Log((GetE() +GetPz()) / (GetE()-GetPz())));
68  }
69 
70 return rapidity;
71 }
72 
74 {
75  Double_t phi = AliKFParticle::GetPhi();
76  if (phi < 0.) phi += 2. * TMath::Pi();
77  return phi;
78 }
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