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

Holder class for all information required to describe a beam pipe model. More...

#include <BDSBeamPipeInfo.hh>

Collaboration diagram for BDSBeamPipeInfo:
Collaboration graph

Public Member Functions

 BDSBeamPipeInfo ()=delete
 Deleted default constructor to ensure one of supplied constructors is used.
 
 BDSBeamPipeInfo (BDSBeamPipeType beamPipeTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4Material *vacuumMaterialIn, G4double beamPipeThicknessIn, G4Material *beamPipeMaterialIn, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1), const G4String &pointsFileNameIn="", const G4String &pointsUnitIn="mm")
 extra constructor to assign all members at once. More...
 
 BDSBeamPipeInfo (const G4String &beamPipeTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, const G4String &vacuumMaterialIn, G4double beamPipeThicknessIn, const G4String &beamPipeMaterialIn, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1))
 
 BDSBeamPipeInfo (const BDSBeamPipeInfo *defaultInfo, const G4String &beamPipeTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, const G4String &vacuumMaterialIn, G4double beamPipeThicknessIn, const G4String &beamPipeMaterialIn, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1))
 
void CheckApertureInfo ()
 
BDSExtent Extent () const
 
BDSExtent ExtentInner () const
 Return an extent for just the raw aperture. More...
 
G4double IndicativeRadius () const
 Return an indicative extent of the beam pipe - typically the maximum of x or y extent. More...
 
G4double IndicativeRadiusInner () const
 Return an indicative inner extent for the beam pipe vacuum. More...
 

Data Fields

BDSBeamPipeType beamPipeType
 Public member for direct access. More...
 
G4double aper1
 Public member for direct access. More...
 
G4double aper2
 Public member for direct access. More...
 
G4double aper3
 Public member for direct access. More...
 
G4double aper4
 Public member for direct access. More...
 
G4double aperOffsetX
 Public member for direct access. More...
 
G4double aperOffsetY
 Public member for direct access. More...
 
G4Material * vacuumMaterial
 Public member for direct access. More...
 
G4double beamPipeThickness
 Public member for direct access. More...
 
G4Material * beamPipeMaterial
 Public member for direct access. More...
 
G4ThreeVector inputFaceNormal
 Public member for direct access. More...
 
G4ThreeVector outputFaceNormal
 Public member for direct access. More...
 
G4String pointsFileName
 Public member for direct access. More...
 
G4String pointsUnit
 Public member for direct access. More...
 

Private Member Functions

void CheckAndSetPointsInfo (const G4String &beamPipeTypeIn)
 Parse the type string to extract the file name and the optional units and assign to member variables. More...
 
void CheckRequiredParametersSet (G4bool setAper1, G4bool setAper2, G4bool setAper3, G4bool setAper4)
 
void InfoOKForCircular ()
 Aperture info check for circular aperture. More...
 
void InfoOKForElliptical ()
 Aperture info check for elliptical aperture. More...
 
void InfoOKForRectangular ()
 Aperture info check for rectangular aperture. More...
 
void InfoOKForLHC ()
 Aperture info check for lhc aperture. More...
 
void InfoOKForLHCDetailed ()
 Aperture info check for lhc detailed aperture. More...
 
void InfoOKForRectEllipse ()
 Aperture info check for rectellipse aperture. More...
 
void InfoOKForRaceTrack ()
 Aperture info check for racetrack aperture. More...
 
void InfoOKForOctagonal ()
 Aperture info check for octagonal aperture. More...
 
void InfoOKForClicPCL ()
 Aperture info check for CLIC PCL aperture. More...
 

Detailed Description

Holder class for all information required to describe a beam pipe model.

This reduces the number of argument to all magnet constructors plus aggregates common tasks in the component factory.

Author
Laurie Nevay

Definition at line 40 of file BDSBeamPipeInfo.hh.

Constructor & Destructor Documentation

◆ BDSBeamPipeInfo() [1/3]

BDSBeamPipeInfo::BDSBeamPipeInfo ( BDSBeamPipeType  beamPipeTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
G4Material *  vacuumMaterialIn,
G4double  beamPipeThicknessIn,
G4Material *  beamPipeMaterialIn,
const G4ThreeVector &  inputFaceNormalIn = G4ThreeVector(0,0,-1),
const G4ThreeVector &  outputFaceNormalIn = G4ThreeVector(0,0,1),
const G4String &  pointsFileNameIn = "",
const G4String &  pointsUnitIn = "mm" 
)

extra constructor to assign all members at once.

Definition at line 31 of file BDSBeamPipeInfo.cc.

References CheckApertureInfo().

Here is the call graph for this function:

◆ BDSBeamPipeInfo() [2/3]

BDSBeamPipeInfo::BDSBeamPipeInfo ( const G4String &  beamPipeTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
const G4String &  vacuumMaterialIn,
G4double  beamPipeThicknessIn,
const G4String &  beamPipeMaterialIn,
const G4ThreeVector &  inputFaceNormalIn = G4ThreeVector(0,0,-1),
const G4ThreeVector &  outputFaceNormalIn = G4ThreeVector(0,0,1) 
)

