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

The sensitive detector class that provides sensitivity to record thin thing hits. More...

#include <BDSSDThinThing.hh>

Inheritance diagram for BDSSDThinThing:
Inheritance graph
Collaboration diagram for BDSSDThinThing:
Collaboration graph

Public Member Functions

 BDSSDThinThing (const G4String &name, const BDS::TrajectoryOptions &trajectoryOptionsIn)
 Include unique name for each instance. More...
 
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. More...
 
BDSSDThinThingoperator= (const BDSSDThinThing &)=delete
 Assignment and copy constructor not implemented nor used.
 
 BDSSDThinThing (BDSSDThinThing &)=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 Attributes

BDSHitsCollectionThinThingthinThingCollection
 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...
 
G4int itsHCID
 
const G4bool storeTrajectoryLocal
 
const G4bool storeTrajectoryLinks
 
const G4bool storeTrajectoryIon
 

Detailed Description

The sensitive detector class that provides sensitivity to record thin thing hits.

The purpose of this class is to identify a primary scatter point in a very thing object such as a wire or gas volume. In such a case, the primary may loose energy due to ionisation or multiple scattering in an AlongStep process but Geant4 will report Transportation as the process that defined the step length. Therefore, we conventionally don't identify it as a scatter point as it's indistinguishable from a transportation step (ie physics process didn't define the step).

Practically, without this ability we would see primaries lost in the model due to a change in energy but the primary not have 'hit' anything.

Author
Laurie Nevay

Definition at line 55 of file BDSSDThinThing.hh.

Constructor & Destructor Documentation

◆ BDSSDThinThing()

BDSSDThinThing::BDSSDThinThing ( const G4String &  name,
const BDS::TrajectoryOptions trajectoryOptionsIn 
)

Include unique name for each instance.

Definition at line 37 of file BDSSDThinThing.cc.

◆ ~BDSSDThinThing()

BDSSDThinThing::~BDSSDThinThing ( )
virtual

Definition at line 50 of file BDSSDThinThing.cc.

Member Function Documentation

◆ Initialize()

void BDSSDThinThing::Initialize ( G4HCofThisEvent *  HCE)
overridevirtual

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

Definition at line 53 of file BDSSDThinThing.cc.

References itsCollectionName, itsHCID, and thinThingCollection.

◆ last()

G4VHit * BDSSDThinThing::last ( ) const
overridevirtual

Return the last collimator hit.

Implements BDSSensitiveDetector.

Definition at line 106 of file BDSSDThinThing.cc.

References thinThingCollection.

◆ ProcessHits()

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

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

Definition at line 68 of file BDSSDThinThing.cc.

References ProcessHitsOrdered().

Here is the call graph for this function:

◆ ProcessHitsOrdered()

G4bool BDSSDThinThing::ProcessHitsOrdered ( G4Step *  step,
G4TouchableHistory *  rOHist,
const std::vector< G4VHit * > &  hits 
)
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 74 of file BDSSDThinThing.cc.

References BDSGlobalConstants::Instance(), BDS::IsFinite(), BDSTrajectoryPoint::IsScatteringPoint(), and thinThingCollection.

Referenced by ProcessHits().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ itsCollectionName

G4String BDSSDThinThing::itsCollectionName
private

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

Definition at line 92 of file BDSSDThinThing.hh.

Referenced by Initialize().

◆ itsHCID

G4int BDSSDThinThing::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 97 of file BDSSDThinThing.hh.

Referenced by Initialize().

◆ storeTrajectoryIon

const G4bool BDSSDThinThing::storeTrajectoryIon
private

Definition at line 101 of file BDSSDThinThing.hh.

◆ storeTrajectoryLinks

const G4bool BDSSDThinThing::storeTrajectoryLinks
private

Definition at line 100 of file BDSSDThinThing.hh.

◆ storeTrajectoryLocal

const G4bool BDSSDThinThing::storeTrajectoryLocal
private

Definition at line 99 of file BDSSDThinThing.hh.

◆ thinThingCollection

BDSHitsCollectionThinThing* BDSSDThinThing::thinThingCollection
private

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

Definition at line 89 of file BDSSDThinThing.hh.

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


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