![]() |
Project
|
#include <FastSimModel.h>
Inherits G4VFastSimulationModel.
Inherited by o2::fastsim::ToyAbsorberFastSim.
Public Member Functions | |
| FastSimModel (const G4String &name, const G4String &envelopeVolume, double minEnergyGeV) | |
| G4bool | IsApplicable (const G4ParticleDefinition &particle) override |
| G4bool | ModelTrigger (const G4FastTrack &fastTrack) override |
| void | DoIt (const G4FastTrack &fastTrack, G4FastStep &fastStep) override |
Protected Member Functions | |
| virtual std::vector< FastSimOutput > | sample (const FastSimInput &input) const =0 |
Base class for fast simulation models.
The model is attached to regions (see G4FastSimulation.h) purely so that Geant4 consults it; what it encloses is the ENVELOPE VOLUME named below, which is normally the mother volume of a whole module. The two are deliberately separate, because a Geant4 region in O2 can only ever be "every
volume of a given material" – the VMC special cuts make every logical volume a root of its own material's region, and Geant4 stops propagating a region at any such daughter. So G4FastTrack::GetEnvelopeSolid() would hand back one absorber piece rather than the absorber, and this class does not use it.
Containment and the exit distance are taken from the track's own touchable, which already carries the full ancestry and the transform of every level.
Definition at line 73 of file FastSimModel.h.
| o2::fastsim::FastSimModel::FastSimModel | ( | const G4String & | name, |
| const G4String & | envelopeVolume, | ||
| double | minEnergyGeV | ||
| ) |
Definition at line 36 of file FastSimModel.cxx.
|
override |
Wraps the common logic of a fast simulation action and delegates the physics to sample(): it measures the distance to the envelope surface, kills the incident particle, stacks what sample() returned and books the energy difference as a deposit. Override it for a model that does not fit that shape.
Definition at line 105 of file FastSimModel.cxx.
|
override |
Definition at line 70 of file FastSimModel.cxx.
|
override |
Definition at line 78 of file FastSimModel.cxx.
|
protectedpure virtual |
Given the particle that entered, return everything that leaves. This is the function a trained model implements.
Implemented in o2::fastsim::ToyAbsorberFastSim.