Constructor with string descriptors of materials and type. Automatically determined using BDSBeamPipeType and BDSMaterials

Definition at line 57 of file BDSBeamPipeInfo.cc.

References beamPipeMaterial, beamPipeType, CheckAndSetPointsInfo(), CheckApertureInfo(), BDS::DetermineBeamPipeType(), BDSMaterials::GetMaterial(), BDSMaterials::Instance(), and vacuumMaterial.

Here is the call graph for this function:

◆ BDSBeamPipeInfo() [3/3]

BDSBeamPipeInfo::BDSBeamPipeInfo ( const BDSBeamPipeInfo defaultInfo,
const G4String &  beamPipeTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
const G4String &  vacuumMaterialIn,
G4double  beamPipeThicknessIn,
const G4String &  beamPipeMaterialIn,
const G4ThreeVector &  inputFaceNormalIn = G4ThreeVector(0,0,-1),
const G4ThreeVector &  outputFaceNormalIn = G4ThreeVector(0,0,1) 
)

Constructor that allows a default model to be used as backup. Checks on parameter validity are done after substituting unset values by values from defaultInfo.

Definition at line 84 of file BDSBeamPipeInfo.cc.

References aper1, aper2, aper3, aper4, beamPipeMaterial, beamPipeThickness, beamPipeType, CheckAndSetPointsInfo(), CheckApertureInfo(), BDS::DetermineBeamPipeType(), BDSMaterials::GetMaterial(), BDSMaterials::Instance(), BDS::IsFinite(), pointsFileName, pointsUnit, and vacuumMaterial.

Here is the call graph for this function:

Member Function Documentation

◆ CheckAndSetPointsInfo()

void BDSBeamPipeInfo::CheckAndSetPointsInfo ( const G4String &  beamPipeTypeIn)
private

Parse the type string to extract the file name and the optional units and assign to member variables.

Definition at line 145 of file BDSBeamPipeInfo.cc.

References pointsFileName, pointsUnit, BDS::SplitOnColon(), and BDS::StrContains().

Referenced by BDSBeamPipeInfo().

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

◆ CheckApertureInfo()

void BDSBeamPipeInfo::CheckApertureInfo ( )

Function to check relevant aperture values are set. This is really a dispatch function for other aperture specific methods below

Definition at line 162 of file BDSBeamPipeInfo.cc.

References beamPipeType, InfoOKForCircular(), InfoOKForClicPCL(), InfoOKForElliptical(), InfoOKForLHC(), InfoOKForLHCDetailed(), InfoOKForOctagonal(), InfoOKForRaceTrack(), InfoOKForRectangular(), InfoOKForRectEllipse(), and BDSTypeSafeEnum< def, inner >::underlying().

Referenced by BDSBeamPipeInfo().

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

◆ CheckRequiredParametersSet()

void BDSBeamPipeInfo::CheckRequiredParametersSet ( G4bool  setAper1,
G4bool  setAper2,
G4bool  setAper3,
G4bool  setAper4 
)
private

Function to check whether a parameter is set (using BDSUtilities BDS::IsFinite() ). If the accompanying G4bool setAper1 (for example) is true, the parameter will be checked for being set. All parameters required to be checked are checked and appropriate warnings printed before exiting if any fail that test.

Definition at line 263 of file BDSBeamPipeInfo.cc.

References aper1, aper2, aper3, aper4, and BDS::IsFinite().

Referenced by InfoOKForCircular(), InfoOKForClicPCL(), InfoOKForElliptical(), InfoOKForLHC(), InfoOKForOctagonal(), InfoOKForRaceTrack(), InfoOKForRectangular(), and InfoOKForRectEllipse().

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

◆ Extent()

BDSExtent BDSBeamPipeInfo::Extent ( ) const

Return a BDSExtent instance for the transverse extents - extent in Z is 0 as this is only aperture information. Includes beam pipe thickness.

Definition at line 241 of file BDSBeamPipeInfo.cc.

References beamPipeThickness, ExtentInner(), BDSExtent::XPos(), and BDSExtent::YPos().

Referenced by BDSUndulator::BuildContainerLogicalVolume(), and IndicativeRadius().

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

◆ ExtentInner()

BDSExtent BDSBeamPipeInfo::ExtentInner ( ) const

Return an extent for just the raw aperture.

Definition at line 189 of file BDSBeamPipeInfo.cc.

References aper1, aper2, aper3, aper4, beamPipeThickness, beamPipeType, and BDSTypeSafeEnum< def, inner >::underlying().

Referenced by Extent(), and IndicativeRadiusInner().

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

◆ IndicativeRadius()

G4double BDSBeamPipeInfo::IndicativeRadius ( ) const

Return an indicative extent of the beam pipe - typically the maximum of x or y extent.

Definition at line 251 of file BDSBeamPipeInfo.cc.

References Extent(), and BDSExtent::MaximumAbsTransverse().

Referenced by BDSComponentFactory::PrepareMagnetOuterFieldInfo(), and BDSComponentFactory::PrepareMagnetOuterInfo().

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

◆ IndicativeRadiusInner()

G4double BDSBeamPipeInfo::IndicativeRadiusInner ( ) const

Return an indicative inner extent for the beam pipe vacuum.

Definition at line 257 of file BDSBeamPipeInfo.cc.

References ExtentInner(), and BDSExtent::MinimumAbsTransverse().

Referenced by BDSCollimatorCrystal::Build().

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

◆ InfoOKForCircular()

void BDSBeamPipeInfo::InfoOKForCircular ( )
private

Aperture info check for circular aperture.

Definition at line 304 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForClicPCL()

void BDSBeamPipeInfo::InfoOKForClicPCL ( )
private

Aperture info check for CLIC PCL aperture.

Definition at line 357 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForElliptical()

void BDSBeamPipeInfo::InfoOKForElliptical ( )
private

Aperture info check for elliptical aperture.

Definition at line 309 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForLHC()

void BDSBeamPipeInfo::InfoOKForLHC ( )
private

Aperture info check for lhc aperture.

Definition at line 319 of file BDSBeamPipeInfo.cc.

References aper1, aper2, aper3, and CheckRequiredParametersSet().

Referenced by CheckApertureInfo(), and InfoOKForLHCDetailed().

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

◆ InfoOKForLHCDetailed()

void BDSBeamPipeInfo::InfoOKForLHCDetailed ( )
private

Aperture info check for lhc detailed aperture.

Definition at line 330 of file BDSBeamPipeInfo.cc.

References InfoOKForLHC().

Referenced by CheckApertureInfo().

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

◆ InfoOKForOctagonal()

void BDSBeamPipeInfo::InfoOKForOctagonal ( )
private

Aperture info check for octagonal aperture.

Definition at line 347 of file BDSBeamPipeInfo.cc.

References aper1, aper2, aper3, aper4, and CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForRaceTrack()

void BDSBeamPipeInfo::InfoOKForRaceTrack ( )
private

Aperture info check for racetrack aperture.

Definition at line 342 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForRectangular()

void BDSBeamPipeInfo::InfoOKForRectangular ( )
private

Aperture info check for rectangular aperture.

Definition at line 314 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForRectEllipse()

void BDSBeamPipeInfo::InfoOKForRectEllipse ( )
private

Aperture info check for rectellipse aperture.

Definition at line 335 of file BDSBeamPipeInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

Field Documentation

◆ aper1

G4double BDSBeamPipeInfo::aper1

◆ aper2

G4double BDSBeamPipeInfo::aper2

◆ aper3

G4double BDSBeamPipeInfo::aper3

◆ aper4

G4double BDSBeamPipeInfo::aper4

◆ aperOffsetX

G4double BDSBeamPipeInfo::aperOffsetX

Public member for direct access.

Definition at line 109 of file BDSBeamPipeInfo.hh.

◆ aperOffsetY

G4double BDSBeamPipeInfo::aperOffsetY

Public member for direct access.

Definition at line 110 of file BDSBeamPipeInfo.hh.

◆ beamPipeMaterial

G4Material* BDSBeamPipeInfo::beamPipeMaterial

Public member for direct access.

Definition at line 113 of file BDSBeamPipeInfo.hh.

Referenced by BDSBeamPipeInfo(), BDSCollimatorCrystal::Material(), and BDSDrift::Material().

◆ beamPipeThickness

G4double BDSBeamPipeInfo::beamPipeThickness

◆ beamPipeType

BDSBeamPipeType BDSBeamPipeInfo::beamPipeType

◆ inputFaceNormal

G4ThreeVector BDSBeamPipeInfo::inputFaceNormal

Public member for direct access.

Definition at line 114 of file BDSBeamPipeInfo.hh.

Referenced by BDSComponentFactory::PrepareBeamPipeInfo().

◆ outputFaceNormal

G4ThreeVector BDSBeamPipeInfo::outputFaceNormal

Public member for direct access.

Definition at line 115 of file BDSBeamPipeInfo.hh.

Referenced by BDSComponentFactory::PrepareBeamPipeInfo().

◆ pointsFileName

G4String BDSBeamPipeInfo::pointsFileName

Public member for direct access.

Definition at line 116 of file BDSBeamPipeInfo.hh.

Referenced by BDSBeamPipeInfo(), and CheckAndSetPointsInfo().

◆ pointsUnit

G4String BDSBeamPipeInfo::pointsUnit

Public member for direct access.

Definition at line 117 of file BDSBeamPipeInfo.hh.

Referenced by BDSBeamPipeInfo(), and CheckAndSetPointsInfo().

◆ vacuumMaterial

G4Material* BDSBeamPipeInfo::vacuumMaterial

Public member for direct access.

Definition at line 111 of file BDSBeamPipeInfo.hh.

Referenced by BDSBeamPipeInfo(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), and BDSMagnetOuterFactoryLHC::CreateQuadrupole().


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