GGS(GenericGEANT4Simulation)Software
2.7.0
|
Definition of GGS Integrated Hit. More...
#include <GGSIntHit.h>
Public Member Functions | |
GGSIntHit (const std::vector< G4double > &timeBins) | |
Constructor. More... | |
~GGSIntHit () | |
Destructor. | |
GGSIntHit (const GGSIntHit &right) | |
Copy constructor. More... | |
const GGSIntHit & | operator= (const GGSIntHit &right) |
Assignment operator. More... | |
int | operator== (const GGSIntHit &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 | SetVolume (const G4VPhysicalVolume *volume) |
Setter for volume. More... | |
void | SetPosHitsStorage (bool flag) |
Turn on or off the storage of position hits. More... | |
void | SetPartHitsStorage (bool flag) |
Turn on or off the storage of particle hits. More... | |
void | SetAbsTranslation (const G4ThreeVector &pos) |
Set the position in global coordinates of the sensitive element. More... | |
void | SetID (G4int id) |
Setter for volume ID. More... | |
G4double | GetTotalEnergyDep () const |
Energy release getter. More... | |
const std::vector< G4double > & | GetEnergyDep () const |
Energy release getter. More... | |
G4double | GetTime () const |
Time getter. More... | |
const std::vector< G4double > & | GetTimeBins () const |
Time bins getter. More... | |
G4double | GetPathLength () const |
Path length getter. More... | |
const G4VPhysicalVolume * | GetVolume () |
Getter for volume. More... | |
GGSPartHitsCollection * | GetPartHits () |
Getter of container of particle hits. More... | |
const G4ThreeVector & | GetAbsTranslation () |
Getter of absolute position of sensitive element. More... | |
G4int | GetID () |
Getter for volume ID. More... | |
Protected Attributes | |
std::vector< G4double > | _eDep |
std::vector< G4double > | _timeBins |
G4double | _time |
G4double | _pathLength |
const G4VPhysicalVolume * | _volume |
G4ThreeVector | _absTranslation |
G4int | _id |
bool | _isReset |
GGSPartHitsCollection * | _partHits |
bool | _storePosHits |
Definition of GGS Integrated Hit.
An integrated hits is associated to a sensitive physical volume. It carries informations about the whole energy released on that volume by all the particles traversing it during an event.
Definition at line 32 of file GGSIntHit.h.
GGSIntHit::GGSIntHit | ( | const std::vector< G4double > & | timeBins | ) |
Constructor.
timeBins | The time bins in which integrated hits will be accumulated. |
Definition at line 12 of file GGSIntHit.cpp.
GGSIntHit::GGSIntHit | ( | const GGSIntHit & | right | ) |
Copy constructor.
right | The object to be copied into current one. |
Definition at line 22 of file GGSIntHit.cpp.
|
virtual |
Adds a step to the particle hit.
This method adds a step to the integrated hit. The integrated hit integral quantities (scoring value and path length) will be incremented by the corresponding step quantities.
If SetPartHitsStorage has been previously called to enable the storage of particle hits, then the step will be added also to its corresponding particle hit object. The same for SetPosHitsStorage relatively to storage of position hits.
step | The step to be added. |
Definition at line 93 of file GGSIntHit.cpp.
|
inline |
Getter of absolute position of sensitive element.
Definition at line 232 of file GGSIntHit.h.
|
inline |
Energy release getter.
Definition at line 188 of file GGSIntHit.h.
|
inline |
Getter for volume ID.
Definition at line 238 of file GGSIntHit.h.
|
inline |
Getter of container of particle hits.
Definition at line 226 of file GGSIntHit.h.
|
inline |
Path length getter.
Definition at line 212 of file GGSIntHit.h.
|
inline |
|
inline |
Time bins getter.
The returned vector contains the time bins. Element 0 is the ending time of first bin (which always starts at time 0); last element is the ending time of last bin but one, which corresponds to start time of last bin (last bin always ends at the end of event).
Definition at line 206 of file GGSIntHit.h.
|
inline |
|
inline |
Getter for volume.
Definition at line 218 of file GGSIntHit.h.
|
inline |
Operator delete.
This implementation uses G4Allocator.
aHit | The current hit to be deleted. |
Definition at line 271 of file GGSIntHit.h.
|
inline |
Operator new.
This implementation uses G4Allocator.
size | Unused (needed by the interface). |
Definition at line 263 of file GGSIntHit.h.
Assignment operator.
right | The object to be assigned to current one. |
Definition at line 41 of file GGSIntHit.cpp.
int GGSIntHit::operator== | ( | const GGSIntHit & | right | ) | const |
Comparison operator.
right | RHS of comparison. |
Definition at line 63 of file GGSIntHit.cpp.
|
inline |
Set the position in global coordinates of the sensitive element.
pos | Absolute position of the sensitive element associated to the hit. |
Definition at line 144 of file GGSIntHit.h.
|
inline |
Setter for volume ID.
An integer identification code for the sensitive volume (i.e. touchable). For output on Root files with GGSRootFileService it is necessary that each volume have a unique (name, ID) pair. This ID must then be set appropriately in order to have a unique (name, ID) for each sensitive volume.
Replicated volumes as G4PVReplica produce many touchables (sensitive volumes), each with a different replica number. However, if a G4PVReplica is placed multiple times (via multiple placements of a G4PVPlacement whose associated logical volume is filled by the G4PVReplica) then all the touchables will have the name of the G4PVReplica, but they will not have different IDs since touchable 0 will have replica number equal to 0 in all its placements. Since it is not possible to manually set a different replica number for each touchable, the absolute ID must be computed in order to be unique for each touchable. As an example, the current implementation in GGSIntHitSD::ProcessHits uses the copy number of the mother G4PVPlacement in order to compute a unique ID for each touchable as:
ID = touchableCopyNumber + touchableMultiplicity*motherCopyNumber
In this way, a replicate volume with 10 touchables placed many times will generate ID=0 for the first placement of the first touchable and ID=10 for the second placement of the first touchable, and so on (as long as each G4PVPlacement have different copy number; this must be ensured by the user in the implementation of the geometry). This numbering scheme for replicated volumes may be reused by other sensitive detectors, although it is not mandatory as long as each sensitive touchable has a unique (name, ID) pair.
It is responsibility of the sensitive detector class to properly fill this field.
ID | The ID of the volume (i.e., touchable) associated to the hit. |
Definition at line 176 of file GGSIntHit.h.
void GGSIntHit::SetPartHitsStorage | ( | bool | flag | ) |
Turn on or off the storage of particle hits.
Steps added to integrated hit by AddStep are by default not stored. This method enables or disables step storage as GGSPartHit objects (i.e., integration of steps over the sensitive volume for each particle).
Calling this method with "false" parameter will automatically disable position hits storage, i.e., it will call SetPosHitsStorage(false).
flag | if true, steps will be stored as particle hits. |
Definition at line 132 of file GGSIntHit.cpp.
void GGSIntHit::SetPosHitsStorage | ( | bool | flag | ) |
Turn on or off the storage of position hits.
Steps can be stored as position hits. If this method is called with "true" parameter, each particle hit associated to the integrated hit will contain its related position hits.
Calling this method with "true" parameter will automatically enable particle hits storage, i.e., it will call SetPartHitsStorage(true).
flag | if true, steps will be stored as position hits. |
Definition at line 114 of file GGSIntHit.cpp.
|
inline |
Setter for volume.
name | The physical volume associated to the hit. |
Definition at line 109 of file GGSIntHit.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 89 of file GGSIntHit.h.