BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Construction of the geometry in the case of a link model. More...
#include <BDSLinkDetectorConstruction.hh>
Public Member Functions | |
BDSLinkDetectorConstruction () | |
Default constructor. | |
virtual G4VPhysicalVolume * | Construct () |
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. | |
void | SetDesignParticle (const BDSParticleDefinition *defIn) |
Set the design particle definition. | |
void | SetPrimaryGeneratorAction (BDSLinkPrimaryGeneratorAction *pgIn) |
void | BuildPhysicsBias () |
const std::map< std::string, G4int > & | NameToElementIndex () const |
const std::map< int, int > & | LinkIDToBeamlineIndex () const |
G4int | NumberOfElements () const |
void | SetSamplerWorldID (G4int samplerWorldIDIn) |
const BDSBeamline * | LinkBeamline () const |
BDSExtent | WorldExtent () const |
Accessor. | |
BDSLinkRegistry * | LinkRegistry () const |
Accessor. | |
Private Member Functions | |
void | UpdateWorldSolid () |
G4int | PlaceOneComponent (const BDSBeamlineElement *element, const G4String &originalName) |
Place a beam line element in the world. | |
Private Attributes | |
G4Box * | worldSolid |
G4VPhysicalVolume * | worldPV |
BDSExtent | worldExtent |
BDSBeamline * | linkBeamline |
BDSLinkRegistry * | linkRegistry |
BDSLinkPrimaryGeneratorAction * | primaryGeneratorAction |
const BDSParticleDefinition * | designParticle |
Particle definition all components are built w.r.t. Includes rigidity etc. | |
G4ChannelingOptrMultiParticleChangeCrossSection * | crystalBiasing |
G4int | samplerWorldID |
Cache of the index to which parallel world the sampler one is. | |
std::map< std::string, G4int > | nameToElementIndex |
Build up a copy here too. | |
std::map< G4int, G4int > | linkIDToBeamlineIndex |
Special linkID to linkBeamline index. | |
Construction of the geometry in the case of a link model.
Definition at line 47 of file BDSLinkDetectorConstruction.hh.
BDSLinkDetectorConstruction::BDSLinkDetectorConstruction | ( | ) |
Default constructor.
Definition at line 65 of file BDSLinkDetectorConstruction.cc.
References BDSSDManager::SetLinkRegistry().
|
virtual |
Definition at line 81 of file BDSLinkDetectorConstruction.cc.
G4int BDSLinkDetectorConstruction::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.
Definition at line 179 of file BDSLinkDetectorConstruction.cc.
References GMAD::Element::aper1, GMAD::Element::apertureType, BDSCrystalInfo::bendingAngleYAxis, designParticle, BDSExtent::DZ(), BDSGeometryComponent::GetExtent(), BDSAcceleratorComponent::GetName(), BDSGeometryComponent::GetName(), GMAD::Element::jawTiltRight, GMAD::Element::l, linkIDToBeamlineIndex, BDS::LowerCase(), nameToElementIndex, GMAD::Element::offsetX, GMAD::Element::offsetY, PlaceOneComponent(), GMAD::Element::region, GMAD::Element::tilt, BDSExtent::TiltOffset(), BDSExtent::TransverseBoundingRadius(), GMAD::Element::type, UpdateWorldSolid(), BDSException::what(), GMAD::Element::xsizeRight, and GMAD::Element::ysize.
Referenced by BDSIMLink::AddLinkCollimatorJaw().
void BDSLinkDetectorConstruction::BuildPhysicsBias | ( | ) |
Definition at line 403 of file BDSLinkDetectorConstruction.cc.
|
virtual |
Definition at line 90 of file BDSLinkDetectorConstruction.cc.
|
inline |
Definition at line 89 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 86 of file BDSLinkDetectorConstruction.hh.
|
inline |
Accessor.
Definition at line 80 of file BDSLinkDetectorConstruction.hh.
Referenced by BDSLinkPrimaryGeneratorAction::GeneratePrimaries().
|
inline |
Definition at line 85 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 87 of file BDSLinkDetectorConstruction.hh.
|
private |
Place a beam line element in the world.
Definition at line 359 of file BDSLinkDetectorConstruction.cc.
References BDSSamplerPlane::ChordLength(), BDSLinkComponent::Component(), BDSBeamlineElement::GetAcceleratorComponent(), BDSGeometryComponent::GetContainerLogicalVolume(), BDSBeamlineElement::GetCopyNo(), BDSBeamlineElement::GetPlacementName(), BDSBeamlineElement::GetPlacementTransform(), BDSBeamlineElement::GetSamplerType(), BDSBeamlineElement::GetSPositionStart(), BDSGlobalConstants::Instance(), BDSSamplerRegistry::Instance(), BDSBeamlineElement::PlaceElement(), BDSSamplerRegistry::RegisterSampler(), and samplerWorldID.
Referenced by AddLinkCollimatorJaw().
|
inline |
Set the design particle definition.
Definition at line 74 of file BDSLinkDetectorConstruction.hh.
References designParticle.
Referenced by BDSIMLink::Initialise().
|
inline |
Definition at line 75 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 88 of file BDSLinkDetectorConstruction.hh.
|
private |
Create the worldSolid if it doesn't exist and if not expand it to the extent of the linkBeamline member. Update worldExtent member also.
Definition at line 334 of file BDSLinkDetectorConstruction.cc.
References BDSExtentGlobal::ExpandToEncompass(), BDSExtentGlobal::GetMaximumExtentAbsolute(), and BDSLinkPrimaryGeneratorAction::SetWorldExtent().
Referenced by AddLinkCollimatorJaw().
|
inline |
Accessor.
Definition at line 79 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 110 of file BDSLinkDetectorConstruction.hh.
|
private |
Particle definition all components are built w.r.t. Includes rigidity etc.
Definition at line 107 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw(), and SetDesignParticle().
|
private |
Definition at line 102 of file BDSLinkDetectorConstruction.hh.
|
private |
Special linkID to linkBeamline index.
Definition at line 117 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw().
|
private |
Definition at line 103 of file BDSLinkDetectorConstruction.hh.
|
private |
Build up a copy here too.
Definition at line 116 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw().
|
private |
Definition at line 104 of file BDSLinkDetectorConstruction.hh.
|
private |
Cache of the index to which parallel world the sampler one is.
Definition at line 114 of file BDSLinkDetectorConstruction.hh.
Referenced by PlaceOneComponent().
|
private |
Definition at line 101 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 100 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 99 of file BDSLinkDetectorConstruction.hh.