BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Member Functions | Private Attributes
BDSParallelWorldSampler Class Reference

A parallel world for sampler planes. More...

#include <BDSParallelWorldSampler.hh>

Inheritance diagram for BDSParallelWorldSampler:
Inheritance graph
Collaboration diagram for BDSParallelWorldSampler:
Collaboration graph

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. More...
 
BDSSamplerPlaneGeneralPlane () const
 Accessor. More...
 
G4LogicalVolume * WorldLV () const
 Accessor. More...
 

Private Member Functions

void ErrorNonPositive (G4double value, const G4String &variableName, const G4String &objectName) const
 Utility function to reduce code. More...
 
BDSSamplerBuildSampler (const GMAD::SamplerPlacement &samplerPlacement, BDSSamplerType st, G4double &radius) const
 Construct the geometry for a sampler. Update 'radius' by reference if applicable. More...
 
void AdjustTransform (G4Transform3D &trans, BDSSamplerType st) const
 

Private Attributes

std::vector< G4VPhysicalVolume * > placements
 Cache of the placements to clean up at the end. More...
 
G4String suffix
 Just the input part of the world name. More...
 
G4VisAttributes * samplerWorldVis
 Visualisation attributes for the sampler world. More...
 
BDSSamplerPlanegeneralPlane
 General single sampler we use for plane samplers. More...
 
std::map< int, BDSSamplerPlane * > samplerInstances
 
G4LogicalVolume * samplerWorldLV
 

Detailed Description

A parallel world for sampler planes.

Author
Laurie Nevay

Definition at line 48 of file BDSParallelWorldSampler.hh.

Constructor & Destructor Documentation

◆ BDSParallelWorldSampler()

BDSParallelWorldSampler::BDSParallelWorldSampler ( const G4String &  name)
explicit

Definition at line 59 of file BDSParallelWorldSampler.cc.

◆ ~BDSParallelWorldSampler()

BDSParallelWorldSampler::~BDSParallelWorldSampler ( )
virtual

Definition at line 67 of file BDSParallelWorldSampler.cc.

Member Function Documentation

◆ AdjustTransform()

void BDSParallelWorldSampler::AdjustTransform ( G4Transform3D &  trans,
BDSSamplerType  st 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildSampler()

BDSSampler * BDSParallelWorldSampler::BuildSampler ( const GMAD::SamplerPlacement samplerPlacement,
BDSSamplerType  st,
G4double &  radius 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct()

void BDSParallelWorldSampler::Construct ( )
virtual

◆ ErrorNonPositive()

void BDSParallelWorldSampler::ErrorNonPositive ( G4double  value,
const G4String &  variableName,
const G4String &  objectName 
) const
private

Utility function to reduce code.

Definition at line 157 of file BDSParallelWorldSampler.cc.

Referenced by BuildSampler().

Here is the caller graph for this function:

◆ GeneralPlane()

BDSSamplerPlane * BDSParallelWorldSampler::GeneralPlane ( ) const
inline

Accessor.

Definition at line 60 of file BDSParallelWorldSampler.hh.

References generalPlane.

◆ Place()

void BDSParallelWorldSampler::Place ( const BDSBeamlineElement element,
G4double  samplerRadius 
)

◆ WorldLV()

G4LogicalVolume * BDSParallelWorldSampler::WorldLV ( ) const
inline

Accessor.

Definition at line 61 of file BDSParallelWorldSampler.hh.

Field Documentation

◆ generalPlane

BDSSamplerPlane* BDSParallelWorldSampler::generalPlane
private

General single sampler we use for plane samplers.

Definition at line 89 of file BDSParallelWorldSampler.hh.

Referenced by Construct(), and GeneralPlane().

◆ placements

std::vector<G4VPhysicalVolume*> BDSParallelWorldSampler::placements
private

Cache of the placements to clean up at the end.

Definition at line 85 of file BDSParallelWorldSampler.hh.

Referenced by Construct(), and Place().

◆ samplerInstances

std::map<int, BDSSamplerPlane*> BDSParallelWorldSampler::samplerInstances
private

Definition at line 90 of file BDSParallelWorldSampler.hh.

◆ samplerWorldLV

G4LogicalVolume* BDSParallelWorldSampler::samplerWorldLV
private

Definition at line 91 of file BDSParallelWorldSampler.hh.

◆ samplerWorldVis

G4VisAttributes* BDSParallelWorldSampler::samplerWorldVis
private

Visualisation attributes for the sampler world.

Definition at line 88 of file BDSParallelWorldSampler.hh.

Referenced by Construct().

◆ suffix

G4String BDSParallelWorldSampler::suffix
private

Just the input part of the world name.

Definition at line 87 of file BDSParallelWorldSampler.hh.


The documentation for this class was generated from the following files: