BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
The sensitive detector class that provides sensitivity to collimators instances. More...
#include <BDSSDCollimator.hh>
Public Member Functions | |
BDSSDCollimator (G4String name) | |
Include unique name for each instance. | |
virtual void | Initialize (G4HCofThisEvent *HCE) override |
virtual G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *rOHist) override |
virtual G4bool | ProcessHitsOrdered (G4Step *step, G4TouchableHistory *rOHist, const std::vector< G4VHit * > &hits) override |
virtual G4VHit * | last () const override |
Return the last collimator hit. | |
BDSSDCollimator & | operator= (const BDSSDCollimator &)=delete |
Assignment and copy constructor not implemented nor used. | |
BDSSDCollimator (BDSSDCollimator &)=delete | |
Assignment and copy constructor not implemented nor used. | |
![]() | |
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) |
Private Member Functions | |
bool | IsIon (const int &pdgID) const |
Private Attributes | |
BDSHitsCollectionCollimator * | collimatorCollection |
The hits collection for this sensitive detector class that's owned by each instance. | |
G4String | itsCollectionName |
The name of the hits collection that's created and registered. | |
G4int | itsHCID |
BDSAuxiliaryNavigator * | auxNavigator |
An auxiliary navigator object for coordinate transforms. | |
std::map< BDSBeamline *, std::map< G4int, G4int > > | mapping |
The sensitive detector class that provides sensitivity to collimators instances.
This class creates BDSHitCollimators for each collimator this SD is attached to.
This class is designed to work with BDSSDEnergyDepositionB in an ordered multi SD. If not, a nullptr will be stored for the energy deposition hit.
Definition at line 51 of file BDSSDCollimator.hh.
|
explicit |
Include unique name for each instance.
Definition at line 42 of file BDSSDCollimator.cc.
|
virtual |
Definition at line 52 of file BDSSDCollimator.cc.
|
overridevirtual |
Overriden from G4VSensitiveDetector. Creates hits collection and registers it with the hits collection of this event (HCE).
Definition at line 57 of file BDSSDCollimator.cc.
References collimatorCollection, itsCollectionName, and itsHCID.
|
inlineprivate |
Definition at line 83 of file BDSSDCollimator.hh.
|
overridevirtual |
Return the last collimator hit.
Implements BDSSensitiveDetector.
Definition at line 147 of file BDSSDCollimator.cc.
References collimatorCollection.
|
overridevirtual |
Overriden from G4VSensitiveDetector. Creates hit instances and appends them to the hits collection.
Definition at line 72 of file BDSSDCollimator.cc.
References ProcessHitsOrdered().
|
overridevirtual |
Override creation of hit w.r.t. hit already generated by other SD, namely the energy deposition SD for collimator hits.
Reimplemented from BDSSensitiveDetector.
Definition at line 78 of file BDSSDCollimator.cc.
References auxNavigator, collimatorCollection, BDSAuxiliaryNavigator::ConvertAxisToLocal(), BDSAuxiliaryNavigator::ConvertToLocal(), BDSAcceleratorModel::CorrespondingMassWorldBeamline(), BDSPhysicalVolumeInfo::GetBeamline(), BDSPhysicalVolumeInfo::GetBeamlineIndex(), BDSBeamline::GetIndicesOfCollimators(), BDSPhysicalVolumeInfoRegistry::GetInfo(), BDSPhysicalVolumeInfoRegistry::Instance(), BDSTrajectoryPoint::IsScatteringPoint(), mapping, BDSStep::PreStepPoint(), and BDSStep::VolumeForTransform().
Referenced by ProcessHits().
|
private |
An auxiliary navigator object for coordinate transforms.
Definition at line 97 of file BDSSDCollimator.hh.
Referenced by ProcessHitsOrdered().
|
private |
The hits collection for this sensitive detector class that's owned by each instance.
Definition at line 86 of file BDSSDCollimator.hh.
Referenced by Initialize(), last(), and ProcessHitsOrdered().
|
private |
The name of the hits collection that's created and registered.
Definition at line 89 of file BDSSDCollimator.hh.
Referenced by Initialize().
|
private |
Hits collection ID - an integer look up for the hits collection provided by G4SDManager (a registry) that is given to the G4HCofThisEvent (Hits collection of the event).
Definition at line 94 of file BDSSDCollimator.hh.
Referenced by Initialize().
|
private |
Map of beam line index to count of that object - ie beam line object 1203 is the 3rd collimator. Store a map of this for each possible beam line. Populated dynamically as requested.
Definition at line 102 of file BDSSDCollimator.hh.
Referenced by ProcessHitsOrdered().