18#ifndef BDSLINKDETECTORCONSTRUCTION_H
19#define BDSLINKDETECTORCONSTRUCTION_H
20#include "BDSBeamline.hh"
21#include "BDSExtent.hh"
23#include "G4ThreeVector.hh"
25#include "G4Version.hh"
26#include "G4VUserDetectorConstruction.hh"
37class G4ChannelingOptrMultiParticleChangeCrossSection;
38class G4VPhysicalVolume;
40#include "parser/element.h"
41#include "parser/elementtype.h"
56 virtual G4VPhysicalVolume* Construct();
60 const std::string& materialName,
62 G4double halfApertureLeft,
63 G4double halfApertureRight,
67 G4double jawTiltLeft = 0.0,
68 G4double jawTiltRight = 0.0,
69 G4bool buildLeftJaw =
true,
70 G4bool buildRightJaw =
true,
71 G4bool isACrystal =
false,
72 G4double crystalAngle = 0,
73 G4bool sampleIn =
false);
77 const std::string& materialName,
78 const std::string& tipMaterialName,
79 G4double tipThickness,
81 G4double halfApertureLeft,
82 G4double halfApertureRight,
86 G4double jawTiltLeft = 0.0,
87 G4double jawTiltRight = 0.0,
88 G4bool buildLeftJaw =
true,
89 G4bool buildRightJaw =
true);
103 void BuildPhysicsBias();
105 inline const std::map<std::string, G4int>& NameToElementIndex()
const {
return nameToElementIndex;}
107 inline G4int NumberOfElements()
const {
return linkBeamline ? (G4int)linkBeamline->
size() : 0;}
108 inline void SetSamplerWorldID(G4int samplerWorldIDIn) {
samplerWorldID = samplerWorldIDIn;}
109 inline const BDSBeamline* LinkBeamline()
const {
return linkBeamline;}
120 G4VPhysicalVolume* worldPV;
129#if G4VERSION_NUMBER > 1039
130 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.