|
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. | |
| 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 | AddLinkElement (GMAD::Element el) |
| Interface to append an element. | |
| 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. | |
| BDSBeamlineIntegral * | integral |
| 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 52 of file BDSLinkDetectorConstruction.hh.
| BDSLinkDetectorConstruction::BDSLinkDetectorConstruction | ( | ) |
Default constructor.
Definition at line 67 of file BDSLinkDetectorConstruction.cc.
References BDSSDManager::SetLinkRegistry().

|
virtual |
Definition at line 84 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 187 of file BDSLinkDetectorConstruction.cc.
References BDSBeamline::AddComponent(), GMAD::Element::aper1, GMAD::Element::apertureType, BDSBeamline::back(), 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, BDSBeamline::size(), GMAD::Element::tilt, BDSExtent::TiltOffset(), BDSExtent::TransverseBoundingRadius(), GMAD::Element::type, UpdateWorldSolid(), BDSException::what(), GMAD::Element::xsizeRight, and GMAD::Element::ysize.
Referenced by BDSIMLink::AddLinkCollimatorJaw().


| G4int BDSLinkDetectorConstruction::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.
Definition at line 350 of file BDSLinkDetectorConstruction.cc.
References BDSBeamline::AddComponent(), GMAD::Element::apertureType, BDSBeamline::back(), designParticle, BDSExtent::DZ(), BDSGeometryComponent::GetExtent(), BDSAcceleratorComponent::GetName(), BDSGeometryComponent::GetName(), GMAD::Element::jawTiltRight, GMAD::Element::l, linkIDToBeamlineIndex, nameToElementIndex, GMAD::Element::offsetX, GMAD::Element::offsetY, PlaceOneComponent(), GMAD::Element::region, BDSBeamline::size(), GMAD::Element::tilt, BDSExtent::TiltOffset(), GMAD::Element::tipMaterial, GMAD::Element::tipThickness, BDSExtent::TransverseBoundingRadius(), GMAD::Element::type, UpdateWorldSolid(), BDSException::what(), GMAD::Element::xsizeRight, and GMAD::Element::ysize.
Referenced by BDSIMLink::AddLinkCollimatorTipJaw().


| G4int BDSLinkDetectorConstruction::AddLinkElement | ( | GMAD::Element | el | ) |
Interface to append an element.
Definition at line 446 of file BDSLinkDetectorConstruction.cc.
References BDSBeamline::AddComponent(), GMAD::Element::apertureType, BDSBeamline::back(), designParticle, BDSExtent::DZ(), BDSGeometryComponent::GetExtent(), BDSAcceleratorComponent::GetName(), BDSGeometryComponent::GetName(), linkIDToBeamlineIndex, nameToElementIndex, GMAD::Element::offsetX, GMAD::Element::offsetY, PlaceOneComponent(), BDSBeamline::size(), GMAD::Element::tilt, BDSExtent::TiltOffset(), BDSExtent::TransverseBoundingRadius(), GMAD::Element::type, UpdateWorldSolid(), and BDSException::what().
Referenced by BDSIMLink::AddLinkElement().


| void BDSLinkDetectorConstruction::BuildPhysicsBias | ( | ) |
Definition at line 565 of file BDSLinkDetectorConstruction.cc.
|
virtual |
Definition at line 94 of file BDSLinkDetectorConstruction.cc.
|
inline |
Definition at line 112 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 109 of file BDSLinkDetectorConstruction.hh.
|
inline |
Accessor.
Definition at line 103 of file BDSLinkDetectorConstruction.hh.
Referenced by BDSLinkPrimaryGeneratorAction::GeneratePrimaries().

|
inline |
Definition at line 108 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 110 of file BDSLinkDetectorConstruction.hh.
|
private |
Place a beam line element in the world.
Definition at line 521 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(), AddLinkCollimatorTipJaw(), and AddLinkElement().


|
inline |
Set the design particle definition.
Definition at line 97 of file BDSLinkDetectorConstruction.hh.
References designParticle.
Referenced by BDSIMLink::Initialise().

|
inline |
Definition at line 98 of file BDSLinkDetectorConstruction.hh.
|
inline |
Definition at line 111 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 496 of file BDSLinkDetectorConstruction.cc.
References BDSExtentGlobal::ExpandToEncompass(), BDSBeamline::GetExtentGlobal(), BDSExtentGlobal::GetMaximumExtentAbsolute(), and BDSLinkPrimaryGeneratorAction::SetWorldExtent().
Referenced by AddLinkCollimatorJaw(), AddLinkCollimatorTipJaw(), and AddLinkElement().


|
inline |
Accessor.
Definition at line 102 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 133 of file BDSLinkDetectorConstruction.hh.
|
private |
Particle definition all components are built w.r.t. Includes rigidity etc.
Definition at line 130 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw(), AddLinkCollimatorTipJaw(), AddLinkElement(), and SetDesignParticle().
|
private |
Definition at line 139 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 125 of file BDSLinkDetectorConstruction.hh.
|
private |
Special linkID to linkBeamline index.
Definition at line 142 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw(), AddLinkCollimatorTipJaw(), and AddLinkElement().
|
private |
Definition at line 126 of file BDSLinkDetectorConstruction.hh.
|
private |
Build up a copy here too.
Definition at line 141 of file BDSLinkDetectorConstruction.hh.
Referenced by AddLinkCollimatorJaw(), AddLinkCollimatorTipJaw(), and AddLinkElement().
|
private |
Definition at line 127 of file BDSLinkDetectorConstruction.hh.
|
private |
Cache of the index to which parallel world the sampler one is.
Definition at line 137 of file BDSLinkDetectorConstruction.hh.
Referenced by PlaceOneComponent().
|
private |
Definition at line 124 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 123 of file BDSLinkDetectorConstruction.hh.
|
private |
Definition at line 122 of file BDSLinkDetectorConstruction.hh.