|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Interface to Geant4's GDML loader. More...
#include <BDSGeometryFactoryGDML.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 > *namedVacuumVolumes=nullptr, G4bool makeSensitive=true, BDSSDType sensitivityType=BDSSDType::energydep, BDSSDType vacuumSensitivityType=BDSSDType::energydepvacuum, G4UserLimits *userLimitsToAttachToAllLVs=nullptr) |
Public Member Functions inherited from BDSGeometryFactoryBase | |
| virtual std::set< G4VisAttributes * > | ApplyColourMapping (const std::set< G4LogicalVolume * > &lvs, const 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. | |
| virtual void | ApplySensitivity (BDSGeometryExternal *result, const std::set< G4LogicalVolume * > &allLogicalVolumesIn, BDSSDType generalSensitivity, const std::set< G4LogicalVolume * > &vacuumLogicalVolumes, BDSSDType vacuumSensitivity) |
| Attach the relevant general and vacuum sensitivity to each volume. | |
Public Member Functions inherited from BDSFactoryBase | |
| virtual void | FactoryBaseCleanUp () |
| Empty containers for next use - factories are never deleted so can't rely on scope. | |
Static Public Member Functions | |
| static std::array< G4double, 4 > | VRGBAStringAndUnitToColourAndStyle (const G4String &value, G4bool &visible) |
Protected Member Functions | |
| virtual G4String | PreprocessedName (const G4String &objectName, const G4String &acceleratorComponentName) const |
| Use the GDML preprocessing scheme to prepare the preprocessed volume names. | |
Protected Member Functions inherited from BDSGeometryFactoryBase | |
| virtual void | CleanUp () |
| Virtual clean up that derived classes can override that calls CleanUpBase(). | |
| 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. | |
| void | CleanUpBase () |
| void | ExpandExtent (const BDSExtent &extent) |
| Expand the acuumulated extents using a (possibly asymmetric) extent instance. | |
| 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. | |
| BDSExtent | Extent () const |
Private Member Functions | |
| std::map< G4String, G4Colour * > | BuildColourMap (const std::set< G4LogicalVolume * > &lvsGDML, G4GDMLParser *parser, const G4String &componentName) |
| void | ReplaceStringInFile (const G4String &filename, const G4String &outputFileName, const G4String &key, const G4String &replacement) |
| void | GetAllLogicalPhysicalAndMaterials (const G4VPhysicalVolume *volume, std::set< G4VPhysicalVolume * > &pvs, std::set< G4LogicalVolume * > &lvs, std::map< G4String, G4Material * > &materialsGDML) |
Additional Inherited Members | |
Protected Attributes inherited from BDSGeometryFactoryBase | |
| G4double | xmin |
| Extent in one dimension. | |
| G4double | xmax |
| Extent in one dimension. | |
| G4double | ymin |
| Extent in one dimension. | |
| G4double | ymax |
| Extent in one dimension. | |
| G4double | zmin |
| Extent in one dimension. | |
| G4double | zmax |
| Extent in one dimension. | |
Protected Attributes inherited from BDSFactoryBase | |
| 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. | |
| G4double | lengthSafetyLarge |
| Cache of global constants variable. | |
| G4bool | checkOverlaps |
| Cache of global constants variable. | |
| G4bool | visDebug |
| Cache of global constants variable. | |
| G4int | nSegmentsPerCircle |
| Cache of global constants variable. | |
| G4VisAttributes * | containerVisAttr |
| Cache of global constants variable. | |
| G4UserLimits * | defaultUserLimits |
| Cache of global constants variable. | |
Interface to Geant4's GDML loader.
Definition at line 48 of file BDSGeometryFactoryGDML.hh.
| BDSGeometryFactoryGDML::BDSGeometryFactoryGDML | ( | ) |
Definition at line 57 of file BDSGeometryFactoryGDML.cc.
|
inlinevirtual |
Definition at line 52 of file BDSGeometryFactoryGDML.hh.
|
virtual |
Main interface overrides base class method to construct a file with optional colour mapping.
Implements BDSGeometryFactoryBase.
Definition at line 60 of file BDSGeometryFactoryGDML.cc.
References BDSGeometryFactoryBase::ApplyColourMapping(), BDSGeometryFactoryBase::ApplySensitivity(), BDSGeometryFactoryBase::ApplyUserLimits(), BDSMaterials::CacheMaterialsFromGDML(), BDSMaterials::CheckForConflictingMaterialsAfterLoad(), BDSGeometryFactoryBase::CleanUp(), BDS::DetermineExtents(), GetAllLogicalPhysicalAndMaterials(), BDSGeometryComponent::GetAllLogicalVolumes(), BDSColourFromMaterial::GetColour(), BDSGeometryFactoryBase::GetVolumes(), BDSColourFromMaterial::Instance(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterPhysicalVolume(), BDSGeometryExternal::RegisterVacuumVolumes(), BDSGeometryComponent::RegisterVisAttributes(), and BDSGeometryExternal::VacuumVolumes().

|
private |
Definition at line 153 of file BDSGeometryFactoryGDML.cc.
|
private |
Recursively append pvs and lvs from a given mother volume. Pass by reference the output vectors
Definition at line 221 of file BDSGeometryFactoryGDML.cc.
References GetAllLogicalPhysicalAndMaterials().
Referenced by Build(), and GetAllLogicalPhysicalAndMaterials().


|
protectedvirtual |
Use the GDML preprocessing scheme to prepare the preprocessed volume names.
Reimplemented from BDSGeometryFactoryBase.
Definition at line 217 of file BDSGeometryFactoryGDML.cc.
References BDSGDMLPreprocessor::ProcessedNodeName().

|
private |
Create a temporary file in the current working directory (even though the geometry file may not exist there) and create a copy of the input geometry file line by line, but replacing a 'key' with 'replacement'. Returns the temporary file name created. Naming only allows one temporary file per component - so far, not a problem.
Definition at line 238 of file BDSGeometryFactoryGDML.cc.
|
static |
Reading a BDSIM colour aux tag. value: "v r g b a" -> bool visible by reference and return value of rgba. The style is also set by reference.
Definition at line 194 of file BDSGeometryFactoryGDML.cc.