BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Base class for external geometry loading factories. More...
#include <BDSGeometryFactoryBase.hh>
Public Member Functions | |
virtual BDSGeometryExternal * | Build (G4String componentName, G4String fileName, std::map< G4String, G4Colour * > *colourMapping=nullptr, G4bool autoColour=true, G4double suggestedLength=0, G4double suggestedHorizontalWidth=0, std::vector< G4String > *vacuumBiasVolumeNames=nullptr, G4UserLimits *userLimitsToAttachToAllLVs=nullptr)=0 |
Main method to load and construct geometry. More... | |
virtual std::set< G4VisAttributes * > | ApplyColourMapping (std::set< G4LogicalVolume * > &lvs, std::map< G4String, G4Colour * > *mapping, G4bool autoColour, const G4String &preprocessPrefix="") |
virtual void | ApplyUserLimits (const std::set< G4LogicalVolume * > &lvsIn, G4UserLimits *userLimits) |
Attach a set of user limits to every logical volume supplied. More... | |
![]() | |
virtual void | FactoryBaseCleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. More... | |
Protected Member Functions | |
virtual void | CleanUp () |
Virtual clean up that derived classes can override that calls CleanUpBase(). More... | |
virtual G4String | PreprocessedName (const G4String &objectName, const G4String &acceleratorComponentName) const |
std::set< G4LogicalVolume * > | GetVolumes (const std::set< G4LogicalVolume * > &allLVs, std::vector< G4String > *volumeNames, G4bool preprocessGDML, const G4String &componentName) const |
Get the volumes that match the name. Volume names are matched exactly and are case sensitive. More... | |
void | CleanUpBase () |
void | ExpandExtent (const BDSExtent &extent) |
Expand the acuumulated extents using a (possibly asymmetric) extent instance. More... | |
void | ExpandExtent (G4double xO, G4double rx, G4double y0, G4double ry, G4double z0, G4double rz) |
void | ExpandExtent (G4double x0, G4double xLow, G4double xHigh, G4double y0, G4double yLow, G4double yHigh, G4double z0, G4double zLow, G4double zHigh) |
Expand the extent but asymmetrically. More... | |
BDSExtent | Extent () const |
Protected Attributes | |
G4double | xmin |
Extent in one dimension. More... | |
G4double | xmax |
Extent in one dimension. More... | |
G4double | ymin |
Extent in one dimension. More... | |
G4double | ymax |
Extent in one dimension. More... | |
G4double | zmin |
Extent in one dimension. More... | |
G4double | zmax |
Extent in one dimension. More... | |
![]() | |
std::set< G4LogicalVolume * > | allLogicalVolumes |
std::set< G4VPhysicalVolume * > | allPhysicalVolumes |
std::set< G4RotationMatrix * > | allRotationMatrices |
std::set< G4UserLimits * > | allUserLimits |
std::set< G4VSolid * > | allSolids |
std::set< G4VisAttributes * > | allVisAttributes |
G4double | lengthSafety |
Cache of global constants variable. More... | |
G4double | lengthSafetyLarge |
Cache of global constants variable. More... | |
G4bool | checkOverlaps |
Cache of global constants variable. More... | |
G4bool | visDebug |
Cache of global constants variable. More... | |
G4double | nSegmentsPerCircle |
Cache of global constants variable. More... | |
G4VisAttributes * | containerVisAttr |
Cache of global constants variable. More... | |
G4UserLimits * | defaultUserLimits |
Cache of global constants variable. More... | |
Base class for external geometry loading factories.
Definition at line 47 of file BDSGeometryFactoryBase.hh.
BDSGeometryFactoryBase::BDSGeometryFactoryBase | ( | ) |
Definition at line 40 of file BDSGeometryFactoryBase.cc.
|
virtual |
Definition at line 45 of file BDSGeometryFactoryBase.cc.
|
virtual |
Apply a colour mapping to a set of logical volumes. This applies a colour from the map if the key value is found as a substring or whole part of the logical volume name. Ie the BDSColour* (red) is defined to key 'quad' and any logical volume with 'quad' (case sensitive) will be set as red. Caches common G4VisAttributes (so no repeats for same colour) and returns those constructed. Map is searched through so key order gives precedence order.
Definition at line 48 of file BDSGeometryFactoryBase.cc.
References BDSColourFromMaterial::GetColour(), BDSColourFromMaterial::Instance(), BDSColours::Instance(), and BDS::StrContains().
Referenced by BDSGeometryFactoryGDML::Build(), and BDSGeometryFactorySQL::Build().
|
virtual |
Attach a set of user limits to every logical volume supplied.
Definition at line 115 of file BDSGeometryFactoryBase.cc.
Referenced by BDSGeometryFactoryGDML::Build().
|
pure virtual |
Main method to load and construct geometry.
Implemented in BDSGeometryFactoryGDML, and BDSGeometryFactorySQL.
Referenced by BDSGeometryFactory::BuildGeometry().
|
protectedvirtual |
Virtual clean up that derived classes can override that calls CleanUpBase().
Reimplemented in BDSGeometryFactorySQL.
Definition at line 122 of file BDSGeometryFactoryBase.cc.
References CleanUpBase().
Referenced by BDSGeometryFactoryGDML::Build(), and BDSGeometryFactorySQL::CleanUp().
|
protected |
Initialise variables - used to reset variables before each use of the factory. Non-virtual as used in constructor.
Definition at line 164 of file BDSGeometryFactoryBase.cc.
References BDSFactoryBase::FactoryBaseCleanUp(), xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by CleanUp().
|
protected |
Expand the acuumulated extents using a (possibly asymmetric) extent instance.
Definition at line 175 of file BDSGeometryFactoryBase.cc.
References xmax, xmin, BDSExtent::XNeg(), BDSExtent::XPos(), ymax, ymin, BDSExtent::YNeg(), BDSExtent::YPos(), zmax, zmin, BDSExtent::ZNeg(), and BDSExtent::ZPos().
Referenced by BDSGeometryFactorySQL::PlaceComponents().
|
protected |
|
protected |
|
inlineprotected |
Definition at line 121 of file BDSGeometryFactoryBase.hh.
|
protected |
Get the volumes that match the name. Volume names are matched exactly and are case sensitive.
Definition at line 131 of file BDSGeometryFactoryBase.cc.
Referenced by BDSGeometryFactoryGDML::Build().
|
protectedvirtual |
Provide the preprocessed object (such as volume) names in case they're processed whilst loading from external formats. By default, no action.
Reimplemented in BDSGeometryFactoryGDML.
Definition at line 127 of file BDSGeometryFactoryBase.cc.
|
protected |
Extent in one dimension.
Definition at line 114 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().
|
protected |
Extent in one dimension.
Definition at line 113 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().
|
protected |
Extent in one dimension.
Definition at line 116 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().
|
protected |
Extent in one dimension.
Definition at line 115 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().
|
protected |
Extent in one dimension.
Definition at line 118 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().
|
protected |
Extent in one dimension.
Definition at line 117 of file BDSGeometryFactoryBase.hh.
Referenced by CleanUpBase(), and ExpandExtent().