Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PrimaryParticle Class Reference

#include <G4PrimaryParticle.hh>

Public Member Functions

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

Detailed Description

Definition at line 66 of file G4PrimaryParticle.hh.

Constructor & Destructor Documentation

◆ G4PrimaryParticle() [1/8]

G4PrimaryParticle::G4PrimaryParticle ( )

Definition at line 39 of file G4PrimaryParticle.cc.

40:PDGcode(0),G4code(0),
41 direction(0.,0.,1.),kinE(0.),
42 nextParticle(0),daughterParticle(0),trackID(-1),
43 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
44 Weight0(1.0),properTime(0.0),userInfo(0)
45{;}

Referenced by operator=().

◆ G4PrimaryParticle() [2/8]

G4PrimaryParticle::G4PrimaryParticle ( G4int  Pcode)

Definition at line 47 of file G4PrimaryParticle.cc.

48:PDGcode(Pcode),
49 direction(0.,0.,1.),kinE(0.),
50 nextParticle(0),daughterParticle(0),trackID(-1),
51 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
52 Weight0(1.0),properTime(0.0),userInfo(0)
53{
55 if (G4code !=0) {
56 mass = G4code->GetPDGMass();
57 charge = G4code->GetPDGCharge();
58 }
59}
G4double GetPDGCharge() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()

◆ G4PrimaryParticle() [3/8]

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

Definition at line 61 of file G4PrimaryParticle.cc.

63:PDGcode(Pcode),
64 direction(0.,0.,1.),kinE(0.),
65 nextParticle(0),daughterParticle(0),trackID(-1),
66 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
67 Weight0(1.0),properTime(0.0),userInfo(0)
68{
70 if (G4code !=0) {
71 mass = G4code->GetPDGMass();
72 charge = G4code->GetPDGCharge();
73 }
74 SetMomentum( px, py, pz);
75}
void SetMomentum(G4double px, G4double py, G4double pz)

◆ G4PrimaryParticle() [4/8]

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

Definition at line 77 of file G4PrimaryParticle.cc.

79:PDGcode(Pcode),
80 direction(0.,0.,1.),kinE(0.),
81 nextParticle(0),daughterParticle(0),trackID(-1),
82 charge(0.),polX(0.),polY(0.),polZ(0.),
83 Weight0(1.0),properTime(0.0),userInfo(0)
84{
86 if (G4code !=0) {
87 mass = G4code->GetPDGMass();
88 charge = G4code->GetPDGCharge();
89 }
90 Set4Momentum( px, py, pz, E);
91}
void Set4Momentum(G4double px, G4double py, G4double pz, G4double E)

◆ G4PrimaryParticle() [5/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4ParticleDefinition Gcode)

Definition at line 93 of file G4PrimaryParticle.cc.

94:PDGcode(0),G4code(Gcode),
95 direction(0.,0.,1.),kinE(0.),
96 nextParticle(0),daughterParticle(0),trackID(-1),
97 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
98 Weight0(1.0),properTime(0.0),userInfo(0)
99{
100 if (G4code !=0) {
101 PDGcode = Gcode->GetPDGEncoding();
102 mass = G4code->GetPDGMass();
103 charge = G4code->GetPDGCharge();
104 }
105}

◆ G4PrimaryParticle() [6/8]

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

Definition at line 107 of file G4PrimaryParticle.cc.

109:PDGcode(0),G4code(Gcode),
110 direction(0.,0.,1.),kinE(0.),
111 nextParticle(0),daughterParticle(0),trackID(-1),
112 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
113 Weight0(1.0),properTime(0.0),userInfo(0)
114{
115 if (G4code !=0) {
116 PDGcode = Gcode->GetPDGEncoding();
117 mass = G4code->GetPDGMass();
118 charge = G4code->GetPDGCharge();
119 }
120 SetMomentum( px, py, pz);
121}

◆ G4PrimaryParticle() [7/8]

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

Definition at line 123 of file G4PrimaryParticle.cc.

125:PDGcode(0),G4code(Gcode),
126 direction(0.,0.,1.),kinE(0.),
127 nextParticle(0),daughterParticle(0),trackID(-1),
128 charge(0.),polX(0.),polY(0.),polZ(0.),
129 Weight0(1.0),properTime(0.0),userInfo(0)
130{
131 if (G4code !=0) {
132 PDGcode = Gcode->GetPDGEncoding();
133 mass = G4code->GetPDGMass();
134 charge = G4code->GetPDGCharge();
135 }
136 Set4Momentum( px, py, pz, E);
137}

◆ ~G4PrimaryParticle()

G4PrimaryParticle::~G4PrimaryParticle ( )
virtual

Definition at line 190 of file G4PrimaryParticle.cc.

