A class to describe a MARS particle read from an input ASCII file.
More...
#include <MarsParticle.h>
A class to describe a MARS particle read from an input ASCII file.
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
Definition at line 55 of file MarsParticle.h.
◆ MarsParticle()
MarsParticle::MarsParticle |
( |
| ) |
|
◆ beamGasInteraction()
A function to return the beam gas interaction information for this particle.
Definition at line 103 of file MarsParticle.h.
◆ directionalCosines()
HepMC::FourVector MarsParticle::directionalCosines |
( |
| ) |
const |
|
inline |
A function to return the directional cosines of this particle.
Definition at line 88 of file MarsParticle.h.
◆ eventNumber()
long MarsParticle::eventNumber |
( |
| ) |
const |
|
inline |
A function to return the event number of this particle.
Definition at line 69 of file MarsParticle.h.
◆ kineticEnergy()
double MarsParticle::kineticEnergy |
( |
| ) |
const |
|
inline |
A function to return the relativistic kinetic energy of this particle.
Definition at line 76 of file MarsParticle.h.
◆ particleId()
int MarsParticle::particleId |
( |
| ) |
const |
|
inline |
A function to return the particle identify of this particle.
Definition at line 72 of file MarsParticle.h.
◆ pdgId()
int MarsParticle::pdgId |
( |
| ) |
|
A function to return the PDG id for this particle.
Definition at line 115 of file MarsParticle.cxx.
119 case 1 :
pdgId = 2212;
break;
120 case 2 :
pdgId = 2112;
break;
121 case 3 :
pdgId = 211;
break;
122 case 4 :
pdgId = -211;
break;
123 case 5 :
pdgId = 321;
break;
124 case 6 :
pdgId = -321;
break;
125 case 7 :
pdgId = -13;
break;
126 case 8 :
pdgId = 13;
break;
127 case 9 :
pdgId = 22;
break;
128 case 10 :
pdgId = 11;
break;
129 case 11 :
pdgId = -11;
break;
130 case 12 :
pdgId = -2212;
break;
131 case 13 :
pdgId = 111;
break;
132 case 14 :
pdgId = 1000010020;
break;
133 case 15 :
pdgId = 1000010030;
break;
134 case 16 :
pdgId = 1000020030;
break;
135 case 17 :
pdgId = 1000020040;
break;
136 case 18 :
pdgId = 14;
break;
137 case 19 :
pdgId = -14;
break;
138 case 20 :
pdgId = 12;
break;
139 case 21 :
pdgId = -12;
break;
140 case 22 :
pdgId = 130;
break;
141 case 23 :
pdgId = 310;
break;
142 case 24 :
pdgId = 311;
break;
143 case 25 :
pdgId = -311;
break;
144 case 26 :
pdgId = 3122;
break;
145 case 27 :
pdgId = -3122;
break;
146 case 28 :
pdgId = 3222;
break;
147 case 29 :
pdgId = 3212;
break;
148 case 30 :
pdgId = 3112;
break;
149 case 31 :
pdgId = -2112;
break;
150 case 32 :
pdgId = 3322;
break;
151 case 33 :
pdgId = 3312;
break;
152 case 34 :
pdgId = 3334;
break;
153 case 35 :
pdgId = -3112;
break;
154 case 36 :
pdgId = -3212;
break;
155 case 37 :
pdgId = -3222;
break;
156 case 38 :
pdgId = -3322;
break;
157 case 39 :
pdgId = -3312;
break;
158 case 40 :
pdgId = -3334;
break;
◆ positionAtScoringPlane()
HepMC::FourVector MarsParticle::positionAtScoringPlane |
( |
| ) |
const |
|
inline |
A function to the position of this particle with respect to the scoring plane.
Definition at line 84 of file MarsParticle.h.
◆ primaryProtonZ()
double MarsParticle::primaryProtonZ |
( |
| ) |
const |
|
inline |
A function to return the primary proton Z position for this particle.
Definition at line 95 of file MarsParticle.h.
◆ print()
void MarsParticle::print |
( |
bool |
beamGas | ) |
|
A function to print the contents of this particle.
If the beamGas value is true then the beam gas information is printed.
Definition at line 80 of file MarsParticle.cxx.
84 std::cout.width(12); std::cout.precision(5); std::cout << std::scientific <<
m_kineticEnergy <<
" ";
85 std::cout.width(11); std::cout.precision(4); std::cout << std::scientific <<
m_weight <<
" ";
88 std::cout.width(14); std::cout.precision(7); std::cout << std::scientific <<
m_directionalCosines.x() <<
" ";
89 std::cout.width(14); std::cout.precision(7); std::cout << std::scientific <<
m_directionalCosines.y() <<
" ";
90 std::cout.width(11); std::cout.precision(4); std::cout << std::scientific <<
m_timeOfFlight <<
" ";
91 std::cout.width(12); std::cout.precision(5); std::cout << std::scientific <<
m_primaryProtonZ <<
" ";
92 std::cout.width(12); std::cout.precision(5); std::cout << std::scientific <<
m_showerPrimary.
position.z() <<
" ";
93 std::cout.width(11); std::cout.precision(4); std::cout << std::scientific <<
m_showerPrimary.
position.x() <<
" ";
94 std::cout.width(11); std::cout.precision(4); std::cout << std::scientific <<
m_showerPrimary.
position.y() <<
" ";
96 std::cout.width(11); std::cout.precision(4); std::cout << std::scientific <<
m_showerPrimary.
weight <<
" ";
108 std::cout << std::endl;
110 std::cout.precision(6);
◆ read()
int MarsParticle::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 37 of file MarsParticle.cxx.
38 if(eventAsStringVector->size() != 17 &&
39 eventAsStringVector->size() != 20) {
40 std::cerr <<
"There are only " << eventAsStringVector->size() <<
" data words. This event will be null." << std::endl;
48 for(;itr!=itr_end;++itr,++wordNumber) {
49 std::istringstream inStr((*itr));
◆ showerPrimary()
A function to return the shower primary infomation for this particle.
Definition at line 99 of file MarsParticle.h.
◆ timeOfFlight()
double MarsParticle::timeOfFlight |
( |
| ) |
const |
|
inline |
A function to return the time of flight for this particle.
Definition at line 91 of file MarsParticle.h.
◆ weight()
double MarsParticle::weight |
( |
| ) |
const |
|
inline |
A function to return the weight associated with this particle in the input ASCII file.
Definition at line 80 of file MarsParticle.h.
◆ m_beamGasInteraction
◆ m_directionalCosines
HepMC::FourVector MarsParticle::m_directionalCosines |
|
private |
◆ m_eventNumber
long MarsParticle::m_eventNumber |
|
private |
◆ m_kineticEnergy
double MarsParticle::m_kineticEnergy |
|
private |
◆ m_particleId
int MarsParticle::m_particleId |
|
private |
◆ m_positionAtScoringPlane
HepMC::FourVector MarsParticle::m_positionAtScoringPlane |
|
private |
◆ m_primaryProtonZ
double MarsParticle::m_primaryProtonZ |
|
private |
◆ m_showerPrimary
◆ m_timeOfFlight
double MarsParticle::m_timeOfFlight |
|
private |
◆ m_weight
double MarsParticle::m_weight |
|
private |
The documentation for this class was generated from the following files:
HepMC::FourVector m_directionalCosines
int pdgId()
A function to return the PDG id for this particle.
MarsBeamGasInteraction m_beamGasInteraction
HepMC::FourVector m_positionAtScoringPlane
MarsShowerPrimary m_showerPrimary