BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Holder class for all information required to describe an aperture. More...
#include <BDSApertureInfo.hh>
Public Member Functions | |
BDSApertureInfo (BDSApertureType apertureTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4String nameForError="") | |
Constructor to assign all members at once. | |
BDSApertureInfo (G4String apertureTypeIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4String nameForError="") | |
Constructor with string descriptors of aperture type. Automatically determined. | |
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. | |
Data Fields | |
BDSApertureType | apertureType |
Public member for direct access. | |
G4double | aper1 |
Public member for direct access. | |
G4double | aper2 |
Public member for direct access. | |
G4double | aper3 |
Public member for direct access. | |
G4double | aper4 |
Public member for direct access. | |
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. | |
void | InfoOKForElliptical () |
Aperture info check for elliptical aperture. | |
void | InfoOKForRectangular () |
Aperture info check for rectangular aperture. | |
void | InfoOKForLHC () |
Aperture info check for lhc aperture. | |
void | InfoOKForLHCDetailed () |
Aperture info check for lhc detailed aperture. | |
void | InfoOKForRectEllipse () |
Aperture info check for rectellipse aperture. | |
void | InfoOKForRaceTrack () |
Aperture info check for racetrack aperture. | |
void | InfoOKForOctagonal () |
Aperture info check for octagonal aperture. | |
void | InfoOKForClicPCL () |
Aperture info check for CLIC PCL aperture. | |
Holder class for all information required to describe an aperture.
Definition at line 36 of file BDSApertureInfo.hh.
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().
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().
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().
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().
|
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().
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().
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().
|
private |
Aperture info check for circular aperture.
Definition at line 208 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
|
private |
Aperture info check for CLIC PCL aperture.
Definition at line 277 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
|
private |
Aperture info check for elliptical aperture.
Definition at line 213 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
|
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().
|
private |
Aperture info check for lhc detailed aperture.
Definition at line 234 of file BDSApertureInfo.cc.
References InfoOKForLHC().
Referenced by CheckApertureInfo().
|
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().
|
private |
Aperture info check for racetrack aperture.
Definition at line 262 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
|
private |
Aperture info check for rectangular aperture.
Definition at line 218 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
|
private |
Aperture info check for rectellipse aperture.
Definition at line 239 of file BDSApertureInfo.cc.
References CheckRequiredParametersSet().
Referenced by CheckApertureInfo().
G4double BDSApertureInfo::aper1 |
Public member for direct access.
Definition at line 78 of file BDSApertureInfo.hh.
Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().
G4double BDSApertureInfo::aper2 |
Public member for direct access.
Definition at line 79 of file BDSApertureInfo.hh.
Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().
G4double BDSApertureInfo::aper3 |
Public member for direct access.
Definition at line 80 of file BDSApertureInfo.hh.
Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), InfoOKForLHC(), and InfoOKForOctagonal().
G4double BDSApertureInfo::aper4 |
Public member for direct access.
Definition at line 81 of file BDSApertureInfo.hh.
Referenced by BDSApertureInfo(), CheckRequiredParametersSet(), Extent(), and InfoOKForOctagonal().
BDSApertureType BDSApertureInfo::apertureType |
Public member for direct access.
Definition at line 77 of file BDSApertureInfo.hh.
Referenced by BDSApertureInfo(), CheckApertureInfo(), and Extent().