BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A parallel world for sampler planes. More...
#include <BDSParallelWorldSampler.hh>
Public Member Functions | |
BDSParallelWorldSampler ()=delete | |
No default constructor. | |
BDSParallelWorldSampler (const G4String &name) | |
virtual void | Construct () |
void | Place (const BDSBeamlineElement *element, G4double samplerRadius) |
Place a sampler from a single element. | |
BDSSamplerPlane * | GeneralPlane () const |
Accessor. | |
G4LogicalVolume * | WorldLV () const |
Accessor. | |
Private Member Functions | |
void | ErrorNonPositive (G4double value, const G4String &variableName, const G4String &objectName) const |
Utility function to reduce code. | |
BDSSampler * | BuildSampler (const GMAD::SamplerPlacement &samplerPlacement, BDSSamplerType st, G4double &radius) const |
Construct the geometry for a sampler. Update 'radius' by reference if applicable. | |
void | AdjustTransform (G4Transform3D &trans, BDSSamplerType st) const |
Private Attributes | |
std::vector< G4VPhysicalVolume * > | placements |
Cache of the placements to clean up at the end. | |
G4String | suffix |
Just the input part of the world name. | |
G4VisAttributes * | samplerWorldVis |
Visualisation attributes for the sampler world. | |
BDSSamplerPlane * | generalPlane |
General single sampler we use for plane samplers. | |
std::map< int, BDSSamplerPlane * > | samplerInstances |
G4LogicalVolume * | samplerWorldLV |
A parallel world for sampler planes.
Definition at line 48 of file BDSParallelWorldSampler.hh.
|
explicit |
Definition at line 59 of file BDSParallelWorldSampler.cc.
|
virtual |
Definition at line 67 of file BDSParallelWorldSampler.cc.
|
private |
Compound the rotation of the placement transform for sphereforward and cylinderforward types of sampler only to orientate them along the beam line direction.
Definition at line 301 of file BDSParallelWorldSampler.cc.
References BDSTypeSafeEnum< def, inner >::underlying().
Referenced by Construct().
|
private |
Construct the geometry for a sampler. Update 'radius' by reference if applicable.
Definition at line 165 of file BDSParallelWorldSampler.cc.
References BDSAcceleratorModel::Aperture(), ErrorNonPositive(), BDS::IsFinite(), GMAD::SamplerPlacement::name, GMAD::SamplerPlacement::partIDSetID, and BDSTypeSafeEnum< def, inner >::underlying().
Referenced by Construct().
|
virtual |
Construct the required parallel world geometry. This must overload the pure virtual method in G4VUserParallelWorld.
Definition at line 77 of file BDSParallelWorldSampler.cc.
References AdjustTransform(), BDSAcceleratorModel::BeamlineMain(), BuildSampler(), BDSDetectorConstruction::CreatePlacementTransform(), generalPlane, BDSGeometryComponent::GetContainerLogicalVolume(), BDSSamplerRegistry::GetNameUnique(), BDSParser::GetSamplerPlacements(), BDSGlobalConstants::Instance(), BDSParser::Instance(), BDSSamplerRegistry::Instance(), BDSOutput::InvalidSamplerName(), Place(), placements, BDSOutput::PrintProtectedNames(), BDSSamplerRegistry::RegisterSampler(), and samplerWorldVis.
|
private |
Utility function to reduce code.
Definition at line 157 of file BDSParallelWorldSampler.cc.
Referenced by BuildSampler().
|
inline |
void BDSParallelWorldSampler::Place | ( | const BDSBeamlineElement * | element, |
G4double | samplerRadius | ||
) |
Place a sampler from a single element.
Definition at line 330 of file BDSParallelWorldSampler.cc.
References BDSBeamlineElement::GetAcceleratorComponent(), BDSBeamlineElement::GetAngle(), BDSBeamlineElement::GetChordLength(), BDSGeometryComponent::GetContainerLogicalVolume(), BDSBeamlineElement::GetExtent(), BDSBeamlineElement::GetReferencePositionEnd(), BDSBeamlineElement::GetSamplerInfo(), BDSBeamlineElement::GetSamplerPlacementTransform(), BDSBeamlineElement::GetSPositionEnd(), BDSAcceleratorComponent::InputFaceNormal(), BDSGlobalConstants::Instance(), BDSSamplerRegistry::Instance(), BDS::IsFinite(), BDSAcceleratorComponent::OutputFaceNormal(), placements, BDSSamplerRegistry::RegisterSampler(), BDSExtent::TransverseBoundingRadius(), and BDSTypeSafeEnum< def, inner >::underlying().
Referenced by Construct().
|
inline |
Accessor.
Definition at line 61 of file BDSParallelWorldSampler.hh.
|
private |
General single sampler we use for plane samplers.
Definition at line 89 of file BDSParallelWorldSampler.hh.
Referenced by Construct(), and GeneralPlane().
|
private |
Cache of the placements to clean up at the end.
Definition at line 85 of file BDSParallelWorldSampler.hh.
Referenced by Construct(), and Place().
|
private |
Definition at line 90 of file BDSParallelWorldSampler.hh.
|
private |
Definition at line 91 of file BDSParallelWorldSampler.hh.
|
private |
Visualisation attributes for the sampler world.
Definition at line 88 of file BDSParallelWorldSampler.hh.
Referenced by Construct().
|
private |
Just the input part of the world name.
Definition at line 87 of file BDSParallelWorldSampler.hh.