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

Construction of the geometry in the case of a link model. More...

#include <BDSLinkDetectorConstruction.hh>

Inheritance diagram for BDSLinkDetectorConstruction:
Inheritance graph
Collaboration diagram for BDSLinkDetectorConstruction:
Collaboration graph

Public Member Functions

 BDSLinkDetectorConstruction ()
 Default constructor. More...
 
virtual G4VPhysicalVolume * Construct ()
 
G4int AddLinkCollimatorJaw (const std::string &collimatorName, const std::string &materialName, G4double length, G4double halfApertureLeft, G4double halfApertureRight, G4double rotation, G4double xOffset, G4double yOffset, G4bool buildLeftJaw=true, G4bool buildRightJaw=true, G4bool isACrystal=false, G4double crystalAngle=0, G4bool sampleIn=false)
 Interface to append a collimator of jaw style to the linking. More...
 
void SetDesignParticle (const BDSParticleDefinition *defIn)
 Set the design particle definition. More...
 
void SetPrimaryGeneratorAction (BDSLinkPrimaryGeneratorAction *pgIn)
 
void BuildPhysicsBias ()
 
const std::map< std::string, G4int > & NameToElementIndex () const
 
const std::map< int, int > & LinkIDToBeamlineIndex () const
 
G4int NumberOfElements () const
 
void SetSamplerWorldID (G4int samplerWorldIDIn)
 
const BDSBeamlineLinkBeamline () const
 
BDSExtent WorldExtent () const
 Accessor. More...
 
BDSLinkRegistryLinkRegistry () const
 Accessor. More...
 

Private Member Functions

void UpdateWorldSolid ()
 
G4int PlaceOneComponent (const BDSBeamlineElement *element, const G4String &originalName)
 Place a beam line element in the world. More...
 

Private Attributes

G4Box * worldSolid
 
G4VPhysicalVolume * worldPV
 
BDSExtent worldExtent
 
BDSBeamlinelinkBeamline
 
BDSLinkRegistrylinkRegistry
 
BDSLinkPrimaryGeneratorActionprimaryGeneratorAction
 
const BDSParticleDefinitiondesignParticle
 Particle definition all components are built w.r.t. Includes rigidity etc. More...
 
G4ChannelingOptrMultiParticleChangeCrossSection * crystalBiasing
 
G4int samplerWorldID
 Cache of the index to which parallel world the sampler one is. More...
 
std::map< std::string, G4int > nameToElementIndex
 Build up a copy here too. More...
 
std::map< G4int, G4int > linkIDToBeamlineIndex
 Special linkID to linkBeamline index. More...
 

Detailed Description

Construction of the geometry in the case of a link model.

Author
Laurie Nevay

Definition at line 47 of file BDSLinkDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ BDSLinkDetectorConstruction()

BDSLinkDetectorConstruction::BDSLinkDetectorConstruction ( )

Default constructor.

Definition at line 65 of file BDSLinkDetectorConstruction.cc.

References BDSSDManager::SetLinkRegistry().

Here is the call graph for this function:

◆ ~BDSLinkDetectorConstruction()

BDSLinkDetectorConstruction::~BDSLinkDetectorConstruction ( )
virtual

Definition at line 81 of file BDSLinkDetectorConstruction.cc.

Member Function Documentation

◆ AddLinkCollimatorJaw()

G4int BDSLinkDetectorConstruction::AddLinkCollimatorJaw ( const std::string &  collimatorName,
const std::string &  materialName,
G4double  length,
G4double  halfApertureLeft,
G4double  halfApertureRight,
G4double  rotation,
G4double  xOffset,
G4double  yOffset,
G4bool  buildLeftJaw = true,
G4bool  buildRightJaw = true,
G4bool  isACrystal = false,
G4double  crystalAngle = 0,
G4bool  sampleIn = false 
)

Interface to append a collimator of jaw style to the linking.

Definition at line 179 of file BDSLinkDetectorConstruction.cc.

References designParticle, BDS::LowerCase(), and GMAD::Element::type.

Referenced by BDSIMLink::AddLinkCollimatorJaw().

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

◆ BuildPhysicsBias()

void BDSLinkDetectorConstruction::BuildPhysicsBias ( )

Definition at line 399 of file BDSLinkDetectorConstruction.cc.

◆ Construct()

G4VPhysicalVolume * BDSLinkDetectorConstruction::Construct ( )
virtual

Definition at line 90 of file BDSLinkDetectorConstruction.cc.

◆ LinkBeamline()

const BDSBeamline * BDSLinkDetectorConstruction::LinkBeamline ( ) const
inline

Definition at line 87 of file BDSLinkDetectorConstruction.hh.

◆ LinkIDToBeamlineIndex()

const std::map< int, int > & BDSLinkDetectorConstruction::LinkIDToBeamlineIndex ( ) const
inline

Definition at line 84 of file BDSLinkDetectorConstruction.hh.

◆ LinkRegistry()

