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

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

#include <BDSSDSamplerSphere.hh>

Inheritance diagram for BDSSDSamplerSphere:
Inheritance graph
Collaboration diagram for BDSSDSamplerSphere:
Collaboration graph

Public Member Functions

 BDSSDSamplerSphere (const G4String &name)
 Construct a sampler with name and type (plane/cylinder).
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *readOutTH)
 
virtual G4VHit * last () const
 Provide access to last hit.
 
- Public Member Functions inherited from BDSSensitiveDetector
 BDSSensitiveDetector (const G4String &name)
 
virtual G4bool ProcessHitsOrdered (G4Step *step, G4TouchableHistory *rOHist, const std::vector< G4VHit * > &hits)
 
G4bool HitOrdered (G4Step *step, const std::vector< G4VHit * > &hits)
 

Private Attributes

BDSHitsCollectionSamplerSphere * samplerHitsCollection
 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.
 
int itsHCID
 
BDSSamplerRegistry * registry
 Cached pointer to registry as accessed many times.
 
BDSGlobalConstants * globals
 Cached pointer to global constants as accessed many times.
 

Detailed Description

The sensitive detector class that provides sensitivity to BDSSamplerSphere instances.

It creates BDSHitSamplerSphere instances for each particle impact on a sampler this SD is attached to.

Written and edited by many authors over time.

Definition at line 42 of file BDSSDSamplerSphere.hh.

Constructor & Destructor Documentation

◆ BDSSDSamplerSphere()

BDSSDSamplerSphere::BDSSDSamplerSphere ( const G4String &  name)
explicit

Construct a sampler with name and type (plane/cylinder).

Definition at line 42 of file BDSSDSamplerSphere.cc.

◆ ~BDSSDSamplerSphere()

BDSSDSamplerSphere::~BDSSDSamplerSphere ( )
virtual

Definition at line 53 of file BDSSDSamplerSphere.cc.

Member Function Documentation

◆ Initialize()

void BDSSDSamplerSphere::Initialize ( G4HCofThisEvent *  HCE)
virtual

Overriden from G4VSensitiveDetector. Creates hits collection and registers it with the hits collection of this event (HCE).

Definition at line 56 of file BDSSDSamplerSphere.cc.

References globals, BDSGlobalConstants::Instance(), BDSSamplerRegistry::Instance(), itsCollectionName, itsHCID, registry, and samplerHitsCollection.

Here is the call graph for this function:

◆ last()

G4VHit * BDSSDSamplerSphere::last ( ) const
virtual

Provide access to last hit.

Implements BDSSensitiveDetector.

Definition at line 165 of file BDSSDSamplerSphere.cc.

References samplerHitsCollection.

◆ ProcessHits()

G4bool BDSSDSamplerSphere::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *  readOutTH 
)
virtual

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

Definition at line 70 of file BDSSDSamplerSphere.cc.

References BDSSamplerPlacementRecord::BeamlineIndex(), BDSSamplerRegistry::GetInfo(), BDSSamplerRegistry::GetTransformInverse(), globals, BDS::IsFinite(), registry, BDS::Rigidity(), samplerHitsCollection, and BDSSamplerPlacementRecord::SPosition().

Here is the call graph for this function:

Field Documentation

◆ globals

BDSGlobalConstants* BDSSDSamplerSphere::globals
private

Cached pointer to global constants as accessed many times.

Definition at line 76 of file BDSSDSamplerSphere.hh.

Referenced by Initialize(), and ProcessHits().

◆ itsCollectionName

G4String BDSSDSamplerSphere::itsCollectionName
private

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

Definition at line 65 of file BDSSDSamplerSphere.hh.

Referenced by Initialize().

◆ itsHCID

int BDSSDSamplerSphere::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 70 of file BDSSDSamplerSphere.hh.

Referenced by Initialize().

◆ registry

BDSSamplerRegistry* BDSSDSamplerSphere::registry
private

Cached pointer to registry as accessed many times.

Definition at line 73 of file BDSSDSamplerSphere.hh.

Referenced by Initialize(), and ProcessHits().

◆ samplerHitsCollection

BDSHitsCollectionSamplerSphere* BDSSDSamplerSphere::samplerHitsCollection
private

The hits collection for this sensitive detector class that's owned by each instance.

Definition at line 62 of file BDSSDSamplerSphere.hh.

Referenced by Initialize(), last(), and ProcessHits().


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