BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A class that constructs tunnel segments around a beamline. More...
#include <BDSTunnelBuilder.hh>
Public Member Functions | |
BDSTunnelBuilder (G4double tunnelMaxSegmentLengthIn=50 *CLHEP::m) | |
BDSBeamline * | BuildTunnelSections (const BDSBeamline *flatBeamLine) const |
Private Member Functions | |
G4bool | BreakTunnel (BDSBeamline::const_iterator proposedStart, BDSBeamline::const_iterator proposedEnd, const G4double &halfWidth) const |
Private Attributes | |
G4double | displacementTolerance |
G4double | maxItems |
Maximum number of items before split. | |
G4double | maxLength |
Maximum length before split. | |
G4double | maxAngle |
Maximum angle before split. | |
G4double | minLength |
Minimum length to angle ratio to allow a split. | |
A class that constructs tunnel segments around a beamline.
It uses a beam line instance - the flat beam line and creates a new beam line of tunnel segments that can then be placed.
Definition at line 35 of file BDSTunnelBuilder.hh.
|
explicit |
Definition at line 38 of file BDSTunnelBuilder.cc.
BDSTunnelBuilder::~BDSTunnelBuilder | ( | ) |
Definition at line 51 of file BDSTunnelBuilder.cc.
|
private |
Decide whether this is a good point to break the tunnel based on various cumulative parameters.
Definition at line 59 of file BDSTunnelBuilder.cc.
References displacementTolerance, BDS::IsFinite(), maxAngle, maxItems, maxLength, and minLength.
Referenced by BuildTunnelSections().
BDSBeamline * BDSTunnelBuilder::BuildTunnelSections | ( | const BDSBeamline * | flatBeamLine | ) | const |
Main function of class - use tunnel factories and builds sections of tunnel around the flat beamline (of accelerator components). Tunnel segments are placed in order in a new beamline instance, which is returned.
Definition at line 128 of file BDSTunnelBuilder.cc.
References BDSBeamline::AddBeamlineElement(), BDSBeamline::AddComponent(), BDSTunnelInfo::aper1, BDSTunnelInfo::aper2, BDSBeamline::back(), BDSBeamline::begin(), BreakTunnel(), BDSTunnelFactory::CreateTunnelSection(), BDSTunnelFactory::CreateTunnelSectionAngled(), BDSBeamline::end(), BDSBeamlineElement::GetReferencePositionEnd(), BDSGlobalConstants::Instance(), BDSTunnelFactory::Instance(), BDSExtent::MaximumAbsTransverse(), BDS::PrintRotationMatrix(), and BDSTunnelInfo::visible.
Referenced by BDSDetectorConstruction::BuildTunnel().
|
private |
Maximum distance tolerable that the beamline can deviate from the previous tunnel break point before another tunnel break point is made.
Definition at line 56 of file BDSTunnelBuilder.hh.
Referenced by BreakTunnel().
|
private |
Maximum angle before split.
Definition at line 65 of file BDSTunnelBuilder.hh.
Referenced by BreakTunnel().
|
private |
Maximum number of items before split.
Definition at line 59 of file BDSTunnelBuilder.hh.
Referenced by BreakTunnel().
|
private |
Maximum length before split.
Definition at line 62 of file BDSTunnelBuilder.hh.
Referenced by BreakTunnel().
|
private |
Minimum length to angle ratio to allow a split.
Definition at line 68 of file BDSTunnelBuilder.hh.
Referenced by BreakTunnel().