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

Class that constructs a Geant4 model of an accelerator. More...

#include <BDSDetectorConstruction.hh>

Inheritance diagram for BDSDetectorConstruction:
Inheritance graph
Collaboration diagram for BDSDetectorConstruction:
Collaboration graph

Public Member Functions

 BDSDetectorConstruction (BDSComponentFactoryUser *userComponentFactoryIn=nullptr)
 
void UpdateSamplerDiameterAndCountSamplers ()
 
virtual G4VPhysicalVolume * Construct ()
 
virtual void ConstructSDandField ()
 Construct sensitive detectors and fields.
 
void BuildPhysicsBias ()
 
void SetDesignParticle (const BDSParticleDefinition *defIn)
 Set the design particle definition.
 
BDSExtent WorldExtent () const
 Public access to the world extent.
 
const std::vector< BDSFieldQueryInfo * > & FieldQueries () const
 Access vector of query objects.
 
G4bool BuildSamplerWorld () const
 
G4bool BuildPlacementFieldsWorld () const
 

Static Public Member Functions

static void PlaceBeamlineInWorld (BDSBeamline *beamline, G4VPhysicalVolume *containerPV, G4bool checkOverlaps=false, G4bool setRegions=false, G4bool registerInfo=false, G4bool useCLPlacementTransform=false, G4bool useIncrementalCopyNumbers=false, G4bool registerPlacementNamesForOutput=false)
 
static G4Transform3D CreatePlacementTransform (const GMAD::Placement &placement, const BDSBeamline *beamLine, G4double *S=nullptr, BDSExtent *placementExtent=nullptr, const G4String &objectTypeForErrorMsg="placement")
 
static G4Transform3D CreatePlacementTransform (const GMAD::ScorerMesh &scorerMesh, const BDSBeamline *beamLine, G4double *S=nullptr)
 placement and uses the above function.
 
static G4Transform3D CreatePlacementTransform (const GMAD::SamplerPlacement &samplerPlacement, const BDSBeamline *beamLine, G4double *S=nullptr)
 
static G4Transform3D CreatePlacementTransform (const GMAD::BLMPlacement &blmPlacement, const BDSBeamline *beamLine, G4double *S=nullptr, BDSExtent *blmExtent=nullptr)
 Create a blm placement from a blm placement.
 
static G4Transform3D CreatePlacementTransform (const GMAD::Query &queryPlacement, const BDSBeamline *beamLine, G4double *S=nullptr)
 Create a query placement from a query placement.
 
static G4ThreeVector SideToLocalOffset (const GMAD::Placement &placement, const BDSBeamline *beamLine, const BDSExtent &placementExtent)
 Attach component with extent2 to component with extent1 with placement.
 
static BDSSamplerInfoBuildSamplerInfo (const GMAD::Element *element)
 
static std::vector< BDSFieldQueryInfo * > PrepareFieldQueries (const BDSBeamline *mainBeamline)
 Prepare field queries from parser information.
 

Private Member Functions

BDSDetectorConstructionoperator= (const BDSDetectorConstruction &)=delete
 assignment and copy constructor not implemented nor used
 
 BDSDetectorConstruction (BDSDetectorConstruction &)=delete
 
void PrepareExtraSamplerSDs ()
 
void CountPlacementFields ()
 Count number of fields required for placements.
 
void InitialiseRegions ()
 Create and set parameters for various G4Regions.
 
void InitialiseApertures ()
 Create all aperture definitions from parser and store in BDSAcceleratorModel.
 
void BuildBeamlines ()
 Build the main beam line and then any other required beam lines.
 
BDSBeamlineSet BuildBeamline (const GMAD::FastList< GMAD::Element > &beamLine, const G4String &name, const G4Transform3D &initialTransform=G4Transform3D(), G4double initialS=0.0, G4bool beamlineIsCircular=false, G4bool isPlacementBeamline=false)
 
void BuildTunnel ()
 Build the tunnel around the already constructed flat beam line.
 
