|
| | GHit (std::shared_ptr< GTouchable > gt, const G4Step *thisStep=nullptr, const std::string &cScheme="default") |
| | Construct a hit container and optionally seed it from a step.
|
| |
| | ~GHit () override=default |
| | Destructor.
|
| |
| void * | operator new (size_t) |
| | Allocate a GHit via the G4Allocator associated with this type.
|
| |
| void | operator delete (void *) |
| | Deallocate a GHit via the G4Allocator associated with this type.
|
| |
| void | Draw () override |
| | Visualize the hit using Geant4 visualization primitives.
|
| |
| bool | is_same_hit (const GHit *hit) const |
| | Compare this hit against another hit by sensitive-element identity.
|
| |
| std::vector< double > | getEdeps () const |
| | Get per-step energy depositions.
|
| |
| std::vector< double > | getTimes () const |
| | Get per-step global times.
|
| |
| std::vector< G4ThreeVector > | getGlobalPositions () const |
| | Get per-step global positions.
|
| |
| std::vector< G4ThreeVector > | getLocalPositions () const |
| | Get per-step local positions.
|
| |
| std::vector< G4ThreeVector > | getTrackVertexPositions () const |
| | Get per-step current-track vertex positions.
|
| |
| G4ThreeVector | getTrackVertexPosition () const |
| | Convenience accessor for the first current-track vertex position.
|
| |
| std::vector< G4ThreeVector > | getMotherTrackVertexPositions () const |
| | Get per-step mother-track vertex positions.
|
| |
| G4ThreeVector | getMotherTrackVertexPosition () const |
| | Convenience accessor for the first mother-track vertex position.
|
| |
| std::vector< int > | getPids () const |
| | Get per-step particle PDG encodings (when enabled).
|
| |
| int | getPid () const |
| | Convenience accessor for the first particle ID.
|
| |
| std::vector< int > | getTids () const |
| | Get per-step particle track id (when enabled).
|
| |
| int | getTid () const |
| | Convenience accessor for the first track ID.
|
| |
| std::vector< int > | getMotherTids () const |
| | Get per-step mother track IDs.
|
| |
| int | getMotherTid () const |
| | Convenience accessor for the first mother track ID.
|
| |
| double | getE () const |
| | Convenience accessor for the first step track total energy.
|
| |
| size_t | nsteps () const |
| | Number of recorded steps.
|
| |
| size_t | getStepCount () const |
| | Number of recorded steps (same as nsteps()).
|
| |
| std::vector< G4ThreeVector > | getMomenta () const |
| | Get per-step track 3-momenta (always present).
|
| |
| G4ThreeVector | getMomentum () const |
| | Convenience accessor for the first step 3-momentum.
|
| |
| std::vector< double > | getTrackEs () const |
| | Get per-step track total energies (always present).
|
| |
| double | getTrackE () const |
| | Convenience accessor for the first step track total energy.
|
| |
| std::vector< int > | getMotherPids () const |
| | Get per-step mother particle PDG encodings (always present).
|
| |
| int | getMpid () const |
| | Convenience accessor for the first step mother particle PDG encoding.
|
| |
| std::string | getProcID () const |
| | Get the representative creator process name for this hit.
|
| |
| std::string | getProcessName () const |
| | Get the representative creator process name for the hit.
|
| |
| std::shared_ptr< GTouchable > | getGTouchable () const |
| | Get the associated sensitive-element descriptor.
|
| |
| std::vector< GIdentifier > | getGID () const |
| | Get the detector element identity.
|
| |
| std::vector< double > | getDetectorDimensions () const |
| | Get the sensitive-element dimensions.
|
| |
| double | getMass () const |
| | Get the sensitive element mass.
|
| |
| void | calculateInfos () |
| | Compute and cache derived hit quantities.
|
| |
| double | getTotalEnergyDeposited () |
| | Get the total deposited energy across all recorded steps.
|
| |
| double | getAverageTime () |
| | Get the average time associated with the hit.
|
| |
| G4ThreeVector | getAvgLocalPosition () |
| | Get the average local position of the hit.
|
| |
| G4ThreeVector | getAvgGlobaPosition () |
| | Get the average global position of the hit.
|
| |
| void | addHitInfos (const G4Step *thisStep) |
| | Append per-step information from a G4Step.
|
| |
| void | randomizeHitForTesting (int nsteps) |
| | Randomize internal vectors for test-only usage.
|
| |
| std::vector< int > | getTTID () const |
| | Get the touchable identity values as integers.
|
| |
A GHit is a G4VHit that accumulates per-step quantities while a track traverses a sensitive detector element and deposits energy.
Conceptually, this class has two layers of information:
- Per-step vectors: always-collected quantities (energy deposition, time, local/global positions, track identity, momentum, and creator process).
- Aggregated quantities: totals/averages (e.g., total energy deposited, average time, average positions, representative process name) computed lazily from the per-step vectors.
- Note
- This class does not own the sensitive-element description. The associated
GTouchable is stored as a std::shared_ptr so that the hit can be compared against other hits and can query identity/dimensions.
Definition at line 37 of file ghit.h.