191{
192 if(nextParticle != 0){
193 delete nextParticle;
194 nextParticle = 0;
195 }
196 if(daughterParticle != 0){
197 delete daughterParticle;
198 daughterParticle =0;
199 }
200 if(userInfo!=0) {
201 delete userInfo;
202 userInfo=0;
203 }
204}

◆ G4PrimaryParticle() [8/8]

G4PrimaryParticle::G4PrimaryParticle ( const G4PrimaryParticle right)

Definition at line 139 of file G4PrimaryParticle.cc.

140:PDGcode(0),G4code(0),
141 direction(0.,0.,1.),kinE(0.),
142 nextParticle(0),daughterParticle(0),trackID(-1),
143 mass(-1.),charge(0.),polX(0.),polY(0.),polZ(0.),
144 Weight0(1.0),properTime(0.0),userInfo(0)
145{
146 *this = right;
147}

Member Function Documentation

◆ GetCharge()

G4double G4PrimaryParticle::GetCharge ( ) const
inline

Definition at line 200 of file G4PrimaryParticle.hh.

201{ return charge; }

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

◆ GetDaughter()

G4PrimaryParticle * G4PrimaryParticle::GetDaughter ( ) const
inline

Definition at line 257 of file G4PrimaryParticle.hh.

258{ return daughterParticle; }

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

◆ GetG4code()

G4ParticleDefinition * G4PrimaryParticle::GetG4code ( ) const
inline

Definition at line 206 of file G4PrimaryParticle.hh.

207{ return const_cast<G4ParticleDefinition*>(G4code); }

◆ GetKineticEnergy()

G4double G4PrimaryParticle::GetKineticEnergy ( ) const
inline

Definition at line 248 of file G4PrimaryParticle.hh.

