A class to describe a FLUKA particle read from an input ASCII file.
More...
#include <FlukaParticle.h>
A class to describe a FLUKA particle read from an input ASCII file.
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
Definition at line 19 of file FlukaParticle.h.
◆ flukaParticleType
◆ FlukaParticle() [1/2]
FlukaParticle::FlukaParticle |
( |
int |
type = 0 | ) |
|
◆ FlukaParticle() [2/2]
◆ clear()
void FlukaParticle::clear |
( |
void |
| ) |
|
A function to clear the values of this particle.
Definition at line 25 of file FlukaParticle.cxx.
◆ directionalCosines()
HepMC::FourVector FlukaParticle::directionalCosines |
( |
void |
| ) |
const |
|
inline |
A function to return the directional cosines of this particle.
The fourth component is 0
Definition at line 58 of file FlukaParticle.h.
◆ eventId()
long FlukaParticle::eventId |
( |
void |
| ) |
const |
|
inline |
A function to return the FLUKA event Id of this particle.
Definition at line 39 of file FlukaParticle.h.
◆ flukaId()
int FlukaParticle::flukaId |
( |
void |
| ) |
const |
|
inline |
A function to return the FLUKA particle Id of this particle.
Definition at line 42 of file FlukaParticle.h.
◆ kineticEnergy()
double FlukaParticle::kineticEnergy |
( |
void |
| ) |
const |
|
inline |
A function to return the relativistic kinetic energy of this particle.
Definition at line 50 of file FlukaParticle.h.
◆ operator=()
◆ partGenNum()
int FlukaParticle::partGenNum |
( |
void |
| ) |
const |
|
inline |
A function to return the particle generation number of this particle.
Definition at line 46 of file FlukaParticle.h.
◆ pdgId()
int FlukaParticle::pdgId |
( |
| ) |
|
A function to return the PDG id of this particle.
Definition at line 128 of file FlukaParticle.cxx.
136 case -6 : pdgID = 1000020040;
break;
137 case -5 : pdgID = 1000020030;
break;
138 case -4 : pdgID = 1000010030;
break;
139 case -3 : pdgID = 1000010020;
break;
140 case 1 : pdgID = 2212;
break;
141 case 2 : pdgID = -2212;
break;
142 case 3 : pdgID = 11;
break;
143 case 4 : pdgID = -11;
break;
144 case 5 : pdgID = 12;
break;
145 case 6 : pdgID = -12;
break;
146 case 7 : pdgID = 22;
break;
147 case 8 : pdgID = 2112;
break;
148 case 9 : pdgID = -2112;
break;
149 case 10 : pdgID = -13;
break;
150 case 11 : pdgID = 13;
break;
151 case 12 : pdgID = 130;
break;
152 case 13 : pdgID = 211;
break;
153 case 14 : pdgID = -211;
break;
154 case 15 : pdgID = 321;
break;
155 case 16 : pdgID = -321;
break;
156 case 17 : pdgID = 3122;
break;
157 case 18 : pdgID = -3122;
break;
158 case 19 : pdgID = 310;
break;
159 case 20 : pdgID = 3112;
break;
160 case 21 : pdgID = 3222;
break;
161 case 22 : pdgID = 3212;
break;
162 case 23 : pdgID = 111;
break;
163 case 24 : pdgID = 311;
break;
164 case 25 : pdgID = -311;
break;
165 case 27 : pdgID = 14;
break;
166 case 28 : pdgID = -14;
break;
167 case 31 : pdgID = -3222;
break;
168 case 32 : pdgID = -3212;
break;
169 case 33 : pdgID = -3112;
break;
170 case 34 : pdgID = 3322;
break;
171 case 35 : pdgID = -3322;
break;
172 case 36 : pdgID = 3312;
break;
173 case 37 : pdgID = -3312;
break;
174 case 38 : pdgID = 3334;
break;
175 case 39 : pdgID = -3334;
break;
176 case 41 : pdgID = -15;
break;
177 case 42 : pdgID = 15;
break;
178 case 43 : pdgID = 16;
break;
179 case 44 : pdgID = -16;
break;
180 case 45 : pdgID = 411;
break;
181 case 46 : pdgID = -411;
break;
182 case 47 : pdgID = 421;
break;
183 case 48 : pdgID = -421;
break;
184 case 49 : pdgID = 431;
break;
185 case 50 : pdgID = -431;
break;
186 case 51 : pdgID = 4122;
break;
187 case 52 : pdgID = 4232;
break;
188 case 53 : pdgID = 4112;
break;
189 case 54 : pdgID = 4322;
break;
190 case 55 : pdgID = 4312;
break;
191 case 56 : pdgID = 4332;
break;
192 case 57 : pdgID = -4122;
break;
193 case 58 : pdgID = -4232;
break;
194 case 59 : pdgID = -4132;
break;
195 case 60 : pdgID = -4322;
break;
196 case 61 : pdgID = -4312;
break;
197 case 62 : pdgID = -4332;
break;
◆ positionAtPrimary()
HepMC::FourVector FlukaParticle::positionAtPrimary |
( |
void |
| ) |
const |
|
inline |
A function to return the position of the primary interaction.
Definition at line 67 of file FlukaParticle.h.
◆ positionAtScoringPlane()
HepMC::FourVector FlukaParticle::positionAtScoringPlane |
( |
void |
| ) |
const |
|
inline |
A function to return the fourvector position with respect to the scoring plane of this particle.
Definition at line 54 of file FlukaParticle.h.
◆ print()
void FlukaParticle::print |
( |
void |
| ) |
|
A function to print the contents of this particle.
Definition at line 206 of file FlukaParticle.cxx.
209 std::cout.width(6); std::cout <<
m_eventId <<
" ";
211 std::cout.width(6); std::cout <<
m_flukaId <<
" ";
212 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_kineticEnergy <<
" ";
213 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_weight <<
" ";
216 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_directionalCosines.x() <<
" ";
217 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_directionalCosines.y() <<
" ";
219 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_totalEnergy <<
" ";
220 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.x() <<
" ";
221 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.y() <<
" ";
222 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.z() <<
" ";
223 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.t() <<
" ";
224 std::cout.precision(6);
225 std::cout << std::endl;
229 std::cout.width(7); std::cout <<
m_eventId <<
" ";
230 std::cout.width(2); std::cout <<
m_flukaId <<
" ";
232 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_kineticEnergy <<
" ";
236 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.x() <<
" ";
237 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.y() <<
" ";
238 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.z() <<
" ";
240 std::cout.precision(6);
241 std::cout << std::endl;
◆ read()
int FlukaParticle::read |
( |
std::vector< std::string > * |
eventAsStringVector | ) |
|
A function to read the values from a single row definition and fill the data members.
Definition at line 47 of file FlukaParticle.cxx.
50 if(!eventAsStringVector) {
51 std::cerr <<
"ERROR: string vector passed to FlukaParticle::read is null." << std::endl;
56 if(eventAsStringVector->size() != 15) {
57 std::cerr <<
"ERROR: there are " << eventAsStringVector->size() <<
" data words, which is out of range. This particle will be null." << std::endl;
62 if(eventAsStringVector->size() < 10 || eventAsStringVector->size() > 11 ) {
63 std::cerr <<
"ERROR: there are " << eventAsStringVector->size() <<
" data words, which is out of range. This particle will be null." << std::endl;
68 std::cerr <<
"ERROR: unknown input Fluka record type. This particle will be null." << std::endl;
77 for(;itr!=itr_end;++itr,++wordNumber) {
78 if((*itr).length() == 0) {
79 std::cerr <<
"ERROR: string word has zero length." << std::endl;
82 std::istringstream inStr((*itr));
104 for(;itr!=itr_end;++itr,++wordNumber) {
105 std::istringstream inStr((*itr));
106 switch (wordNumber) {
◆ totalEnergy()
double FlukaParticle::totalEnergy |
( |
void |
| ) |
const |
|
inline |
A function to return the total energy.
Definition at line 64 of file FlukaParticle.h.
◆ type()
int FlukaParticle::type |
( |
void |
| ) |
const |
|
inline |
◆ weight()
double FlukaParticle::weight |
( |
void |
| ) |
const |
|
inline |
A function to return the particle or event weight.
Definition at line 61 of file FlukaParticle.h.
◆ m_directionalCosines
HepMC::FourVector FlukaParticle::m_directionalCosines |
|
private |
◆ m_eventId
long FlukaParticle::m_eventId |
|
private |
◆ m_flukaId
int FlukaParticle::m_flukaId |
|
private |
◆ m_kineticEnergy
double FlukaParticle::m_kineticEnergy |
|
private |
◆ m_partGenNum
int FlukaParticle::m_partGenNum |
|
private |
◆ m_positionAtPrimary
HepMC::FourVector FlukaParticle::m_positionAtPrimary |
|
private |
◆ m_positionAtScoringPlane
HepMC::FourVector FlukaParticle::m_positionAtScoringPlane |
|
private |
◆ m_totalEnergy
double FlukaParticle::m_totalEnergy |
|
private |
◆ m_type
int FlukaParticle::m_type |
|
private |
◆ m_weight
double FlukaParticle::m_weight |
|
private |
The documentation for this class was generated from the following files:
HepMC::FourVector m_positionAtPrimary
void clear(void)
A function to clear the values of this particle.
HepMC::FourVector m_directionalCosines
int type(void) const
A function to return the type of this FlukaParticle.
HepMC::FourVector m_positionAtScoringPlane