BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Member Functions | Private Attributes
BDSTunnelBuilder Class Reference

A class that constructs tunnel segments around a beamline. More...

#include <BDSTunnelBuilder.hh>

Collaboration diagram for BDSTunnelBuilder:
Collaboration graph

Public Member Functions

 BDSTunnelBuilder (G4double tunnelMaxSegmentLengthIn=50 *CLHEP::m)
 
BDSBeamlineBuildTunnelSections (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. More...
 
G4double maxLength
 Maximum length before split. More...
 
G4double maxAngle
 Maximum angle before split. More...
 
G4double minLength
 Minimum length to angle ratio to allow a split. More...
 

Detailed Description

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.

Author
Laurie Nevay

Definition at line 35 of file BDSTunnelBuilder.hh.

Constructor & Destructor Documentation

◆ BDSTunnelBuilder()

BDSTunnelBuilder::BDSTunnelBuilder ( G4double  tunnelMaxSegmentLengthIn = 50*CLHEP::m)
explicit

Definition at line 38 of file BDSTunnelBuilder.cc.

◆ ~BDSTunnelBuilder()

BDSTunnelBuilder::~BDSTunnelBuilder ( )

Definition at line 51 of file BDSTunnelBuilder.cc.

Member Function Documentation

◆ BreakTunnel()

G4bool BDSTunnelBuilder::BreakTunnel ( BDSBeamline::const_iterator  proposedStart,
BDSBeamline::const_iterator  proposedEnd,
const G4double &  halfWidth 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ displacementTolerance

G4double BDSTunnelBuilder::displacementTolerance
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().

◆ maxAngle

G4double BDSTunnelBuilder::maxAngle
private

Maximum angle before split.

Definition at line 65 of file BDSTunnelBuilder.hh.

Referenced by BreakTunnel().

◆ maxItems

G4double BDSTunnelBuilder::maxItems
private

Maximum number of items before split.

Definition at line 59 of file BDSTunnelBuilder.hh.

Referenced by BreakTunnel().

◆ maxLength

G4double BDSTunnelBuilder::maxLength
private

Maximum length before split.

Definition at line 62 of file BDSTunnelBuilder.hh.

Referenced by BreakTunnel().

◆ minLength

G4double BDSTunnelBuilder::minLength
private

Minimum length to angle ratio to allow a split.

Definition at line 68 of file BDSTunnelBuilder.hh.

Referenced by BreakTunnel().


The documentation for this class was generated from the following files: