19#ifndef BDSLINKDETECTORCONSTRUCTION_H
20#define BDSLINKDETECTORCONSTRUCTION_H
21#include "BDSBeamline.hh"
22#include "BDSCollimatorJaw.hh"
23#include "BDSCollimatorTipJaw.hh"
24#include "BDSExtent.hh"
26#include "G4ThreeVector.hh"
28#include "G4Version.hh"
29#include "G4VUserDetectorConstruction.hh"
40class G4ChannelingOptrMultiParticleChangeCrossSection;
41class G4VPhysicalVolume;
43#include "parser/element.h"
44#include "parser/elementtype.h"
59 virtual G4VPhysicalVolume* Construct();
63 const std::string& materialName,
65 G4double halfApertureLeft,
66 G4double halfApertureRight,
70 G4double jawTiltLeft = 0.0,
71 G4double jawTiltRight = 0.0,
72 G4bool buildLeftJaw =
true,
73 G4bool buildRightJaw =
true,
74 G4bool isACrystal =
false,
75 G4double crystalAngle = 0,
76 G4bool sampleIn =
false);
80 const std::string& materialName,
81 const std::string& tipMaterialName,
82 G4double tipThickness,
84 G4double halfApertureLeft,
85 G4double halfApertureRight,
89 G4double jawTiltLeft = 0.0,
90 G4double jawTiltRight = 0.0,
91 G4bool buildLeftJaw =
true,
92 G4bool buildRightJaw =
true);
106 void BuildPhysicsBias();
108 inline const std::map<std::string, G4int>& NameToElementIndex()
const {
return nameToElementIndex;}
110 inline G4int NumberOfElements()
const {
return linkBeamline ? (G4int)linkBeamline->
size() : 0;}
111 inline void SetSamplerWorldID(G4int samplerWorldIDIn) {
samplerWorldID = samplerWorldIDIn;}
112 inline const BDSBeamline* LinkBeamline()
const {
return linkBeamline;}
123 G4VPhysicalVolume* worldPV;
132#if G4VERSION_NUMBER > 1039
133 G4ChannelingOptrMultiParticleChangeCrossSection* crystalBiasing;
A class that holds a fully constructed BDSAcceleratorComponent as well as any information relevant to...
A class that holds the current integrated quantities along a beam line.
A vector of BDSBeamlineElement instances - a beamline.
BeamlineVector::size_type size() const
Get the number of elements.
Holder for +- extents in 3 dimensions.
Construction of the geometry in the case of a link model.
G4int AddLinkCollimatorTipJaw(const std::string &collimatorName, const std::string &materialName, const std::string &tipMaterialName, G4double tipThickness, G4double length, G4double halfApertureLeft, G4double halfApertureRight, G4double rotation, G4double xOffset, G4double yOffset, G4double jawTiltLeft=0.0, G4double jawTiltRight=0.0, G4bool buildLeftJaw=true, G4bool buildRightJaw=true)
Interface to append a tip collimator jaw to the linking.
G4int AddLinkCollimatorJaw(const std::string &collimatorName, const std::string &materialName, G4double length, G4double halfApertureLeft, G4double halfApertureRight, G4double rotation, G4double xOffset, G4double yOffset, G4double jawTiltLeft=0.0, G4double jawTiltRight=0.0, G4bool buildLeftJaw=true, G4bool buildRightJaw=true, G4bool isACrystal=false, G4double crystalAngle=0, G4bool sampleIn=false)
Interface to append a collimator of jaw style to the linking.
G4int AddLinkElement(GMAD::Element el)
Interface to append an element.
BDSExtent WorldExtent() const
Accessor.
G4int samplerWorldID
Cache of the index to which parallel world the sampler one is.
G4int PlaceOneComponent(const BDSBeamlineElement *element, const G4String &originalName)
Place a beam line element in the world.
const BDSParticleDefinition * designParticle
Particle definition all components are built w.r.t. Includes rigidity etc.
BDSLinkRegistry * LinkRegistry() const
Accessor.
BDSLinkDetectorConstruction()
Default constructor.
std::map< std::string, G4int > nameToElementIndex
Build up a copy here too.
std::map< G4int, G4int > linkIDToBeamlineIndex
Special linkID to linkBeamline index.
void SetDesignParticle(const BDSParticleDefinition *defIn)
Set the design particle definition.
Generates primary particle vertices using BDSBunch.
Registry / map of components for tracker linkage.
Wrapper for particle definition.