BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A generic geometry component for a bdsim model. More...
#include <BDSGeometryComponent.hh>
Public Member Functions | |
BDSGeometryComponent (G4VSolid *containerSolidIn, G4LogicalVolume *containerLVIn, const BDSExtent &extentIn=BDSExtent(), const BDSExtent &innerExtentIn=BDSExtent(), const G4ThreeVector &placementOffsetIn=G4ThreeVector(0, 0, 0), G4RotationMatrix *placementRotationIn=nullptr) | |
BDSGeometryComponent (G4AssemblyVolume *containerAssemblyIn, const BDSExtent &extentIn=BDSExtent(), const BDSExtent &innerExtentIn=BDSExtent(), const G4ThreeVector &placementOffsetIn=G4ThreeVector(0, 0, 0), G4RotationMatrix *placementRotationIn=nullptr) | |
BDSGeometryComponent (const BDSGeometryComponent &component) | |
Copy constructor (no copying of registered objects) | |
BDSGeometryComponent & | operator= (const BDSGeometryComponent &)=delete |
Assignment operator not used. | |
G4bool | ContainerIsAssembly () const |
Whether the container is an assembly. If not, it's a logical volume. | |
void | SetPlacementOffset (const G4ThreeVector &offsetIn) |
Set the offset from 0,0,0 that the object should ideally be placed in its parent. | |
G4ThreeVector | GetExtentPositive () const |
Get the extent of the object in the positive direction in all dimensions. | |
G4ThreeVector | GetExtentNegative () const |
Get the extent of the object in the negative direction in all dimensions. | |
void | InheritExtents (BDSGeometryComponent const *const anotherComponent) |
Update the extents of this object with those of another object. | |
void | InheritExtents (BDSGeometryComponent const *const anotherComponent, const G4ThreeVector &offset) |
void | RegisterDaughter (BDSGeometryComponent *anotherComponent) |
void | RegisterSolid (G4VSolid *solid) |
void | RegisterSolid (const std::set< G4VSolid * > &solids) |
Similarly for a set of unique solids. | |
void | RegisterLogicalVolume (G4LogicalVolume *logicalVolume) |
void | RegisterLogicalVolume (const std::set< G4LogicalVolume * > &localVolumes) |
Apply RegisterLogicalVolume() to a set of logical volumes. | |
void | RegisterSensitiveVolume (G4LogicalVolume *sensitiveVolume, BDSSDType sensitivityType) |
void | RegisterSensitiveVolume (const std::set< G4LogicalVolume * > &sensitiveVolumes, BDSSDType sensitivityType) |
void | RegisterSensitiveVolume (const std::map< G4LogicalVolume *, BDSSDType > &sensitiveVolumes) |
Copy in a mapping of sensitive volumes to sensitive detectors. | |
void | RegisterPhysicalVolume (G4VPhysicalVolume *physicalVolume) |
void | RegisterPhysicalVolume (const std::set< G4VPhysicalVolume * > &physicalVolumes) |
Apply RegisterPhysicalVolume() to a set of physical volumes. | |
void | RegisterRotationMatrix (G4RotationMatrix *rotationMatrix) |
void | RegisterRotationMatrix (const std::set< G4RotationMatrix * > &rotationMatrices) |
Apply Register RotationMatrix() to a set of rotation matrices. | |
void | RegisterVisAttributes (G4VisAttributes *visAttribute) |
void | RegisterVisAttributes (const std::set< G4VisAttributes * > &visAttributes) |
Apply RegisterVisAttribute() to a set of visualisation attributes. | |
void | RegisterUserLimits (G4UserLimits *userLimit) |
void | RegisterUserLimits (const std::set< G4UserLimits * > &userLimits) |
Apply RegisterUserLimit to a set of user limits. | |
void | InheritObjects (BDSGeometryComponent *component) |
virtual std::set< G4LogicalVolume * > | GetAllLogicalVolumes () const |
Access all logical volumes belonging to this component. | |
virtual std::set< G4LogicalVolume * > | GetAllBiasingVolumes () const |
Return all logical volumes that should be used for biasing minus any that are in the excluded set. | |
virtual std::map< G4LogicalVolume *, BDSSDType > | GetAllSensitiveVolumes () const |
Access all sensitive volumes belonging to this component. | |
void | MakeAllVolumesSensitive (BDSSDType stype=BDSSDType::energydep) |
virtual void | AttachSensitiveDetectors () |
Attach a sensitive detector class to all registered sensitive volumes in this component. | |
virtual void | ExcludeLogicalVolumeFromBiasing (G4LogicalVolume *lv) |
void | StripOuterAndMakeAssemblyVolume () |
Change from a container logical volume to an assembly volume. | |
virtual G4String | GetName () const |
Accessor - see member for more info. | |
G4VSolid * | GetContainerSolid () const |
Accessor - see member for more info. | |
G4LogicalVolume * | GetContainerLogicalVolume () const |
Accessor - see member for more info. | |
G4AssemblyVolume * | GetContainerAssemblyVolume () const |
Accessor - see member for more info. | |
G4Transform3D | GetPlacementTransform () const |
Accessor - see member for more info. | |
G4ThreeVector | GetPlacementOffset () const |
Accessor - see member for more info. | |
G4RotationMatrix * | GetPlacementRotation () const |
Accessor - see member for more info. | |
BDSExtent | GetExtent () const |
Accessor - see member for more info. | |
BDSExtent | GetInnerExtent () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentX () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentY () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentZ () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentX () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentY () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentZ () const |
Accessor - see member for more info. | |
virtual std::set< G4VPhysicalVolume * > | GetAllPhysicalVolumes () const |
Accessor - see member for more info. | |
virtual std::set< G4RotationMatrix * > | GetAllRotationMatrices () const |
Accessor - see member for more info. | |
virtual std::set< G4VisAttributes * > | GetAllVisAttributes () const |
Accessor - see member for more info. | |
virtual std::set< G4UserLimits * > | GetAllUserLimits () const |
Accessor - see member for more info. | |
virtual std::set< BDSGeometryComponent * > | GetAllDaughters () const |
Accessor - see member for more info. | |
virtual std::set< G4VSolid * > | GetAllSolids () const |
Accessor - see member for more info. | |
void | SetExtent (const BDSExtent &extIn) |
Set extent. | |
void | SetInnerExtent (const BDSExtent &extIn) |
Set extent. | |
Static Public Member Functions | |
static void | AttachUserLimitsToAssembly (G4AssemblyVolume *av, G4UserLimits *ul) |
Utility function to apply user limits to an assembly volume as there's not interface. | |
Protected Attributes | |
G4bool | containerIsAssembly |
True if the 'container' is really an assembly; false if an LV. | |
G4VSolid * | containerSolid |
G4LogicalVolume * | containerLogicalVolume |
G4AssemblyVolume * | containerAssembly |
BDSExtent | outerExtent |
BDSExtent | innerExtent |
std::set< BDSGeometryComponent * > | allDaughters |
registry of all daughter geometry components | |
std::set< G4VSolid * > | allSolids |
registry of all solids belonging to this component | |
std::set< G4LogicalVolume * > | allLogicalVolumes |
std::map< G4LogicalVolume *, BDSSDType > | sensitivity |
G4bool | overrideSensitivity |
std::set< G4VPhysicalVolume * > | allPhysicalVolumes |
registry of all physical volumes belonging to this component | |
std::set< G4RotationMatrix * > | allRotationMatrices |
registry of all rotation matrices belonging to this component | |
std::set< G4VisAttributes * > | allVisAttributes |
registry of all visualisation attributes belonging to this component | |
std::set< G4UserLimits * > | allUserLimits |
registry of all user limits belonging to this component | |
G4ThreeVector | placementOffset |
G4RotationMatrix * | placementRotation |
std::set< G4LogicalVolume * > * | lvsExcludedFromBiasing |
Volumes that should not be included when return GetAllBiasingVolumes(). | |
A generic geometry component for a bdsim model.
This class contains the minimum information required for any geometrical object for a bdsim geant4 model.
It represents one complete geometrical object and all the (c++) objects that compose it - therefore, once constructed, a BDSGeometryComponent instance owns all the objects of its members.
Fundamentally, the piece of geometry can have an outer 'container' that is either a Logical Volume or an Assembly Volume.
Note, the container solid and container logical volume are automatically registered by the constructor and do not need to be registered separately like all other volumes. There are safeguards to prevent double registration and the consequential seg faults.
Many accessors construct a new set of pointers to return rather than a const reference to the member set as the pointers from daughter objects are appended to the temporary set. The originals are retained untouched.
Definition at line 69 of file BDSGeometryComponent.hh.
BDSGeometryComponent::BDSGeometryComponent | ( | G4VSolid * | containerSolidIn, |
G4LogicalVolume * | containerLVIn, | ||
const BDSExtent & | extentIn = BDSExtent() , |
||
const BDSExtent & | innerExtentIn = BDSExtent() , |
||
const G4ThreeVector & | placementOffsetIn = G4ThreeVector(0,0,0) , |
||
G4RotationMatrix * | placementRotationIn = nullptr |
||
) |
Definition at line 41 of file BDSGeometryComponent.cc.
BDSGeometryComponent::BDSGeometryComponent | ( | G4AssemblyVolume * | containerAssemblyIn, |
const BDSExtent & | extentIn = BDSExtent() , |
||
const BDSExtent & | innerExtentIn = BDSExtent() , |
||
const G4ThreeVector & | placementOffsetIn = G4ThreeVector(0,0,0) , |
||
G4RotationMatrix * | placementRotationIn = nullptr |
||
) |
Definition at line 59 of file BDSGeometryComponent.cc.
BDSGeometryComponent::BDSGeometryComponent | ( | const BDSGeometryComponent & | component | ) |
Copy constructor (no copying of registered objects)
Definition at line 76 of file BDSGeometryComponent.cc.
|
virtual |
Definition at line 92 of file BDSGeometryComponent.cc.
|
virtual |
Attach a sensitive detector class to all registered sensitive volumes in this component.
Reimplemented in BDSBLM, and BDSElement.
Definition at line 240 of file BDSGeometryComponent.cc.
References allDaughters, overrideSensitivity, BDSSDManager::SensitiveDetector(), and sensitivity.
Referenced by BDSElement::AttachSensitiveDetectors(), and BDSDetectorConstruction::BuildWorld().
|
static |
Utility function to apply user limits to an assembly volume as there's not interface.
Definition at line 280 of file BDSGeometryComponent.cc.
Referenced by BDSAcceleratorComponent::AttachUserLimits().
|
inline |
Whether the container is an assembly. If not, it's a logical volume.
Definition at line 91 of file BDSGeometryComponent.hh.
References containerIsAssembly.
Referenced by BDSSimpleComponent::BDSSimpleComponent(), BDSElement::BuildContainerLogicalVolume(), and BDSBeamlineElement::PlaceElement().
|
virtual |
Remove a particular logical volume from the logical volumes that will be returned for biasing.
Reimplemented in BDSElement.
Definition at line 249 of file BDSGeometryComponent.cc.
References GetName(), and lvsExcludedFromBiasing.
Referenced by BDSCrystalFactory::BuildCrystalObject(), and BDSElement::ExcludeLogicalVolumeFromBiasing().
|
virtual |
Return all logical volumes that should be used for biasing minus any that are in the excluded set.
Reimplemented in BDSElement.
Definition at line 210 of file BDSGeometryComponent.cc.
References allDaughters, and lvsExcludedFromBiasing.
Referenced by BDSAcceleratorComponent::GetAcceleratorMaterialLogicalVolumes(), and BDSElement::GetAllBiasingVolumes().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 113 of file BDSGeometryComponent.hh.
References allDaughters.
Referenced by BDSMagnet::BuildOuterField(), and BDSElement::GetAllDaughters().
|
virtual |
Access all logical volumes belonging to this component.
Reimplemented in BDSElement.
Definition at line 199 of file BDSGeometryComponent.cc.
References allDaughters.
Referenced by BDSGeometryFactoryGDML::Build(), BDSDetectorConstruction::BuildWorld(), BDSBLMFactory::CreateBLM(), BDSElement::GetAllLogicalVolumes(), BDSBeamPipe::GetVolumesForField(), InheritObjects(), MakeAllVolumesSensitive(), and BDSCollimatorCrystal::RegisterCrystalLVs().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 109 of file BDSGeometryComponent.hh.
References allPhysicalVolumes.
Referenced by BDSElement::GetAllPhysicalVolumes(), and InheritObjects().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 110 of file BDSGeometryComponent.hh.
References allRotationMatrices.
Referenced by BDSElement::GetAllRotationMatrices(), and InheritObjects().
|
virtual |
Access all sensitive volumes belonging to this component.
Reimplemented in BDSElement.
Definition at line 228 of file BDSGeometryComponent.cc.
References allDaughters, and sensitivity.
Referenced by BDSElement::GetAllSensitiveVolumes(), and InheritObjects().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 114 of file BDSGeometryComponent.hh.
References allSolids.
Referenced by BDSElement::GetAllSolids(), and InheritObjects().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 112 of file BDSGeometryComponent.hh.
References allUserLimits.
Referenced by BDSElement::GetAllUserLimits(), and InheritObjects().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSElement.
Definition at line 111 of file BDSGeometryComponent.hh.
References allVisAttributes.
Referenced by BDSElement::GetAllVisAttributes(), and InheritObjects().
|
inline |
Accessor - see member for more info.
Definition at line 97 of file BDSGeometryComponent.hh.
Referenced by BDSSimpleComponent::BDSSimpleComponent(), BDSElement::BuildContainerLogicalVolume(), and BDSBeamlineElement::PlaceElement().
|
inline |
Accessor - see member for more info.
Definition at line 96 of file BDSGeometryComponent.hh.
Referenced by BDSLinkComponent::BDSLinkComponent(), BDSSimpleComponent::BDSSimpleComponent(), BDSTunnelSection::BDSTunnelSection(), BDSCollimatorCrystal::Build(), BDSDrift::Build(), BDSUndulator::Build(), BDSCavityElement::Build(), BDSElement::BuildContainerLogicalVolume(), BDSMagnet::BuildContainerLogicalVolume(), BDSWireScanner::BuildContainerLogicalVolume(), BDSMagnet::BuildOuterField(), BDSMagnet::BuildVacuumField(), BDSDetectorConstruction::BuildWorld(), BDSParallelWorldImportance::BuildWorld(), BDSParallelWorldSampler::Construct(), BDSBLMFactory::CreateBLM(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), BDSBeamPipe::GetVolumesForField(), BDSParallelWorldSampler::Place(), BDSMagnet::PlaceComponents(), BDSBeamlineElement::PlaceElement(), BDSLinkDetectorConstruction::PlaceOneComponent(), and BDSLinkOpaqueBox::PlaceOutputSampler().
|
inline |
Accessor - see member for more info.
Definition at line 95 of file BDSGeometryComponent.hh.
Referenced by BDSLinkComponent::BDSLinkComponent(), BDSSimpleComponent::BDSSimpleComponent(), BDSTunnelSection::BDSTunnelSection(), BDSCollimatorCrystal::Build(), BDSDrift::Build(), BDSCavityElement::Build(), BDSElement::BuildContainerLogicalVolume(), BDSMagnet::BuildContainerLogicalVolume(), BDSWireScanner::BuildContainerLogicalVolume(), BDSMagnet::BuildOuter(), BDS::BuildPlacementGeometry(), and BDSDetectorConstruction::BuildWorld().
|
inline |
Accessor - see member for more info.
Definition at line 101 of file BDSGeometryComponent.hh.
Referenced by BDSLinkDetectorConstruction::AddLinkCollimatorJaw(), BDSBeamline::AddSingleComponent(), BDSCollimatorCrystal::Build(), BDS::BuildBLMs(), BDSElement::BuildContainerLogicalVolume(), BDS::BuildEndPieceBeamline(), BDS::BuildPlacementGeometry(), BDSDetectorConstruction::BuildWorld(), BDSMagnetOuterFactory::CreateContainerForExternal(), BDSMagnetOuterFactory::CreateExternal(), BDSMagnetOuterFactory::CreateMagnetOuter(), BDSMagnetOuterFactoryPolesBase::DipoleCalculations(), BDSBeamlineElement::GetExtent(), BDSBeamlineElement::GetExtentGlobal(), InheritExtents(), BDSBeamlineElement::Overlaps(), BDSLinkOpaqueBox::PlaceOutputSampler(), and BDSMagnetOuterFactoryCylindrical::TestInputParameters().
|
inline |
Get the extent of the object in the negative direction in all dimensions.
Definition at line 129 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentNegative().
Referenced by BDSBeamline::AddSingleComponent().
|
inline |
Get the extent of the object in the positive direction in all dimensions.
Definition at line 126 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentPositive().
Referenced by BDSBeamline::AddSingleComponent().
|
inline |
Accessor - see member for more info.
Definition at line 103 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentX().
|
inline |
Accessor - see member for more info.
Definition at line 104 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentY().
|
inline |
Accessor - see member for more info.
Definition at line 105 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentZ().
|
inline |
Accessor - see member for more info.
Definition at line 102 of file BDSGeometryComponent.hh.
Referenced by BDSMagnetOuterFactory::CreateExternal(), and InheritExtents().
|
inline |
Accessor - see member for more info.
Definition at line 106 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentX().
|
inline |
Accessor - see member for more info.
Definition at line 107 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentY().
|
inline |
Accessor - see member for more info.
Definition at line 108 of file BDSGeometryComponent.hh.
References BDSExtent::ExtentZ().
|
inlinevirtual |
Accessor - see member for more info.
Reimplemented in BDSAcceleratorComponent, and BDSSampler.
Definition at line 94 of file BDSGeometryComponent.hh.
Referenced by BDSLinkDetectorConstruction::AddLinkCollimatorJaw(), BDS::BuildBLMs(), and ExcludeLogicalVolumeFromBiasing().
|
inline |
Accessor - see member for more info.
Definition at line 99 of file BDSGeometryComponent.hh.
References placementOffset.
Referenced by BDSBeamline::AddSingleComponent(), BDSCollimatorCrystal::Build(), BDSElement::BuildContainerLogicalVolume(), BDSMagnet::BuildOuter(), and BDSMagnet::PlaceComponents().
|
inline |
Accessor - see member for more info.
Definition at line 100 of file BDSGeometryComponent.hh.
References placementRotation.
Referenced by BDSCollimatorCrystal::Build().
|
inline |
Accessor - see member for more info.
Definition at line 285 of file BDSGeometryComponent.hh.
References placementOffset, and placementRotation.
Referenced by BDSMagnet::BuildBeampipe().
void BDSGeometryComponent::InheritExtents | ( | BDSGeometryComponent const *const | anotherComponent | ) |
Update the extents of this object with those of another object.
Definition at line 111 of file BDSGeometryComponent.cc.
References GetExtent(), and GetInnerExtent().
Referenced by BDSLinkComponent::BDSLinkComponent(), BDSSimpleComponent::BDSSimpleComponent(), BDSTunnelSection::BDSTunnelSection(), BDSCollimatorCrystal::Build(), BDSDrift::Build(), BDSCavityElement::Build(), BDSMagnet::BuildBeampipe(), BDSElement::BuildContainerLogicalVolume(), BDSMagnet::BuildContainerLogicalVolume(), BDSWireScanner::BuildContainerLogicalVolume(), and BDSMagnet::BuildOuter().
void BDSGeometryComponent::InheritExtents | ( | BDSGeometryComponent const *const | anotherComponent, |
const G4ThreeVector & | offset | ||
) |
Update the extents of this object with those of another object whilst accounting for any offset.
Definition at line 117 of file BDSGeometryComponent.cc.
References GetExtent(), GetInnerExtent(), and BDSExtent::Translate().
void BDSGeometryComponent::InheritObjects | ( | BDSGeometryComponent * | component | ) |
Utility method to copy all the logical & physical volumes plus rotation matrices from a BDSGeometryComponent instance to this one. Useful for example when prefabricated objects from factories are made to belong to an object.
Definition at line 188 of file BDSGeometryComponent.cc.
References GetAllLogicalVolumes(), GetAllPhysicalVolumes(), GetAllRotationMatrices(), GetAllSensitiveVolumes(), GetAllSolids(), GetAllUserLimits(), GetAllVisAttributes(), RegisterLogicalVolume(), RegisterPhysicalVolume(), RegisterRotationMatrix(), RegisterSensitiveVolume(), RegisterSolid(), RegisterUserLimits(), and RegisterVisAttributes().
|
inline |
Make all logical volumes sensitive by setting flag for later attachment with AttachSensitiveDetectors. This propagates to all daughter volumes.
Definition at line 216 of file BDSGeometryComponent.hh.
References GetAllLogicalVolumes(), and RegisterSensitiveVolume().
|
inline |
Register another geometry component as belonging to this one. This component will then own and delete it as necessary.
Definition at line 141 of file BDSGeometryComponent.hh.
References allDaughters.
Referenced by BDSBLM::BDSBLM(), BDSLinkComponent::BDSLinkComponent(), BDSSimpleComponent::BDSSimpleComponent(), BDSTunnelSection::BDSTunnelSection(), BDSCollimatorCrystal::Build(), BDSDrift::Build(), BDSUndulator::Build(), BDSCavityElement::Build(), BDSMagnet::BuildBeampipe(), BDSShield::BuildBeamPipe(), BDSWireScanner::BuildContainerLogicalVolume(), BDSMagnet::BuildOuter(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), and BDSMagnetOuterFactoryLHC::CreateQuadrupole().
void BDSGeometryComponent::RegisterLogicalVolume | ( | const std::set< G4LogicalVolume * > & | localVolumes | ) |
Apply RegisterLogicalVolume() to a set of logical volumes.
Definition at line 130 of file BDSGeometryComponent.cc.
References RegisterLogicalVolume().
|
inline |
Register a logical volume as belonging to this geometry component, which then becomes responsible for it. Note the container logical volume for this piece of geometry is automatically registered separately.
Definition at line 153 of file BDSGeometryComponent.hh.
Referenced by BDSCollimator::Build(), BDSDegrader::Build(), BDSUndulator::Build(), BDSWireScanner::Build(), BDSCollimatorJaw::Build(), BDSGeometryFactoryGDML::Build(), BDSGeometryFactorySQL::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSShield::BuildShield(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSMagnetOuterFactoryPolesSquare::CommonConstructor(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::CreateEndPiece(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), InheritObjects(), BDSTunnelFactoryBase::PrepareGeometryComponent(), RegisterLogicalVolume(), and RegisterSensitiveVolume().
void BDSGeometryComponent::RegisterPhysicalVolume | ( | const std::set< G4VPhysicalVolume * > & | physicalVolumes | ) |
Apply RegisterPhysicalVolume() to a set of physical volumes.
Definition at line 136 of file BDSGeometryComponent.cc.
References RegisterPhysicalVolume().
|
inline |
Register a physical volume as belonging to this geometry component, which then becomes responsible for it.
Definition at line 174 of file BDSGeometryComponent.hh.
References allPhysicalVolumes.
Referenced by BDSCollimator::Build(), BDSCollimatorCrystal::Build(), BDSUndulator::Build(), BDSWireScanner::Build(), BDSCollimatorJaw::Build(), BDSGeometryFactoryGDML::Build(), BDSGeometryFactorySQL::Build(), BDSShield::BuildBeamPipe(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSShield::BuildShield(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), InheritObjects(), BDSMagnet::PlaceComponents(), BDSMagnetOuterFactoryPolesBase::PlaceComponentsCoils(), BDSDegrader::PlaceWedge(), and RegisterPhysicalVolume().
void BDSGeometryComponent::RegisterRotationMatrix | ( | const std::set< G4RotationMatrix * > & | rotationMatrices | ) |
Apply Register RotationMatrix() to a set of rotation matrices.
Definition at line 142 of file BDSGeometryComponent.cc.
References RegisterRotationMatrix().
|
inline |
Register a rotation matrix as belonging to this geometry component, which then becomes responsible for it.
Definition at line 181 of file BDSGeometryComponent.hh.
References allRotationMatrices.
Referenced by BDSCollimator::Build(), BDSCollimatorCrystal::Build(), BDSDegrader::Build(), BDSWireScanner::Build(), BDSGeometryFactorySQL::Build(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), InheritObjects(), BDSMagnetOuterFactoryPolesBase::PlaceComponentsCoils(), BDSLinkOpaqueBox::PlaceOutputSampler(), and RegisterRotationMatrix().
void BDSGeometryComponent::RegisterSensitiveVolume | ( | const std::map< G4LogicalVolume *, BDSSDType > & | sensitiveVolumes | ) |
Copy in a mapping of sensitive volumes to sensitive detectors.
Definition at line 171 of file BDSGeometryComponent.cc.
References sensitivity.
void BDSGeometryComponent::RegisterSensitiveVolume | ( | const std::set< G4LogicalVolume * > & | sensitiveVolumes, |
BDSSDType | sensitivityType | ||
) |
Apply RegisterSensitiveVolume(G4LogicalVolume* sensitiveVolume) to a set of logical volumes.
Definition at line 164 of file BDSGeometryComponent.cc.
References RegisterSensitiveVolume().
void BDSGeometryComponent::RegisterSensitiveVolume | ( | G4LogicalVolume * | sensitiveVolume, |
BDSSDType | sensitivityType | ||
) |
Mark a volume as one that should be made sensitive. This method will also check and ensure that the sensitive logical volume is an already registered logical volume with this geometry component.
Definition at line 148 of file BDSGeometryComponent.cc.
References RegisterLogicalVolume(), and sensitivity.
Referenced by BDSScreen::AddScreenLayer(), BDSGeometryFactoryBase::ApplySensitivity(), BDSCollimator::Build(), BDSDegrader::Build(), BDSUndulator::Build(), BDSWireScanner::Build(), BDSCollimatorJaw::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSLaserWire::BuildContainerLogicalVolume(), BDSCrystalFactory::BuildCrystalObject(), BDSShield::BuildShield(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSMagnetOuterFactoryPolesSquare::CommonConstructor(), BDSBeamPipeFactoryLHCDetailed::CommonFinalConstruction(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::CreateEndPiece(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), InheritObjects(), MakeAllVolumesSensitive(), RegisterSensitiveVolume(), and BDSTunnelFactoryBase::SetSensitiveVolumes().
void BDSGeometryComponent::RegisterSolid | ( | const std::set< G4VSolid * > & | solids | ) |
Similarly for a set of unique solids.
Definition at line 124 of file BDSGeometryComponent.cc.
References RegisterSolid().
|
inline |
Register a solid as belonging to this geometry component, which then becomes responsible for it. Note, the container solid given in the constructor is automatically registered.
Definition at line 145 of file BDSGeometryComponent.hh.
References allSolids.
Referenced by BDSCollimator::Build(), BDSDegrader::Build(), BDSUndulator::Build(), BDSWireScanner::Build(), BDSCollimatorJaw::Build(), BDSGeometryFactorySQL::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSCrystalFactory::BuildCrystalObject(), BDSCollimatorElliptical::BuildInnerCollimator(), BDSCollimatorRectangular::BuildInnerCollimator(), BDSShield::BuildShield(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::CreateEndPiece(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), InheritObjects(), BDSTunnelFactoryBase::PrepareGeometryComponent(), and RegisterSolid().
void BDSGeometryComponent::RegisterUserLimits | ( | const std::set< G4UserLimits * > & | userLimits | ) |
Apply RegisterUserLimit to a set of user limits.
Definition at line 182 of file BDSGeometryComponent.cc.
References RegisterUserLimits().
|
inline |
Register a user limits object as belonging to this geometry component, which then becomes responsible for it
Definition at line 195 of file BDSGeometryComponent.hh.
References allUserLimits.
Referenced by BDSTeleporter::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSTerminator::BuildContainerLogicalVolume(), BDSCrystalFactory::BuildCrystalObject(), BDSAcceleratorComponent::BuildUserLimits(), BDSDump::BuildUserLimits(), BDSCollimator::CollimatorUserLimits(), InheritObjects(), and RegisterUserLimits().
void BDSGeometryComponent::RegisterVisAttributes | ( | const std::set< G4VisAttributes * > & | visAttributes | ) |
Apply RegisterVisAttribute() to a set of visualisation attributes.
Definition at line 176 of file BDSGeometryComponent.cc.
References RegisterVisAttributes().
|
inline |
Register a visualisation attribute object as belonging to this geometry component, which then becomes responsible for it.
Definition at line 188 of file BDSGeometryComponent.hh.
References allVisAttributes.
Referenced by BDSCollimator::Build(), BDSDegrader::Build(), BDSUndulator::Build(), BDSWireScanner::Build(), BDSCollimatorJaw::Build(), BDSDump::Build(), BDSGeometryFactoryGDML::Build(), BDSGeometryFactorySQL::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSCavityFactoryBase::BuildCavityAndRegisterObjects(), BDSCrystalFactory::BuildCrystalObject(), BDSShield::BuildShield(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::CreateEndPiece(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSMagnetOuterFactoryLHC::CreateQuadrupole(), InheritObjects(), BDSTunnelFactoryBase::PrepareGeometryComponent(), and RegisterVisAttributes().
|
inline |
Set extent.
Definition at line 121 of file BDSGeometryComponent.hh.
Referenced by BDSSamplerCylinder::BDSSamplerCylinder(), BDSSimpleComponent::BDSSimpleComponent(), BDSCollimator::BuildContainerLogicalVolume(), BDSElement::BuildContainerLogicalVolume(), BDSTeleporter::BuildContainerLogicalVolume(), BDSTerminator::BuildContainerLogicalVolume(), BDSUndulator::BuildContainerLogicalVolume(), BDSCollimatorJaw::BuildContainerLogicalVolume(), BDSDump::BuildContainerLogicalVolume(), and BDSTunnelFactoryBase::PrepareGeometryComponent().
|
inline |
Set extent.
Definition at line 122 of file BDSGeometryComponent.hh.
Referenced by BDSMagnetOuterFactoryPolesBase::CreateEndPiece().
|
inline |
Set the offset from 0,0,0 that the object should ideally be placed in its parent.
Definition at line 118 of file BDSGeometryComponent.hh.
References placementOffset.
Referenced by BDSElement::BuildContainerLogicalVolume(), and BDSMagnet::BuildOuter().
void BDSGeometryComponent::StripOuterAndMakeAssemblyVolume | ( | ) |
Change from a container logical volume to an assembly volume.
Definition at line 263 of file BDSGeometryComponent.cc.
References containerIsAssembly.
Referenced by BDSGeometryFactory::BuildGeometry().
|
protected |
registry of all daughter geometry components
Definition at line 241 of file BDSGeometryComponent.hh.
Referenced by AttachSensitiveDetectors(), GetAllBiasingVolumes(), GetAllDaughters(), GetAllLogicalVolumes(), GetAllSensitiveVolumes(), and RegisterDaughter().
|
protected |
Definition at line 246 of file BDSGeometryComponent.hh.
|
protected |
registry of all physical volumes belonging to this component
Definition at line 260 of file BDSGeometryComponent.hh.
Referenced by GetAllPhysicalVolumes(), and RegisterPhysicalVolume().
|
protected |
registry of all rotation matrices belonging to this component
Definition at line 263 of file BDSGeometryComponent.hh.
Referenced by GetAllRotationMatrices(), and RegisterRotationMatrix().
|
protected |
registry of all solids belonging to this component
Definition at line 244 of file BDSGeometryComponent.hh.
Referenced by GetAllSolids(), and RegisterSolid().
|
protected |
registry of all user limits belonging to this component
Definition at line 269 of file BDSGeometryComponent.hh.
Referenced by GetAllUserLimits(), and RegisterUserLimits().
|
protected |
registry of all visualisation attributes belonging to this component
Definition at line 266 of file BDSGeometryComponent.hh.
Referenced by GetAllVisAttributes(), and RegisterVisAttributes().
|
protected |
Definition at line 236 of file BDSGeometryComponent.hh.
|
protected |
True if the 'container' is really an assembly; false if an LV.
Definition at line 233 of file BDSGeometryComponent.hh.
Referenced by BDSAcceleratorComponent::AttachUserLimits(), BDSSimpleComponent::BDSSimpleComponent(), BDSElement::BuildContainerLogicalVolume(), ContainerIsAssembly(), and StripOuterAndMakeAssemblyVolume().
|
protected |
Definition at line 235 of file BDSGeometryComponent.hh.
|
protected |
Definition at line 234 of file BDSGeometryComponent.hh.
|
protected |
Definition at line 238 of file BDSGeometryComponent.hh.
|
protected |
Volumes that should not be included when return GetAllBiasingVolumes().
Definition at line 282 of file BDSGeometryComponent.hh.
Referenced by ExcludeLogicalVolumeFromBiasing(), and GetAllBiasingVolumes().
|
protected |
Definition at line 237 of file BDSGeometryComponent.hh.
|
protected |
If true, the sensitivity will be applied irrespective of the general store options. So if eloss is turned off but you really want from this component, you can.
Definition at line 257 of file BDSGeometryComponent.hh.
Referenced by AttachSensitiveDetectors().
|
protected |
The offset to be applied BEFORE rotation when placed - used to account for any asymmetry the component may have.
Definition at line 273 of file BDSGeometryComponent.hh.
Referenced by GetPlacementOffset(), GetPlacementTransform(), and SetPlacementOffset().
|
protected |
The rotation to be applied when placed - used to account for any required rotation of the geometry before placement such as being built along a different axis. This is defaulted to a nullptr so MUST be tested before use - this saves memory as every piece of geometry uses this class.
Definition at line 279 of file BDSGeometryComponent.hh.
Referenced by GetPlacementRotation(), and GetPlacementTransform().
|
protected |
Mapping of which volumes have which sensitivity. Not all volumes need be registered. The way of saying no sensitivity is to not have the volume registered.
Definition at line 253 of file BDSGeometryComponent.hh.
Referenced by AttachSensitiveDetectors(), GetAllSensitiveVolumes(), and RegisterSensitiveVolume().