BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Virtual class to define interface for ordered multi-sensitive detector. More...
#include <BDSSensitiveDetector.hh>
Public Member Functions | |
BDSSensitiveDetector (const G4String &name) | |
virtual G4VHit * | last () const =0 |
virtual G4bool | ProcessHitsOrdered (G4Step *step, G4TouchableHistory *rOHist, const std::vector< G4VHit * > &hits) |
G4bool | HitOrdered (G4Step *step, const std::vector< G4VHit * > &hits) |
Virtual class to define interface for ordered multi-sensitive detector.
Definition at line 39 of file BDSSensitiveDetector.hh.
BDSSensitiveDetector::BDSSensitiveDetector | ( | const G4String & | name | ) |
Definition at line 25 of file BDSSensitiveDetector.cc.
|
inlinevirtual |
Definition at line 45 of file BDSSensitiveDetector.hh.
G4bool BDSSensitiveDetector::HitOrdered | ( | G4Step * | step, |
const std::vector< G4VHit * > & | hits | ||
) |
Hit() is non-virtual so provide separate function here for ordered multi-sensitive detectors.
Definition at line 36 of file BDSSensitiveDetector.cc.
References ProcessHitsOrdered().
|
pure virtual |
Derived class should implement method to return pointer of base class type G4VHit to the last hit. Not called back to avoid confusion with the STL back() that would return a reference. We must return a pointer here.
Implemented in BDSSDEnergyDeposition, BDSSDEnergyDepositionGlobal, BDSSDSampler, BDSSDSamplerCylinder, BDSSDSamplerLink, BDSSDSamplerSphere, BDSSDCollimator, and BDSSDThinThing.
|
virtual |
Give the opportunity to make use of the hit generated by the previous sensitive detector in an ordered one. May be nullptr. By default don't use it and call normal ProcessHits(). Derived class may override it.
Reimplemented in BDSSDCollimator, and BDSSDThinThing.
Definition at line 29 of file BDSSensitiveDetector.cc.
Referenced by HitOrdered().