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

Generates BDSHitsEnergyDepositions from step information - uses curvilinear coords. More...

#include <BDSSDEnergyDeposition.hh>

Inheritance diagram for BDSSDEnergyDeposition:
Inheritance graph
Collaboration diagram for BDSSDEnergyDeposition:
Collaboration graph

Public Member Functions

 BDSSDEnergyDeposition (const G4String &name, G4bool storeExtrasIn, G4bool killedParticleMassAddedToElossIn=false)
 
BDSSDEnergyDepositionoperator= (const BDSSDEnergyDeposition &)=delete
 assignment and copy constructor not implemented nor used
 
 BDSSDEnergyDeposition (BDSSDEnergyDeposition &)=delete
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *th)
 
virtual G4bool ProcessHitsTrack (const G4Track *track, G4TouchableHistory *th)
 
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

G4bool storeExtras
 Whether to store extra information. More...
 
G4bool killedParticleMassAddedToEloss
 In the case of a G4Track being deposited. More...
 
G4String colName
 Collection name. More...
 
BDSHitsCollectionEnergyDepositionhits
 
G4int HCIDe
 
BDSAuxiliaryNavigatorauxNavigator
 Navigator for checking points in read out geometry. More...
 

Detailed Description

Generates BDSHitsEnergyDepositions from step information - uses curvilinear coords.

This class interrogates a G4Step and generates an energy deposition hit if there was a change in energy. This assigns the energy deposition to a point randomly (uniformly) along the step. It also uses a BDSAuxiliaryNavigator instance to use transforms from the curvilinear parallel world for curvilinear coordinates.

Definition at line 41 of file BDSSDEnergyDeposition.hh.

Constructor & Destructor Documentation

◆ BDSSDEnergyDeposition()

BDSSDEnergyDeposition::BDSSDEnergyDeposition ( const G4String &  name,
G4bool  storeExtrasIn,
G4bool  killedParticleMassAddedToElossIn = false 
)

Definition at line 43 of file BDSSDEnergyDeposition.cc.

◆ ~BDSSDEnergyDeposition()

BDSSDEnergyDeposition::~BDSSDEnergyDeposition ( )
virtual

Definition at line 57 of file BDSSDEnergyDeposition.cc.

Member Function Documentation

◆ Initialize()

void BDSSDEnergyDeposition::Initialize ( G4HCofThisEvent *  HCE)
virtual

Definition at line 62 of file BDSSDEnergyDeposition.cc.

◆ last()

G4VHit * BDSSDEnergyDeposition::last ( ) const
virtual

Provide access to last hit.

Implements BDSSensitiveDetector.

Definition at line 342 of file BDSSDEnergyDeposition.cc.

◆ ProcessHits()

G4bool BDSSDEnergyDeposition::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *  th 
)
virtual

The standard interface here to process a step from Geant4. Record all the relevant coordinates here. Records the energy deposited along the step.

Definition at line 74 of file BDSSDEnergyDeposition.cc.

References auxNavigator, BDSAuxiliaryNavigator::ConvertToLocal(), BDSPhysicalVolumeInfoRegistry::GetInfo(), BDSPhysicalVolumeInfo::GetSPos(), BDSGlobalConstants::Instance(), BDSPhysicalVolumeInfoRegistry::Instance(), BDS::IsFinite(), BDSStep::PreStepPoint(), storeExtras, and BDSStep::VolumeForTransform().

Here is the call graph for this function:

◆ ProcessHitsTrack()

G4bool BDSSDEnergyDeposition::ProcessHitsTrack ( const G4Track *  track,
G4TouchableHistory *  th 
)
virtual

An extra interface that can be used when artificially killing a track to add that kill action as energy deposition of the particle there. Note, this method always uses the total energy of the particle. There is no step here, so it's just the total energy of the particle.

Definition at line 222 of file BDSSDEnergyDeposition.cc.

References auxNavigator, BDSAuxiliaryNavigator::ConvertToLocal(), BDSPhysicalVolumeInfoRegistry::GetInfo(), BDSPhysicalVolumeInfo::GetSPos(), BDSGlobalConstants::Instance(), BDSPhysicalVolumeInfoRegistry::Instance(), BDS::IsFinite(), killedParticleMassAddedToEloss, BDSStep::PreStepPoint(), storeExtras, and BDSStep::VolumeForTransform().

Here is the call graph for this function:

Field Documentation

◆ auxNavigator

BDSAuxiliaryNavigator* BDSSDEnergyDeposition::auxNavigator
private

Navigator for checking points in read out geometry.

Definition at line 80 of file BDSSDEnergyDeposition.hh.

Referenced by ProcessHits(), and ProcessHitsTrack().

◆ colName

G4String BDSSDEnergyDeposition::colName
private

Collection name.

Definition at line 75 of file BDSSDEnergyDeposition.hh.

◆ HCIDe

G4int BDSSDEnergyDeposition::HCIDe
private

Definition at line 77 of file BDSSDEnergyDeposition.hh.

◆ hits

BDSHitsCollectionEnergyDeposition* BDSSDEnergyDeposition::hits
private

Definition at line 76 of file BDSSDEnergyDeposition.hh.

◆ killedParticleMassAddedToEloss

G4bool BDSSDEnergyDeposition::killedParticleMassAddedToEloss
private

In the case of a G4Track being deposited.

Definition at line 74 of file BDSSDEnergyDeposition.hh.

Referenced by ProcessHitsTrack().

◆ storeExtras

G4bool BDSSDEnergyDeposition::storeExtras
private

Whether to store extra information.

Definition at line 73 of file BDSSDEnergyDeposition.hh.

Referenced by ProcessHits(), and ProcessHitsTrack().


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