|
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, 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 void | SetDefaultRigidity (G4double rigidityIn) |
Protected Member Functions | |
| virtual void | CleanUp () |
| Clean up members. | |
| void | CleanUpSQL () |
| Non-virtual clean up as used in constructor. | |
Protected Member Functions inherited from BDSGeometryFactoryBase | |
| 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. | |
| 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 | |
| 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) | |
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. | |
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 288 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 296 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 304 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 581 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 447 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 492 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 780 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 527 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 689 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 231 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 650 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 610 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 743 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 897 of file BDSGeometryFactorySQL.cc.
References defaultRigidity, BDSGeometryFactoryBase::ExpandExtent(), BDSGlobalConstants::Instance(), samplerIDs, and BDSExtent::Translate().

|
private |
Definition at line 868 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 311 of file BDSGeometryFactorySQL.cc.
|
inlinestatic |
Definition at line 57 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 420 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 427 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 342 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 414 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 397 of file BDSGeometryFactorySQL.cc.
|
private |
Definition at line 118 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 119 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 171 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 172 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 122 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 128 of file BDSGeometryFactorySQL.hh.
|
staticprivate |
Cache of default rigidity for possibly constructing fields (only SQL)
Definition at line 180 of file BDSGeometryFactorySQL.hh.
Referenced by PlaceComponents().
|
private |
Definition at line 85 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 123 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 123 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 123 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 115 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 153 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 154 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 113 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 113 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 113 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 113 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 125 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 117 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 103 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 105 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 97 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 92 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 93 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 177 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 116 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 114 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 107 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 108 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 109 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 121 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 127 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 88 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 89 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 175 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 150 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 112 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 110 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 111 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 167 of file BDSGeometryFactorySQL.hh.
Referenced by CleanUpSQL(), and PlaceComponents().
|
private |
Definition at line 169 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 120 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 90 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 91 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 176 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 104 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 84 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 174 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 81 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 101 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 100 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 99 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 98 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 102 of file BDSGeometryFactorySQL.hh.
|
private |
Definition at line 95 of file BDSGeometryFactorySQL.hh.