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

Holder class for all information required to describe an aperture. More...

#include <BDSApertureInfo.hh>

Collaboration diagram for BDSApertureInfo:
Collaboration graph

Public Member Functions

 BDSApertureInfo (BDSApertureType apertureTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4String nameForError="")
 Constructor to assign all members at once. More...
 
 BDSApertureInfo (G4String apertureTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4String nameForError="")
 Constructor with string descriptors of aperture type. Automatically determined. More...
 
 BDSApertureInfo (BDSApertureInfo *defaultInfo, G4String apertureTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4String nameForError="")
 
void CheckApertureInfo (const G4String &nameForError)
 
BDSExtent Extent () const
 
G4double IndicativeRadius () const
 Return an indicative extent of the beam pipe - typically the maximum of x or y extent. More...
 

Data Fields

BDSApertureType apertureType
 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...
 

Private Member Functions

 BDSApertureInfo ()=delete
 Private default constructor to ensure one of supplied constructors is used.
 
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 an aperture.

Author
Laurie Nevay

Definition at line 36 of file BDSApertureInfo.hh.

Constructor & Destructor Documentation

◆ BDSApertureInfo() [1/3]

BDSApertureInfo::BDSApertureInfo ( BDSApertureType  apertureTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
G4String  nameForError = "" 
)

Constructor to assign all members at once.

Definition at line 30 of file BDSApertureInfo.cc.

References CheckApertureInfo().

Here is the call graph for this function:

◆ BDSApertureInfo() [2/3]

BDSApertureInfo::BDSApertureInfo ( G4String  apertureTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
G4String  nameForError = "" 
)

Constructor with string descriptors of aperture type. Automatically determined.

Definition at line 45 of file BDSApertureInfo.cc.

References apertureType, CheckApertureInfo(), and BDS::DetermineApertureType().

Here is the call graph for this function:

◆ BDSApertureInfo() [3/3]

BDSApertureInfo::BDSApertureInfo ( BDSApertureInfo defaultInfo,
G4String  apertureTypeIn,
G4double  aper1In,
G4double  aper2In,
G4double  aper3In,
G4double  aper4In,
G4String  nameForError = "" 
)

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 60 of file BDSApertureInfo.cc.

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

Here is the call graph for this function:

Member Function Documentation

◆ CheckApertureInfo()

void BDSApertureInfo::CheckApertureInfo ( const G4String &  nameForError)

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

Definition at line 93 of file BDSApertureInfo.cc.

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

Referenced by BDSApertureInfo().

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

◆ CheckRequiredParametersSet()

void BDSApertureInfo::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 186 of file BDSApertureInfo.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 BDSApertureInfo::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 128 of file BDSApertureInfo.cc.

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

Referenced by BDSDetectorConstruction::CalculateExtentOfSamplerPlacement(), and IndicativeRadius().

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

◆ IndicativeRadius()

G4double BDSApertureInfo::IndicativeRadius ( ) const

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

Definition at line 180 of file BDSApertureInfo.cc.

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

Here is the call graph for this function:

◆ InfoOKForCircular()

void BDSApertureInfo::InfoOKForCircular ( )
private

Aperture info check for circular aperture.

Definition at line 208 of file BDSApertureInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForClicPCL()

void BDSApertureInfo::InfoOKForClicPCL ( )
private

Aperture info check for CLIC PCL aperture.

Definition at line 277 of file BDSApertureInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForElliptical()

void BDSApertureInfo::InfoOKForElliptical ( )
private

Aperture info check for elliptical aperture.

Definition at line 213 of file BDSApertureInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForLHC()

void BDSApertureInfo::InfoOKForLHC ( )
private

Aperture info check for lhc aperture.

Definition at line 223 of file BDSApertureInfo.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 BDSApertureInfo::InfoOKForLHCDetailed ( )
private

Aperture info check for lhc detailed aperture.

Definition at line 234 of file BDSApertureInfo.cc.

References InfoOKForLHC().

Referenced by CheckApertureInfo().

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

◆ InfoOKForOctagonal()

void BDSApertureInfo::InfoOKForOctagonal ( )
private

Aperture info check for octagonal aperture.

Definition at line 267 of file BDSApertureInfo.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 BDSApertureInfo::InfoOKForRaceTrack ( )
private

Aperture info check for racetrack aperture.

Definition at line 262 of file BDSApertureInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForRectangular()

void BDSApertureInfo::InfoOKForRectangular ( )
private

Aperture info check for rectangular aperture.

Definition at line 218 of file BDSApertureInfo.cc.

References CheckRequiredParametersSet().

Referenced by CheckApertureInfo().

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

◆ InfoOKForRectEllipse()

void BDSApertureInfo::InfoOKForRectEllipse ( )
private

Aperture info check for rectellipse aperture.

Definition at line 239 of file BDSApertureInfo.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 BDSApertureInfo::aper1

Public member for direct access.

Definition at line 78 of file BDSApertureInfo.hh.

Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().

◆ aper2

G4double BDSApertureInfo::aper2

Public member for direct access.

Definition at line 79 of file BDSApertureInfo.hh.

Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().

◆ aper3

G4double BDSApertureInfo::aper3

Public member for direct access.

Definition at line 80 of file BDSApertureInfo.hh.

Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().

◆ aper4

G4double BDSApertureInfo::aper4

Public member for direct access.

Definition at line 81 of file BDSApertureInfo.hh.

Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), and InfoOKForOctagonal().

◆ apertureType

BDSApertureType BDSApertureInfo::apertureType

Public member for direct access.

Definition at line 77 of file BDSApertureInfo.hh.

Referenced by BDSApertureInfo(), CheckApertureInfo(), and Extent().


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