Geant4-11
Public Member Functions | Private Attributes
G4PrimaryParticle Class Reference

#include <G4PrimaryParticle.hh>

Public Member Functions

void ClearNext ()
 
 G4PrimaryParticle ()
 
 G4PrimaryParticle (const G4ParticleDefinition *Gcode)
 
 G4PrimaryParticle (const G4ParticleDefinition *Gcode, G4double px, G4double py, G4double pz)
 
 G4PrimaryParticle (const G4ParticleDefinition *Gcode, G4double px, G4double py, G4double pz, G4double E)
 
 G4PrimaryParticle (const G4PrimaryParticle &right)
 
 G4PrimaryParticle (G4int Pcode)
 
 G4PrimaryParticle (G4int Pcode, G4double px, G4double py, G4double pz)
 
 G4PrimaryParticle (G4int Pcode, G4double px, G4double py, G4double pz, G4double E)
 
G4double GetCharge () const
 
G4PrimaryParticleGetDaughter () const
 
G4ParticleDefinitionGetG4code () const
 
G4double GetKineticEnergy () const
 
G4double GetMass () const
 
G4ThreeVector GetMomentum () const
 
const G4ThreeVectorGetMomentumDirection () const
 
G4PrimaryParticleGetNext () const
 
const G4ParticleDefinitionGetParticleDefinition () const
 
G4int GetPDGcode () const
 
G4ThreeVector GetPolarization () const
 
G4double GetPolX () const
 
G4double GetPolY () const
 
G4double GetPolZ () const
 
G4double GetProperTime () const
 
G4double GetPx () const
 
G4double GetPy () const
 
G4double GetPz () const
 
G4double GetTotalEnergy () const
 
G4double GetTotalMomentum () const
 
G4int GetTrackID () const
 
G4VUserPrimaryParticleInformationGetUserInformation () const
 
G4double GetWeight () const
 
void operator delete (void *aPrimaryParticle)
 
void * operator new (std::size_t)
 
G4bool operator!= (const G4PrimaryParticle &right) const
 
G4PrimaryParticleoperator= (const G4PrimaryParticle &right)
 
G4bool operator== (const G4PrimaryParticle &right) const
 
void Print () const
 
void Set4Momentum (G4double px, G4double py, G4double pz, G4double E)
 
void SetCharge (G4double chg)
 
void SetDaughter (G4PrimaryParticle *np)
 
void SetG4code (const G4ParticleDefinition *Gcode)
 
void SetKineticEnergy (G4double eKin)
 
void SetMass (G4double mas)
 
void SetMomentum (G4double px, G4double py, G4double pz)
 
void SetMomentumDirection (const G4ThreeVector &p)
 
void SetNext (G4PrimaryParticle *np)
 
void SetParticleDefinition (const G4ParticleDefinition *pdef)
 
void SetPDGcode (G4int Pcode)
 
void SetPolarization (const G4ThreeVector &pol)
 
void SetPolarization (G4double px, G4double py, G4double pz)
 
void SetProperTime (G4double t)
 
void SetTotalEnergy (G4double eTot)
 
void SetTrackID (G4int id)
 
void SetUserInformation (G4VUserPrimaryParticleInformation *anInfo)
 
void SetWeight (G4double w)
 
virtual ~G4PrimaryParticle ()
 

Private Attributes

G4double charge = 0.0
 
G4PrimaryParticledaughterParticle = nullptr
 
G4ThreeVector direction
 
const G4ParticleDefinitionG4code = nullptr
 
G4double kinE = 0.0
 
G4double mass = -1.0
 
G4PrimaryParticlenextParticle = nullptr
 
G4int PDGcode = 0
 
G4double polX = 0.0
 
G4double polY = 0.0
 
G4double polZ = 0.0
 
G4double properTime = -1.0
 
G4int trackID = -1
 
G4VUserPrimaryParticleInformationuserInfo = nullptr
 
G4double Weight0 = 1.0
 

Detailed Description

Definition at line 66 of file G4PrimaryParticle.hh.

Constructor & Destructor Documentation

◆ G4PrimaryParticle() [1/8]

G4PrimaryParticle::G4PrimaryParticle ( )

Definition at line 46 of file G4PrimaryParticle.cc.

47 : direction(0.,0.,1.)
48{
49}
G4ThreeVector direction

Referenced by operator=().

◆ G4PrimaryParticle() [2/8]

G4PrimaryParticle::G4PrimaryParticle ( G4int  Pcode)

Definition at line 52 of file G4PrimaryParticle.cc.

53 : direction(0.,0.,1.), PDGcode(Pcode)
54{
56 if (G4code != nullptr)
57 {
60 }
61}
G4double GetPDGCharge() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
const G4ParticleDefinition * G4code

References charge, G4ParticleTable::FindParticle(), G4code, G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), and mass.

◆ G4PrimaryParticle() [3/8]

G4PrimaryParticle::G4PrimaryParticle ( G4int  Pcode,
G4double  px,
G4double  py,
G4double  pz 
)

Definition at line 64 of file G4PrimaryParticle.cc.

66 : direction(0.,0.,1.), PDGcode(Pcode)
67{
69 if (G4code != nullptr)
70 {
73 }
74 SetMomentum( px, py, pz);
75}
void SetMomentum(G4double px, G4double py, G4double pz)

References charge, G4ParticleTable::FindParticle(), G4code, G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), mass, and SetMomentum().

◆ G4PrimaryParticle() [4/8]

G4PrimaryParticle::G4PrimaryParticle ( G4int  Pcode,
G4double  px,
G4double  py,
G4double  pz,
G4double  E 
)

Definition at line 78 of file G4PrimaryParticle.cc.

81 : direction(0.,0.,1.), PDGcode(Pcode)
82{
84 if (G4code != nullptr)
85 {
88 }
89 Set4Momentum( px, py, pz, E);
90}
void Set4Momentum(G4double px, G4double py, G4double pz, G4double E)

References charge, G4ParticleTable::FindParticle(), G4code, G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), mass, and Set4Momentum().

◆ G4PrimaryParticle() [5/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4ParticleDefinition Gcode)

Definition at line 93 of file G4PrimaryParticle.cc.

94 : G4code(Gcode), direction(0.,0.,1.)
95{
96 if (G4code != nullptr)
97 {
98 PDGcode = Gcode->GetPDGEncoding();
101 }
102}

References charge, G4code, G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), mass, and PDGcode.

◆ G4PrimaryParticle() [6/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4ParticleDefinition Gcode,
G4double  px,
G4double  py,
G4double  pz 
)

Definition at line 105 of file G4PrimaryParticle.cc.

107 : G4code(Gcode), direction(0.,0.,1.)
108{
109 if (G4code != nullptr)
110 {
111 PDGcode = Gcode->GetPDGEncoding();
114 }
115 SetMomentum( px, py, pz);
116}

References charge, G4code, G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), mass, PDGcode, and SetMomentum().

◆ G4PrimaryParticle() [7/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4ParticleDefinition Gcode,
G4double  px,
G4double  py,
G4double  pz,
G4double  E 
)

Definition at line 119 of file G4PrimaryParticle.cc.

121 : G4code(Gcode), direction(0.,0.,1.)
122{
123 if (G4code != nullptr)
124 {
125 PDGcode = Gcode->GetPDGEncoding();
128 }
129 Set4Momentum( px, py, pz, E);
130}

References charge, G4code, G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), mass, PDGcode, and Set4Momentum().

◆ ~G4PrimaryParticle()

G4PrimaryParticle::~G4PrimaryParticle ( )
virtual

Definition at line 195 of file G4PrimaryParticle.cc.

196{
197 delete nextParticle;
198 nextParticle = nullptr;
199
200 delete daughterParticle;
201 daughterParticle = nullptr;
202
203 delete userInfo;
204 userInfo = nullptr;
205}
G4VUserPrimaryParticleInformation * userInfo
G4PrimaryParticle * daughterParticle
G4PrimaryParticle * nextParticle

References daughterParticle, nextParticle, and userInfo.

◆ G4PrimaryParticle() [8/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4PrimaryParticle right)

Definition at line 133 of file G4PrimaryParticle.cc.

134{
135 *this = right;
136}

Member Function Documentation

◆ ClearNext()

void G4PrimaryParticle::ClearNext ( )
inline

Definition at line 397 of file G4PrimaryParticle.hh.

398{
399 nextParticle = nullptr;
400}

References nextParticle.

Referenced by G4PrimaryVertex::~G4PrimaryVertex().

◆ GetCharge()

G4double G4PrimaryParticle::GetCharge ( ) const
inline

◆ GetDaughter()

G4PrimaryParticle * G4PrimaryParticle::GetDaughter ( ) const
inline

◆ GetG4code()

G4ParticleDefinition * G4PrimaryParticle::GetG4code ( ) const
inline

Definition at line 224 of file G4PrimaryParticle.hh.

225{
226 return const_cast<G4ParticleDefinition*>(G4code);
227}

References G4code.

Referenced by export_G4PrimaryParticle().

◆ GetKineticEnergy()

G4double G4PrimaryParticle::GetKineticEnergy ( ) const
inline

Definition at line 292 of file G4PrimaryParticle.hh.

293{
294 return kinE;
295}

References kinE.

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetMass()

G4double G4PrimaryParticle::GetMass ( ) const
inline

◆ GetMomentum()

G4ThreeVector G4PrimaryParticle::GetMomentum ( ) const
inline

◆ GetMomentumDirection()

const G4ThreeVector & G4PrimaryParticle::GetMomentumDirection ( ) const
inline

Definition at line 249 of file G4PrimaryParticle.hh.

250{
251 return direction;
252}

References direction.

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetNext()

G4PrimaryParticle * G4PrimaryParticle::GetNext ( ) const
inline

◆ GetParticleDefinition()

const G4ParticleDefinition * G4PrimaryParticle::GetParticleDefinition ( ) const
inline

Definition at line 230 of file G4PrimaryParticle.hh.

231{
232 return G4code;
233}

References G4code.

◆ GetPDGcode()

G4int G4PrimaryParticle::GetPDGcode ( ) const
inline

◆ GetPolarization()

G4ThreeVector G4PrimaryParticle::GetPolarization ( ) const
inline

Definition at line 322 of file G4PrimaryParticle.hh.

323{
324 return G4ThreeVector(polX,polY,polZ);
325}
CLHEP::Hep3Vector G4ThreeVector

References polX, polY, and polZ.

Referenced by export_G4PrimaryParticle(), and G4PrimaryTransformer::GenerateSingleTrack().

◆ GetPolX()

G4double G4PrimaryParticle::GetPolX ( ) const
inline

◆ GetPolY()

G4double G4PrimaryParticle::GetPolY ( ) const
inline

◆ GetPolZ()

G4double G4PrimaryParticle::GetPolZ ( ) const
inline

◆ GetProperTime()

G4double G4PrimaryParticle::GetProperTime ( ) const
inline

◆ GetPx()

G4double G4PrimaryParticle::GetPx ( ) const
inline

Definition at line 261 of file G4PrimaryParticle.hh.

262{
263 return GetTotalMomentum()*direction.x();
264}
double x() const

References direction, GetTotalMomentum(), and CLHEP::Hep3Vector::x().

Referenced by export_G4PrimaryParticle().

◆ GetPy()

G4double G4PrimaryParticle::GetPy ( ) const
inline

Definition at line 267 of file G4PrimaryParticle.hh.

268{
269 return GetTotalMomentum()*direction.y();
270}
double y() const

References direction, GetTotalMomentum(), and CLHEP::Hep3Vector::y().

Referenced by export_G4PrimaryParticle().

◆ GetPz()

G4double G4PrimaryParticle::GetPz ( ) const
inline

Definition at line 273 of file G4PrimaryParticle.hh.

274{
275 return GetTotalMomentum()*direction.z();
276}
double z() const

References direction, GetTotalMomentum(), and CLHEP::Hep3Vector::z().

Referenced by export_G4PrimaryParticle().

◆ GetTotalEnergy()

G4double G4PrimaryParticle::GetTotalEnergy ( ) const
inline

Definition at line 278 of file G4PrimaryParticle.hh.

279{
280 if (mass<0.) return kinE;
281 else return kinE+mass;
282}

References kinE, and mass.

◆ GetTotalMomentum()

G4double G4PrimaryParticle::GetTotalMomentum ( ) const
inline

Definition at line 236 of file G4PrimaryParticle.hh.

237{
238 if (mass<0.) return kinE;
239 else return std::sqrt(kinE*(kinE+2.*mass));
240}

References kinE, and mass.

Referenced by GetMomentum(), GetPx(), GetPy(), GetPz(), and Print().

◆ GetTrackID()

G4int G4PrimaryParticle::GetTrackID ( ) const
inline

Definition at line 316 of file G4PrimaryParticle.hh.

317{
318 return trackID;
319}

References trackID.

Referenced by export_G4PrimaryParticle().

◆ GetUserInformation()

G4VUserPrimaryParticleInformation * G4PrimaryParticle::GetUserInformation ( ) const
inline

Definition at line 378 of file G4PrimaryParticle.hh.

379{
380 return userInfo;
381}

References userInfo.

◆ GetWeight()

G4double G4PrimaryParticle::GetWeight ( ) const
inline

Definition at line 346 of file G4PrimaryParticle.hh.

347{
348 return Weight0;
349}

References Weight0.

Referenced by export_G4PrimaryParticle(), and G4PrimaryTransformer::GenerateSingleTrack().

◆ operator delete()

void G4PrimaryParticle::operator delete ( void *  aPrimaryParticle)
inline

Definition at line 199 of file G4PrimaryParticle.hh.

200{
202 ->FreeSingle((G4PrimaryParticle*) aPrimaryParticle);
203}
G4PART_DLL G4Allocator< G4PrimaryParticle > *& aPrimaryParticleAllocator()

References aPrimaryParticleAllocator().

◆ operator new()

void * G4PrimaryParticle::operator new ( std::size_t  )
inline

Definition at line 189 of file G4PrimaryParticle.hh.

190{
191 if (aPrimaryParticleAllocator() == nullptr)
192 {
194 }
195 return (void*) aPrimaryParticleAllocator()->MallocSingle();
196}

References aPrimaryParticleAllocator().

◆ operator!=()

G4bool G4PrimaryParticle::operator!= ( const G4PrimaryParticle right) const

Definition at line 189 of file G4PrimaryParticle.cc.

190{
191 return (this!=&right);
192}

◆ operator=()

G4PrimaryParticle & G4PrimaryParticle::operator= ( const G4PrimaryParticle right)

Definition at line 140 of file G4PrimaryParticle.cc.

141{
142 if (this != &right)
143 {
144 PDGcode = right.PDGcode;
145 G4code = right.G4code;
146 direction = right.direction;
147 kinE = right.kinE;
148 if (nextParticle != nullptr) delete nextParticle;
149 if ( right.nextParticle == nullptr )
150 {
151 nextParticle = nullptr;
152 }
153 else
154 {
156 }
157 if (daughterParticle != nullptr) delete daughterParticle;
158 if ( right.daughterParticle == nullptr )
159 {
160 daughterParticle = nullptr;
161 }
162 else
163 {
165 }
166 trackID = right.trackID;
167 mass = right.mass;
168 charge = right.charge;
169 polX = right.polX;
170 polY = right.polY;
171 polZ = right.polZ;
172 Weight0 = right.Weight0;
173 properTime = right.properTime;
174
175 // userInfo cannot be copied
176 userInfo = nullptr;
177 }
178
179 return *this;
180}

