BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Geometry factory for SQL geometry. More...
#include <BDSGeometryFactorySQL.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) |
![]() | |
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... | |
Static Public Member Functions | |
static void | SetDefaultRigidity (G4double rigidityIn) |
Protected Member Functions | |
virtual void | CleanUp () |
Clean up members. More... | |
void | CleanUpSQL () |
Non-virtual clean up as used in constructor. More... | |
![]() | |
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 |
Private Member Functions | |
void | BuildSQLObjects (G4String file) |
void | SetCommonParams (BDSMySQLTable *, G4int) |
void | SetPlacementParams (BDSMySQLTable *, G4int) |
G4VisAttributes * | VisAtt () |
G4UserLimits * | UserLimits (G4double) |
void | SetLogVolAtt (G4LogicalVolume *, G4double) |
void | SetLogVolRegion (G4LogicalVolume *) |
G4LogicalVolume * | BuildCone (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildEllipticalCone (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildPolyCone (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildBox (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildTrap (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildTorus (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildSampler (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildTube (BDSMySQLTable *aSQLTable, G4int k) |
G4LogicalVolume * | BuildEllipticalTube (BDSMySQLTable *aSQLTable, G4int k) |
G4RotationMatrix * | RotateComponent (G4double psi, G4double phi, G4double theta) |
void | PlaceComponents (BDSMySQLTable *aSQLTable, std::vector< G4LogicalVolume * > VOL_LIST) |
void | SetMultiplePhysicalVolumes (G4VPhysicalVolume *aPhysVol) |
template<typename T > | |
void | AssignVariable (BDSMySQLTable *aSQLTable, G4int k, G4String variableName, T &variable) |
Search SQL table for variableName and if exists assign to variable. | |
template<> | |
void | AssignVariable (BDSMySQLTable *aSQLTable, G4int k, G4String variableName, G4double &variable) |
template<> | |
void | AssignVariable (BDSMySQLTable *aSQLTable, G4int k, G4String variableName, G4int &variable) |
template<> | |
void | AssignVariable (BDSMySQLTable *aSQLTable, G4int k, G4String variableName, G4String &variable) |
Private Attributes | |
std::unordered_map< G4VSolid *, BDSExtent > | unShiftedExtents |
std::list< G4ThreeVector > | UniformField |
std::list< G4String > | Fieldvol |
std::list< G4double > | QuadBgrad |
std::list< G4String > | Quadvol |
std::list< G4double > | SextBgrad |
std::list< G4String > | Sextvol |
std::list< G4double > | OctBgrad |
std::list< G4String > | Octvol |
std::vector< G4LogicalVolume * > | VOL_LIST |
G4int | NVariables |
G4double | VisRed |
G4double | VisGreen |
G4double | VisBlue |
G4double | VisAlpha |
G4String | VisType |
G4String | Material |
G4String | TableName |
G4String | Name |
G4double | PosX |
G4double | PosY |
G4double | PosZ |
G4double | RotPsi |
G4double | RotTheta |
G4double | RotPhi |
G4double | K1 |
G4double | K2 |
G4double | K3 |
G4double | K4 |
G4String | PARENTNAME |
G4String | InheritStyle |
G4String | Parameterisation |
G4String | MagType |
G4int | align_in |
G4int | align_out |
G4int | SetSensitive |
G4int | PrecisionRegion |
G4int | ApproximationRegion |
G4double | FieldX |
G4double | FieldY |
G4double | FieldZ |
G4double | lengthUserLimit |
G4Region * | precisionRegionSQL |
G4Region * | approximationRegionSQL |
G4RotationMatrix * | rotateComponent |
G4LogicalVolume * | itsMarkerVol |
std::vector< BDSMySQLTable * > | itsSQLTable |
std::map< G4LogicalVolume *, G4int > | samplerIDs |
std::set< G4LogicalVolume * > | sensitiveComponents |
G4VPhysicalVolume * | alignInVolume |
G4VPhysicalVolume * | alignOutVolume |
std::map< G4String, G4ThreeVector > | uniformFieldVolField |
std::map< G4String, G4double > | quadVolBgrad |
std::map< G4String, G4double > | sextVolBgrad |
std::map< G4String, G4double > | octVolBgrad |
Static Private Attributes | |
static G4double | defaultRigidity = std::numeric_limits<double>::max() |
Cache of default rigidity for possibly constructing fields (only SQL) More... | |
Additional Inherited Members | |
![]() | |
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... | |
Geometry factory for SQL geometry.
The extents are accumulated during the construction of the solids in a vector then these are used to expand the extent of the full element using the placement offset that's done at a later stage.
Definition at line 51 of file BDSGeometryFactorySQL.hh.
BDSGeometryFactorySQL::BDSGeometryFactorySQL | ( | ) |
Definition at line 69 of file BDSGeometryFactorySQL.cc.
|
inlinevirtual |
Definition at line 55 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 280 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 288 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 296 of file BDSGeometryFactorySQL.cc.
|
virtual |
Main interface overrides base class method to construct a file with optional colour mapping.
Implements BDSGeometryFactoryBase.
Definition at line 146 of file BDSGeometryFactorySQL.cc.
References BDSGeometryFactoryBase::ApplyColourMapping(), CleanUp(), BDS::GetFullPath(), BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterPhysicalVolume(), BDSGeometryComponent::RegisterRotationMatrix(), BDSGeometryComponent::RegisterSolid(), BDSGeometryComponent::RegisterVisAttributes(), and BDS::StrContains().
|
private |
Definition at line 573 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 439 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 484 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 772 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 519 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 681 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 223 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 642 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 602 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 735 of file BDSGeometryFactorySQL.cc.
|
protectedvirtual |
Clean up members.
Reimplemented from BDSGeometryFactoryBase.
Definition at line 74 of file BDSGeometryFactorySQL.cc.
References BDSGeometryFactoryBase::CleanUp(), and CleanUpSQL().
Referenced by Build().
|
protected |
Non-virtual clean up as used in constructor.
Definition at line 80 of file BDSGeometryFactorySQL.cc.
References samplerIDs.
Referenced by CleanUp().
|
private |
Offset extent of individual solid and expand it.
Definition at line 889 of file BDSGeometryFactorySQL.cc.
References defaultRigidity, BDSGeometryFactoryBase::ExpandExtent(), BDSGlobalConstants::Instance(), samplerIDs, and BDSExtent::Translate().
|
private |
Definition at line 860 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 303 of file BDSGeometryFactorySQL.cc.
|
inlinestatic |
Definition at line 57 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 412 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 419 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 334 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 406 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 389 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 115 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 116 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 168 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 169 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 119 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 125 of file BDSGeometryFactorySQL.hh.
|
staticprivate |
Cache of default rigidity for possibly constructing fields (only SQL)
Definition at line 177 of file BDSGeometryFactorySQL.hh.
Referenced by PlaceComponents().
|
private |
Definition at line 82 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 120 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 120 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 120 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 112 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 150 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 151 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 110 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 110 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 110 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 110 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 122 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 114 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 100 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 102 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 94 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 89 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 90 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 174 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 113 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 111 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 104 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 105 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 106 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 118 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 124 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 85 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 86 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 172 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 147 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 109 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 107 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 108 of file BDSGeometryFactorySQL.hh.
|
private |
As the samplers are registered and placed in a separate loop, we need to store a cache of the copy numbers (for lookup in the output) w.r.t. the particular logical volume (referenced by pointer);
Definition at line 164 of file BDSGeometryFactorySQL.hh.
Referenced by CleanUpSQL(), and PlaceComponents().
|
private |
Definition at line 166 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 117 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 87 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 88 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 173 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 101 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 81 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 171 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 78 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 98 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 97 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 96 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 95 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 99 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 92 of file BDSGeometryFactorySQL.hh.