Initial check-in of the model classes
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / Model / AliFemtoModelHiddenInfo.cxx
CommitLineData
75c432a7 1#include "AliFemtoModelHiddenInfo.h"
2
3//_____________________________________________
4AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo() :
5 fTrueMomentum(0),
6 fEmissionPoint(0),
7 fPDGPid(0),
8 fMass(0)
9{
10};
11//_____________________________________________
12AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &aInfo) :
13 fTrueMomentum(0),
14 fEmissionPoint(0),
15 fPDGPid(0),
16 fMass(0)
17{
18 if (aInfo.GetTrueMomentum())
19 SetTrueMomentum(aInfo.GetTrueMomentum());
20 if (aInfo.GetEmissionPoint())
21 SetEmissionPoint(aInfo.GetEmissionPoint());
22 fPDGPid = aInfo.GetPDGPid();
23 fMass = aInfo.GetMass();
24}
25//_____________________________________________
26AliFemtoModelHiddenInfo::~AliFemtoModelHiddenInfo()
27{
28 if (fTrueMomentum) delete fTrueMomentum;
29 if (fEmissionPoint) delete fEmissionPoint;
30}
31//_____________________________________________
32AliFemtoModelHiddenInfo& AliFemtoModelHiddenInfo::operator=(const AliFemtoModelHiddenInfo& aInfo)
33{
34 if (this == &aInfo)
35 return *this;
36
37 if (aInfo.GetTrueMomentum())
38 SetTrueMomentum(aInfo.GetTrueMomentum());
39 else SetTrueMomentum(0);
40 if (aInfo.GetEmissionPoint())
41 SetEmissionPoint(aInfo.GetEmissionPoint());
42 else SetEmissionPoint(0);
43 fPDGPid = aInfo.GetPDGPid();
44 fMass = aInfo.GetMass();
45
46 return *this;
47}
48//_____________________________________________
49AliFemtoThreeVector *AliFemtoModelHiddenInfo::GetTrueMomentum() const
50{
51 return fTrueMomentum;
52}
53//_____________________________________________
54AliFemtoLorentzVector *AliFemtoModelHiddenInfo::GetEmissionPoint() const
55{
56 return fEmissionPoint;
57}
58//_____________________________________________
59Int_t AliFemtoModelHiddenInfo::GetPDGPid() const
60{
61 return fPDGPid;
62}
63//_____________________________________________
64Double_t AliFemtoModelHiddenInfo::GetMass() const
65{
66 return fMass;
67}
68//_____________________________________________
69void AliFemtoModelHiddenInfo::SetTrueMomentum(AliFemtoThreeVector *aMom)
70{
71 if (fTrueMomentum) {
72 fTrueMomentum->setX(aMom->x());
73 fTrueMomentum->setY(aMom->y());
74 fTrueMomentum->setZ(aMom->z());
75 }
76 else {
77 fTrueMomentum = new AliFemtoThreeVector(*aMom);
78 }
79}
80//_____________________________________________
81void AliFemtoModelHiddenInfo::SetTrueMomentum(const AliFemtoThreeVector& aMom)
82{
83 if (fTrueMomentum) {
84 fTrueMomentum->setX(aMom.x());
85 fTrueMomentum->setY(aMom.y());
86 fTrueMomentum->setZ(aMom.z());
87 }
88 else {
89 fTrueMomentum = new AliFemtoThreeVector();
90 *fTrueMomentum = aMom;
91 }
92}
93//_____________________________________________
94void AliFemtoModelHiddenInfo::SetTrueMomentum(Double_t aPx, Double_t aPy, Double_t aPz)
95{
96 if (!fTrueMomentum) fTrueMomentum = new AliFemtoThreeVector();
97 fTrueMomentum->setX(aPx);
98 fTrueMomentum->setY(aPy);
99 fTrueMomentum->setZ(aPz);
100}
101//_____________________________________________
102void AliFemtoModelHiddenInfo::SetEmissionPoint(AliFemtoLorentzVector *aPos)
103{
104 if (fEmissionPoint) {
105 fEmissionPoint->setX(aPos->px());
106 fEmissionPoint->setY(aPos->py());
107 fEmissionPoint->setZ(aPos->pz());
108 fEmissionPoint->setT(aPos->e());
109 }
110 else {
111 fEmissionPoint = new AliFemtoLorentzVector(*aPos);
112 }
113}
114//_____________________________________________
115void AliFemtoModelHiddenInfo::SetEmissionPoint(const AliFemtoLorentzVector& aPos)
116{
117 if (fEmissionPoint) {
118 fEmissionPoint->setX(aPos.px());
119 fEmissionPoint->setY(aPos.py());
120 fEmissionPoint->setZ(aPos.pz());
121 fEmissionPoint->setT(aPos.e());
122 }
123 else {
124 fEmissionPoint = new AliFemtoLorentzVector();
125 *fEmissionPoint = aPos;
126 }
127}
128//_____________________________________________
129void AliFemtoModelHiddenInfo::SetPDGPid(Int_t aPid)
130{
131 fPDGPid = aPid;
132}
133//_____________________________________________
134void AliFemtoModelHiddenInfo::SetMass(Double_t aMass)
135{
136 fMass = aMass;
137}
138//_____________________________________________
139void AliFemtoModelHiddenInfo::SetEmissionPoint(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT)
140{
141 fEmissionPoint->setX(aRx);
142 fEmissionPoint->setY(aRy);
143 fEmissionPoint->setZ(aRz);
144 fEmissionPoint->setT(aT);
145}
146//_____________________________________________
147 AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::getParticleHiddenInfo() const
148{
149 AliFemtoModelHiddenInfo* tBuf = new AliFemtoModelHiddenInfo(*this);
150 return tBuf;
151}