19#ifndef BDSACCELERATORMODEL_H
20#define BDSACCELERATORMODEL_H
21#include "BDSBeamlineSet.hh"
22#include "BDSPlacementToMake.hh"
23#include "BDSScorerHistogramDef.hh"
26#include "G4Transform3D.hh"
39class G4VPhysicalVolume;
41class G4VUserParallelWorld;
73 inline G4LogicalVolume*
WorldLV()
const {
return worldLV;}
89 inline void RegisterParallelWorld(G4VUserParallelWorld* world) {
parallelWorlds.insert(world);}
132 G4Region*
Region(
const G4String& name)
const;
135 std::set<G4LogicalVolume*>*
VolumeSet(
const G4String& name);
140 const G4String& registryName);
162 const G4Transform3D& placement);
171 void RegisterLinkComponent(
BDSLinkComponent* linkComponentIn) {linkComponents.insert(linkComponentIn);}
172 inline const std::set<BDSLinkComponent*>& LinkComponents()
const {
return linkComponents;}
180 G4LogicalVolume* worldLV;
181 G4VSolid* worldSolid;
203 std::map<G4String, BDSRegion*> regions;
217 std::map<G4String, G4Transform3D> scorerMeshPlacements;
219 std::set<BDSLinkComponent*> linkComponents;
A holder class for all representations of the accelerator model created in BDSIM.
BDSBeamline * placementBeamline
Placement beam line.
std::vector< BDSPlacementToMake > placementFieldPlacements
void RegisterFields(std::vector< BDSFieldObjects * > &fieldsIn)
Register all field objects.
std::vector< BDSScorerHistogramDef > scorerHistogramDefs
Scorer histogram definitions cached from construction here to be used in output creation.
void RegisterBeamlineSetExtra(const G4String &name, const BDSBeamlineSet &setIn)
Register a set of beam lines to be managed and cleared up at the end of the simulation.
std::map< G4String, BDSScorerHistogramDef > scorerHistogramDefsMap
Scorer histogram definitions cached from construction here to be used in output creation.
BDSBeamline * blmsBeamline
BLMs beam line.
void RegisterWorldLV(G4LogicalVolume *worldIn)
Register constituent of world.
std::set< G4LogicalVolume * > * VolumeSet(const G4String &name)
Returns pointer to a set of logical volumes. If no set by that name exits, create it.
std::map< BDSBeamline *, G4bool > massWorldMapTF
std::map< G4String, BDSBeamlineSet > extraBeamlines
Extra beamlines.
void MassWorldBeamlineAndIndex(BDSBeamline *&bl, G4int &index) const
BDSApertureInfo * Aperture(G4String name) const
const BDSScorerHistogramDef * ScorerHistogramDef(const G4String &name)
Access all scorer histogram definitions.
const std::vector< BDSScorerHistogramDef > & ScorerHistogramDefinitions() const
Access all scorer histogram definitions.
const std::map< G4String, BDSBeamlineSet > & ExtraBeamlines() const
Accessor.
std::map< G4String, std::set< G4LogicalVolume * > * > volumeRegistries
All volume registries.
const std::map< G4String, BDSScorerHistogramDef > & ScorerHistogramDefinitionsMap() const
Access all scorer histogram definitions.
BDSBeamline * CorrespondingMassWorldBeamline(BDSBeamline *bl) const
const std::map< G4String, G4Transform3D > & ScorerMeshPlacementsMap() const
Access all scorer histogram definitions.
const std::vector< BDSPlacementToMake > & PlacementFieldPWPlacements() const
Access field volumes for parallel world.
std::map< G4String, BDSApertureInfo * > apertures
All apertures.
BDSAcceleratorModel()
Default constructor is private as singleton.
std::vector< BDSFieldObjects * > fields
All field objects.
G4bool BeamlineIsMassWorld(BDSBeamline *bl) const
std::set< BDSRegion * > regionStorage
Unique storage of regions.
BDSBeamline * TunnelBeamline() const
Access the beam line containing all the tunnel segments.
void MapBeamlineSet(const BDSBeamlineSet &setIn)
Utility function to apply mapping.
void RegisterApertures(const std::map< G4String, BDSApertureInfo * > &aperturesIn)
Register a map of apertures with associated names.
void RegisterScorerPlacement(const G4String &meshName, const G4Transform3D &placement)
Register a copy of the scorer placement so it can be used in the output.
const BDSBeamlineSet & BeamlineSetMain() const
Accessor.
void RegisterAperture(const G4String &name, BDSApertureInfo *apertureIn)
Register a single aperture.
const BDSBeamline * BeamlineMain() const
Accessor.
BDSBeamline * BLMsBeamline() const
Access the beam line of blm placements.
void RegisterTunnelBeamline(BDSBeamline *beamlineIn)
Register the beam line containing all the tunnel segments.
G4bool VolumeInSet(G4LogicalVolume *volume, const G4String ®istryName)
BDSBeamline * PlacementBeamline() const
Access the beam line of arbitrary placements.
void RegisterWorldPV(G4VPhysicalVolume *worldIn)
Register constituent of world.
void RegisterPlacementBeamline(BDSBeamline *placementBLIn)
Register the beam line of arbitrary placements.
void RegisterPlacementFieldPlacements(const std::vector< BDSPlacementToMake > &pIn)
Register complete placements to make for field volumes in parallel world.
void RegisterBeamlineSetMain(const BDSBeamlineSet &setIn)
Register the main beam line set.
G4VPhysicalVolume * worldPV
Physical volume of the mass world.
const BDSBeamlineSet & BeamlineSet(const G4String &name) const
Accessor.
std::set< G4VUserParallelWorld * > parallelWorlds
Parallel worlds not use with beam lines.
void RegisterScorerHistogramDefinition(const BDSScorerHistogramDef &def)
std::map< BDSBeamline *, BDSBeamline * > clToMassWorldMap
Mapping from any curvilinear beam line to the corresponding mass world beam line.
G4LogicalVolume * WorldLV() const
Access the logical volume of the world.
void RegisterBLMs(BDSBeamline *blmsIn)
Register a beam line of blm placements.
G4Region * Region(const G4String &name) const
Access region information. Will exit if not found.
G4VPhysicalVolume * WorldPV() const
Access the physical volume of the world.
void RegisterWorldSolid(G4VSolid *worldIn)
Register constituent of world.
BDSBeamline * tunnelBeamline
Tunnel segments beam line.
void RegisterRegion(BDSRegion *region)
Register a region.
Holder class for all information required to describe an aperture.
Simple struct to return a beamline plus associated beam lines.
A vector of BDSBeamlineElement instances - a beamline.
A holder for all the Geant4 field related objects.
A BDSAcceleratorComponent wrapper for BDSLinkOpaqueBox.
Range cuts for a region. Help with defaults.
Definition for a scorer histogram.