References charge, daughterParticle, direction, G4code, G4PrimaryParticle(), kinE, mass, nextParticle, PDGcode, polX, polY, polZ, properTime, trackID, userInfo, and Weight0.

◆ operator==()

G4bool G4PrimaryParticle::operator== ( const G4PrimaryParticle right) const

Definition at line 183 of file G4PrimaryParticle.cc.

184{
185 return (this==&right);
186}

◆ Print()

void G4PrimaryParticle::Print ( ) const

Definition at line 277 of file G4PrimaryParticle.cc.

278{
279 G4cout << "==== PDGcode " << PDGcode << " Particle name ";
280 if(G4code != nullptr)
281 {
283 }
284 else
285 {
286 G4cout << " is not defined in G4." << G4endl;
287 }
288 G4cout << " Assigned charge : " << charge/eplus << G4endl;
289 G4cout << " Momentum ( "
290 << GetTotalMomentum()*direction.x()/GeV << "[GeV/c], "
291 << GetTotalMomentum()*direction.y()/GeV << "[GeV/c], "
292 << GetTotalMomentum()*direction.z()/GeV << "[GeV/c] )" << G4endl;
293 G4cout << " kinetic Energy : " << kinE/GeV << " [GeV]" << G4endl;
294 if(mass>=0.)
295 {
296 G4cout << " Mass : " << mass/GeV << " [GeV]" << G4endl;
297 }
298 else
299 {
300 G4cout << " Mass is not assigned " << G4endl;
301 }
302 G4cout << " Polarization ( "
303 << polX << ", "
304 << polY << ", "
305 << polZ << " )"
306 << G4endl;
307 G4cout << " Weight : " << Weight0 << G4endl;
308 if(properTime>=0.0)
309 {
310 G4cout << " PreAssigned proper decay time : "
311 << properTime/ns << " [ns] " << G4endl;
312 }
313 if(userInfo != 0) { userInfo->Print(); }
314 if(daughterParticle != nullptr)
315 {
316 G4cout << ">>>> Daughters" << G4endl;
318 }
319 if(nextParticle != nullptr)
320 {
322 }
323 else
324 {
325 G4cout << "<<<< End of link" << G4endl;
326 }
327}
static constexpr double eplus
Definition: G4SIunits.hh:184
static constexpr double GeV
Definition: G4SIunits.hh:203
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4String & GetParticleName() const
virtual void Print() const =0
#define ns
Definition: xmlparse.cc:614

References charge, daughterParticle, direction, eplus, G4code, G4cout, G4endl, G4ParticleDefinition::GetParticleName(), GetTotalMomentum(), GeV, kinE, mass, nextParticle, ns, PDGcode, polX, polY, polZ, Print(), G4VUserPrimaryParticleInformation::Print(), properTime, userInfo, Weight0, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by export_G4PrimaryParticle(), Print(), and G4PrimaryVertex::Print().

◆ Set4Momentum()

void G4PrimaryParticle::Set4Momentum ( G4double  px,
G4double  py,
G4double  pz,
G4double  E 
)

Definition at line 225 of file G4PrimaryParticle.cc.

227{
228 G4double pmom = std::sqrt(px*px+py*py+pz*pz);
229 if (pmom>0.0)
230 {
231 direction.setX(px/pmom);
232 direction.setY(py/pmom);
233 direction.setZ(pz/pmom);
234 }
235 G4double mas2 = E*E - pmom*pmom;
236 if(mas2>=0.)
237 {
238 mass = std::sqrt(mas2);
239 }
240 else
241 {
242 if (G4code != nullptr)
243 {
244 mass = G4code->GetPDGMass();
245 }
246 E = std::sqrt(pmom*pmom+mass*mass);
247 }
248 kinE = E - mass;
249}
double G4double
Definition: G4Types.hh:83
void setY(double)
void setZ(double)
void setX(double)

References direction, G4code, G4ParticleDefinition::GetPDGMass(), kinE, mass, CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

Referenced by export_G4PrimaryParticle(), and G4PrimaryParticle().

◆ SetCharge()

void G4PrimaryParticle::SetCharge ( G4double  chg)
inline

◆ SetDaughter()

void G4PrimaryParticle::SetDaughter ( G4PrimaryParticle np)
inline

Definition at line 403 of file G4PrimaryParticle.hh.

404{
405 if(daughterParticle == nullptr) { daughterParticle = np; }
406 else { daughterParticle->SetNext(np); }
407}
void SetNext(G4PrimaryParticle *np)

References daughterParticle, and SetNext().

Referenced by G4HEPEvtInterface::GeneratePrimaryVertex().

◆ SetG4code()

void G4PrimaryParticle::SetG4code ( const G4ParticleDefinition Gcode)
inline

Definition at line 384 of file G4PrimaryParticle.hh.

385{
387}
void SetParticleDefinition(const G4ParticleDefinition *pdef)

References SetParticleDefinition().

◆ SetKineticEnergy()

void G4PrimaryParticle::SetKineticEnergy ( G4double  eKin)
inline

◆ SetMass()

void G4PrimaryParticle::SetMass ( G4double  mas)
inline

◆ SetMomentum()

void G4PrimaryParticle::SetMomentum ( G4double  px,
G4double  py,
G4double  pz 
)

Definition at line 208 of file G4PrimaryParticle.cc.

209{
210 if ((mass<0.)&&(G4code!=0))
211 {
212 mass = G4code->GetPDGMass();
213 }
214 G4double pmom = std::sqrt(px*px+py*py+pz*pz);
215 if (pmom>0.0)
216 {
217 direction.setX(px/pmom);
218 direction.setY(py/pmom);
219 direction.setZ(pz/pmom);
220 }
221 kinE = std::sqrt(px*px+py*py+pz*pz+mass*mass)-mass;
222}

References direction, G4code, G4ParticleDefinition::GetPDGMass(), kinE, mass, CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

Referenced by G4PrimaryParticle(), and G4HEPEvtInterface::GeneratePrimaryVertex().

◆ SetMomentumDirection()

void G4PrimaryParticle::SetMomentumDirection ( const G4ThreeVector p)
inline

◆ SetNext()

void G4PrimaryParticle::SetNext ( G4PrimaryParticle np)
inline

Definition at line 390 of file G4PrimaryParticle.hh.

391{
392 if (nextParticle == nullptr) { nextParticle = np; }
393 else { nextParticle->SetNext(np); }
394}

References nextParticle, and SetNext().

Referenced by SetDaughter(), SetNext(), and G4PrimaryVertex::SetPrimary().

◆ SetParticleDefinition()

void G4PrimaryParticle::SetParticleDefinition ( const G4ParticleDefinition pdef)

Definition at line 265 of file G4PrimaryParticle.cc.

266{
267 G4code = Gcode;
268 if (G4code != nullptr)
269 {
270 PDGcode = Gcode->GetPDGEncoding();
271 mass = G4code->GetPDGMass();
273 }
274}

References charge, G4code, G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), mass, and PDGcode.

Referenced by SetG4code().

◆ SetPDGcode()

void G4PrimaryParticle::SetPDGcode ( G4int  Pcode)

◆ SetPolarization() [1/2]

void G4PrimaryParticle::SetPolarization ( const G4ThreeVector pol)
inline

◆ SetPolarization() [2/2]

void G4PrimaryParticle::SetPolarization ( G4double  px,
G4double  py,
G4double  pz 
)
inline

Definition at line 428 of file G4PrimaryParticle.hh.

429{
430 polX = px;
431 polY = py;
432 polZ = pz;
433}

References polX, polY, and polZ.

◆ SetProperTime()

