GGS(GenericGEANT4Simulation)Software
2.7.0
|
Definition of GGS Particle Hit. More...
#include <GGSPartHit.h>
Public Member Functions | |
GGSPartHit () | |
Constructor. | |
~GGSPartHit () | |
Destructor. | |
GGSPartHit (const GGSPartHit &right) | |
Copy constructor. More... | |
const GGSPartHit & | operator= (const GGSPartHit &right) |
Assignment operator. More... | |
bool | operator== (const GGSPartHit &right) const |
Comparison operator. More... | |
void * | operator new (size_t size) |
Operator new. More... | |
void | operator delete (void *aHit) |
Operator delete. More... | |
virtual void | UserInit (G4Step *aStep) |
User initialization of hit global properties. More... | |
virtual void | AddStep (const G4Step &step) |
Adds a step to the particle hit. More... | |
void | SetTrackID (G4int id) |
Track ID setter. More... | |
void | SetParentID (G4int id) |
Parent's track ID setter. More... | |
void | SetParticlePdg (G4int pdg) |
PDG code setter. More... | |
void | SetPosHitsStorage (bool flag) |
Turn on or off the storage of position hits. More... | |
G4double | GetEnergyDeposit () const |
Energy deposit getter. More... | |
G4double | GetTime () const |
Time getter. More... | |
G4double | GetPathLength () const |
Path length getter. More... | |
G4ThreeVector | GetEntrancePoint () const |
Entrance point getter. More... | |
G4ThreeVector | GetExitPoint () const |
Exit point getter. More... | |
G4ThreeVector | GetEntranceMomentum () const |
Entrance momentum getter. More... | |
G4double | GetEntranceEnergy () const |
Entrance energy getter. More... | |
G4int | GetTrackID () const |
Track ID getter. More... | |
G4int | GetParentID () const |
Parent's track ID getter. More... | |
G4int | GetParticlePdg () const |
PDG code getter. More... | |
GGSPosHitsCollection * | GetPosHits () |
Getter of container of position hits. More... | |
Protected Attributes | |
G4double | _eDep |
G4double | _time |
G4double | _pathLength |
G4ThreeVector | _entrancePoint |
G4ThreeVector | _exitPoint |
G4ThreeVector | _entranceMomentum |
G4double | _entranceEnergy |
G4int | _trackID |
G4int | _parentID |
G4int | _particlePdg |
bool | _isReset |
GGSPosHitsCollection * | _posHits |
Definition of GGS Particle Hit.
A particle hit is associated to a sensitive physical volume and a particle. It carries information about total energy release of that particle in that volume during the current event. So if in the current event there are N volumes and the i-th volume is traversed by M_i particles, then there will be sum_i (M_i) particle hits in the event. Note that if a particle passes through a sensitive volume without releasing energy (eg., a neutrino) the corresponding particle hit will be generated anyway with zero energy release.
Definition at line 36 of file GGSPartHit.h.
GGSPartHit::GGSPartHit | ( | const GGSPartHit & | right | ) |
Copy constructor.
right | The object to be copied into current one. |
Definition at line 23 of file GGSPartHit.cpp.
|
virtual |
Adds a step to the particle hit.
This method adds a step to the particle hit. The particle hit integral quantities (scoring value and path length) will be incremented by the corresponding step quantities. The exit point from the volume will be updated with the value of the end point of the step; if the step is the first to be added, its values for start point, energy, momentum and time will be used to set the values of entrance point, energy, momentum and time of the particle hit.
The step object itself can be stored as a GGSPosHit by calling SetPosHitsStorage with proper parameter. The container of stored position hit objects can be retrieved with the GetPosHits method. Default behavior is to not store GGSPosHit objects; user must be aware that storing GGSPosHit objects could result in a great increase in memory consumption if the sensitive element is thick or traversed by many particles (e.g. a scintillating bar in an e.m. calorimeter).
step | the G4Step object representing the simulation step to be added. |
Definition at line 101 of file GGSPartHit.cpp.
|
inline |
|
inline |
Entrance energy getter.
Gets the energy of the particle at entrance in the volume.
Definition at line 192 of file GGSPartHit.h.
|
inline |
Entrance momentum getter.
Gets the momentum of the particle at entrance in the volume.
Definition at line 184 of file GGSPartHit.h.
|
inline |
Entrance point getter.
Gets the particle's entrance point in the volume.
Definition at line 168 of file GGSPartHit.h.
|
inline |
Exit point getter.
Gets the particle's exit point from the volume.
Definition at line 176 of file GGSPartHit.h.
|
inline |
Parent's track ID getter.
Definition at line 204 of file GGSPartHit.h.
|
inline |
|
inline |
Path length getter.
Definition at line 160 of file GGSPartHit.h.
|
inline |
Getter of container of position hits.
Definition at line 218 of file GGSPartHit.h.
|
inline |
Time getter.
Definition at line 154 of file GGSPartHit.h.
|
inline |
|
inline |
Operator delete.
This implementation uses G4Allocator.
aHit | The current hit to be deleted. |
Definition at line 253 of file GGSPartHit.h.
|
inline |
Operator new.
This implementation uses G4Allocator.
size | Unused (needed by the interface). |
Definition at line 245 of file GGSPartHit.h.
const GGSPartHit & GGSPartHit::operator= | ( | const GGSPartHit & | right | ) |
Assignment operator.
right | The object to be assigned to current one. |
Definition at line 44 of file GGSPartHit.cpp.
bool GGSPartHit::operator== | ( | const GGSPartHit & | right | ) | const |
Comparison operator.
right | RHS of comparison. |
Definition at line 68 of file GGSPartHit.cpp.
|
inline |
Parent's track ID setter.
id | The ID of the track of the particle's parent. |
Definition at line 126 of file GGSPartHit.h.
|
inline |
PDG code setter.
pdg | The PDG code of the particle. |
Definition at line 132 of file GGSPartHit.h.
void GGSPartHit::SetPosHitsStorage | ( | bool | flag | ) |
Turn on or off the storage of position hits.
Position hits added to particle hit by AddStep are by default not stored. This method enables or disables position hit storage.
flag | if true, position hits will be stored. |
Definition at line 121 of file GGSPartHit.cpp.
|
inline |
Track ID setter.
id | The ID of particle's track |
Definition at line 120 of file GGSPartHit.h.
|
inlinevirtual |
User initialization of hit global properties.
This method is called by GGSIntHitSD after initializing the hit object just after its creation, before calling AddStep. Users can override this method in custom hit classes to perform additional custom initialization. The #aStep argument is the simulation step at which the hit is created.
aStep | The step at which the hit has been created. |
Definition at line 90 of file GGSPartHit.h.