G4VPhysicalVolume * BuildWorld ()
 
void ComponentPlacement (G4VPhysicalVolume *worldPV)
 Place beam line, tunnel beam line, end pieces and placements in world.
 
G4bool UnsuitableFirstElement (std::list< GMAD::Element >::const_iterator element)
 
BDSExtent CalculateExtentOfSamplerPlacement (const GMAD::SamplerPlacement &sp) const
 Calculate local extent of custom user sampler.
 
BDSExtentGlobal CalculateExtentOfSamplerPlacements (const BDSBeamline *beamLine) const
 
BDSExtent CalculateExtentOfScorerMesh (const GMAD::ScorerMesh &sm) const
 Calculate local extent of scorer mesh in 3D.
 
BDSExtentGlobal CalculateExtentOfScorerMeshes (const BDSBeamline *bl) const
 
BDSBOptrMultiParticleChangeCrossSectionBuildCrossSectionBias (const std::list< std::string > &biasList, const std::list< std::string > &defaultBias, const G4String &elementName)
 Function that creates physics biasing cross section.
 
void ConstructScoringMeshes ()
 Construct scoring meshes.
 
void VerboseSensitivity () const
 Print out the sensitivity of every single volume so far constructed in the world.
 
void PrintSensitiveDetectorsOfLV (const G4LogicalVolume *lv, G4int currentDepth) const
 Recursive function to print out each sensitive detector name.
 
void PrintUserLimitsSummary (const G4VPhysicalVolume *world) const
 
void PrintUserLimitsPV (const G4VPhysicalVolume *aPV, G4double globalMinEK) const
 

Private Attributes

std::vector< BDSBOptrMultiParticleChangeCrossSection * > biasObjects
 List of bias objects - for memory management.
 
std::map< G4String, BDSBOptrMultiParticleChangeCrossSection * > biasSetObjects
 
bool debug = true
 
BDSAcceleratorModelacceleratorModel
 Accelerator model pointer.
 
std::vector< BDSFieldObjects * > fields
 All fields.
 
G4bool circular
 Whether or not we're building a circular machine.
 
BDSExtent worldExtent
 Record of the world extent.
 
BDSBeamlineplacementBL
 
const BDSParticleDefinitiondesignParticle
 Particle definition all components are built w.r.t. Includes rigidity etc.
 
G4bool canSampleAngledFaces
 Whether the integrator set permits sampling elements with angled faces.
 
BDSComponentFactoryUseruserComponentFactory
 
G4int nSamplers
 Count of number of samplers to be built.
 
G4bool buildPlacementFieldsWorld
 
std::set< G4LogicalVolume * > worldContentsLogicalVolumes
 Cache of possibly loaded logical volumes from a world geometry file - used for biasing.
 
std::set< G4LogicalVolume * > worldVacuumLogicalVolumes
 
G4LogicalVolume * worldLogicalVolume
 
std::vector< BDSFieldQueryInfo * > fieldQueries
 
G4bool verbose
 Variable copied from global constants.
 
G4bool checkOverlaps
 Variable copied from global constants.
 

Detailed Description

Class that constructs a Geant4 model of an accelerator.

Mandatory class that must be supplied for a valid Geant4 simulation. As construction is based on user input (via the parser) for a potentially large number of items, the construction process is factorised into key steps with member functions and makes use of factories for components and tunnel segments.

Maintained by Laurie Nevay & Jochem Snuverink

Definition at line 74 of file BDSDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ BDSDetectorConstruction()

BDSDetectorConstruction::BDSDetectorConstruction ( BDSComponentFactoryUser userComponentFactoryIn = nullptr)
explicit

Definition at line 125 of file BDSDetectorConstruction.cc.

◆ ~BDSDetectorConstruction()

BDSDetectorConstruction::~BDSDetectorConstruction ( )
virtual

Definition at line 291 of file BDSDetectorConstruction.cc.

Member Function Documentation

