]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoModelAllHiddenInfo.cxx
Adding new hidden info class for decay products
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoModelAllHiddenInfo.cxx
CommitLineData
a329d65b 1//K//////////////////////////////////////////////////////////////////////////M//
2//K M//
3//K AliFemtoModelAllHiddenInfo - M//
4//K derived class inherits the base class AliFemtoModelHiddenInfo M//
5//K the hidden info for model calculations M//
6//K Stores information needed for the weight generation - M//
7//K M//
8//K in addition to the base class AliFemtoModelHiddenInfo - the true M//
9//K simulated momenta, freeze-out coordinates from model and particle PID M//
10//K New information was added M//
11//K 1. Mother ID M//
12//K 2. Mother 4-Momentum M//
13//K 3. Mother emission point 4-vector M//
14//K 4. Childs IDs M//
15//K 5. Childs 4-Momentum M//
16//K--------------------------------------------------------------------------M// //
17//K APR2008 Konstantin Mikhailov Konstantin.Mikhailov@itep.ru M//
18//K M//
19//K//////////////////////////////////////////////////////////////////////////M//
20#include "AliFemtoModelAllHiddenInfo.h"
21
22//_____________________________________________
23AliFemtoModelAllHiddenInfo::AliFemtoModelAllHiddenInfo() :
24 fTrueMomentumMother(0),
25 fEmissionPointMother(0),
26 fPDGPidMother(0),
27 fTrueMomentumChild1(0),
28 fTrueMomentumChild2(0),
29 fPDGPidChild1(0),
30 fPDGPidChild2(0)
31{
32 // Default constructor
33}
34//_____________________________________________
35AliFemtoModelAllHiddenInfo::AliFemtoModelAllHiddenInfo(const AliFemtoModelAllHiddenInfo &aInfo) :
36 AliFemtoModelHiddenInfo(aInfo),
37 fTrueMomentumMother(0),
38 fEmissionPointMother(0),
39 fPDGPidMother(0),
40 fTrueMomentumChild1(0),
41 fTrueMomentumChild2(0),
42 fPDGPidChild1(0),
43 fPDGPidChild2(0)
44{
45 // Copy constructor
46 if (aInfo.GetTrueMomentumMother())
47 SetTrueMomentumMother(aInfo.GetTrueMomentumMother());
48 if (aInfo.GetEmissionPointMother())
49 SetEmissionPointMother(aInfo.GetEmissionPointMother());
50 fPDGPidMother = aInfo.GetPDGPidMother();
51 if (aInfo.GetTrueMomentumChild1())
52 SetTrueMomentumChild1(aInfo.GetTrueMomentumChild1());
53 if (aInfo.GetTrueMomentumChild2())
54 SetTrueMomentumChild2(aInfo.GetTrueMomentumChild2());
55 fPDGPidChild1 = aInfo.GetPDGPidChild1();
56 fPDGPidChild2 = aInfo.GetPDGPidChild2();
57}
58//_____________________________________________
59AliFemtoModelAllHiddenInfo::~AliFemtoModelAllHiddenInfo()
60{
61 // Destructor
62 if (fTrueMomentumMother) delete fTrueMomentumMother;
63 if (fEmissionPointMother) delete fEmissionPointMother;
64 if (fTrueMomentumChild1) delete fTrueMomentumChild1;
65 if (fTrueMomentumChild2) delete fTrueMomentumChild2;
66}
67//_____________________________________________
68AliFemtoModelAllHiddenInfo& AliFemtoModelAllHiddenInfo::operator=(const AliFemtoModelAllHiddenInfo& aInfo)
69{
70 // assignment operator
71 if (this == &aInfo)
72 return *this;
73
74 if (aInfo.GetTrueMomentumMother())
75 SetTrueMomentumMother(aInfo.GetTrueMomentumMother());
76 else SetTrueMomentumMother(0);
77 if (aInfo.GetEmissionPointMother())
78 SetEmissionPointMother(aInfo.GetEmissionPointMother());
79 else SetEmissionPointMother(0);
80 fPDGPidMother = aInfo.GetPDGPidMother();
81 if (aInfo.GetTrueMomentumChild1())
82 SetTrueMomentumChild1(aInfo.GetTrueMomentumChild1());
83 else SetTrueMomentumChild1(0);
84 if (aInfo.GetTrueMomentumChild2())
85 SetTrueMomentumChild2(aInfo.GetTrueMomentumChild2());
86 else SetTrueMomentumChild2(0);
87 fPDGPidChild1 = aInfo.GetPDGPidChild1();
88 fPDGPidChild2 = aInfo.GetPDGPidChild2();
89
90 return *this;
91}
92//
93// GET
94//
95//_____________________________________________
96AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumMother() const
97{
98return fTrueMomentumMother;
99}
100//_____________________________________________
101AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetEmissionPointMother() const
102{
103 return fEmissionPoint;
104}
105//_____________________________________________
106 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidMother() const
107{
108 return fPDGPidMother;
109}
110//_____________________________________________
111AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumChild1() const
112{
113return fTrueMomentumChild1;
114}
115//_____________________________________________
116AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumChild2() const
117{
118return fTrueMomentumChild2;
119}
120//_____________________________________________
121 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidChild1() const
122{
123 return fPDGPidChild1;
124}
125//_____________________________________________
126 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidChild2() const
127{
128 return fPDGPidChild2;
129}
130//
131// SET
132//
133//_____________________________________________
134// Mother momentum
135//_____________________________________________
136void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(AliFemtoLorentzVector *aMomMother)
137{
138 // set momentum from vector
139 if (fTrueMomentumMother) {
140 fTrueMomentumMother->setX(aMomMother->px());
141 fTrueMomentumMother->setY(aMomMother->py());
142 fTrueMomentumMother->setZ(aMomMother->pz());
143 fTrueMomentumMother->setT(aMomMother->e());
144 }
145 else {
146 fTrueMomentumMother = new AliFemtoLorentzVector(*aMomMother);
147 }
148}
149//_____________________________________________
150void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(const AliFemtoLorentzVector& aMomMother)
151{
152 // set momentum from vector and energy
153 if (fTrueMomentumMother) {
154 fTrueMomentumMother->setX(aMomMother.px());
155 fTrueMomentumMother->setY(aMomMother.py());
156 fTrueMomentumMother->setZ(aMomMother.pz());
157 fTrueMomentumMother->setT(aMomMother.e());
158 }
159 else {
160 fTrueMomentumMother = new AliFemtoLorentzVector();
161 *fTrueMomentumMother = aMomMother;
162 }
163}
164//_____________________________________________
165void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(Double_t aMotherPx, Double_t aMotherPy, Double_t aMotherPz, Double_t aMotherE)
166{
167 // set momentum from components and energy
168 if (!fTrueMomentumMother) fTrueMomentumMother = new AliFemtoLorentzVector();
169 fTrueMomentumMother->setX(aMotherPx);
170 fTrueMomentumMother->setY(aMotherPy);
171 fTrueMomentumMother->setZ(aMotherPz);
172 fTrueMomentumMother->setT(aMotherE);
173}
174//_____________________________________________
175// Mother Emissin Point
176//_____________________________________________
177void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(AliFemtoLorentzVector *aPos)
178{
179 // set position from vector
180 if (fEmissionPointMother) {
181 fEmissionPointMother->setX(aPos->px());
182 fEmissionPointMother->setY(aPos->py());
183 fEmissionPointMother->setZ(aPos->pz());
184 fEmissionPointMother->setT(aPos->e());
185 }
186 else {
187 fEmissionPointMother = new AliFemtoLorentzVector(*aPos);
188 }
189}
190//_____________________________________________
191void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(const AliFemtoLorentzVector& aPos)
192{
193 // set position from vector
194 if (fEmissionPointMother) {
195 fEmissionPointMother->setX(aPos.px());
196 fEmissionPointMother->setY(aPos.py());
197 fEmissionPointMother->setZ(aPos.pz());
198 fEmissionPointMother->setT(aPos.e());
199 }
200 else {
201 fEmissionPointMother = new AliFemtoLorentzVector();
202 *fEmissionPointMother = aPos;
203 }
204}
205//_____________________________________________
206void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT)
207{
208 // set position from components
209 if (fEmissionPointMother) {
210 fEmissionPointMother->setX(aRx);
211 fEmissionPointMother->setY(aRy);
212 fEmissionPointMother->setZ(aRz);
213 fEmissionPointMother->setT(aT);
214 }
215 else {
216 fEmissionPointMother = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
217 }
218}
219//_____________________________________________
220// Mother PID
221//_____________________________________________
222void AliFemtoModelAllHiddenInfo::SetPDGPidMother(Int_t aPidMother)
223{
224 fPDGPidMother = aPidMother;
225}
226//_____________________________________________
227// Child1 momentum
228//_____________________________________________
229void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(AliFemtoLorentzVector *aMomChild1)
230{
231 // set momentum from vector
232 if (fTrueMomentumChild1) {
233 fTrueMomentumChild1->setX(aMomChild1->px());
234 fTrueMomentumChild1->setY(aMomChild1->py());
235 fTrueMomentumChild1->setZ(aMomChild1->pz());
236 fTrueMomentumChild1->setT(aMomChild1->e());
237 }
238 else {
239 fTrueMomentumChild1 = new AliFemtoLorentzVector(*aMomChild1);
240 }
241}
242//_____________________________________________
243void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(const AliFemtoLorentzVector& aMomChild1)
244{
245 // set momentum from vector and energy
246 if (fTrueMomentumChild1) {
247 fTrueMomentumChild1->setX(aMomChild1.px());
248 fTrueMomentumChild1->setY(aMomChild1.py());
249 fTrueMomentumChild1->setZ(aMomChild1.pz());
250 fTrueMomentumChild1->setT(aMomChild1.e());
251 }
252 else {
253 fTrueMomentumChild1 = new AliFemtoLorentzVector();
254 *fTrueMomentumChild1 = aMomChild1;
255 }
256}
257//_____________________________________________
258void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(Double_t aChild1Px, Double_t aChild1Py, Double_t aChild1Pz, Double_t aChild1E)
259{
260 // set momentum from components and energy
261 if (!fTrueMomentumChild1) fTrueMomentumChild1 = new AliFemtoLorentzVector();
262 fTrueMomentumChild1->setX(aChild1Px);
263 fTrueMomentumChild1->setY(aChild1Py);
264 fTrueMomentumChild1->setZ(aChild1Pz);
265 fTrueMomentumChild1->setT(aChild1E);
266}
267//_____________________________________________
268// Child2 momentum
269//_____________________________________________
270void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(AliFemtoLorentzVector *aMomChild2)
271{
272 // set momentum from vector
273 if (fTrueMomentumChild2) {
274 fTrueMomentumChild2->setX(aMomChild2->px());
275 fTrueMomentumChild2->setY(aMomChild2->py());
276 fTrueMomentumChild2->setZ(aMomChild2->pz());
277 fTrueMomentumChild2->setT(aMomChild2->e());
278 }
279 else {
280 fTrueMomentumChild2 = new AliFemtoLorentzVector(*aMomChild2);
281 }
282}
283//_____________________________________________
284void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(const AliFemtoLorentzVector& aMomChild2)
285{
286 // set momentum from vector and energy
287 if (fTrueMomentumChild2) {
288 fTrueMomentumChild2->setX(aMomChild2.px());
289 fTrueMomentumChild2->setY(aMomChild2.py());
290 fTrueMomentumChild2->setZ(aMomChild2.pz());
291 fTrueMomentumChild2->setT(aMomChild2.e());
292 }
293 else {
294 fTrueMomentumChild2 = new AliFemtoLorentzVector();
295 *fTrueMomentumChild2 = aMomChild2;
296 }
297}
298//_____________________________________________
299void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(Double_t aChild2Px, Double_t aChild2Py, Double_t aChild2Pz, Double_t aChild2E)
300{
301 // set momentum from components and energy
302 if (!fTrueMomentumChild2) fTrueMomentumChild2 = new AliFemtoLorentzVector();
303 fTrueMomentumChild2->setX(aChild2Px);
304 fTrueMomentumChild2->setY(aChild2Py);
305 fTrueMomentumChild2->setZ(aChild2Pz);
306 fTrueMomentumChild2->setT(aChild2E);
307}
308//_____________________________________________
309// Child1 PID
310//_____________________________________________
311void AliFemtoModelAllHiddenInfo::SetPDGPidChild1(Int_t aPidChild1)
312{
313 fPDGPidMother = aPidChild1;
314}
315//_____________________________________________
316// Child2 PID
317//_____________________________________________
318void AliFemtoModelAllHiddenInfo::SetPDGPidChild2(Int_t aPidChild2)
319{
320 fPDGPidMother = aPidChild2;
321}
322//
323// RETURN COPY
324//
325//_____________________________________________
326 AliFemtoModelHiddenInfo* AliFemtoModelAllHiddenInfo::GetParticleHiddenInfo() const
327{
328 // return copy of this hidden info
329 AliFemtoModelAllHiddenInfo* tBuf = new AliFemtoModelAllHiddenInfo(*this);
330 return tBuf;
331}