BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Attributes
BDSSDSamplerCylinder Class Reference

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

#include <BDSSDSamplerCylinder.hh>

Inheritance diagram for BDSSDSamplerCylinder:
Inheritance graph
Collaboration diagram for BDSSDSamplerCylinder:
Collaboration graph

Public Member Functions

 BDSSDSamplerCylinder (const G4String &name)
 Construct a sampler with name and type (plane/cylinder). More...
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *readOutTH)
 
virtual G4VHit * last () const
 Provide access to last hit. More...
 
- 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 Attributes

BDSHitsCollectionSamplerCylindersamplerHitsCollection
 The hits collection for this sensitive detector class that's owned by each instance. More...
 
G4String itsCollectionName
 The name of the hits collection that's created and registered. More...
 
int itsHCID
 
BDSSamplerRegistryregistry
 Cached pointer to registry as accessed many times. More...
 
BDSGlobalConstantsglobals
 Cached pointer to global constants as accessed many times. More...
 

Detailed Description

The sensitive detector class that provides sensitivity to BDSSamplerCylinder instances.

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

Written and edited by many authors over time.

Definition at line 43 of file BDSSDSamplerCylinder.hh.

Constructor & Destructor Documentation

◆ BDSSDSamplerCylinder()

BDSSDSamplerCylinder::BDSSDSamplerCylinder ( const G4String &  name)
explicit

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

Definition at line 43 of file BDSSDSamplerCylinder.cc.

◆ ~BDSSDSamplerCylinder()

BDSSDSamplerCylinder::~BDSSDSamplerCylinder ( )
virtual

Definition at line 54 of file BDSSDSamplerCylinder.cc.

Member Function Documentation

◆ Initialize()

void BDSSDSamplerCylinder::Initialize ( G4HCofThisEvent *  HCE)
virtual

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

Definition at line 57 of file BDSSDSamplerCylinder.cc.

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

Here is the call graph for this function:

◆ last()

G4VHit * BDSSDSamplerCylinder::last ( ) const
virtual

Provide access to last hit.

Implements BDSSensitiveDetector.

Definition at line 166 of file BDSSDSamplerCylinder.cc.

References samplerHitsCollection.

◆ ProcessHits()

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

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

Definition at line 71 of file BDSSDSamplerCylinder.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* BDSSDSamplerCylinder::globals
private

Cached pointer to global constants as accessed many times.

Definition at line 77 of file BDSSDSamplerCylinder.hh.

Referenced by Initialize(), and ProcessHits().

◆ itsCollectionName

G4String BDSSDSamplerCylinder::itsCollectionName
private

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

Definition at line 66 of file BDSSDSamplerCylinder.hh.

Referenced by Initialize().

◆ itsHCID

int BDSSDSamplerCylinder::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 71 of file BDSSDSamplerCylinder.hh.

Referenced by Initialize().

◆ registry

BDSSamplerRegistry* BDSSDSamplerCylinder::registry
private

Cached pointer to registry as accessed many times.

Definition at line 74 of file BDSSDSamplerCylinder.hh.

Referenced by Initialize(), and ProcessHits().

◆ samplerHitsCollection

BDSHitsCollectionSamplerCylinder* BDSSDSamplerCylinder::samplerHitsCollection
private

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

Definition at line 63 of file BDSSDSamplerCylinder.hh.

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


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