◆ BuildBeamline()

BDSBeamlineSet BDSDetectorConstruction::BuildBeamline ( const GMAD::FastList< GMAD::Element > &  beamLine,
const G4String &  name,
const G4Transform3D &  initialTransform = G4Transform3D(),
G4double  initialS = 0.0,
G4bool  beamlineIsCircular = false,
G4bool  isPlacementBeamline = false 
)
private

◆ BuildBeamlines()

void BDSDetectorConstruction::BuildBeamlines ( )
private

◆ BuildCrossSectionBias()

BDSBOptrMultiParticleChangeCrossSection * BDSDetectorConstruction::BuildCrossSectionBias ( const std::list< std::string > &  biasList,
const std::list< std::string > &  defaultBias,
const G4String &  elementName 
)
private

Function that creates physics biasing cross section.

Definition at line 1095 of file BDSDetectorConstruction.cc.

References biasObjects, GMAD::PhysicsBiasing::factor, GMAD::FastList< T >::find(), GMAD::PhysicsBiasing::flag, BDSParser::GetBiasing(), BDSParser::Instance(), GMAD::PhysicsBiasing::name, GMAD::PhysicsBiasing::particle, GMAD::PhysicsBiasing::process, and BDS::StrStrip().

Referenced by BuildPhysicsBias().

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

◆ BuildPhysicsBias()

void BDSDetectorConstruction::BuildPhysicsBias ( )

◆ BuildPlacementFieldsWorld()

G4bool BDSDetectorConstruction::BuildPlacementFieldsWorld ( ) const
inline

Definition at line 168 of file BDSDetectorConstruction.hh.

◆ BuildSamplerInfo()

BDSSamplerInfo * BDSDetectorConstruction::BuildSamplerInfo ( const GMAD::Element element)
static

Construct sampler specifications from a GMAD element. May return nullptr if none type is specified.

Definition at line 394 of file BDSDetectorConstruction.cc.

References GMAD::Element::samplerName, GMAD::Element::samplerParticleSetID, and GMAD::Element::samplerType.

Referenced by BuildBeamline().

Here is the caller graph for this function:

◆ BuildSamplerWorld()

G4bool BDSDetectorConstruction::BuildSamplerWorld ( ) const
inline

Whether to build a sampler world or not. If we've counted more than one sampler we should build the world in the end.

Definition at line 166 of file BDSDetectorConstruction.hh.

References nSamplers.

Referenced by BDSIM::Initialise().

Here is the caller graph for this function:

◆ BuildTunnel()

void BDSDetectorConstruction::BuildTunnel ( )
private

Build the tunnel around the already constructed flat beam line.

Definition at line 554 of file BDSDetectorConstruction.cc.

References acceleratorModel, BDSAcceleratorModel::BeamlineMain(), BDSTunnelBuilder::BuildTunnelSections(), BDSGlobalConstants::Instance(), and BDSAcceleratorModel::RegisterTunnelBeamline().

Referenced by ComponentPlacement(), and Construct().

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

◆ BuildWorld()

G4VPhysicalVolume * BDSDetectorConstruction::BuildWorld ( )
private

Build the world volume using the extent of the BDSBeamline instance created in BuildBeamline()

Give the pv info registry a heads up that these volumes don't have info (optimisation).

Definition at line 565 of file BDSDetectorConstruction.cc.

References acceleratorModel, BDSGeometryComponent::AttachSensitiveDetectors(), BDSAuxiliaryNavigator::AttachWorldVolumeToNavigator(), BDSFieldQuery::AttachWorldVolumeToNavigator(), BDSAcceleratorModel::BeamlineSetMain(), BDSGeometryFactory::BuildGeometry(), CalculateExtentOfSamplerPlacements(), CalculateExtentOfScorerMeshes(), checkOverlaps, BDSExtentGlobal::Encompasses(), BDSAcceleratorModel::ExtraBeamlines(), BDSGeometryComponent::GetAllLogicalVolumes(), BDSGeometryComponent::GetContainerLogicalVolume(), BDSGeometryComponent::GetContainerSolid(), BDSGeometryComponent::GetExtent(), BDSBeamline::GetExtentGlobal(), BDSBeamlineSet::GetExtentGlobals(), BDSMaterials::GetMaterial(), BDSGeometryFactory::Instance(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDSPhysicalVolumeInfoRegistry::Instance(), BDSAcceleratorModel::PlacementBeamline(), BDSPhysicalVolumeInfoRegistry::RegisterExcludedPV(), BDSAcceleratorModel::RegisterWorldLV(), BDSAcceleratorModel::RegisterWorldPV(), BDSAcceleratorModel::RegisterWorldSolid(), BDS::SplitOnWhiteSpace(), BDSAcceleratorModel::TunnelBeamline(), BDSGlobalConstants::UseImportanceSampling(), BDSGeometryExternal::VacuumVolumes(), worldContentsLogicalVolumes, and worldExtent.

Referenced by Construct().

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

◆ CalculateExtentOfSamplerPlacement()

BDSExtent BDSDetectorConstruction::CalculateExtentOfSamplerPlacement ( const GMAD::SamplerPlacement sp) const
private

Calculate local extent of custom user sampler.

Definition at line 1024 of file BDSDetectorConstruction.cc.

References BDSAcceleratorModel::Aperture(), BDSApertureInfo::Extent(), GMAD::SamplerPlacement::name, GMAD::SamplerPlacement::samplerType, BDSExtent::XNeg(), BDSExtent::XPos(), BDSExtent::YNeg(), and BDSExtent::YPos().

Referenced by CalculateExtentOfSamplerPlacements().

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

◆ CalculateExtentOfSamplerPlacements()

BDSExtentGlobal BDSDetectorConstruction::CalculateExtentOfSamplerPlacements ( const BDSBeamline beamLine) const
private

Calculate the maximum global extent of all sampler placements from the parser. Beam line supplied to calculate placements in some cases.

Definition at line 1059 of file BDSDetectorConstruction.cc.

References CalculateExtentOfSamplerPlacement(), CreatePlacementTransform(), BDSExtentGlobal::ExpandToEncompass(), BDSParser::GetSamplerPlacements(), and BDSParser::Instance().

Referenced by BuildWorld().

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

◆ CalculateExtentOfScorerMesh()

BDSExtent BDSDetectorConstruction::CalculateExtentOfScorerMesh ( const GMAD::ScorerMesh sm) const
private

Calculate local extent of scorer mesh in 3D.

Definition at line 1073 of file BDSDetectorConstruction.cc.

Referenced by CalculateExtentOfScorerMeshes().

Here is the caller graph for this function:

◆ CalculateExtentOfScorerMeshes()

BDSExtentGlobal BDSDetectorConstruction::CalculateExtentOfScorerMeshes ( const BDSBeamline bl) const
private

Calculate the maximum global extent of all scoerer meshes from the parser. Beam line supplied to calculate placements in some cases.

Definition at line 1079 of file BDSDetectorConstruction.cc.

References CalculateExtentOfScorerMesh(), CreatePlacementTransform(), BDSExtentGlobal::ExpandToEncompass(), BDSParser::GetScorerMesh(), and BDSParser::Instance().

Referenced by BuildWorld().

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

◆ ComponentPlacement()

void BDSDetectorConstruction::ComponentPlacement ( G4VPhysicalVolume *  worldPV)
private

Place beam line, tunnel beam line, end pieces and placements in world.

Definition at line 733 of file BDSDetectorConstruction.cc.

References acceleratorModel, BDSAcceleratorModel::BeamlineSetMain(), BuildTunnel(), checkOverlaps, BDSAcceleratorModel::ExtraBeamlines(), BDSGlobalConstants::Instance(), PlaceBeamlineInWorld(), placementBL, and BDSAcceleratorModel::TunnelBeamline().

Referenced by Construct().

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

◆ Construct()

G4VPhysicalVolume * BDSDetectorConstruction::Construct ( )
virtual

◆ ConstructScoringMeshes()

void BDSDetectorConstruction::ConstructScoringMeshes ( )
private

◆ ConstructSDandField()

void BDSDetectorConstruction::ConstructSDandField ( )
virtual

Construct sensitive detectors and fields.

Definition at line 1285 of file BDSDetectorConstruction.cc.

References acceleratorModel, ConstructScoringMeshes(), BDSFieldBuilder::Instance(), and BDSAcceleratorModel::RegisterFields().

Here is the call graph for this function:

◆ CountPlacementFields()

void BDSDetectorConstruction::CountPlacementFields ( )
private

Count number of fields required for placements.

Definition at line 223 of file BDSDetectorConstruction.cc.

References BDSParser::GetPlacements(), and BDSParser::Instance().

Here is the call graph for this function:

◆ CreatePlacementTransform() [1/5]

G4Transform3D BDSDetectorConstruction::CreatePlacementTransform ( const GMAD::BLMPlacement blmPlacement,
const BDSBeamline beamLine,
G4double *  S = nullptr,
BDSExtent blmExtent = nullptr 
)
static

Create a blm placement from a blm placement.

Definition at line 953 of file BDSDetectorConstruction.cc.

References CreatePlacementTransform().

Here is the call graph for this function:

◆ CreatePlacementTransform() [2/5]

G4Transform3D BDSDetectorConstruction::CreatePlacementTransform ( const GMAD::Placement placement,
const BDSBeamline beamLine,
G4double *  S = nullptr,
BDSExtent placementExtent = nullptr,
const G4String &  objectTypeForErrorMsg = "placement" 
)
static

Create a transform based on the information in the placement. If S is supplied, it's updated with the final S coordinate calculated. If an extent is given - only in the case of a placement transform w.r.t. the curvilinear system (ie not global) - the side parameter from the placement is used to include an offset to the edge of the element.

Definition at line 826 of file BDSDetectorConstruction.cc.

References GMAD::Placement::angle, GMAD::Placement::axisAngle, GMAD::Placement::axisX, GMAD::Placement::axisY, GMAD::Placement::axisZ, BDSBeamline::GetElement(), BDSBeamline::GetGlobalEuclideanTransform(), BDSBeamlineElement::GetSPositionMiddle(), BDS::IsFinite(), GMAD::Placement::name, GMAD::Placement::phi, GMAD::Placement::psi, GMAD::Placement::referenceElement, GMAD::Placement::referenceElementNumber, GMAD::Placement::s, SideToLocalOffset(), GMAD::Placement::theta, GMAD::Placement::x, GMAD::Placement::y, and GMAD::Placement::z.

Referenced by BuildBeamlines(), BDS::BuildBLMs(), BDS::BuildPlacementGeometry(), CalculateExtentOfSamplerPlacements(), CalculateExtentOfScorerMeshes(), BDSParallelWorldSampler::Construct(), ConstructScoringMeshes(), CreatePlacementTransform(), and PrepareFieldQueries().

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

◆ CreatePlacementTransform() [3/5]

G4Transform3D BDSDetectorConstruction::CreatePlacementTransform ( const GMAD::Query queryPlacement,
const BDSBeamline beamLine,
G4double *  S = nullptr 
)
static

Create a query placement from a query placement.

Definition at line 963 of file BDSDetectorConstruction.cc.

References CreatePlacementTransform().

Here is the call graph for this function:

◆ CreatePlacementTransform() [4/5]

G4Transform3D BDSDetectorConstruction::CreatePlacementTransform ( const GMAD::SamplerPlacement samplerPlacement,
const BDSBeamline beamLine,
G4double *  S = nullptr 
)
static

Create a sampler placement transform. Turns the sampler placement into a placement and uses the above function.

Definition at line 944 of file BDSDetectorConstruction.cc.

References CreatePlacementTransform().

Here is the call graph for this function:

◆ CreatePlacementTransform() [5/5]

G4Transform3D BDSDetectorConstruction::CreatePlacementTransform ( const GMAD::ScorerMesh scorerMesh,
const BDSBeamline beamLine,
G4double *  S = nullptr 
)
static

placement and uses the above function.

Definition at line 935 of file BDSDetectorConstruction.cc.

References CreatePlacementTransform().

Here is the call graph for this function:

◆ FieldQueries()

const std::vector< BDSFieldQueryInfo * > & BDSDetectorConstruction::FieldQueries ( ) const
inline

Access vector of query objects.

Definition at line 103 of file BDSDetectorConstruction.hh.

◆ InitialiseApertures()

void BDSDetectorConstruction::InitialiseApertures ( )
private

Create all aperture definitions from parser and store in BDSAcceleratorModel.

Definition at line 314 of file BDSDetectorConstruction.cc.

References acceleratorModel, BDSParser::Instance(), and BDSAcceleratorModel::RegisterApertures().

Referenced by Construct().

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

◆ InitialiseRegions()

void BDSDetectorConstruction::InitialiseRegions ( )
private

Create and set parameters for various G4Regions.

Definition at line 302 of file BDSDetectorConstruction.cc.

References acceleratorModel, BDSParser::Instance(), and BDSAcceleratorModel::RegisterRegion().

Referenced by Construct().

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

◆ PlaceBeamlineInWorld()

void BDSDetectorConstruction::PlaceBeamlineInWorld ( BDSBeamline beamline,
G4VPhysicalVolume *  containerPV,
G4bool  checkOverlaps = false,
G4bool  setRegions = false,
G4bool  registerInfo = false,
G4bool  useCLPlacementTransform = false,
G4bool  useIncrementalCopyNumbers = false,
G4bool  registerPlacementNamesForOutput = false 
)
static

Loop over a beam line and place elements in a container (world). If a sensitive detector is specified in each component, this is applied to each volume. If regions are desired, the element is looked up in the region definitions and that is set up. If registerInfo, physical volume info is created and placed in a pv info registry. Public and static so it can be used by parallel world constructors. Last argument is whether to use the placement transform for curvilinear coordinate geometry that's different in the case of tilted dipoles.

Definition at line 769 of file BDSDetectorConstruction.cc.

References checkOverlaps, BDSPhysicalVolumeInfoRegistry::Instance(), BDSAcceleratorModel::Region(), BDSPhysicalVolumeInfoRegistry::RegisterInfo(), and BDSPhysicalVolumeInfoRegistry::RegisterPVsForOutput().

Referenced by ComponentPlacement(), BDSParallelWorldCurvilinear::Construct(), and BDSParallelWorldCurvilinearBridge::Construct().

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

◆ PrepareExtraSamplerSDs()

void BDSDetectorConstruction::PrepareExtraSamplerSDs ( )
private

Prepare extra sampler sensitive detector classes required if we have any particle filters created for samplers.

Definition at line 217 of file BDSDetectorConstruction.cc.

References BDSSDManager::ConstructSamplerSDsForParticleSets(), and BDSParser::Instance().

Here is the call graph for this function:

◆ PrepareFieldQueries()

std::vector< BDSFieldQueryInfo * > BDSDetectorConstruction::PrepareFieldQueries ( const BDSBeamline mainBeamline)
static

Prepare field queries from parser information.

Definition at line 1410 of file BDSDetectorConstruction.cc.

References CreatePlacementTransform(), BDSParser::GetQuery(), BDSParser::Instance(), and BDS::LoadFieldQueryPoints().

Referenced by Construct().

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

◆ PrintSensitiveDetectorsOfLV()

void BDSDetectorConstruction::PrintSensitiveDetectorsOfLV ( const G4LogicalVolume *  lv,
G4int  currentDepth 
) const
private

Recursive function to print out each sensitive detector name.

Definition at line 1505 of file BDSDetectorConstruction.cc.

References PrintSensitiveDetectorsOfLV().

Referenced by PrintSensitiveDetectorsOfLV(), and VerboseSensitivity().

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

◆ PrintUserLimitsPV()

void BDSDetectorConstruction::PrintUserLimitsPV ( const G4VPhysicalVolume *  aPV,
G4double  globalMinEK 
) const
private

Definition at line 1477 of file BDSDetectorConstruction.cc.

◆ PrintUserLimitsSummary()

void BDSDetectorConstruction::PrintUserLimitsSummary ( const G4VPhysicalVolume *  world) const
private

Definition at line 1469 of file BDSDetectorConstruction.cc.

◆ SetDesignParticle()

void BDSDetectorConstruction::SetDesignParticle ( const BDSParticleDefinition defIn)
inline

Set the design particle definition.

Definition at line 97 of file BDSDetectorConstruction.hh.

References designParticle.

Referenced by BDSIM::Initialise().

Here is the caller graph for this function:

◆ SideToLocalOffset()

G4ThreeVector BDSDetectorConstruction::SideToLocalOffset ( const GMAD::Placement placement,
const BDSBeamline beamLine,
const BDSExtent placementExtent 
)
static

Attach component with extent2 to component with extent1 with placement.

Definition at line 971 of file BDSDetectorConstruction.cc.

References BDSExtent::DX(), BDSBeamline::end(), BDSExtent::ExtentZ(), BDSBeamline::FindFromS(), BDSGlobalConstants::Instance(), BDS::IsFinite(), BDS::LowerCase(), BDS::MaximumCombinedExtent(), GMAD::Placement::s, GMAD::Placement::side, GMAD::Placement::sideOffset, BDSExtent::XNeg(), BDSExtent::XPos(), BDSExtent::YNeg(), and BDSExtent::YPos().

Referenced by CreatePlacementTransform().

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

◆ UnsuitableFirstElement()

G4bool BDSDetectorConstruction::UnsuitableFirstElement ( std::list< GMAD::Element >::const_iterator  element)
private

Detect whether the first element has an angled face such that it might overlap with a previous element. Only used in case of a circular machine.

Definition at line 1293 of file BDSDetectorConstruction.cc.

References BDS::IsFinite().

Referenced by BuildBeamline().

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

◆ UpdateSamplerDiameterAndCountSamplers()

void BDSDetectorConstruction::UpdateSamplerDiameterAndCountSamplers ( )

Loop over beam line and work out maximum tolerable sampler radius. Count all samplers and set member nSamplers and the same time.

Definition at line 172 of file BDSDetectorConstruction.cc.

References GMAD::Parser::GetBeamline(), BDSParser::GetSamplerPlacements(), BDSGlobalConstants::Instance(), BDSParser::Instance(), BDS::IsFinite(), nSamplers, BDSGlobalConstants::SetCurvilinearDiameter(), BDSGlobalConstants::SetCurvilinearDiameterShrunkForBends(), and BDSGlobalConstants::SetSamplerDiameter().

Here is the call graph for this function:

◆ VerboseSensitivity()

void BDSDetectorConstruction::VerboseSensitivity ( ) const
private

Print out the sensitivity of every single volume so far constructed in the world.

Definition at line 1496 of file BDSDetectorConstruction.cc.

References PrintSensitiveDetectorsOfLV().

Referenced by Construct().

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

◆ WorldExtent()

BDSExtent BDSDetectorConstruction::WorldExtent ( ) const
inline

Public access to the world extent.

Definition at line 100 of file BDSDetectorConstruction.hh.

References worldExtent.

Field Documentation

◆ acceleratorModel

BDSAcceleratorModel* BDSDetectorConstruction::acceleratorModel
private

◆ biasObjects

std::vector<BDSBOptrMultiParticleChangeCrossSection*> BDSDetectorConstruction::biasObjects
private

List of bias objects - for memory management.

Definition at line 247 of file BDSDetectorConstruction.hh.

Referenced by BuildCrossSectionBias().

◆ biasSetObjects

std::map<G4String, BDSBOptrMultiParticleChangeCrossSection*> BDSDetectorConstruction::biasSetObjects
private

Definition at line 248 of file BDSDetectorConstruction.hh.

◆ buildPlacementFieldsWorld

G4bool BDSDetectorConstruction::buildPlacementFieldsWorld
private

Definition at line 278 of file BDSDetectorConstruction.hh.

◆ canSampleAngledFaces

G4bool BDSDetectorConstruction::canSampleAngledFaces
private

Whether the integrator set permits sampling elements with angled faces.

Definition at line 273 of file BDSDetectorConstruction.hh.

Referenced by BuildBeamline().

◆ checkOverlaps

G4bool BDSDetectorConstruction::checkOverlaps
private

Variable copied from global constants.

Definition at line 259 of file BDSDetectorConstruction.hh.

Referenced by BuildWorld(), ComponentPlacement(), and PlaceBeamlineInWorld().

◆ circular

G4bool BDSDetectorConstruction::circular
private

Whether or not we're building a circular machine.

Definition at line 268 of file BDSDetectorConstruction.hh.

Referenced by BuildBeamline(), and BuildBeamlines().

◆ debug

bool BDSDetectorConstruction::debug = true
private

Definition at line 252 of file BDSDetectorConstruction.hh.

◆ designParticle

const BDSParticleDefinition* BDSDetectorConstruction::designParticle
private

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

Definition at line 272 of file BDSDetectorConstruction.hh.

Referenced by BuildBeamline(), Construct(), and SetDesignParticle().

◆ fieldQueries

std::vector<BDSFieldQueryInfo*> BDSDetectorConstruction::fieldQueries
private

Definition at line 285 of file BDSDetectorConstruction.hh.

◆ fields

std::vector<BDSFieldObjects*> BDSDetectorConstruction::fields
private

All fields.

Definition at line 266 of file BDSDetectorConstruction.hh.

◆ nSamplers

G4int BDSDetectorConstruction::nSamplers
private

Count of number of samplers to be built.

Definition at line 277 of file BDSDetectorConstruction.hh.

Referenced by BuildSamplerWorld(), and UpdateSamplerDiameterAndCountSamplers().

◆ placementBL

BDSBeamline* BDSDetectorConstruction::placementBL
private

Placement beam line.

Definition at line 270 of file BDSDetectorConstruction.hh.

Referenced by ComponentPlacement(), and Construct().

◆ userComponentFactory

BDSComponentFactoryUser* BDSDetectorConstruction::userComponentFactory
private

Definition at line 275 of file BDSDetectorConstruction.hh.

◆ verbose

G4bool BDSDetectorConstruction::verbose
private

Variable copied from global constants.

Definition at line 258 of file BDSDetectorConstruction.hh.

Referenced by BuildBeamlines(), and Construct().

◆ worldContentsLogicalVolumes

std::set<G4LogicalVolume*> BDSDetectorConstruction::worldContentsLogicalVolumes
private

Cache of possibly loaded logical volumes from a world geometry file - used for biasing.

Definition at line 281 of file BDSDetectorConstruction.hh.

Referenced by BuildPhysicsBias(), and BuildWorld().

◆ worldExtent

BDSExtent BDSDetectorConstruction::worldExtent
private

Record of the world extent.

Definition at line 269 of file BDSDetectorConstruction.hh.

Referenced by BuildWorld(), and WorldExtent().

◆ worldLogicalVolume

G4LogicalVolume* BDSDetectorConstruction::worldLogicalVolume
private

Definition at line 283 of file BDSDetectorConstruction.hh.

◆ worldVacuumLogicalVolumes

std::set<G4LogicalVolume*> BDSDetectorConstruction::worldVacuumLogicalVolumes
private

Definition at line 282 of file BDSDetectorConstruction.hh.


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