]>
Commit | Line | Data |
---|---|---|
2e967919 | 1 | /****************************************************************************** |
2 | * T H E R M I N A T O R * | |
3 | * THERMal heavy-IoN generATOR * | |
4 | * version 1.0 * | |
5 | * * | |
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 * | |
12 | * * | |
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 * | |
16 | * * | |
17 | * Homepage: http://hirg.if.pw.edu.pl/en/therminator/ * | |
18 | * * | |
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 * | |
24 | * available. * | |
25 | * * | |
26 | *****************************************************************************/ | |
27 | #include "ParticleType.h" | |
28 | #include "DecayTable.h" | |
29 | ||
30 | ParticleType::ParticleType() | |
31 | { | |
32 | mName = ""; | |
33 | mNumber=0; | |
34 | mMass=-1.; | |
35 | mStrangeness=-1; | |
36 | mBarionN=-1; | |
37 | mCharmN=-1; | |
38 | mSpin=-1.; | |
39 | mI=-1.; | |
40 | mI3=-1.; | |
41 | mGamma=-1.; | |
42 | mDecayChannelCount2=0; | |
43 | mDecayChannelCount3=0; | |
44 | mTable = new DecayTable(); | |
45 | mPDGCode = 0; | |
46 | mFMax = 0.0; | |
47 | } | |
48 | ||
49 | ParticleType::ParticleType(const ParticleType& aParticleType) | |
50 | { | |
51 | mName = aParticleType.GetName(); | |
52 | mNumber = aParticleType.GetNumber(); | |
53 | mMass = aParticleType.GetMass(); | |
54 | mStrangeness = aParticleType.GetStrangeness(); | |
55 | mBarionN=aParticleType.GetBarionN(); | |
56 | mCharmN=aParticleType.GetCharmN(); | |
57 | mSpin=aParticleType.GetSpin(); | |
58 | mI=aParticleType.GetI(); | |
59 | mI3=aParticleType.GetI3(); | |
60 | mGamma=aParticleType.GetGamma(); | |
61 | mDecayChannelCount2=aParticleType.GetDecayChannelCount2(); | |
62 | mDecayChannelCount3=aParticleType.GetDecayChannelCount3(); | |
63 | mPDGCode = aParticleType.GetPDGCode(); | |
64 | mFMax = aParticleType.GetFMax(); | |
65 | mTable = new DecayTable(*(aParticleType.GetTable())); | |
66 | } | |
67 | ||
6150e077 | 68 | ParticleType& ParticleType::operator=(const ParticleType& aParticleType) |
69 | { | |
70 | if (this != &aParticleType) { | |
71 | mName = aParticleType.GetName(); | |
72 | mNumber = aParticleType.GetNumber(); | |
73 | mMass = aParticleType.GetMass(); | |
74 | mStrangeness = aParticleType.GetStrangeness(); | |
75 | mBarionN=aParticleType.GetBarionN(); | |
76 | mCharmN=aParticleType.GetCharmN(); | |
77 | mSpin=aParticleType.GetSpin(); | |
78 | mI=aParticleType.GetI(); | |
79 | mI3=aParticleType.GetI3(); | |
80 | mGamma=aParticleType.GetGamma(); | |
81 | mDecayChannelCount2=aParticleType.GetDecayChannelCount2(); | |
82 | mDecayChannelCount3=aParticleType.GetDecayChannelCount3(); | |
83 | mPDGCode = aParticleType.GetPDGCode(); | |
84 | mFMax = aParticleType.GetFMax(); | |
85 | delete mTable; | |
86 | mTable = new DecayTable(*(aParticleType.GetTable())); | |
87 | } | |
88 | ||
89 | return *this; | |
90 | } | |
91 | ||
92 | ||
2e967919 | 93 | ParticleType::~ParticleType() |
94 | { | |
95 | if (mTable) | |
96 | delete mTable; | |
97 | } | |
98 | ||
c61a7285 | 99 | void ParticleType::WriteParticle(int /*i*/) |
2e967919 | 100 | { |
101 | mMass=-1; | |
102 | mStrangeness=-1; | |
103 | mBarionN=-1; | |
104 | mCharmN=-1; | |
105 | mSpin=-1; | |
106 | mName="1"; | |
107 | } | |
108 | ||
109 | int ParticleType::GetNumber() const { return mNumber; } | |
110 | float ParticleType::GetMass() const { return mMass; } | |
111 | int ParticleType::GetStrangeness() const { return mStrangeness; } | |
112 | int ParticleType::GetBarionN() const { return mBarionN; } | |
113 | int ParticleType::GetCharmN() const { return mCharmN; } | |
114 | float ParticleType::GetSpin() const { return mSpin; } | |
115 | float ParticleType::GetI() const { return mI; } | |
116 | float ParticleType::GetI3() const { return mI3; } | |
117 | float ParticleType::GetGamma() const { return mGamma; } | |
118 | std::string ParticleType::GetName() const { return mName; } | |
119 | int ParticleType::GetDecayChannelCount2() const { return mDecayChannelCount2; } | |
120 | int ParticleType::GetDecayChannelCount3() const { return mDecayChannelCount3; } | |
121 | int ParticleType::GetCharge() { return int(mI3+(mBarionN+mStrangeness)/2.); } /*MCH int() added */ | |
122 | int ParticleType::GetPDGCode() const { return mPDGCode; } | |
123 | ||
124 | ||
125 | ||
126 | void ParticleType::SetNumber(int aNumber) { mNumber = aNumber; } | |
127 | void ParticleType::SetMass(float aMass) { mMass = aMass; } | |
128 | void ParticleType::SetStrangeness(int aStrangeness) { mStrangeness = aStrangeness; } | |
129 | void ParticleType::SetBarionN(int aBarionN) { mBarionN = aBarionN; } | |
130 | void ParticleType::SetCharmN(int aCharmN) { mCharmN = aCharmN; } | |
131 | void ParticleType::SetSpin(float aSpin) { mSpin = aSpin; } | |
132 | void ParticleType::SetI(float aI) { mI = aI; } | |
133 | void ParticleType::SetI3(float aI3) { mI3 = aI3; } | |
134 | void ParticleType::SetGamma(float aGamma) { mGamma = aGamma; } | |
135 | void ParticleType::SetName(char *aName) { mName = aName; } | |
136 | void ParticleType::SetDecayChannelCount2(int aDCCount2) { mDecayChannelCount2 = aDCCount2; } | |
137 | void ParticleType::SetDecayChannelCount3(int aDCCount3) { mDecayChannelCount3 = aDCCount3; } | |
138 | void ParticleType::SetPDGCode(int aCode) { mPDGCode = aCode; } | |
139 | ||
140 | DecayTable* | |
141 | ParticleType::GetTable() const | |
142 | { | |
143 | if (mTable) | |
144 | return mTable; | |
145 | else | |
146 | return NULL; | |
147 | } | |
148 | ||
149 | void | |
150 | ParticleType::AddDecayChannel(DecayChannel aChannel) | |
151 | { | |
152 | if (!mTable) | |
153 | mTable = new DecayTable(); | |
154 | mTable->AddDecayChannel(aChannel); | |
155 | } | |
156 | ||
157 | float | |
158 | ParticleType::GetFMax() const | |
159 | { | |
160 | return mFMax; | |
161 | } | |
162 | ||
163 | void | |
164 | ParticleType::SetFMax(float aFMax) | |
165 | { | |
166 | mFMax = aFMax; | |
167 | } |