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"
36 Particle::Particle(double aRapidity, double aPt, double aPhip,
37 double aAlfam, double aRho, double aPhis, double aTau,
44 px = aPt*TMath::Cos(aPhip);
45 py = aPt*TMath::Sin(aPhip);
46 double tMt = TMath::Hypot(GetMass(),aPt);
47 pz = tMt*TMath::SinH(aRapidity);
49 rx = aRho*TMath::Cos(aPhis);
50 ry = aRho*TMath::Sin(aPhis);
52 // New method of calculating rz, rt
53 rz = aTau*TMath::SinH(aAlfam);
54 rt = aTau*TMath::CosH(aAlfam);
57 Particle::Particle(ParticleType *aType,
58 double aPx, double aPy, double aPz,
59 double aRx, double aRy, double aRz,
77 Particle::Particle(const Particle& aParticle)
79 mPartType = aParticle.GetParticleType();
81 mHasFather = aParticle.GetFather();
99 Particle::WriteParticle(ostream *aOuts)
101 aOuts->flags(ios::left | ios::scientific);
103 (*aOuts) << mPartType->GetPDGCode();
104 aOuts->width(FIELDWIDTH);
106 aOuts->width(FIELDWIDTH);
108 aOuts->width(FIELDWIDTH);
110 aOuts->width(FIELDWIDTH);
111 (*aOuts) << GetEnergy();
112 aOuts->width(FIELDWIDTH);
113 (*aOuts) << GetMass();
114 aOuts->width(FIELDWIDTH);
116 aOuts->width(FIELDWIDTH);
118 aOuts->width(FIELDWIDTH);
120 aOuts->width(FIELDWIDTH);
122 // (*aOuts) << mPartType->GetCharge() << " ";
123 // if (mHasFather>-1) (*aOuts) << mHasFather << " ";
125 (*aOuts) << (mHasFather);
127 (*aOuts) << (mDecayed);
134 return TMath::Hypot(px, py);
140 double tE = TMath::Sqrt(px*px+py*py+pz*pz+GetMass()*GetMass());
141 return 0.5*TMath::Log((tE-pz)/(tE+pz));
145 Particle::GetParticleType() const
151 Particle::HadDecayed()
159 return mPartType->GetMass();
163 Particle::GetEnergy()
165 return TMath::Sqrt(GetMass()*GetMass()+px*px+py*py+pz*pz);
172 return mPartType->GetI3();
176 Particle::GetBarionN()
178 return mPartType->GetBarionN();
182 Particle::GetStrangeness()
184 return mPartType->GetStrangeness();
188 Particle::SetDecayed()
194 Particle::SetFather(int aFather)
196 mHasFather = aFather;
200 Particle::GetFather() const