void G4PrimaryParticle::SetProperTime ( G4double  t)
inline

Definition at line 358 of file G4PrimaryParticle.hh.

359{
360 properTime = t;
361}

References properTime.

◆ SetTotalEnergy()

void G4PrimaryParticle::SetTotalEnergy ( G4double  eTot)
inline

Definition at line 285 of file G4PrimaryParticle.hh.

286{
287 if (mass<0.) kinE = eTot;
288 else kinE = eTot - mass;
289}

References kinE, and mass.

◆ SetTrackID()

void G4PrimaryParticle::SetTrackID ( G4int  id)
inline

Definition at line 410 of file G4PrimaryParticle.hh.

411{
412 trackID = id;
413}

References trackID.

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ SetUserInformation()

void G4PrimaryParticle::SetUserInformation ( G4VUserPrimaryParticleInformation anInfo)
inline

Definition at line 370 of file G4PrimaryParticle.hh.

372{
373 userInfo = anInfo;
374}

References userInfo.

◆ SetWeight()

void G4PrimaryParticle::SetWeight ( G4double  w)
inline

Definition at line 352 of file G4PrimaryParticle.hh.

353{
354 Weight0 = w;
355}

References Weight0.

Referenced by export_G4PrimaryParticle(), and G4SingleParticleSource::GeneratePrimaryVertex().

Field Documentation

◆ charge

G4double G4PrimaryParticle::charge = 0.0
private

◆ daughterParticle

G4PrimaryParticle* G4PrimaryParticle::daughterParticle = nullptr
private

Definition at line 165 of file G4PrimaryParticle.hh.

Referenced by GetDaughter(), operator=(), Print(), SetDaughter(), and ~G4PrimaryParticle().

◆ direction

G4ThreeVector G4PrimaryParticle::direction
private

◆ G4code

const G4ParticleDefinition* G4PrimaryParticle::G4code = nullptr
private

◆ kinE

G4double G4PrimaryParticle::kinE = 0.0
private

◆ mass

G4double G4PrimaryParticle::mass = -1.0
private

◆ nextParticle

G4PrimaryParticle* G4PrimaryParticle::nextParticle = nullptr
private

Definition at line 164 of file G4PrimaryParticle.hh.

Referenced by ClearNext(), GetNext(), operator=(), Print(), SetNext(), and ~G4PrimaryParticle().

◆ PDGcode

G4int G4PrimaryParticle::PDGcode = 0
private

◆ polX

G4double G4PrimaryParticle::polX = 0.0
private

Definition at line 169 of file G4PrimaryParticle.hh.

Referenced by GetPolarization(), GetPolX(), operator=(), Print(), and SetPolarization().

◆ polY

G4double G4PrimaryParticle::polY = 0.0
private

Definition at line 170 of file G4PrimaryParticle.hh.

Referenced by GetPolarization(), GetPolY(), operator=(), Print(), and SetPolarization().

◆ polZ

G4double G4PrimaryParticle::polZ = 0.0
private

Definition at line 171 of file G4PrimaryParticle.hh.

Referenced by GetPolarization(), GetPolZ(), operator=(), Print(), and SetPolarization().

◆ properTime

G4double G4PrimaryParticle::properTime = -1.0
private

Definition at line 173 of file G4PrimaryParticle.hh.

Referenced by GetProperTime(), operator=(), Print(), and SetProperTime().

◆ trackID

G4int G4PrimaryParticle::trackID = -1
private

Definition at line 177 of file G4PrimaryParticle.hh.

Referenced by GetTrackID(), operator=(), and SetTrackID().

◆ userInfo

G4VUserPrimaryParticleInformation* G4PrimaryParticle::userInfo = nullptr
private

◆ Weight0

G4double G4PrimaryParticle::Weight0 = 1.0
private

Definition at line 172 of file G4PrimaryParticle.hh.

Referenced by GetWeight(), operator=(), Print(), and SetWeight().


The documentation for this class was generated from the following files: