1 /******************************************************************************
2 * T H E R M I N A T O R *
3 * THERMal heavy-IoN generATOR *
6 * Authors of the model: Wojciech Broniowski, Wojciech.Broniowski@ifj.edu.pl, *
7 * Wojciech Florkowski, Wojciech.Florkowski@ifj.edu.pl *
8 * Authors of the code: Adam Kisiel, kisiel@if.pw.edu.pl *
9 * Tomasz Taluc, ttaluc@if.pw.edu.pl *
10 * Code designers: Adam Kisiel, Tomasz Taluc, Wojciech Broniowski, *
11 * Wojciech Florkowski *
13 * For the detailed description of the program and furhter references *
14 * to the description of the model plesase refer to: nucl-th/0504047, *
15 * accessibile at: http://www.arxiv.org/nucl-th/0504047 *
17 * Homepage: http://hirg.if.pw.edu.pl/en/therminator/ *
19 * This code can be freely used and redistributed. However if you decide to *
20 * make modifications to the code, please contact the authors, especially *
21 * if you plan to publish the results obtained with such modified code. *
22 * Any publication of results obtained using this code must include the *
23 * reference to nucl-th/0504047 and the published version of it, when *
26 *****************************************************************************/
28 #include "ParticleType.h"
35 px = 0; py = 0; pz = 0;
36 rx = 0; ry = 0; rz = 0; rt = 0;
41 Particle::Particle(double aRapidity, double aPt, double aPhip,
42 double aAlfam, double aRho, double aPhis, double aTau,
49 px = aPt*TMath::Cos(aPhip);
50 py = aPt*TMath::Sin(aPhip);
51 double tMt = TMath::Hypot(GetMass(),aPt);
52 pz = tMt*TMath::SinH(aRapidity);
54 rx = aRho*TMath::Cos(aPhis);
55 ry = aRho*TMath::Sin(aPhis);
57 // New method of calculating rz, rt
58 rz = aTau*TMath::SinH(aAlfam);
59 rt = aTau*TMath::CosH(aAlfam);
62 Particle::Particle(ParticleType *aType,
63 double aPx, double aPy, double aPz,
64 double aRx, double aRy, double aRz,
82 Particle::Particle(const Particle& aParticle)
84 mPartType = aParticle.GetParticleType();
86 mHasFather = aParticle.GetFather();
104 Particle::WriteParticle(ostream *aOuts)
106 aOuts->flags(ios::left | ios::scientific);
108 (*aOuts) << mPartType->GetPDGCode();
109 aOuts->width(FIELDWIDTH);
111 aOuts->width(FIELDWIDTH);
113 aOuts->width(FIELDWIDTH);
115 aOuts->width(FIELDWIDTH);
116 (*aOuts) << GetEnergy();
117 aOuts->width(FIELDWIDTH);
118 (*aOuts) << GetMass();
119 aOuts->width(FIELDWIDTH);
121 aOuts->width(FIELDWIDTH);
123 aOuts->width(FIELDWIDTH);
125 aOuts->width(FIELDWIDTH);
127 // (*aOuts) << mPartType->GetCharge() << " ";
128 // if (mHasFather>-1) (*aOuts) << mHasFather << " ";
130 (*aOuts) << (mHasFather);
132 (*aOuts) << (mDecayed);
139 return TMath::Hypot(px, py);
145 double tE = TMath::Sqrt(px*px+py*py+pz*pz+GetMass()*GetMass());
146 return 0.5*TMath::Log((tE-pz)/(tE+pz));
150 Particle::GetParticleType() const
156 Particle::HadDecayed()
164 return mPartType->GetMass();
168 Particle::GetEnergy()
170 return TMath::Sqrt(GetMass()*GetMass()+px*px+py*py+pz*pz);
177 return mPartType->GetI3();
181 Particle::GetBarionN()
183 return mPartType->GetBarionN();
187 Particle::GetStrangeness()
189 return mPartType->GetStrangeness();
193 Particle::SetDecayed()
199 Particle::SetFather(int aFather)
201 mHasFather = aFather;
205 Particle::GetFather() const