19#ifndef BDSLINKDETECTORCONSTRUCTION_H
20#define BDSLINKDETECTORCONSTRUCTION_H
21#include "BDSBeamline.hh"
22#include "BDSCollimatorJaw.hh"
23#include "BDSExtent.hh"
25#include "G4ThreeVector.hh"
27#include "G4Version.hh"
28#include "G4VUserDetectorConstruction.hh"
38class G4ChannelingOptrMultiParticleChangeCrossSection;
39class G4VPhysicalVolume;
54 virtual G4VPhysicalVolume* Construct();
58 const std::string& materialName,
60 G4double halfApertureLeft,
61 G4double halfApertureRight,
65 G4double jawTiltLeft = 0.0,
66 G4double jawTiltRight = 0.0,
67 G4bool buildLeftJaw =
true,
68 G4bool buildRightJaw =
true,
69 G4bool isACrystal =
false,
70 G4double crystalAngle = 0,
71 G4bool sampleIn =
false);
83 void BuildPhysicsBias();
85 inline const std::map<std::string, G4int>& NameToElementIndex()
const {
return nameToElementIndex;}
87 inline G4int NumberOfElements()
const {
return linkBeamline ? (G4int)linkBeamline->
size() : 0;}
88 inline void SetSamplerWorldID(G4int samplerWorldIDIn) {
samplerWorldID = samplerWorldIDIn;}
89 inline const BDSBeamline* LinkBeamline()
const {
return linkBeamline;}
100 G4VPhysicalVolume* worldPV;
109#if G4VERSION_NUMBER > 1039
110 G4ChannelingOptrMultiParticleChangeCrossSection* crystalBiasing;
A class that holds a fully constructed BDSAcceleratorComponent as well as any information relevant to...
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 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.
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.