]>
Commit | Line | Data |
---|---|---|
d0e92d9a | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | /// /// | |
3 | /// AliFemtoModelHiddenInfo - the hidden info for model calculations /// | |
4 | /// Stores information needed for the weight generation - the true /// | |
5 | /// simulated momenta, freeze-out coordinates from model and particle PID /// | |
6 | /// /// | |
7 | //////////////////////////////////////////////////////////////////////////////// | |
75c432a7 | 8 | #include "AliFemtoModelHiddenInfo.h" |
9 | ||
10 | //_____________________________________________ | |
11 | AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo() : | |
12 | fTrueMomentum(0), | |
13 | fEmissionPoint(0), | |
14 | fPDGPid(0), | |
15 | fMass(0) | |
16 | { | |
d0e92d9a | 17 | // Default constructor |
75c432a7 | 18 | }; |
19 | //_____________________________________________ | |
20 | AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &aInfo) : | |
21 | fTrueMomentum(0), | |
22 | fEmissionPoint(0), | |
23 | fPDGPid(0), | |
24 | fMass(0) | |
25 | { | |
d0e92d9a | 26 | // Copy constructor |
75c432a7 | 27 | if (aInfo.GetTrueMomentum()) |
28 | SetTrueMomentum(aInfo.GetTrueMomentum()); | |
29 | if (aInfo.GetEmissionPoint()) | |
30 | SetEmissionPoint(aInfo.GetEmissionPoint()); | |
31 | fPDGPid = aInfo.GetPDGPid(); | |
32 | fMass = aInfo.GetMass(); | |
33 | } | |
34 | //_____________________________________________ | |
35 | AliFemtoModelHiddenInfo::~AliFemtoModelHiddenInfo() | |
36 | { | |
d0e92d9a | 37 | // Destructor |
75c432a7 | 38 | if (fTrueMomentum) delete fTrueMomentum; |
39 | if (fEmissionPoint) delete fEmissionPoint; | |
40 | } | |
41 | //_____________________________________________ | |
42 | AliFemtoModelHiddenInfo& AliFemtoModelHiddenInfo::operator=(const AliFemtoModelHiddenInfo& aInfo) | |
43 | { | |
d0e92d9a | 44 | // assignment operator |
75c432a7 | 45 | if (this == &aInfo) |
46 | return *this; | |
47 | ||
48 | if (aInfo.GetTrueMomentum()) | |
49 | SetTrueMomentum(aInfo.GetTrueMomentum()); | |
50 | else SetTrueMomentum(0); | |
51 | if (aInfo.GetEmissionPoint()) | |
52 | SetEmissionPoint(aInfo.GetEmissionPoint()); | |
53 | else SetEmissionPoint(0); | |
54 | fPDGPid = aInfo.GetPDGPid(); | |
55 | fMass = aInfo.GetMass(); | |
56 | ||
57 | return *this; | |
58 | } | |
59 | //_____________________________________________ | |
60 | AliFemtoThreeVector *AliFemtoModelHiddenInfo::GetTrueMomentum() const | |
61 | { | |
62 | return fTrueMomentum; | |
63 | } | |
64 | //_____________________________________________ | |
65 | AliFemtoLorentzVector *AliFemtoModelHiddenInfo::GetEmissionPoint() const | |
66 | { | |
67 | return fEmissionPoint; | |
68 | } | |
69 | //_____________________________________________ | |
70 | Int_t AliFemtoModelHiddenInfo::GetPDGPid() const | |
71 | { | |
72 | return fPDGPid; | |
73 | } | |
74 | //_____________________________________________ | |
75 | Double_t AliFemtoModelHiddenInfo::GetMass() const | |
76 | { | |
77 | return fMass; | |
78 | } | |
79 | //_____________________________________________ | |
80 | void AliFemtoModelHiddenInfo::SetTrueMomentum(AliFemtoThreeVector *aMom) | |
81 | { | |
d0e92d9a | 82 | // set momentum from vector |
75c432a7 | 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(*aMom); | |
90 | } | |
91 | } | |
92 | //_____________________________________________ | |
93 | void AliFemtoModelHiddenInfo::SetTrueMomentum(const AliFemtoThreeVector& aMom) | |
94 | { | |
d0e92d9a | 95 | // set momentum from vector |
75c432a7 | 96 | if (fTrueMomentum) { |
97 | fTrueMomentum->setX(aMom.x()); | |
98 | fTrueMomentum->setY(aMom.y()); | |
99 | fTrueMomentum->setZ(aMom.z()); | |
100 | } | |
101 | else { | |
102 | fTrueMomentum = new AliFemtoThreeVector(); | |
103 | *fTrueMomentum = aMom; | |
104 | } | |
105 | } | |
106 | //_____________________________________________ | |
107 | void AliFemtoModelHiddenInfo::SetTrueMomentum(Double_t aPx, Double_t aPy, Double_t aPz) | |
108 | { | |
d0e92d9a | 109 | // set momentum from components |
75c432a7 | 110 | if (!fTrueMomentum) fTrueMomentum = new AliFemtoThreeVector(); |
111 | fTrueMomentum->setX(aPx); | |
112 | fTrueMomentum->setY(aPy); | |
113 | fTrueMomentum->setZ(aPz); | |
114 | } | |
115 | //_____________________________________________ | |
116 | void AliFemtoModelHiddenInfo::SetEmissionPoint(AliFemtoLorentzVector *aPos) | |
117 | { | |
d0e92d9a | 118 | // set position from vector |
75c432a7 | 119 | if (fEmissionPoint) { |
120 | fEmissionPoint->setX(aPos->px()); | |
121 | fEmissionPoint->setY(aPos->py()); | |
122 | fEmissionPoint->setZ(aPos->pz()); | |
123 | fEmissionPoint->setT(aPos->e()); | |
124 | } | |
125 | else { | |
126 | fEmissionPoint = new AliFemtoLorentzVector(*aPos); | |
127 | } | |
128 | } | |
129 | //_____________________________________________ | |
130 | void AliFemtoModelHiddenInfo::SetEmissionPoint(const AliFemtoLorentzVector& aPos) | |
131 | { | |
d0e92d9a | 132 | // set position from vector |
75c432a7 | 133 | if (fEmissionPoint) { |
134 | fEmissionPoint->setX(aPos.px()); | |
135 | fEmissionPoint->setY(aPos.py()); | |
136 | fEmissionPoint->setZ(aPos.pz()); | |
137 | fEmissionPoint->setT(aPos.e()); | |
138 | } | |
139 | else { | |
140 | fEmissionPoint = new AliFemtoLorentzVector(); | |
141 | *fEmissionPoint = aPos; | |
142 | } | |
143 | } | |
144 | //_____________________________________________ | |
145 | void AliFemtoModelHiddenInfo::SetPDGPid(Int_t aPid) | |
146 | { | |
147 | fPDGPid = aPid; | |
148 | } | |
149 | //_____________________________________________ | |
150 | void AliFemtoModelHiddenInfo::SetMass(Double_t aMass) | |
151 | { | |
152 | fMass = aMass; | |
153 | } | |
154 | //_____________________________________________ | |
155 | void AliFemtoModelHiddenInfo::SetEmissionPoint(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT) | |
156 | { | |
d0e92d9a | 157 | // set position from components |
75c432a7 | 158 | fEmissionPoint->setX(aRx); |
159 | fEmissionPoint->setY(aRy); | |
160 | fEmissionPoint->setZ(aRz); | |
161 | fEmissionPoint->setT(aT); | |
162 | } | |
163 | //_____________________________________________ | |
d0e92d9a | 164 | AliFemtoHiddenInfo* AliFemtoModelHiddenInfo::GetParticleHiddenInfo() const |
75c432a7 | 165 | { |
d0e92d9a | 166 | // return copy of this hidden info |
75c432a7 | 167 | AliFemtoModelHiddenInfo* tBuf = new AliFemtoModelHiddenInfo(*this); |
168 | return tBuf; | |
169 | } |