BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes
BDSSDCollimator Class Reference

The sensitive detector class that provides sensitivity to collimators instances. More...

#include <BDSSDCollimator.hh>

Inheritance diagram for BDSSDCollimator:
Inheritance graph
Collaboration diagram for BDSSDCollimator:
Collaboration graph

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.
 
BDSSDCollimatoroperator= (const BDSSDCollimator &)=delete
 Assignment and copy constructor not implemented nor used.
 
 BDSSDCollimator (BDSSDCollimator &)=delete
 Assignment and copy constructor not implemented nor used.
 
- Public Member Functions inherited from BDSSensitiveDetector
 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

BDSHitsCollectionCollimatorcollimatorCollection
 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
 
BDSAuxiliaryNavigatorauxNavigator
 An auxiliary navigator object for coordinate transforms.
 
std::map< BDSBeamline *, std::map< G4int, G4int > > mapping
 

Detailed Description

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.

Author
Laurie Nevay

Definition at line 51 of file BDSSDCollimator.hh.

Constructor & Destructor Documentation

◆ BDSSDCollimator()

BDSSDCollimator::BDSSDCollimator ( G4String  name)
explicit

Include unique name for each instance.

Definition at line 42 of file BDSSDCollimator.cc.

◆ ~BDSSDCollimator()

BDSSDCollimator::~BDSSDCollimator ( )
virtual

Definition at line 52 of file BDSSDCollimator.cc.

Member Function Documentation

◆ Initialize()

void BDSSDCollimator::Initialize ( G4HCofThisEvent *  HCE)
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.

◆ IsIon()

bool BDSSDCollimator::IsIon ( const int &  pdgID) const
inlineprivate

Definition at line 83 of file BDSSDCollimator.hh.

◆ last()

G4VHit * BDSSDCollimator::last ( ) const
overridevirtual

Return the last collimator hit.

Implements BDSSensitiveDetector.

Definition at line 147 of file BDSSDCollimator.cc.

References collimatorCollection.

◆ ProcessHits()

G4bool BDSSDCollimator::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *  rOHist 
)
overridevirtual

Overriden from G4VSensitiveDetector. Creates hit instances and appends them to the hits collection.

Definition at line 72 of file BDSSDCollimator.cc.

References ProcessHitsOrdered().

Here is the call graph for this function:

◆ ProcessHitsOrdered()

G4bool BDSSDCollimator::ProcessHitsOrdered ( G4Step *  step,
G4TouchableHistory *  rOHist,
const std::vector< G4VHit * > &  hits 
)
overridevirtual

Field Documentation

◆ auxNavigator

BDSAuxiliaryNavigator* BDSSDCollimator::auxNavigator
private

An auxiliary navigator object for coordinate transforms.

Definition at line 97 of file BDSSDCollimator.hh.

Referenced by ProcessHitsOrdered().

◆ collimatorCollection

BDSHitsCollectionCollimator* BDSSDCollimator::collimatorCollection
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().

◆ itsCollectionName

G4String BDSSDCollimator::itsCollectionName
private

The name of the hits collection that's created and registered.

Definition at line 89 of file BDSSDCollimator.hh.

Referenced by Initialize().

◆ itsHCID

G4int BDSSDCollimator::itsHCID
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().

◆ mapping

std::map<BDSBeamline*, std::map<G4int, G4int> > BDSSDCollimator::mapping
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().


The documentation for this class was generated from the following files: