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

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

#include <BDSSDSamplerLink.hh>

Inheritance diagram for BDSSDSamplerLink:
Inheritance graph
Collaboration diagram for BDSSDSamplerLink:
Collaboration graph

Public Member Functions

 BDSSDSamplerLink (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.
 
void SetLinkRegistry (BDSLinkRegistry *registryIn)
 Update cached pointer of link registry.
 
void SetMinimumEK (G4double minimumEKIn)
 
void SetProtonsAndIonsOnly (G4bool protonsAndIonsOnlyIn)
 
- 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

BDSHitsCollectionSamplerLinksamplerLinkCollection
 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
 
BDSLinkRegistryregistry
 Cached pointer to registry as accessed many times.
 
G4double minimumEK
 Minimum kinetic energy to generate a hit for.
 
G4bool protonsAndIonsOnly
 Whether to return protons and ions only.
 

Detailed Description

The sensitive detector class that provides sensitivity to BDSSamplerLink instances.

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

Author
Laurie Nevay

Definition at line 42 of file BDSSDSamplerLink.hh.

Constructor & Destructor Documentation

◆ BDSSDSamplerLink()

BDSSDSamplerLink::BDSSDSamplerLink ( const G4String &  name)
explicit

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

Definition at line 41 of file BDSSDSamplerLink.cc.

◆ ~BDSSDSamplerLink()

BDSSDSamplerLink::~BDSSDSamplerLink ( )
virtual

Definition at line 53 of file BDSSDSamplerLink.cc.

Member Function Documentation

◆ Initialize()

void BDSSDSamplerLink::Initialize ( G4HCofThisEvent *  HCE)
virtual

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

Definition at line 56 of file BDSSDSamplerLink.cc.

References itsCollectionName, itsHCID, and samplerLinkCollection.

◆ last()

G4VHit * BDSSDSamplerLink::last ( ) const
virtual

Provide access to last hit.

Implements BDSSensitiveDetector.

Definition at line 172 of file BDSSDSamplerLink.cc.

References samplerLinkCollection.

◆ ProcessHits()

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

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

Definition at line 67 of file BDSSDSamplerLink.cc.

References BDS::IsIon(), minimumEK, protonsAndIonsOnly, registry, and samplerLinkCollection.

Here is the call graph for this function:

◆ SetLinkRegistry()

void BDSSDSamplerLink::SetLinkRegistry ( BDSLinkRegistry registryIn)
inline

Update cached pointer of link registry.

Definition at line 61 of file BDSSDSamplerLink.hh.

References registry.

Referenced by BDSSDManager::SetLinkRegistry().

Here is the caller graph for this function:

◆ SetMinimumEK()

void BDSSDSamplerLink::SetMinimumEK ( G4double  minimumEKIn)
inline

Definition at line 63 of file BDSSDSamplerLink.hh.

◆ SetProtonsAndIonsOnly()

void BDSSDSamplerLink::SetProtonsAndIonsOnly ( G4bool  protonsAndIonsOnlyIn)
inline

Definition at line 64 of file BDSSDSamplerLink.hh.

Field Documentation

◆ itsCollectionName

G4String BDSSDSamplerLink::itsCollectionName
private

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

Definition at line 71 of file BDSSDSamplerLink.hh.

Referenced by Initialize().

◆ itsHCID

G4int BDSSDSamplerLink::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 76 of file BDSSDSamplerLink.hh.

Referenced by Initialize().

◆ minimumEK

G4double BDSSDSamplerLink::minimumEK
private

Minimum kinetic energy to generate a hit for.

Definition at line 82 of file BDSSDSamplerLink.hh.

Referenced by ProcessHits().

◆ protonsAndIonsOnly

G4bool BDSSDSamplerLink::protonsAndIonsOnly
private

Whether to return protons and ions only.

Definition at line 85 of file BDSSDSamplerLink.hh.

Referenced by ProcessHits().

◆ registry

BDSLinkRegistry* BDSSDSamplerLink::registry
private

Cached pointer to registry as accessed many times.

Definition at line 79 of file BDSSDSamplerLink.hh.

Referenced by ProcessHits(), and SetLinkRegistry().

◆ samplerLinkCollection

BDSHitsCollectionSamplerLink* BDSSDSamplerLink::samplerLinkCollection
private

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

Definition at line 68 of file BDSSDSamplerLink.hh.

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


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