]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoModelAllHiddenInfo.cxx
Lines getting the matched track moved to a method in AliCalorimeterUtils. Lines copie...
[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),
19708f0f 37 fTrueMomentumMother(new AliFemtoLorentzVector(*(aInfo.fTrueMomentumMother))),
38 fEmissionPointMother(new AliFemtoLorentzVector(*(aInfo.fEmissionPointMother))),
39 fPDGPidMother(aInfo.fPDGPidMother),
40 fTrueMomentumChild1(new AliFemtoLorentzVector(*(aInfo.fTrueMomentumChild1))),
41 fTrueMomentumChild2(new AliFemtoLorentzVector(*(aInfo.fTrueMomentumChild2))),
42 fPDGPidChild1(aInfo.fPDGPidChild1),
43 fPDGPidChild2(aInfo.fPDGPidChild2)
a329d65b 44{
19708f0f 45 //
a329d65b 46 // Copy constructor
19708f0f 47 //
a329d65b 48}
49//_____________________________________________
50AliFemtoModelAllHiddenInfo::~AliFemtoModelAllHiddenInfo()
51{
52 // Destructor
19708f0f 53 delete fTrueMomentumMother;
54 delete fEmissionPointMother;
55 delete fTrueMomentumChild1;
56 delete fTrueMomentumChild2;
a329d65b 57}
58//_____________________________________________
59AliFemtoModelAllHiddenInfo& AliFemtoModelAllHiddenInfo::operator=(const AliFemtoModelAllHiddenInfo& aInfo)
60{
19708f0f 61 //
a329d65b 62 // assignment operator
19708f0f 63 //
64 if (this != &aInfo) {
65 AliFemtoModelHiddenInfo::operator=(aInfo);
66 delete fTrueMomentumMother;
67 fTrueMomentumMother = new AliFemtoLorentzVector(*(aInfo.fTrueMomentumMother));
68 delete fEmissionPointMother;
69 fEmissionPointMother = new AliFemtoLorentzVector(*(aInfo.fEmissionPointMother));
70 fPDGPidMother = aInfo.fPDGPidMother;
71 delete fTrueMomentumChild1;
72 fTrueMomentumChild1 = new AliFemtoLorentzVector(*(aInfo.fTrueMomentumChild1));
73 delete fTrueMomentumChild2;
74 fTrueMomentumChild2 = new AliFemtoLorentzVector(*(aInfo.fTrueMomentumChild2));
75 fPDGPidChild1 = aInfo.fPDGPidChild1;
76 fPDGPidChild2 = aInfo.fPDGPidChild2;
77 }
a329d65b 78 return *this;
79}
80//
81// GET
82//
83//_____________________________________________
84AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumMother() const
85{
86return fTrueMomentumMother;
87}
88//_____________________________________________
89AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetEmissionPointMother() const
90{
91 return fEmissionPoint;
92}
93//_____________________________________________
94 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidMother() const
95{
96 return fPDGPidMother;
97}
98//_____________________________________________
99AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumChild1() const
100{
101return fTrueMomentumChild1;
102}
103//_____________________________________________
104AliFemtoLorentzVector *AliFemtoModelAllHiddenInfo::GetTrueMomentumChild2() const
105{
106return fTrueMomentumChild2;
107}
108//_____________________________________________
109 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidChild1() const
110{
111 return fPDGPidChild1;
112}
113//_____________________________________________
114 Int_t AliFemtoModelAllHiddenInfo::GetPDGPidChild2() const
115{
116 return fPDGPidChild2;
117}
118//
119// SET
120//
121//_____________________________________________
122// Mother momentum
123//_____________________________________________
124void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(AliFemtoLorentzVector *aMomMother)
125{
01daf251 126 // Set momentum from vector
a329d65b 127 if (fTrueMomentumMother) {
01daf251 128 fTrueMomentumMother->SetX(aMomMother->px());
129 fTrueMomentumMother->SetY(aMomMother->py());
130 fTrueMomentumMother->SetZ(aMomMother->pz());
131 fTrueMomentumMother->SetT(aMomMother->e());
a329d65b 132 }
133 else {
134 fTrueMomentumMother = new AliFemtoLorentzVector(*aMomMother);
135 }
136}
137//_____________________________________________
138void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(const AliFemtoLorentzVector& aMomMother)
139{
01daf251 140 // Set momentum from vector and energy
a329d65b 141 if (fTrueMomentumMother) {
01daf251 142 fTrueMomentumMother->SetX(aMomMother.px());
143 fTrueMomentumMother->SetY(aMomMother.py());
144 fTrueMomentumMother->SetZ(aMomMother.pz());
145 fTrueMomentumMother->SetT(aMomMother.e());
a329d65b 146 }
147 else {
148 fTrueMomentumMother = new AliFemtoLorentzVector();
149 *fTrueMomentumMother = aMomMother;
150 }
151}
152//_____________________________________________
153void AliFemtoModelAllHiddenInfo::SetTrueMomentumMother(Double_t aMotherPx, Double_t aMotherPy, Double_t aMotherPz, Double_t aMotherE)
154{
01daf251 155 // Set momentum from components and energy
a329d65b 156 if (!fTrueMomentumMother) fTrueMomentumMother = new AliFemtoLorentzVector();
01daf251 157 fTrueMomentumMother->SetX(aMotherPx);
158 fTrueMomentumMother->SetY(aMotherPy);
159 fTrueMomentumMother->SetZ(aMotherPz);
160 fTrueMomentumMother->SetT(aMotherE);
a329d65b 161}
162//_____________________________________________
163// Mother Emissin Point
164//_____________________________________________
165void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(AliFemtoLorentzVector *aPos)
166{
01daf251 167 // Set position from vector
a329d65b 168 if (fEmissionPointMother) {
01daf251 169 fEmissionPointMother->SetX(aPos->px());
170 fEmissionPointMother->SetY(aPos->py());
171 fEmissionPointMother->SetZ(aPos->pz());
172 fEmissionPointMother->SetT(aPos->e());
a329d65b 173 }
174 else {
175 fEmissionPointMother = new AliFemtoLorentzVector(*aPos);
176 }
177}
178//_____________________________________________
179void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(const AliFemtoLorentzVector& aPos)
180{
01daf251 181 // Set position from vector
a329d65b 182 if (fEmissionPointMother) {
01daf251 183 fEmissionPointMother->SetX(aPos.px());
184 fEmissionPointMother->SetY(aPos.py());
185 fEmissionPointMother->SetZ(aPos.pz());
186 fEmissionPointMother->SetT(aPos.e());
a329d65b 187 }
188 else {
189 fEmissionPointMother = new AliFemtoLorentzVector();
190 *fEmissionPointMother = aPos;
191 }
192}
193//_____________________________________________
194void AliFemtoModelAllHiddenInfo::SetEmissionPointMother(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT)
195{
01daf251 196 // Set position from components
a329d65b 197 if (fEmissionPointMother) {
01daf251 198 fEmissionPointMother->SetX(aRx);
199 fEmissionPointMother->SetY(aRy);
200 fEmissionPointMother->SetZ(aRz);
201 fEmissionPointMother->SetT(aT);
a329d65b 202 }
203 else {
204 fEmissionPointMother = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
205 }
206}
207//_____________________________________________
208// Mother PID
209//_____________________________________________
210void AliFemtoModelAllHiddenInfo::SetPDGPidMother(Int_t aPidMother)
211{
212 fPDGPidMother = aPidMother;
213}
214//_____________________________________________
215// Child1 momentum
216//_____________________________________________
217void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(AliFemtoLorentzVector *aMomChild1)
218{
01daf251 219 // Set momentum from vector
a329d65b 220 if (fTrueMomentumChild1) {
01daf251 221 fTrueMomentumChild1->SetX(aMomChild1->px());
222 fTrueMomentumChild1->SetY(aMomChild1->py());
223 fTrueMomentumChild1->SetZ(aMomChild1->pz());
224 fTrueMomentumChild1->SetT(aMomChild1->e());
a329d65b 225 }
226 else {
227 fTrueMomentumChild1 = new AliFemtoLorentzVector(*aMomChild1);
228 }
229}
230//_____________________________________________
231void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(const AliFemtoLorentzVector& aMomChild1)
232{
01daf251 233 // Set momentum from vector and energy
a329d65b 234 if (fTrueMomentumChild1) {
01daf251 235 fTrueMomentumChild1->SetX(aMomChild1.px());
236 fTrueMomentumChild1->SetY(aMomChild1.py());
237 fTrueMomentumChild1->SetZ(aMomChild1.pz());
238 fTrueMomentumChild1->SetT(aMomChild1.e());
a329d65b 239 }
240 else {
241 fTrueMomentumChild1 = new AliFemtoLorentzVector();
242 *fTrueMomentumChild1 = aMomChild1;
243 }
244}
245//_____________________________________________
246void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild1(Double_t aChild1Px, Double_t aChild1Py, Double_t aChild1Pz, Double_t aChild1E)
247{
01daf251 248 // Set momentum from components and energy
a329d65b 249 if (!fTrueMomentumChild1) fTrueMomentumChild1 = new AliFemtoLorentzVector();
01daf251 250 fTrueMomentumChild1->SetX(aChild1Px);
251 fTrueMomentumChild1->SetY(aChild1Py);
252 fTrueMomentumChild1->SetZ(aChild1Pz);
253 fTrueMomentumChild1->SetT(aChild1E);
a329d65b 254}
255//_____________________________________________
256// Child2 momentum
257//_____________________________________________
258void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(AliFemtoLorentzVector *aMomChild2)
259{
01daf251 260 // Set momentum from vector
a329d65b 261 if (fTrueMomentumChild2) {
01daf251 262 fTrueMomentumChild2->SetX(aMomChild2->px());
263 fTrueMomentumChild2->SetY(aMomChild2->py());
264 fTrueMomentumChild2->SetZ(aMomChild2->pz());
265 fTrueMomentumChild2->SetT(aMomChild2->e());
a329d65b 266 }
267 else {
268 fTrueMomentumChild2 = new AliFemtoLorentzVector(*aMomChild2);
269 }
270}
271//_____________________________________________
272void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(const AliFemtoLorentzVector& aMomChild2)
273{
01daf251 274 // Set momentum from vector and energy
a329d65b 275 if (fTrueMomentumChild2) {
01daf251 276 fTrueMomentumChild2->SetX(aMomChild2.px());
277 fTrueMomentumChild2->SetY(aMomChild2.py());
278 fTrueMomentumChild2->SetZ(aMomChild2.pz());
279 fTrueMomentumChild2->SetT(aMomChild2.e());
a329d65b 280 }
281 else {
282 fTrueMomentumChild2 = new AliFemtoLorentzVector();
283 *fTrueMomentumChild2 = aMomChild2;
284 }
285}
286//_____________________________________________
287void AliFemtoModelAllHiddenInfo::SetTrueMomentumChild2(Double_t aChild2Px, Double_t aChild2Py, Double_t aChild2Pz, Double_t aChild2E)
288{
01daf251 289 // Set momentum from components and energy
a329d65b 290 if (!fTrueMomentumChild2) fTrueMomentumChild2 = new AliFemtoLorentzVector();
01daf251 291 fTrueMomentumChild2->SetX(aChild2Px);
292 fTrueMomentumChild2->SetY(aChild2Py);
293 fTrueMomentumChild2->SetZ(aChild2Pz);
294 fTrueMomentumChild2->SetT(aChild2E);
a329d65b 295}
296//_____________________________________________
297// Child1 PID
298//_____________________________________________
299void AliFemtoModelAllHiddenInfo::SetPDGPidChild1(Int_t aPidChild1)
300{
301 fPDGPidMother = aPidChild1;
302}
303//_____________________________________________
304// Child2 PID
305//_____________________________________________
306void AliFemtoModelAllHiddenInfo::SetPDGPidChild2(Int_t aPidChild2)
307{
308 fPDGPidMother = aPidChild2;
309}
310//
311// RETURN COPY
312//
313//_____________________________________________
314 AliFemtoModelHiddenInfo* AliFemtoModelAllHiddenInfo::GetParticleHiddenInfo() const
315{
316 // return copy of this hidden info
317 AliFemtoModelAllHiddenInfo* tBuf = new AliFemtoModelAllHiddenInfo(*this);
318 return tBuf;
319}