249{ return kinE; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetMass()

G4double G4PrimaryParticle::GetMass ( ) const
inline

Definition at line 197 of file G4PrimaryParticle.hh.

198{ return mass; }

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

◆ GetMomentum()

G4ThreeVector G4PrimaryParticle::GetMomentum ( ) const
inline

◆ GetMomentumDirection()

const G4ThreeVector & G4PrimaryParticle::GetMomentumDirection ( ) const
inline

Definition at line 221 of file G4PrimaryParticle.hh.

222{ return direction;}

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetNext()

◆ GetParticleDefinition()

const G4ParticleDefinition * G4PrimaryParticle::GetParticleDefinition ( ) const
inline

Definition at line 209 of file G4PrimaryParticle.hh.

210{ return G4code; }

◆ GetPDGcode()

G4int G4PrimaryParticle::GetPDGcode ( ) const
inline

Definition at line 203 of file G4PrimaryParticle.hh.

204{ return PDGcode; }

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

◆ GetPolarization()

G4ThreeVector G4PrimaryParticle::GetPolarization ( ) const
inline

Definition at line 263 of file G4PrimaryParticle.hh.

264{ return G4ThreeVector(polX,polY,polZ); }
CLHEP::Hep3Vector G4ThreeVector

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetPolX()

G4double G4PrimaryParticle::GetPolX ( ) const
inline

Definition at line 266 of file G4PrimaryParticle.hh.

267{ return polX; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetPolY()

G4double G4PrimaryParticle::GetPolY ( ) const
inline

Definition at line 269 of file G4PrimaryParticle.hh.

270{ return polY; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetPolZ()

G4double G4PrimaryParticle::GetPolZ ( ) const
inline

Definition at line 272 of file G4PrimaryParticle.hh.

273{ return polZ; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ GetProperTime()

G4double G4PrimaryParticle::GetProperTime ( ) const
inline

Definition at line 284 of file G4PrimaryParticle.hh.

285{ return properTime; }

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

◆ GetPx()

G4double G4PrimaryParticle::GetPx ( ) const
inline

Definition at line 227 of file G4PrimaryParticle.hh.

228{ return GetTotalMomentum()*direction.x();}
double x() const

◆ GetPy()

G4double G4PrimaryParticle::GetPy ( ) const
inline

Definition at line 230 of file G4PrimaryParticle.hh.

231{ return GetTotalMomentum()*direction.y();}
double y() const

◆ GetPz()

G4double G4PrimaryParticle::GetPz ( ) const
inline

Definition at line 233 of file G4PrimaryParticle.hh.

234{ return GetTotalMomentum()*direction.z();}
double z() const

◆ GetTotalEnergy()

G4double G4PrimaryParticle::GetTotalEnergy ( ) const
inline

Definition at line 236 of file G4PrimaryParticle.hh.

237{
238 if (mass<0.) return kinE;
239 else return kinE+mass;
240}

◆ GetTotalMomentum()

G4double G4PrimaryParticle::GetTotalMomentum ( ) const
inline

Definition at line 212 of file G4PrimaryParticle.hh.

213{
214 if (mass<0.) return kinE;
215 else return std::sqrt(kinE*(kinE+2.*mass));
216}

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

◆ GetTrackID()

G4int G4PrimaryParticle::GetTrackID ( ) const
inline

Definition at line 260 of file G4PrimaryParticle.hh.

261{ return trackID; }

◆ GetUserInformation()

G4VUserPrimaryParticleInformation * G4PrimaryParticle::GetUserInformation ( ) const
inline

Definition at line 290 of file G4PrimaryParticle.hh.

291{ return userInfo; }

◆ GetWeight()

G4double G4PrimaryParticle::GetWeight ( ) const
inline

Definition at line 275 of file G4PrimaryParticle.hh.

276{ return Weight0; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ operator delete()

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

Definition at line 192 of file G4PrimaryParticle.hh.

193{
194 aPrimaryParticleAllocator.FreeSingle((G4PrimaryParticle *) aPrimaryParticle);
195}
G4DLLIMPORT G4Allocator< G4PrimaryParticle > aPrimaryParticleAllocator

◆ operator new()

void * G4PrimaryParticle::operator new ( size_t  )
inline

Definition at line 185 of file G4PrimaryParticle.hh.

186{
187 void * aPrimaryParticle;
188 aPrimaryParticle = (void *) aPrimaryParticleAllocator.MallocSingle();
189 return aPrimaryParticle;
190}

◆ operator!=()

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

Definition at line 187 of file G4PrimaryParticle.cc.

188{ return (this!=&right); }

◆ operator=()

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

Definition at line 149 of file G4PrimaryParticle.cc.

150{
151 if (this != &right) {
152 PDGcode = right.PDGcode;
153 G4code = right.G4code;
154 direction = right.direction;
155 kinE = right.kinE;
156 if (nextParticle !=0) delete nextParticle;
157 if ( right.nextParticle ==0 ){
158 nextParticle = 0;
159 } else {
160 nextParticle = new G4PrimaryParticle(*right.nextParticle);
161 }
162 if (daughterParticle !=0) delete daughterParticle;
163 if ( right.daughterParticle ==0 ){
164 daughterParticle = 0;
165 } else {
166 daughterParticle = new G4PrimaryParticle(*right.daughterParticle);
167 }
168 trackID = right.trackID;
169 mass = right.mass;
170 charge = right.charge;
171 polX = right.polX;
172 polY = right.polY;
173 polZ = right.polZ;
174 Weight0 = right.Weight0;
175 properTime = right.properTime;
176
177 // userInfo can not be copied
178 userInfo = 0;
179 }
180
181 return *this;
182}

◆ operator==()

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

Definition at line 184 of file G4PrimaryParticle.cc.

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

◆ Print()

void G4PrimaryParticle::Print ( ) const

Definition at line 260 of file G4PrimaryParticle.cc.

261{
262 G4cout << "==== PDGcode " << PDGcode << " Particle name ";
263 if(G4code != 0)
264 { G4cout << G4code->GetParticleName() << G4endl; }
265 else
266 { G4cout << " is not defined in G4." << G4endl; }
267 G4cout << " Assigned charge : " << charge/eplus << G4endl;
268 G4cout << " Momentum ( "
269 << GetTotalMomentum()*direction.x()/GeV << "[GeV/c], "
270 << GetTotalMomentum()*direction.y()/GeV << "[GeV/c], "
271 << GetTotalMomentum()*direction.z()/GeV << "[GeV/c] )" << G4endl;
272 G4cout << " kinetic Energy : " << kinE/GeV << " [GeV]" << G4endl;
273 if(mass>=0.){
274 G4cout << " Mass : " << mass/GeV << " [GeV]" << G4endl;
275 } else {
276 G4cout << " Mass is not assigned " << G4endl;
277 }
278 G4cout << " Polarization ( "
279 << polX << ", "
280 << polY << ", "
281 << polZ << " )"
282 << G4endl;
283 G4cout << " Weight : " << Weight0 << G4endl;
284 if(properTime>0.0) {
285 G4cout << " PreAssigned proper decay time : " << properTime/ns << " [ns] " << G4endl;
286 }
287 if(userInfo != 0) { userInfo->Print(); }
288 if(daughterParticle != 0) {
289 G4cout << ">>>> Daughters" << G4endl;
290 daughterParticle->Print();
291 }
292 if(nextParticle != 0) {
293 nextParticle->Print();
294 } else {
295 G4cout << "<<<< End of link" << G4endl;
296 }
297}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
const G4String & GetParticleName() const
virtual void Print() const =0
#define ns
Definition: xmlparse.cc:597

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

◆ Set4Momentum()

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

Definition at line 220 of file G4PrimaryParticle.cc.

221{
222 G4double pmom = std::sqrt(px*px+py*py+pz*pz);
223 if (pmom>0.0) {
224 direction.setX(px/pmom);
225 direction.setY(py/pmom);
226 direction.setZ(pz/pmom);
227 }
228 G4double mas2 = E*E - pmom*pmom;
229 if(mas2>=0.){
230 mass = std::sqrt(mas2);
231 } else {
232 if (G4code!=0){
233 mass = G4code->GetPDGMass();
234 }
235 E = std::sqrt(pmom*pmom+mass*mass);
236 }
237 kinE = E - mass;
238}
double G4double
Definition: G4Types.hh:64
void setY(double)
void setZ(double)
void setX(double)

Referenced by G4PrimaryParticle().

◆ SetCharge()

void G4PrimaryParticle::SetCharge ( G4double  chg)
inline

Definition at line 316 of file G4PrimaryParticle.hh.

317{ charge = chg; }

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

◆ SetDaughter()

void G4PrimaryParticle::SetDaughter ( G4PrimaryParticle np)
inline

Definition at line 304 of file G4PrimaryParticle.hh.

305{
306 if(daughterParticle == 0) { daughterParticle = np; }
307 else { daughterParticle->SetNext(np); }
308}
void SetNext(G4PrimaryParticle *np)

Referenced by G4HEPEvtInterface::GeneratePrimaryVertex().

◆ SetG4code()

void G4PrimaryParticle::SetG4code ( const G4ParticleDefinition Gcode)
inline

Definition at line 293 of file G4PrimaryParticle.hh.

294{
296}
void SetParticleDefinition(const G4ParticleDefinition *pdef)

◆ 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 206 of file G4PrimaryParticle.cc.

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

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

◆ SetMomentumDirection()

void G4PrimaryParticle::SetMomentumDirection ( const G4ThreeVector p)
inline

◆ SetNext()

void G4PrimaryParticle::SetNext ( G4PrimaryParticle np)
inline

Definition at line 298 of file G4PrimaryParticle.hh.

299{
300 if (nextParticle == 0) { nextParticle = np; }
301 else { nextParticle->SetNext(np); }
302}

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

◆ SetParticleDefinition()

void G4PrimaryParticle::SetParticleDefinition ( const G4ParticleDefinition pdef)

Definition at line 250 of file G4PrimaryParticle.cc.

251{
252 G4code = Gcode;
253 if (G4code!=0){
254 PDGcode = Gcode->GetPDGEncoding();
255 mass = G4code->GetPDGMass();
256 charge = G4code->GetPDGCharge();
257 }
258}

Referenced by SetG4code().

◆ SetPDGcode()

void G4PrimaryParticle::SetPDGcode ( G4int  Pcode)

Definition at line 240 of file G4PrimaryParticle.cc.

241{
242 PDGcode = Pcode;
244 if (G4code!=0){
245 mass = G4code->GetPDGMass();
246 charge = G4code->GetPDGCharge();
247 }
248}

◆ SetPolarization() [1/2]

void G4PrimaryParticle::SetPolarization ( const G4ThreeVector pol)
inline

Definition at line 326 of file G4PrimaryParticle.hh.

327{
328 polX = pol.x();
329 polY = pol.y();
330 polZ = pol.z();
331}

Referenced by G4ParticleGun::GeneratePrimaryVertex(), G4SingleParticleSource::GeneratePrimaryVertex(), and G4RayShooter::Shoot().

◆ SetPolarization() [2/2]

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

Definition at line 319 of file G4PrimaryParticle.hh.

320{
321 polX = px;
322 polY = py;
323 polZ = pz;
324}

◆ SetProperTime()

void G4PrimaryParticle::SetProperTime ( G4double  t)
inline

Definition at line 281 of file G4PrimaryParticle.hh.

282{ properTime = t; }

◆ SetTotalEnergy()

void G4PrimaryParticle::SetTotalEnergy ( G4double  eTot)
inline

Definition at line 242 of file G4PrimaryParticle.hh.

243{
244 if (mass<0.) kinE = eTot;
245 else kinE = eTot - mass;
246}

◆ SetTrackID()

void G4PrimaryParticle::SetTrackID ( G4int  id)
inline

Definition at line 310 of file G4PrimaryParticle.hh.

311{ trackID = id; }

Referenced by G4PrimaryTransformer::GenerateSingleTrack().

◆ SetUserInformation()

void G4PrimaryParticle::SetUserInformation ( G4VUserPrimaryParticleInformation anInfo)
inline

Definition at line 287 of file G4PrimaryParticle.hh.

288{ userInfo = anInfo; }

◆ SetWeight()

void G4PrimaryParticle::SetWeight ( G4double  w)
inline

Definition at line 278 of file G4PrimaryParticle.hh.

279{ Weight0 = w; }

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().


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