BDSLinkRegistry * BDSLinkDetectorConstruction::LinkRegistry ( ) const
inline

Accessor.

Definition at line 78 of file BDSLinkDetectorConstruction.hh.

Referenced by BDSLinkPrimaryGeneratorAction::GeneratePrimaries().

Here is the caller graph for this function:

◆ NameToElementIndex()

const std::map< std::string, G4int > & BDSLinkDetectorConstruction::NameToElementIndex ( ) const
inline

Definition at line 83 of file BDSLinkDetectorConstruction.hh.

◆ NumberOfElements()

G4int BDSLinkDetectorConstruction::NumberOfElements ( ) const
inline

Definition at line 85 of file BDSLinkDetectorConstruction.hh.

◆ PlaceOneComponent()

G4int BDSLinkDetectorConstruction::PlaceOneComponent ( const BDSBeamlineElement element,
const G4String &  originalName 
)
private

◆ SetDesignParticle()

void BDSLinkDetectorConstruction::SetDesignParticle ( const BDSParticleDefinition defIn)
inline

Set the design particle definition.

Definition at line 72 of file BDSLinkDetectorConstruction.hh.

References designParticle.

Referenced by BDSIMLink::Initialise().

Here is the caller graph for this function:

◆ SetPrimaryGeneratorAction()

void BDSLinkDetectorConstruction::SetPrimaryGeneratorAction ( BDSLinkPrimaryGeneratorAction pgIn)
inline

Definition at line 73 of file BDSLinkDetectorConstruction.hh.

◆ SetSamplerWorldID()

void BDSLinkDetectorConstruction::SetSamplerWorldID ( G4int  samplerWorldIDIn)
inline

Definition at line 86 of file BDSLinkDetectorConstruction.hh.

◆ UpdateWorldSolid()

void BDSLinkDetectorConstruction::UpdateWorldSolid ( )
private

Create the worldSolid if it doesn't exist and if not expand it to the extent of the linkBeamline member. Update worldExtent member also.

Definition at line 330 of file BDSLinkDetectorConstruction.cc.

References BDSExtentGlobal::ExpandToEncompass(), BDSExtentGlobal::GetMaximumExtentAbsolute(), and BDSLinkPrimaryGeneratorAction::SetWorldExtent().

Here is the call graph for this function:

◆ WorldExtent()

BDSExtent BDSLinkDetectorConstruction::WorldExtent ( ) const
inline

Accessor.

Definition at line 77 of file BDSLinkDetectorConstruction.hh.

Field Documentation

◆ crystalBiasing

G4ChannelingOptrMultiParticleChangeCrossSection* BDSLinkDetectorConstruction::crystalBiasing
private

Definition at line 108 of file BDSLinkDetectorConstruction.hh.

◆ designParticle

const BDSParticleDefinition* BDSLinkDetectorConstruction::designParticle
private

Particle definition all components are built w.r.t. Includes rigidity etc.

Definition at line 105 of file BDSLinkDetectorConstruction.hh.

Referenced by AddLinkCollimatorJaw(), and SetDesignParticle().

◆ linkBeamline

BDSBeamline* BDSLinkDetectorConstruction::linkBeamline
private

Definition at line 100 of file BDSLinkDetectorConstruction.hh.

◆ linkIDToBeamlineIndex

std::map<G4int, G4int> BDSLinkDetectorConstruction::linkIDToBeamlineIndex
private

Special linkID to linkBeamline index.

Definition at line 115 of file BDSLinkDetectorConstruction.hh.

◆ linkRegistry

BDSLinkRegistry* BDSLinkDetectorConstruction::linkRegistry
private

Definition at line 101 of file BDSLinkDetectorConstruction.hh.

◆ nameToElementIndex

std::map<std::string, G4int> BDSLinkDetectorConstruction::nameToElementIndex
private

Build up a copy here too.

Definition at line 114 of file BDSLinkDetectorConstruction.hh.

◆ primaryGeneratorAction

BDSLinkPrimaryGeneratorAction* BDSLinkDetectorConstruction::primaryGeneratorAction
private

Definition at line 102 of file BDSLinkDetectorConstruction.hh.

◆ samplerWorldID

G4int BDSLinkDetectorConstruction::samplerWorldID
private

Cache of the index to which parallel world the sampler one is.

Definition at line 112 of file BDSLinkDetectorConstruction.hh.

Referenced by PlaceOneComponent().

◆ worldExtent

BDSExtent BDSLinkDetectorConstruction::worldExtent
private

Definition at line 99 of file BDSLinkDetectorConstruction.hh.

◆ worldPV

G4VPhysicalVolume* BDSLinkDetectorConstruction::worldPV
private

Definition at line 98 of file BDSLinkDetectorConstruction.hh.

◆ worldSolid

G4Box* BDSLinkDetectorConstruction::worldSolid
private

Definition at line 97 of file BDSLinkDetectorConstruction.hh.


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