GGS(GenericGEANT4Simulation)Software
2.7.0
|
A class that computes unique IDs for each touchable. More...
#include <GGSUniqueTouchableIDComputer.h>
Public Member Functions | |
int | ComputeTouchableID (G4Step *aStep) |
Computes the touchable ID in a unique way. More... | |
![]() | |
virtual | ~GGSTouchableIDComputer () |
Destructor. | |
A class that computes unique IDs for each touchable.
This class computes a unique ID for each touchable belonging to a given detector logical volume. It works only for a given volume hierarchy, i.e. for those touchables that are inside the same hierarchy of volumes up to the world volume. For example, a sensitive logical L might be placed as G4PVPlacement twice in the logical container L1 and three times in the logical container L2; L1 and L2 are then placed N1 and N2 times inside the world volume. In this case, the computed IDs will be unique among the physical volumes inside the various L1s, and the same for L2, but the IDs for volumes in L1 and in L2 might be the same.
To obtain unique IDs the various placements of the sensitive volume and all its mother volumes must have different copy numbers.
Definition at line 32 of file GGSUniqueTouchableIDComputer.h.
|
virtual |
Computes the touchable ID in a unique way.
The ID is computed starting from the replica number and taking into account the multiplicity of the touchable and of all its mother volumes. This requires all the volumes to have unique copy/replica number. For example, consider three sensitive volumes (copy no. 0, 1 and 2) in a container placed two times (copy no.* 0 and 1). Volume 0 in container 0 will have ID 0, volume 0 in container 1 will have ID 3 = copy n. + multiplicity * mother copy n. = 0 + 3*1.
aStep | The current step. |
Implements GGSTouchableIDComputer.
Definition at line 14 of file GGSUniqueTouchableIDComputer.cpp.