BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Return either G4Tubs or G4CutTubs depending on flat face. More...
Data Structures | |
struct | ActionAngleCoord |
Simple struct for storing action/angle pairs to aid readability. Implementation detail. More... | |
class | EllipsePointGenerator |
Class for generating points uniformly on ellipse perimeters via interpolation. Part of implementation. More... | |
struct | FourPoints |
struct | non_alpha |
Logical not for isalpha UnaryPredicate as needed for string manipulations. More... | |
struct | PhaseSpaceCoord |
Simple struct for storing position/momentum pairs to aid readability. Implementation detail. More... | |
struct | ThreePoints |
struct | TrajectoryOptions |
struct | TwissPair |
Simple struct for storing Twiss alpha/beta pairs to aid readability. Implementation detail. More... | |
Enumerations | |
enum class | StringStripType { leading , trailing , both } |
Functions | |
PhaseSpaceCoord | PhaseSpaceCoordFromActionAngle (ActionAngleCoord aa, const TwissPair &tp) |
BDSExtent | MaximumCombinedExtent (const BDSExtent &first, const BDSExtent &second) |
Returns the extent which is the greatest extent in all six directions. | |
BDSTrajectoryFilter | BDSTrajectoryFilterEnumOfIndex (int i) |
std::vector< G4TwoVector > * | LoadAperturePoints (const G4String &fileName, const G4String &unit="") |
BDSApertureType | DetermineApertureType (G4String apertureType) |
function that gives corresponding enum value for string (case-insensitive) | |
G4VSolid * | AppropriateTubs (const G4String &name, G4double innerRadius, G4double outerRadius, G4double halfLength, G4double startAngle, G4double sweepAngle, const G4ThreeVector &inputFaceNormal, const G4ThreeVector &outputFaceNormal, G4bool flatFaces) |
BDSArrayReflectionType | DetermineArrayReflectionType (G4String arrayReflectionType) |
Function that gives corresponding enum value for string (case-insensitive) | |
BDSArrayReflectionTypeSet | DetermineArrayReflectionTypeSet (const G4String &arrayReflectionType) |
Return a std::set of reflection types. Split string on white space. | |
G4bool | ProblemWithArrayReflectionCombination (const BDSArrayReflectionTypeSet &setIn, G4String *details=nullptr) |
Return true if there's a conceptual conflict with the set of field reflections requested. | |
BDSBeamline * | BuildBLMs (const std::vector< GMAD::BLMPlacement > &blmPlacements, const BDSBeamline *parentBeamLine) |
BDSBeamline * | BuildEndPieceBeamline (const BDSBeamline *beamline, const G4bool circularMachine) |
BDSBeamline * | BuildPlacementGeometry (const std::vector< GMAD::Placement > &placements, const BDSBeamline *parentBeamLine, BDSComponentFactory *componentFactory) |
BDSBeamPipeType | DetermineBeamPipeType (G4String apertureType) |
Function that gives corresponding enum value for string (case-insensitive). | |
BDSAcceleratorComponent * | BuildSBendLine (const G4String &elementName, const GMAD::Element *element, BDSMagnetStrength *st, G4double brho, const BDSIntegratorSet *integratorSet, G4double incomingFaceAngle, G4double outgoingFaceAngle, G4bool buildFringeFields, const GMAD::Element *prevElement, const GMAD::Element *nextElement, BDSModulatorInfo *fieldModulator=nullptr) |
BDSLine * | BuildRBendLine (const G4String &elementName, const GMAD::Element *element, const GMAD::Element *prevElement, const GMAD::Element *nextElement, G4double brho, BDSMagnetStrength *st, const BDSIntegratorSet *integratorSet, G4double incomingFaceAngle, G4double outgoingFaceAngle, G4bool buildFringeFields, BDSModulatorInfo *fieldModulator=nullptr) |
G4int | CalculateNSBendSegments (G4double length, G4double angle, G4double incomingFaceAngle=0, G4double outgoingFaceAngle=0, G4double aperturePrecision=1.0) |
BDSMagnet * | BuildDipoleFringe (const GMAD::Element *element, G4double angleIn, G4double angleOut, const G4String &name, BDSMagnetStrength *st, G4double brho, const BDSIntegratorSet *integratorSet, BDSFieldType dipoleFieldType, BDSModulatorInfo *fieldModulator=nullptr) |
BDSMagnet * | BuildSingleSBend (const GMAD::Element *element, const G4String &name, G4double arcLength, G4double angle, G4double angleIn, G4double angleOut, const BDSMagnetStrength *strength, G4double brho, const BDSIntegratorSet *integratorSet, G4bool yokeOnLeft, const BDSFieldInfo *outerFieldIn, BDSModulatorInfo *fieldModulator=nullptr) |
Function to return a single sector bend section. | |
void | UpdateSegmentAngles (G4int index, G4int nSBends, G4double semiAngle, G4double incomingFaceAngle, G4double outgoingFaceAngle, G4double &segmentAngleIn, G4double &segmentAngleOut) |
BDSMagnetStrength * | GetFringeMagnetStrength (const GMAD::Element *element, const BDSMagnetStrength *st, G4double fringeAngle, G4double e1, G4double e2, G4double fintx, G4bool entranceOrExit) |
BDSIntegratorType | GetDipoleIntegratorType (const BDSIntegratorSet *integratorSet, const GMAD::Element *element) |
G4bool | ZeroStrengthDipole (const BDSMagnetStrength *st) |
Return whether finite angle or field for a dipole. | |
BDSBLMType | DetermineBLMType (G4String blmType) |
function that gives corresponding enum value for string (case-insensitive) | |
template<typename T > | |
std::vector< G4double > | CumulativeDistances (T pairs) |
BDSBunchType | DetermineBunchType (G4String distrType) |
Function that gives corresponding enum value for string (case-insensitive). | |
BDSCavityFieldType | DetermineCavityFieldType (G4String cavityFieldType) |
function to determine the enum type of the cavity field type (case-insensitive) | |
BDSCavityType | DetermineCavityType (G4String cavityType) |
function to determine the enum type of the cavity geometry (case-insensitive) | |
BDSCrystalType | DetermineCrystalType (G4String crystalType) |
function to determine the enum type of the cavity geometry (case-insensitive) | |
BDSDimensionType | DetermineDimensionType (G4String dimensionType) |
Determine the output format to be used from the input string. | |
BDSEventGeneratorFileType | DetermineEventGeneratorFileType (G4String distrType) |
Function that gives corresponding enum value for string (case-insensitive). | |
BDSFieldClassType | DetermineFieldClassType (BDSFieldType fieldType) |
Function that gives the corresponding enum value for a field type enum. | |
BDSFieldFormat | DetermineFieldFormat (G4String fieldformat) |
Function that gives corresponding enum value for string (case-insensitive) | |
G4int | NDimensionsOfFieldFormat (const BDSFieldFormat &ff) |
Report the number of dimensions for that format. | |
std::vector< BDSFourVector< G4double > > | LoadFieldQueryPoints (const G4String &fileName, std::vector< G4String > *columnNamesIn) |
BDSFieldType | DetermineFieldType (G4String fieldType) |
Function that gives corresponding enum value for string (case-insensitive) | |
G4String | PreprocessGDML (const G4String &file, const G4String &prefix, G4bool preprocessSchema=true) |
G4String | PreprocessGDMLSchemaOnly (const G4String &file) |
G4String | GDMLSchemaLocation () |
Get GDML Schema location included with BDSIM. | |
std::pair< BDSExtent, BDSExtent > | DetermineExtents (const G4VSolid *solid) |
std::pair< BDSExtent, BDSExtent > | InspectDisplacedSolid (const G4VSolid *solidIn) |
Inspect a G4DisplacedSolid. | |
std::pair< BDSExtent, BDSExtent > | InspectSubtractionSolid (const G4VSolid *solidIn) |
std::pair< BDSExtent, BDSExtent > | InspectIntersectionSolid (const G4VSolid *solidIn) |
Inspect a G4IntersectionSolid. | |
std::pair< BDSExtent, BDSExtent > | InspectUnionSolid (const G4VSolid *solidIn) |
Inspect a G4UnionSolid. | |
std::pair< BDSExtent, BDSExtent > | InspectBox (const G4VSolid *solidIn) |
Inspect a G4Box. | |
std::pair< BDSExtent, BDSExtent > | InspectTubs (const G4VSolid *solidIn) |
Inspect a G4Tubs. | |
std::pair< BDSExtent, BDSExtent > | InspectCutTubs (const G4VSolid *solidIn) |
Inspect a G4CutTubs. | |
std::pair< BDSExtent, BDSExtent > | InspectEllipticalTube (const G4VSolid *solidIn) |
Inspect a G4EllipticalTube. | |
BDSGeometryType | DetermineGeometryType (G4String geometryType) |
function that gives corresponding enum value for string (case-insensitive) | |
G4double | FringeFieldCorrection (BDSMagnetStrength const *strength, G4bool entranceOrExit) |
Function to calculate the value of the fringe field correction term. | |
G4double | SecondFringeFieldCorrection (BDSMagnetStrength const *strength, G4bool entranceOrExit) |
Function to calculate the value of the second fringe field correction term. | |
BDSIntegratorSetType | DetermineIntegratorSetType (G4String integratorSet) |
Function that gives corresponding enum value for string (case-insensitive) | |
BDSIntegratorType | DetermineIntegratorType (G4String integratorType) |
Function that determines enum from string (case-insensitive). | |
template<class T > | |
T | mag (const T &v) |
template<template< class > class BDSFieldValue, class V > | |
V | mag (const BDSFieldValue< V > &v) |
Specialisation for a 3-vector field value. | |
template<class T > | |
T | Linear1D (const T p[2], G4double x) |
template<class T > | |
T | Linear2D (const T p[2][2], G4double x, G4double y) |
Linear interpolation in 2 dimensions. | |
template<class T > | |
T | Linear3D (const T p[2][2][2], G4double x, G4double y, G4double z) |
Linear interpolation in 3 dimensions. | |
template<class T > | |
T | Linear4D (const T p[2][2][2][2], G4double x, G4double y, G4double z, G4double t) |
Linear interpolation in 4 dimensions. | |
template<class T > | |
T | Cubic1D (const T p[4], G4double x) |
template<class T > | |
T | Cubic2D (const T p[4][4], G4double x, G4double y) |
Cubic interpolation in 2 dimensions. | |
template<class T > | |
T | Cubic3D (const T p[4][4][4], G4double x, G4double y, G4double z) |
Cubic interpolation in 3 dimensions. | |
template<class T > | |
T | Cubic4D (const T p[4][4][4][4], G4double x, G4double y, G4double z, G4double t) |
Cubic interpolation in 4 dimensions. | |
template<class T > | |
double | Linear1DMagOnly (const T p[2], G4double x) |
Linear interpolation of the magnitude in 1 dimension. | |
template<class T > | |
double | Linear2DMagOnly (const T p[2][2], G4double x, G4double y) |
Linear interpolation of the magnitude in 2 dimensions. | |
template<class T > | |
double | Linear3DMagOnly (const T p[2][2][2], G4double x, G4double y, G4double z) |
Linear interpolation of the magnitude in 3 dimensions. | |
template<class T > | |
double | Linear4DMagOnly (const T p[2][2][2][2], G4double x, G4double y, G4double z, G4double t) |
Linear interpolation of the magnitude in 4 dimensions. | |
template<class T > | |
T | Linear1DMag (const T p[2], G4double x) |
Linear interpolation in 1 dimension including magnitude interpolation. | |
template<class T > | |
T | Linear2DMag (const T p[2][2], G4double x, G4double y) |
Linear interpolation in 2 dimensions including magnitude interpolation. | |
template<class T > | |
T | Linear3DMag (const T p[2][2][2], G4double x, G4double y, G4double z) |
Linear interpolation in 3 dimensions including magnitude interpolation. | |
template<class T > | |
T | Linear4DMag (const T p[2][2][2][2], G4double x, G4double y, G4double z, G4double t) |
Linear interpolation in 4 dimensions including magnitude interpolation. | |
BDSInterpolatorType | DetermineInterpolatorType (G4String interpolatorType) |
Function that determines enum from string (case-insensitive). | |
G4int | NDimensionsOfInterpolatorType (const BDSInterpolatorType &it) |
Report the number of dimensions for that interpolator type. | |
G4bool | InterpolatorTypeIsAuto (BDSInterpolatorType typeIn) |
Return true if the type is one containing 'auto'. | |
BDSInterpolatorType | InterpolatorTypeSpecificFromAuto (G4int nDimension, BDSInterpolatorType autoType) |
BDSMagnetGeometryType | DetermineMagnetGeometryType (G4String geometryType) |
function to determine the enum type of the magnet geometry (case-insensitive) | |
BDSModulatorType | DetermineModulatorType (G4String mType) |
Function that gives corresponding enum value for string (case-insensitive) | |
BDSOutputType | DetermineOutputType (G4String outputType) |
Determine the output format to be used from the input string. | |
std::vector< BDSParallelWorldInfo > | NumberOfExtraWorldsRequired () |
std::vector< G4VUserParallelWorld * > | ConstructAndRegisterParallelWorlds (G4VUserDetectorConstruction *massWorld, G4bool buildSamplerWorld, G4bool buildPlacementFieldsWorld) |
std::vector< G4ParallelWorldPhysics * > | ConstructParallelWorldPhysics (const std::vector< G4VUserParallelWorld * > &worlds) |
Construct the parallel physics process for each sampler world. | |
void | RegisterSamplerPhysics (const std::vector< G4ParallelWorldPhysics * > &processes, G4VModularPhysicsList *physicsList) |
Register each parallel physics process to the main physics list. | |
void | AddIStore (const std::vector< G4VUserParallelWorld * > &worlds) |
Get store, and prepare importance sampling for importance geometry sampler. | |
void | RegisterImportanceBiasing (const std::vector< G4VUserParallelWorld * > &worlds, G4VModularPhysicsList *physicsList) |
Create importance geometry sampler and register importance biasing with physics list. | |
BDSParallelWorldImportance * | GetImportanceSamplingWorld (const std::vector< G4VUserParallelWorld * > &worlds) |
Get importance sampling world from list of all parallel worlds. | |
G4bool | IsIon (const G4ParticleDefinition *particle) |
Whether a particle is an ion. A proton is counted NOT as an ion. | |
G4bool | IsIon (const G4DynamicParticle *paritlce) |
Calls IsIon above but also a proton with any bound electrons is considered an ion. | |
G4VModularPhysicsList * | BuildPhysics (const G4String &physicsList, G4int verbosity=1) |
G4int | NBeamParametersSet (const GMAD::Beam &beamDefinition, const std::set< std::string > &keys) |
Count how many out of the set of keys in a beam instance are set. | |
void | ConflictingParametersSet (const GMAD::Beam &beamDefinition, const std::set< std::string > &keys, G4int nSet, G4bool warnZeroParamsSet=true, const G4String &unitString="") |
Throw an exception if too few or too many parameters are set for the supplied keys. | |
void | ConstructDesignAndBeamParticle (const GMAD::Beam &beamDefinition, G4double ffact, BDSParticleDefinition *&designParticle, BDSParticleDefinition *&beamParticle, G4bool &beamDifferentFromDesignParticle) |
BDSParticleDefinition * | ConstructParticleDefinition (const G4String &particleNameIn, G4double totalEnergyIn, G4double kineticEnergyIn, G4double momentumIn, G4double ffact=1) |
void | ConstructBeamParticleG4 (const G4String &name) |
void | ConstructMinimumParticleSet () |
void | ConstructExtendedParticleSet () |
void | PrintPrimaryParticleProcesses (const G4String &primaryParticleName) |
void | PrintDefinedParticles () |
G4GenericBiasingPhysics * | BuildAndAttachBiasWrapper (const GMAD::FastList< GMAD::PhysicsBiasing > &biases) |
void | BuildMuonBiasing (G4VModularPhysicsList *physicsList) |
Build muon splitting biasing and wrap the various processes in the physics list. | |
G4VModularPhysicsList * | ChannellingPhysicsComplete (G4bool useEMD=false, G4bool regular=false, G4bool em4=false, G4bool emss=false) |
Build the physics required for channelling to work correctly. | |
void | SetRangeCuts (G4VModularPhysicsList *physicsList, G4int verbosity=1) |
void | CheckAndSetEnergyValidityRange () |
void | FixGeant105ThreshholdsForBeamParticle (const BDSParticleDefinition *particleDefinition) |
Apply FixGeant105ThreshholdsForParticle to the beam particle definition. | |
void | FixGeant105ThreshholdsForParticle (const G4ParticleDefinition *particleDefinition) |
void | ChangeLooperParameters (const G4ParticleDefinition *particleDef) |
Taken from Geant4 field01 example. Set low values. | |
std::pair< G4Transportation *, G4CoupledTransportation * > | FindTransportation (const G4ParticleDefinition *particleDef) |
Taken from Geant4 field01 example. Get the two possible transportation processes. | |
BDSSamplerType | DetermineSamplerType (G4String samplerType) |
BDSScorerType | DetermineScorerType (G4String scorerType) |
function to determine the enum type of the cavity geometry (case-insensitive) | |
G4Transform3D | CalculateTeleporterDelta (const BDSBeamline *beamline, G4double &teleporterLength) |
BDSTunnelType | DetermineTunnelType (G4String tunnelType) |
Function to determine the enum type of the tunnel (case-insensitive) | |
G4bool | StrContains (const G4String &str, const G4String &test) |
Utility function to simplify lots of syntax changes for pedantic g4 changes. | |
G4int | StrCompare (const G4String &str, const G4String &, G4String::caseCompare mode=G4String::ignoreCase) |
Utility function to simplify lots of syntax changes for pedantic g4 changes. | |
G4String | LowerCase (const G4String &str) |
Utility function to simplify lots of syntax changes for pedantic g4 changes. | |
G4String | StrStrip (const G4String &str, char ch, StringStripType stripType=StringStripType::both) |
Utility function to simplify lots of syntax changes for pedantic g4 changes. | |
G4String | PrepareSafeName (G4String name) |
Remove white space and special characters in the name. | |
G4int | CalculateOrientation (G4double angle) |
std::pair< G4ThreeVector, G4ThreeVector > | CalculateFaces (G4double angleInIn, G4double angleOutIn) |
Calculate input and output normal vector. | |
void | EnsureInLimits (G4double &value, G4double lowerLimit, G4double upperLimit) |
G4bool | FileExists (const G4String &filename) |
Checks if filename exists. | |
G4bool | DirectoryExists (const G4String &path) |
Check if directory exists. | |
std::string | GetCurrentDir () |
Get the current dir the program was executed from. | |
std::string | GetBDSIMExecPath () |
G4String | GetFullPath (G4String filename, bool excludeNameFromPath=false, bool useCWDForPrefix=false) |
void | SplitPathAndFileName (const G4String &filePath, G4String &path, G4String &filename) |
void | SplitFileAndExtension (const G4String &fileName, G4String &file, G4String &extension) |
Split a filename.ext into filename and extension. Extension includes '.'. | |
void | HandleAborts (int signal_number) |
G4bool | IsFinite (G4double value, G4double tolerance=std::numeric_limits< double >::epsilon()) |
G4bool | IsFinite (const G4ThreeVector &variable, G4double tolerance=std::numeric_limits< double >::epsilon()) |
Apply IsFinite to each component of a 3-vector. | |
G4bool | NonZero (G4double value) |
Test whether a number is non-zero - ie abs(number) > minimum number. | |
G4bool | IsFiniteStrength (G4double variable) |
G4bool | IsInteger (const char *s, int &convertedInteger) |
Check if character array is an integer, and returns the integer by reference. | |
G4bool | IsNumber (const char *s, double &convertedNumber) |
Check if character array is an integer, and returns the double by reference. | |
template<typename T > | |
G4int | Sign (T val) |
G4String | BoolToString (G4bool in) |
void | PrintRotationMatrix (G4RotationMatrix *rm, G4String keyName="unknown") |
G4bool | Geant4EnvironmentIsSet () |
Check if the geant4 environmental variables necessary for a run are set. | |
void | CheckHighPrecisionDataExists (const G4String &physicsListName) |
void | CheckLowEnergyNeutronDataExists (const G4String &phhysicsListName) |
std::vector< G4String > | SplitOnWhiteSpace (const G4String &input) |
Split a string on whitespace and return a vector of these 'words'. | |
G4TwoVector | Rotate (const G4TwoVector &vec, const G4double &angle) |
Rotate a two vector in polar coordinates by an angle. | |
G4bool | WillIntersect (const G4ThreeVector &incomingNormal, const G4ThreeVector &outgoingNormal, const G4double &zSeparation, const BDSExtent &incomingExtent, const BDSExtent &outgoingExtent) |
G4bool | WillIntersect (const G4double &angleIn, const G4double &angleOut, const G4double &horizontalWidth, const G4double &length) |
G4double | GetZOfPointOnPlane (const G4ThreeVector &normal, G4double x, G4double y) |
G4ThreeVector | RotateToReferenceFrame (G4ThreeVector faceNormal, G4double fullAngle) |
std::pair< G4String, G4String > | SplitOnColon (const G4String &formatAndPath) |
G4UserLimits * | CreateUserLimits (G4UserLimits *defaultUL, G4double length, G4double fraction=1.6) |
G4double | GetMemoryUsage () |
Get the current memory usage. | |
std::map< G4String, G4String > | GetUserParametersMap (const G4String &userParameters, char delimiter=':') |
Take one long string and split on space and then on colon. "key1:value1 key2:value2" etc. | |
template<typename K , typename V > | |
V | MapGetWithDefault (const std::map< K, V > &m, const K &key, const V &defaultValue) |
G4int | VerboseEventStop (G4int verboseEventStart, G4int verboseEventContinueFor) |
G4bool | VerboseThisEvent (G4int eventIndex, G4int eventStart, G4int eventStop) |
Logic of whether this event should be verbose or not. Code here so it's not duplicated. | |
G4double | Rigidity (G4double momentumMagnitude, G4double charge) |
Calculate the rigidity for a total momentum and charge. | |
G4bool | StartsWith (const std::string &expression, const std::string &prefix) |
Return true if a string "expression" starts with "prefix". | |
G4bool | EndsWith (const std::string &expression, const std::string &suffix) |
Return true if a string "expression" ends with "suffix". | |
G4double | CalculateSafeAngledVolumeLength (G4double angleIn, G4double angleOut, G4double length, G4double containerWidth, G4double containerHeight=0) |
Calculate safe length of an angled volume so it fills the length of its container. | |
G4double | CalculateSafeAngledVolumeLength (G4ThreeVector inputfaceIn, G4ThreeVector outputfaceIn, G4double length, G4double containerWidth, G4double containerHeight=0) |
Overloaded method to process G4ThreeVectors instead of angles. | |
G4double | ArcLengthFromChordLength (G4double chordLength, G4double angle) |
Calculate the arc length from the chord length for a given angle. | |
void | Warning (const G4String &message) |
void | Warning (const G4String &methodName, const G4String &message) |
template<typename A , typename B > | |
std::pair< B, A > | flip_pair (const std::pair< A, B > &p) |
template<typename A , typename B > | |
std::multimap< B, A > | flip_map (const std::map< A, B > &src) |
G4double | ParseEnergyUnit (const G4String &fmt) |
G4double | ParseLengthUnit (const G4String &fmt) |
G4double | ParseAngleUnit (const G4String &fmt) |
G4double | ParseTimeUnit (const G4String &fmt) |
const BDSIntegratorSet * | IntegratorSet (G4String set) |
Return the appropriate set of integrators to use for each magnet type. | |
const BDSIntegratorSet * | IntegratorSet (BDSIntegratorSetType set) |
Return the appropriate set of integrators to use for each magnet type. | |
G4double | GetParameterValueDouble (G4String spec, G4String name) |
Get parameter value from the specification ('spec') string. | |
G4String | GetParameterValueString (G4String spec, G4String name) |
Get parameter value from the specification ('spec') string. | |
G4int | GetParameterValueInt (G4String spec, G4String name) |
Get parameter value from the specification ('spec') string. | |
Variables | |
const BDSIntegratorSet * | integratorsBDSIMOne |
const BDSIntegratorSet * | integratorsBDSIMTwo |
const BDSIntegratorSet * | integratorsBDSIMMatrix |
Mad-x style tracking. | |
const BDSIntegratorSet * | integratorsBDSIMMatrixFringeScaling |
const BDSIntegratorSet * | integratorsGeant4 |
const BDSIntegratorSet * | integratorsGeant4DP |
static const G4double | cOverGeV = CLHEP::c_light / CLHEP::GeV |
speed of light / 1 GeV, used for scaling in brho calculation | |
static const int | NTrajectoryFilters = 10 |
Return either G4Tubs or G4CutTubs depending on flat face.
General warning that prints a message and hangs briefly.
Various utility functions that have no specific place - for example string manipulations, and checking.
Holder for trajectory storage options.
Utility function to always instantiate the right solid to avoid getting an exception from Geant4.
Functions are part of the BDS namespace
|
strong |
Because Geant4 is removing this we need to maintain it to have backwards compatibility, sadly polluting BDSIM.
Definition at line 69 of file BDSUtilities.hh.
void BDS::AddIStore | ( | const std::vector< G4VUserParallelWorld * > & | worlds | ) |
Get store, and prepare importance sampling for importance geometry sampler.
Definition at line 174 of file BDSParallelWorldUtilities.cc.
References BDSParallelWorldImportance::AddIStore(), and GetImportanceSamplingWorld().
Referenced by BDSIM::Initialise().
G4VSolid * BDS::AppropriateTubs | ( | const G4String & | name, |
G4double | innerRadius, | ||
G4double | outerRadius, | ||
G4double | halfLength, | ||
G4double | startAngle, | ||
G4double | sweepAngle, | ||
const G4ThreeVector & | inputFaceNormal, | ||
const G4ThreeVector & | outputFaceNormal, | ||
G4bool | flatFaces | ||
) |
Definition at line 27 of file BDSAppropriateTubs.cc.
G4double BDS::ArcLengthFromChordLength | ( | G4double | chordLength, |
G4double | angle | ||
) |
Calculate the arc length from the chord length for a given angle.
Definition at line 708 of file BDSUtilities.cc.
References IsFinite().
BDSTrajectoryFilter BDS::BDSTrajectoryFilterEnumOfIndex | ( | int | i | ) |
Definition at line 42 of file BDSTrajectoryFilter.cc.
|
inline |
Definition at line 161 of file BDSUtilities.hh.
G4GenericBiasingPhysics * BDS::BuildAndAttachBiasWrapper | ( | const GMAD::FastList< GMAD::PhysicsBiasing > & | biases | ) |
Definition at line 478 of file BDSPhysicsUtilities.cc.
BDSBeamline * BDS::BuildBLMs | ( | const std::vector< GMAD::BLMPlacement > & | blmPlacements, |
const BDSBeamline * | parentBeamLine | ||
) |
Construct a BDSBeamline instance of blms. The parent beam line is required for making placements w.r.t. it.
Here we're assuming the length is along z which may not be true, but close enough for this purpose as we rely only on the centre position.
Definition at line 57 of file BDSBeamlineBLMBuilder.cc.
References BDSBeamline::AddBeamlineElement(), BDSGeometryFactory::BuildGeometry(), BDSDetectorConstruction::CreatePlacementTransform(), BDSScorerFactory::CreateScorer(), BDSExtent::DZ(), BDSGeometryComponent::GetExtent(), BDSGeometryComponent::GetName(), BDSParser::GetScorers(), BDSAcceleratorComponent::Initialise(), BDSBLMRegistry::Instance(), BDSGeometryFactory::Instance(), BDSParser::Instance(), IsFinite(), BDSScorerInfo::name, BDSSDManager::RegisterPrimitiveScorerNames(), and SplitOnWhiteSpace().
Referenced by BDSDetectorConstruction::Construct().
BDSMagnet * BDS::BuildDipoleFringe | ( | const GMAD::Element * | element, |
G4double | angleIn, | ||
G4double | angleOut, | ||
const G4String & | name, | ||
BDSMagnetStrength * | st, | ||
G4double | brho, | ||
const BDSIntegratorSet * | integratorSet, | ||
BDSFieldType | dipoleFieldType, | ||
BDSModulatorInfo * | fieldModulator = nullptr |
||
) |
Thin magnet for dipole fringe field. Is beampipe only, no outer magnet.
Definition at line 811 of file BDSBendBuilder.cc.
References BDSBeamPipeInfo::beamPipeType, BDSComponentFactory::CreateFieldTransform(), BDSComponentFactory::PrepareBeamPipeInfo(), and BDSComponentFactory::PrepareMagnetOuterInfo().
Referenced by BuildRBendLine(), and BuildSBendLine().
BDSBeamline * BDS::BuildEndPieceBeamline | ( | const BDSBeamline * | beamline, |
const G4bool | circularMachine | ||
) |
Loop over the flat beam line in BDSAcceleratorModel and inspect each element seeing if it has end pieces to be placed and if they will fit without overlapping. If they will, append them to a separate beam line of end pieces that can be placed in the world volume.
Definition at line 32 of file BDSBeamlineEndPieceBuilder.cc.
References BDSBeamline::AddBeamlineElement(), BDSBeamline::back(), BDSBeamline::empty(), BDSAcceleratorComponent::EndPieceBefore(), BDSBeamlineElement::GetAcceleratorComponent(), BDSAcceleratorComponent::GetChordLength(), BDSBeamlineElement::GetChordLength(), BDSGeometryComponent::GetExtent(), BDSBeamline::GetFirstItem(), BDSBeamline::GetLastItem(), BDSBeamline::GetPrevious(), BDSBeamlineElement::GetTilt(), BDSBeamlineElement::GetType(), BDSGlobalConstants::Instance(), BDSAcceleratorComponent::OutputFaceNormal(), BDSBeamline::ProvideEndPieceElementAfter(), BDSExtent::Tilted(), BDSExtent::TransverselyGreaterThan(), and WillIntersect().
Referenced by BDSDetectorConstruction::BuildBeamline().
void BDS::BuildMuonBiasing | ( | G4VModularPhysicsList * | physicsList | ) |
Build muon splitting biasing and wrap the various processes in the physics list.
Definition at line 507 of file BDSPhysicsUtilities.cc.
References BDSGlobalConstants::Instance().
Referenced by BDSIM::Initialise().
G4VModularPhysicsList * BDS::BuildPhysics | ( | const G4String & | physicsList, |
G4int | verbosity = 1 |
||
) |
Detect whether we're using a Geant4 provided physics list or whether we'll use the BDSIM modular physics and construct it.
Definition at line 113 of file BDSPhysicsUtilities.cc.
References ChannellingPhysicsComplete(), CheckAndSetEnergyValidityRange(), ConstructMinimumParticleSet(), GetFullPath(), BDSGlobalConstants::Instance(), LowerCase(), SetRangeCuts(), and StrContains().
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
BDSBeamline * BDS::BuildPlacementGeometry | ( | const std::vector< GMAD::Placement > & | placements, |
const BDSBeamline * | parentBeamLine, | ||
BDSComponentFactory * | componentFactory | ||
) |
Construct a BDSBeamline instance with all external geometry. The geometry is constructed using the geometry factory (and owned by it) but the beam line is necessary for extent calculation for the world. The parent beam line is required for making placements w.r.t. it.
Here we're assuming the length is along z which may not be true, but close enough for this purpose as we rely only on the centre position.
Definition at line 52 of file BDSBeamlinePlacementBuilder.cc.
References BDSBeamline::AddBeamlineElement(), BDSGeometryFactory::BuildGeometry(), BDSComponentFactory::CreateComponent(), BDSDetectorConstruction::CreatePlacementTransform(), BDSExtent::DZ(), BDSAcceleratorComponent::GetChordLength(), BDSGeometryComponent::GetContainerSolid(), BDSGeometryComponent::GetExtent(), BDSAcceleratorComponent::GetName(), BDSParser::GetPlacementElement(), BDSAcceleratorComponent::HasAField(), BDSAcceleratorComponent::Initialise(), BDSFieldFactory::Instance(), BDSGeometryFactory::Instance(), BDSParser::Instance(), BDSFieldInfo::NameOfParserDefinition(), BDSAcceleratorModel::RegisterPlacementFieldPlacements(), BDSAcceleratorComponent::SetField(), and BDSAcceleratorComponent::SetFieldUsePlacementWorldTransform().
Referenced by BDSDetectorConstruction::Construct().
BDSLine * BDS::BuildRBendLine | ( | const G4String & | elementName, |
const GMAD::Element * | element, | ||
const GMAD::Element * | prevElement, | ||
const GMAD::Element * | nextElement, | ||
G4double | brho, | ||
BDSMagnetStrength * | st, | ||
const BDSIntegratorSet * | integratorSet, | ||
G4double | incomingFaceAngle, | ||
G4double | outgoingFaceAngle, | ||
G4bool | buildFringeFields, | ||
BDSModulatorInfo * | fieldModulator = nullptr |
||
) |
Construct beamline for an rbend. A line is returned with a single magnet as the main dipole, but can have fringefield magnets placed either end if specified.
Definition at line 553 of file BDSBendBuilder.cc.
References BDSLine::AddComponent(), BuildDipoleFringe(), BDSComponentFactory::CreateFieldTransform(), GMAD::Element::e1, GMAD::Element::e2, GMAD::Element::fint, GMAD::Element::fintx, GetDipoleIntegratorType(), GMAD::Element::hgap, BDSGlobalConstants::Instance(), IsFinite(), BDSIntegratorSet::IsMatrixIntegratorSet(), BDSComponentFactory::PrepareBeamPipeInfo(), BDSComponentFactory::PrepareMagnetOuterFieldInfo(), BDSComponentFactory::PrepareMagnetOuterInfo(), BDSComponentFactory::ScalingFieldOuter(), GMAD::Element::type, BDSComponentFactory::YokeOnLeft(), and ZeroStrengthDipole().
BDSAcceleratorComponent * BDS::BuildSBendLine | ( | const G4String & | elementName, |
const GMAD::Element * | element, | ||
BDSMagnetStrength * | st, | ||
G4double | brho, | ||
const BDSIntegratorSet * | integratorSet, | ||
G4double | incomingFaceAngle, | ||
G4double | outgoingFaceAngle, | ||
G4bool | buildFringeFields, | ||
const GMAD::Element * | prevElement, | ||
const GMAD::Element * | nextElement, | ||
BDSModulatorInfo * | fieldModulator = nullptr |
||
) |
This calculates and constructs a BDSLine* of BDSMagnet*. The bend is split into multiple wedges. If a small or zero poleface angle is specified, the end wedges will have faces angled as appropriate, the remaining wedges will re-use a single identical 'central' wedge several times. For a stronger angled poleface, the faces of each wedge fade in/out from the poleface to the cental wedge in the middle. Thin fringefield elements are placed at the beginning and end of the beamline if required.
Definition at line 53 of file BDSBendBuilder.cc.
References BDSLine::AddComponent(), BuildDipoleFringe(), BuildSingleSBend(), CalculateNSBendSegments(), BDSComponentFactory::CheckBendLengthAngleWidthCombo(), BDSComponentFactory::CreateFieldTransform(), GMAD::Element::e1, GMAD::Element::e2, GMAD::Element::fint, GMAD::Element::fintx, GetDipoleIntegratorType(), GMAD::Element::hgap, BDSGlobalConstants::Instance(), IsFinite(), BDSIntegratorSet::IsMatrixIntegratorSet(), GMAD::Element::l, BDSComponentFactory::PrepareBeamPipeInfo(), BDSComponentFactory::PrepareHorizontalWidth(), BDSComponentFactory::PrepareMagnetOuterFieldInfo(), BDSComponentFactory::PrepareMagnetOuterInfo(), BDSComponentFactory::ScalingFieldOuter(), GMAD::Element::type, BDSComponentFactory::YokeOnLeft(), and ZeroStrengthDipole().
BDSMagnet * BDS::BuildSingleSBend | ( | const GMAD::Element * | element, |
const G4String & | name, | ||
G4double | arcLength, | ||
G4double | angle, | ||
G4double | angleIn, | ||
G4double | angleOut, | ||
const BDSMagnetStrength * | strength, | ||
G4double | brho, | ||
const BDSIntegratorSet * | integratorSet, | ||
G4bool | yokeOnLeft, | ||
const BDSFieldInfo * | outerFieldIn, | ||
BDSModulatorInfo * | fieldModulator = nullptr |
||
) |
Function to return a single sector bend section.
Definition at line 501 of file BDSBendBuilder.cc.
References BDSComponentFactory::CreateFieldTransform(), GetDipoleIntegratorType(), IsFinite(), BDSComponentFactory::PrepareBeamPipeInfo(), BDSComponentFactory::PrepareMagnetOuterInfo(), and ZeroStrengthDipole().
Referenced by BuildSBendLine().
std::pair< G4ThreeVector, G4ThreeVector > BDS::CalculateFaces | ( | G4double | angleInIn, |
G4double | angleOutIn | ||
) |
Calculate input and output normal vector.
orientation -1,0,1 value - always use |angle| with trigonometric and then multiply by this factor, 0 by default
Definition at line 139 of file BDSUtilities.cc.
References CalculateOrientation().
Referenced by BDSCurvilinearFactory::CreateCurvilinearVolume(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSMagnetOuterFactoryCylindrical::CreateRectangularBend(), BDSMagnetOuterFactoryCylindrical::CreateSectorBend(), BDSTunnelFactoryBase::CreateTunnelSectionAngledInOut(), and BDSComponentFactory::PrepareBeamPipeInfo().
G4int BDS::CalculateNSBendSegments | ( | G4double | length, |
G4double | angle, | ||
G4double | incomingFaceAngle = 0 , |
||
G4double | outgoingFaceAngle = 0 , |
||
G4double | aperturePrecision = 1.0 |
||
) |
Utility function to calculate the number of segments an sbend should be split into. Based on aperture error tolerance - default is 1mm.
Definition at line 851 of file BDSBendBuilder.cc.
References BDSGlobalConstants::Instance().
Referenced by BuildSBendLine().
G4int BDS::CalculateOrientation | ( | G4double | angle | ) |
Calculate the +- 1 orientation multiplier for absolute angles seems trivial, but used in a lot of places so put in one place
Definition at line 134 of file BDSUtilities.cc.
Referenced by CalculateFaces(), and BDSMagnetOuterFactoryLHC::CreateLHCDipole().
G4double BDS::CalculateSafeAngledVolumeLength | ( | G4double | angleIn, |
G4double | angleOut, | ||
G4double | length, | ||
G4double | containerWidth, | ||
G4double | containerHeight = 0 |
||
) |
Calculate safe length of an angled volume so it fills the length of its container.
Definition at line 682 of file BDSUtilities.cc.
References IsFinite().
Referenced by CalculateSafeAngledVolumeLength(), BDSBeamPipeFactoryRectEllipse::CreateGeneralAngledSolids(), BDSBeamPipeFactoryLHC::CreateGeneralAngledSolids(), BDSBeamPipeFactoryRectangular::CreateGeneralAngledSolids(), BDSBeamPipeFactoryElliptical::CreateGeneralAngledSolids(), BDSBeamPipeFactoryCircular::CreateGeneralAngledSolids(), BDSBeamPipeFactoryPoints::CreateSolidsAngled(), and BDSMagnetOuterFactoryPolesBase::DipoleCalculations().
G4double BDS::CalculateSafeAngledVolumeLength | ( | G4ThreeVector | inputfaceIn, |
G4ThreeVector | outputfaceIn, | ||
G4double | length, | ||
G4double | containerWidth, | ||
G4double | containerHeight = 0 |
||
) |
Overloaded method to process G4ThreeVectors instead of angles.
Definition at line 671 of file BDSUtilities.cc.
References CalculateSafeAngledVolumeLength().
G4Transform3D BDS::CalculateTeleporterDelta | ( | const BDSBeamline * | beamline, |
G4double & | teleporterLength | ||
) |
Calculate the difference between the beginning and end of a beam line. Writes the length to the argument passed by reference.
Definition at line 87 of file BDSTeleporter.cc.
References BDSBeamline::back(), BDSSamplerPlane::ChordLength(), BDSBeamline::empty(), BDSBeamline::front(), BDSBeamlineElement::GetReferencePositionEnd(), and BDSBeamline::PaddingLength().
Referenced by BDSDetectorConstruction::BuildBeamline().
G4VModularPhysicsList * BDS::ChannellingPhysicsComplete | ( | G4bool | useEMD = false , |
G4bool | regular = false , |
||
G4bool | em4 = false , |
||
G4bool | emss = false |
||
) |
Build the physics required for channelling to work correctly.
Definition at line 542 of file BDSPhysicsUtilities.cc.
References BDSGlobalConstants::Instance().
Referenced by BuildPhysics().
void BDS::CheckAndSetEnergyValidityRange | ( | ) |
Check if the user has requested a changed energy validity range and set the appropriate variables in the G4ProductionCutsTable.
Definition at line 631 of file BDSPhysicsUtilities.cc.
References BDSGlobalConstants::Instance(), and IsFinite().
Referenced by BuildPhysics().
void BDS::CheckHighPrecisionDataExists | ( | const G4String & | physicsListName | ) |
Check if the optional G4PARTICLEHPDATA exists in the environment. Will print out error and exit if no variable found. Physics list argument used for feedback purposes.
Definition at line 410 of file BDSUtilities.cc.
Referenced by BDSModularPhysicsList::IonBinary(), BDSModularPhysicsList::IonINCLXX(), and BDSModularPhysicsList::IonPHP().
void BDS::CheckLowEnergyNeutronDataExists | ( | const G4String & | phhysicsListName | ) |
Check if the optional Low Energy Neutron Data set exists via the environmental variable G4LENDDATA. Physics list argument used for feedback purposes.
Definition at line 424 of file BDSUtilities.cc.
Referenced by BDSModularPhysicsList::EmExtra(), BDSModularPhysicsList::HadronicElasticLEND(), and BDSModularPhysicsList::ShieldingLEND().
void BDS::ConflictingParametersSet | ( | const GMAD::Beam & | beamDefinition, |
const std::set< std::string > & | keys, | ||
G4int | nSet, | ||
G4bool | warnZeroParamsSet = true , |
||
const G4String & | unitString = "" |
||
) |
Throw an exception if too few or too many parameters are set for the supplied keys.
Definition at line 225 of file BDSPhysicsUtilities.cc.
References GMAD::Beam::get_value().
Referenced by ConstructDesignAndBeamParticle(), BDSBunch::SetEmittances(), and BDSBunch::SetOptions().
std::vector< G4VUserParallelWorld * > BDS::ConstructAndRegisterParallelWorlds | ( | G4VUserDetectorConstruction * | massWorld, |
G4bool | buildSamplerWorld, | ||
G4bool | buildPlacementFieldsWorld | ||
) |
Construct the default and any extra parallel worlds required and register them to the main mass world argument. Returns the vector of worlds that required a physics process so that their boundaries are respected in tracking.
Definition at line 78 of file BDSParallelWorldUtilities.cc.
References BDSGlobalConstants::Instance(), and NumberOfExtraWorldsRequired().
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
void BDS::ConstructBeamParticleG4 | ( | const G4String & | name | ) |
Ensure required beam particle has been constructed for Geant4 purposes. Expects lowercase letters, not the Geant4 exact string.
Definition at line 375 of file BDSPhysicsUtilities.cc.
Referenced by ConstructParticleDefinition().
void BDS::ConstructDesignAndBeamParticle | ( | const GMAD::Beam & | beamDefinition, |
G4double | ffact, | ||
BDSParticleDefinition *& | designParticle, | ||
BDSParticleDefinition *& | beamParticle, | ||
G4bool & | beamDifferentFromDesignParticle | ||
) |
Construct the design and beam particle definitions. Even if these are the same, unique objects are created for and must be deleted elsewhere. Two pointers are passed by reference that will be updated with the allocated objects. The Boolean by reference argument is to tell whether they definitions (although unique objects) define the same particle.
Definition at line 247 of file BDSPhysicsUtilities.cc.
References GMAD::BeamBase::beamEnergy, GMAD::BeamBase::beamKineticEnergy, GMAD::BeamBase::beamMomentum, GMAD::BeamBase::beamParticleName, ConflictingParametersSet(), ConstructParticleDefinition(), GMAD::BeamBase::E0, GMAD::BeamBase::Ek0, NBeamParametersSet(), GMAD::BeamBase::P0, and GMAD::BeamBase::particle.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
void BDS::ConstructExtendedParticleSet | ( | ) |
Construct all leptons, pi+- K+- K. Utility function for when we expect other possible beam particles.
Definition at line 449 of file BDSPhysicsUtilities.cc.
Referenced by BDSIM::Initialise().
void BDS::ConstructMinimumParticleSet | ( | ) |
Construct the minimum particle set required (gamma, electron, positron, proton and anti-proton.
Definition at line 431 of file BDSPhysicsUtilities.cc.
Referenced by BuildPhysics(), and BDSModularPhysicsList::ConstructParticle().
std::vector< G4ParallelWorldPhysics * > BDS::ConstructParallelWorldPhysics | ( | const std::vector< G4VUserParallelWorld * > & | worlds | ) |
Construct the parallel physics process for each sampler world.
Definition at line 159 of file BDSParallelWorldUtilities.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
BDSParticleDefinition * BDS::ConstructParticleDefinition | ( | const G4String & | particleNameIn, |
G4double | totalEnergyIn, | ||
G4double | kineticEnergyIn, | ||
G4double | momentumIn, | ||
G4double | ffact = 1 |
||
) |
Construct particle definition. Ensure that particle is instantiated from a Geant4 point of view. 'ffact' is typically 1 or -1 used to flip the sign of the rigidity for difference between convention and what's required. Only one of totalEnergy, kineticEnergy and momentum should be non-zero.
cache this here in case the particle definition isn't available until during a run
Definition at line 295 of file BDSPhysicsUtilities.cc.
References ConstructBeamParticleG4(), LowerCase(), and PrintDefinedParticles().
Referenced by ConstructDesignAndBeamParticle().
G4UserLimits * BDS::CreateUserLimits | ( | G4UserLimits * | defaultUL, |
G4double | length, | ||
G4double | fraction = 1.6 |
||
) |
Create a user limits instance based on a default with a new step length limit of the length parameter. Check the max step length in the defaultUL and use the shorter of the two. Note the G4UserLimits instance is not const although it could be as the accessors in that class are not const. Fraction is the fraction of the length that max step will be because if it's exactly the length of an object, it can prove problematic to resolve the outgoing surface - better to give some margin.
Definition at line 591 of file BDSUtilities.cc.
References IsFinite().
Referenced by BDSAcceleratorComponent::BuildUserLimits(), BDSBeamPipeFactoryCircularVacuum::CommonFinalConstruction(), BDSFieldFactory::PrepareFieldDefinitions(), BDSBeamPipeFactoryBase::SetUserLimits(), BDSCavityFactoryBase::SetUserLimits(), BDSCrystalFactory::SetUserLimits(), and BDSFieldInfo::UpdateUserLimitsLengthMaximumStepSize().
T BDS::Cubic1D | ( | const T | p[4], |
G4double | x | ||
) |
Cubic interpolation in 1 dimension. The "p" is the real value to be interpolated. 'x' must be on the interval [0,1], ie normalised.
Definition at line 91 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator1DCubic::GetInterpolatedValueT().
T BDS::Cubic2D | ( | const T | p[4][4], |
G4double | x, | ||
G4double | y | ||
) |
Cubic interpolation in 2 dimensions.
Definition at line 99 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator2DCubic::GetInterpolatedValueT().
T BDS::Cubic3D | ( | const T | p[4][4][4], |
G4double | x, | ||
G4double | y, | ||
G4double | z | ||
) |
Cubic interpolation in 3 dimensions.
Definition at line 113 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator3DCubic::GetInterpolatedValueT().
T BDS::Cubic4D | ( | const T | p[4][4][4][4], |
G4double | x, | ||
G4double | y, | ||
G4double | z, | ||
G4double | t | ||
) |
Cubic interpolation in 4 dimensions.
Definition at line 128 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator4DCubic::GetInterpolatedValueT().
std::vector< G4double > BDS::CumulativeDistances | ( | T | pairs | ) |
Definition at line 84 of file BDSBunchHaloFlatSigma.hh.
BDSApertureType BDS::DetermineApertureType | ( | G4String | apertureType | ) |
function that gives corresponding enum value for string (case-insensitive)
Definition at line 46 of file BDSApertureType.cc.
References LowerCase().
Referenced by BDSApertureInfo::BDSApertureInfo().
BDSArrayReflectionType BDS::DetermineArrayReflectionType | ( | G4String | arrayReflectionType | ) |
Function that gives corresponding enum value for string (case-insensitive)
Definition at line 51 of file BDSArrayReflectionType.cc.
References LowerCase().
Referenced by DetermineArrayReflectionTypeSet().
BDSArrayReflectionTypeSet BDS::DetermineArrayReflectionTypeSet | ( | const G4String & | arrayReflectionType | ) |
Return a std::set of reflection types. Split string on white space.
Definition at line 86 of file BDSArrayReflectionType.cc.
References DetermineArrayReflectionType(), and SplitOnWhiteSpace().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSBeamPipeType BDS::DetermineBeamPipeType | ( | G4String | apertureType | ) |
Function that gives corresponding enum value for string (case-insensitive).
Definition at line 47 of file BDSBeamPipeType.cc.
References LowerCase(), and StrContains().
Referenced by BDSBeamPipeInfo::BDSBeamPipeInfo().
BDSBLMType BDS::DetermineBLMType | ( | G4String | blmType | ) |
function that gives corresponding enum value for string (case-insensitive)
Definition at line 39 of file BDSBLMType.cc.
References LowerCase().
Referenced by BDSBLMFactory::CreateBLM().
BDSBunchType BDS::DetermineBunchType | ( | G4String | distrType | ) |
Function that gives corresponding enum value for string (case-insensitive).
Definition at line 55 of file BDSBunchType.cc.
References LowerCase().
Referenced by BDSBunchFactory::CreateBunch(), BDSBunchComposite::SetOptions(), and BDSBunchCompositeSDE::SetOptions().
BDSCavityFieldType BDS::DetermineCavityFieldType | ( | G4String | cavityFieldType | ) |
function to determine the enum type of the cavity field type (case-insensitive)
Definition at line 38 of file BDSCavityFieldType.cc.
References LowerCase().
Referenced by BDSBeamlineIntegral::Integrate().
BDSCavityType BDS::DetermineCavityType | ( | G4String | cavityType | ) |
function to determine the enum type of the cavity geometry (case-insensitive)
Definition at line 39 of file BDSCavityType.cc.
References LowerCase().
Referenced by BDSComponentFactory::PrepareCavityModels().
BDSCrystalType BDS::DetermineCrystalType | ( | G4String | crystalType | ) |
function to determine the enum type of the cavity geometry (case-insensitive)
Definition at line 39 of file BDSCrystalType.cc.
References LowerCase().
Referenced by BDSComponentFactory::PrepareCrystals().
BDSDimensionType BDS::DetermineDimensionType | ( | G4String | dimensionType | ) |
Determine the output format to be used from the input string.
Definition at line 40 of file BDSDimensionType.cc.
References LowerCase().
Referenced by BDSFieldLoaderBDSIM< T >::Load().
BDSEventGeneratorFileType BDS::DetermineEventGeneratorFileType | ( | G4String | distrType | ) |
Function that gives corresponding enum value for string (case-insensitive).
Definition at line 42 of file BDSEventGeneratorFileType.cc.
References LowerCase().
Referenced by BDSPrimaryGeneratorFileHEPMC::BDSPrimaryGeneratorFileHEPMC().
Utility function to inspect a solid and determine it's outer (and posssibly inner) extent by casting to it's solid class. Delegates to below methods which may use this method themselves for recursion in booleans.
Definition at line 45 of file BDSGeometryInspector.cc.
References InspectBox(), InspectCutTubs(), InspectDisplacedSolid(), InspectEllipticalTube(), InspectIntersectionSolid(), InspectSubtractionSolid(), InspectTubs(), and InspectUnionSolid().
Referenced by BDSGeometryFactoryGDML::Build(), InspectDisplacedSolid(), InspectIntersectionSolid(), InspectSubtractionSolid(), and InspectUnionSolid().
BDSFieldClassType BDS::DetermineFieldClassType | ( | BDSFieldType | fieldType | ) |
Function that gives the corresponding enum value for a field type enum.
Definition at line 34 of file BDSFieldClassType.cc.
References BDSTypeSafeEnum< def, inner >::underlying().
Referenced by BDSFieldFactory::CreateField().
BDSFieldFormat BDS::DetermineFieldFormat | ( | G4String | fieldformat | ) |
Function that gives corresponding enum value for string (case-insensitive)
Definition at line 44 of file BDSFieldFormat.cc.
References LowerCase().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSFieldType BDS::DetermineFieldType | ( | G4String | fieldType | ) |
Function that gives corresponding enum value for string (case-insensitive)
Definition at line 90 of file BDSFieldType.cc.
References LowerCase().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSGeometryType BDS::DetermineGeometryType | ( | G4String | geometryType | ) |
function that gives corresponding enum value for string (case-insensitive)
Definition at line 38 of file BDSGeometryType.cc.
References LowerCase().
Referenced by BDSGeometryFactory::BuildGeometry().
BDSIntegratorSetType BDS::DetermineIntegratorSetType | ( | G4String | integratorSet | ) |
Function that gives corresponding enum value for string (case-insensitive)
Definition at line 44 of file BDSIntegratorSetType.cc.
References LowerCase().
Referenced by BDSGlobalConstants::BDSGlobalConstants(), and IntegratorSet().
BDSIntegratorType BDS::DetermineIntegratorType | ( | G4String | integratorType | ) |
Function that determines enum from string (case-insensitive).
Definition at line 90 of file BDSIntegratorType.cc.
References LowerCase().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSInterpolatorType BDS::DetermineInterpolatorType | ( | G4String | interpolatorType | ) |
Function that determines enum from string (case-insensitive).
Definition at line 57 of file BDSInterpolatorType.cc.
References LowerCase().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSMagnetGeometryType BDS::DetermineMagnetGeometryType | ( | G4String | geometryType | ) |
function to determine the enum type of the magnet geometry (case-insensitive)
Definition at line 45 of file BDSMagnetGeometryType.cc.
References LowerCase(), and StrContains().
Referenced by BDSGlobalConstants::BDSGlobalConstants(), and BDSComponentFactory::MagnetGeometryType().
BDSModulatorType BDS::DetermineModulatorType | ( | G4String | mType | ) |
Function that gives corresponding enum value for string (case-insensitive)
Definition at line 39 of file BDSModulatorType.cc.
References LowerCase().
Referenced by BDSFieldFactory::PrepareModulatorDefinitions().
BDSOutputType BDS::DetermineOutputType | ( | G4String | outputType | ) |
Determine the output format to be used from the input string.
Definition at line 37 of file BDSOutputType.cc.
References LowerCase().
Referenced by BDSGlobalConstants::BDSGlobalConstants().
BDSSamplerType BDS::DetermineSamplerType | ( | G4String | samplerType | ) |
Definition at line 42 of file BDSSamplerType.cc.
BDSScorerType BDS::DetermineScorerType | ( | G4String | scorerType | ) |
function to determine the enum type of the cavity geometry (case-insensitive)
Definition at line 53 of file BDSScorerType.cc.
References LowerCase().
Referenced by BDSScorerInfo::BDSScorerInfo().
BDSTunnelType BDS::DetermineTunnelType | ( | G4String | tunnelType | ) |
Function to determine the enum type of the tunnel (case-insensitive)
Definition at line 42 of file BDSTunnelType.cc.
References LowerCase().
Referenced by BDSTunnelInfo::BDSTunnelInfo().
G4bool BDS::DirectoryExists | ( | const G4String & | path | ) |
Check if directory exists.
Definition at line 171 of file BDSUtilities.cc.
Referenced by BDSTemporaryFiles::InitialiseTempDir(), and BDSGeometryWriter::WriteToGDML().
|
inline |
Return true if a string "expression" ends with "suffix".
Definition at line 271 of file BDSUtilities.hh.
void BDS::EnsureInLimits | ( | G4double & | value, |
G4double | lowerLimit, | ||
G4double | upperLimit | ||
) |
Ensure a variable passed by reference is capped within lowerLimit and upperLimit. If it's outside these it is defaulted to those limit values.
Definition at line 156 of file BDSUtilities.cc.
Referenced by BDSColours::DefineColour().
G4bool BDS::FileExists | ( | const G4String & | filename | ) |
Checks if filename exists.
Definition at line 164 of file BDSUtilities.cc.
Referenced by BDSPSPopulationScaled::BDSPSPopulationScaled(), BDSGeometryFactory::BuildGeometry(), BDSCrystalFactory::CommonConstruction(), BDSOutput::GetNextFileName(), LoadAperturePoints(), LoadFieldQueryPoints(), BDSFieldQuery::OpenFiles(), BDSVisManager::StartSession(), and BDSGeometryWriter::WriteToGDML().
std::pair< G4Transportation *, G4CoupledTransportation * > BDS::FindTransportation | ( | const G4ParticleDefinition * | particleDef | ) |
Taken from Geant4 field01 example. Get the two possible transportation processes.
Definition at line 711 of file BDSPhysicsUtilities.cc.
Referenced by FixGeant105ThreshholdsForParticle().
void BDS::FixGeant105ThreshholdsForBeamParticle | ( | const BDSParticleDefinition * | particleDefinition | ) |
Apply FixGeant105ThreshholdsForParticle to the beam particle definition.
Definition at line 674 of file BDSPhysicsUtilities.cc.
References FixGeant105ThreshholdsForParticle(), and BDSParticleDefinition::ParticleDefinition().
void BDS::FixGeant105ThreshholdsForParticle | ( | const G4ParticleDefinition * | particleDefinition | ) |
Set 1keV, 10keV and 1500 for warning energy, important energy and number of trials in Geant4's looping thresholds.
Definition at line 680 of file BDSPhysicsUtilities.cc.
References FindTransportation().
Referenced by FixGeant105ThreshholdsForBeamParticle(), BDSBunchSixTrackLink::UpdateGeant4ParticleDefinition(), BDSBunch::UpdateIonDefinition(), and BDSBunchSixTrackLink::UpdateIonDefinition().
std::multimap< B, A > BDS::flip_map | ( | const std::map< A, B > & | src | ) |
Definition at line 47 of file PerEntryHistogramSet.hh.
std::pair< B, A > BDS::flip_pair | ( | const std::pair< A, B > & | p | ) |
Nice flip pair and map from https://stackoverflow.com/questions/5056645/sorting-stdmap-using-value to order the map of <pdg ID to integral> so we can get the top N histograms.
Definition at line 43 of file PerEntryHistogramSet.hh.
G4double BDS::FringeFieldCorrection | ( | BDSMagnetStrength const * | strength, |
G4bool | entranceOrExit | ||
) |
Function to calculate the value of the fringe field correction term.
Definition at line 370 of file BDSIntegratorDipoleFringe.cc.
G4String BDS::GDMLSchemaLocation | ( | ) |
Get GDML Schema location included with BDSIM.
Definition at line 109 of file BDSGDMLPreprocessor.cc.
References GetBDSIMExecPath().
G4bool BDS::Geant4EnvironmentIsSet | ( | ) |
Check if the geant4 environmental variables necessary for a run are set.
Definition at line 372 of file BDSUtilities.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
std::string BDS::GetBDSIMExecPath | ( | ) |
Returns path from which BDSIM is executed supports linux/unix and mac OS
Definition at line 191 of file BDSUtilities.cc.
Referenced by GDMLSchemaLocation(), BDSTemporaryFiles::InitialiseTempDir(), and BDSVisManager::StartSession().
std::string BDS::GetCurrentDir | ( | ) |
Get the current dir the program was executed from.
Definition at line 178 of file BDSUtilities.cc.
Referenced by GetFullPath(), and BDSExecOptions::GetPath().
BDSIntegratorType BDS::GetDipoleIntegratorType | ( | const BDSIntegratorSet * | integratorSet, |
const GMAD::Element * | element | ||
) |
Function to get the integrator type. Test for finite K1 and returns dipole or dipolequadrupole integrator as appropriate.
Definition at line 876 of file BDSBendBuilder.cc.
References BDSIntegratorSet::Integrator(), IsFinite(), and GMAD::Element::k1.
Referenced by BuildRBendLine(), BuildSBendLine(), and BuildSingleSBend().
BDSMagnetStrength * BDS::GetFringeMagnetStrength | ( | const GMAD::Element * | element, |
const BDSMagnetStrength * | st, | ||
G4double | fringeAngle, | ||
G4double | e1, | ||
G4double | e2, | ||
G4double | fintx, | ||
G4bool | entranceOrExit | ||
) |
Definition at line 892 of file BDSBendBuilder.cc.
G4String BDS::GetFullPath | ( | G4String | filename, |
bool | excludeNameFromPath = false , |
||
bool | useCWDForPrefix = false |
||
) |
Get the full absolute directory path where a file can be found. Option excludeNameFromPath: if true will return only the path without the filename appended to exclude the filename from path. Option useCWDForPrefix: if the path is relative, then we would normally prepend the absolute path of the main input file so it's relative to that but with an absolute path. However, we may want to do this relative to the executable directory of the program. If this option is on, it'll be CWD.
Definition at line 213 of file BDSUtilities.cc.
References GetCurrentDir(), BDSGlobalConstants::Instance(), and SplitPathAndFileName().
Referenced by BDSPSCellFluxScaled3D::BDSPSCellFluxScaled3D(), BDSPSPopulationScaled::BDSPSPopulationScaled(), BDSPTCOneTurnMap::BDSPTCOneTurnMap(), BDSGeometryFactorySQL::Build(), BDSGeometryFactory::BuildGeometry(), BuildPhysics(), BDSCrystalFactory::CommonConstruction(), BDSParallelWorldImportance::Construct(), BDSPrimaryGeneratorFile::ConstructGenerator(), LoadAperturePoints(), LoadFieldQueryPoints(), BDSFieldFactory::PrepareFieldDefinitions(), BDSBunchPtc::SetOptions(), BDSBunchUserFile< T >::SetOptions(), and BDSGeometryWriter::WriteToGDML().
BDSParallelWorldImportance * BDS::GetImportanceSamplingWorld | ( | const std::vector< G4VUserParallelWorld * > & | worlds | ) |
Get importance sampling world from list of all parallel worlds.
Definition at line 195 of file BDSParallelWorldUtilities.cc.
Referenced by AddIStore(), and RegisterImportanceBiasing().
G4double BDS::GetMemoryUsage | ( | ) |
Get the current memory usage.
Definition at line 610 of file BDSUtilities.cc.
G4double BDS::GetParameterValueDouble | ( | G4String | spec, |
G4String | name | ||
) |
Get parameter value from the specification ('spec') string.
Definition at line 438 of file BDSUtilities.cc.
References GetParameterValueString().
G4int BDS::GetParameterValueInt | ( | G4String | spec, |
G4String | name | ||
) |
Get parameter value from the specification ('spec') string.
Definition at line 446 of file BDSUtilities.cc.
References GetParameterValueString().
G4String BDS::GetParameterValueString | ( | G4String | spec, |
G4String | name | ||
) |
Get parameter value from the specification ('spec') string.
Definition at line 454 of file BDSUtilities.cc.
Referenced by GetParameterValueDouble(), and GetParameterValueInt().
std::map< G4String, G4String > BDS::GetUserParametersMap | ( | const G4String & | userParameters, |
char | delimiter = ':' |
||
) |
Take one long string and split on space and then on colon. "key1:value1 key2:value2" etc.
Definition at line 628 of file BDSUtilities.cc.
Referenced by BDSFieldFactory::PrepareFieldStrengthFromParameters().
G4double BDS::GetZOfPointOnPlane | ( | const G4ThreeVector & | normal, |
G4double | x, | ||
G4double | y | ||
) |
Given an x and y coordinate, calculate what the z coordinate must be to lie on the plane defined by the supplied normal vector - assumes plane intercepts 0,0,0. Used in WillIntersect.
Definition at line 548 of file BDSUtilities.cc.
Referenced by WillIntersect().
void BDS::HandleAborts | ( | int | signal_number | ) |
Try to catch abort signals. This is not guaranteed to work. Main goal is to close output stream / files.
Try to catch abort signals. This is not guaranteed to work. Main goal is to close output stream / files.
Definition at line 293 of file BDSUtilities.cc.
Referenced by BDSIM::BeamOn(), and BDSIMLink::BeamOn().
Inspect a G4Box.
Definition at line 153 of file BDSGeometryInspector.cc.
References BDSGlobalConstants::Instance().
Referenced by DetermineExtents().
Inspect a G4CutTubs.
Definition at line 186 of file BDSGeometryInspector.cc.
References BDSGlobalConstants::Instance().
Referenced by DetermineExtents().
Inspect a G4DisplacedSolid.
Definition at line 77 of file BDSGeometryInspector.cc.
References DetermineExtents(), and BDSExtent::Translate().
Referenced by DetermineExtents().
Inspect a G4EllipticalTube.
Definition at line 219 of file BDSGeometryInspector.cc.
References BDSGlobalConstants::Instance().
Referenced by DetermineExtents().
Inspect a G4IntersectionSolid.
Definition at line 117 of file BDSGeometryInspector.cc.
References DetermineExtents(), and BDSExtent::TransverselyLessThan().
Referenced by DetermineExtents().
Inpsect a G4SubtractionSolid. Convention: solid B is assumed to represent the inner extent of the solid.
Definition at line 96 of file BDSGeometryInspector.cc.
References DetermineExtents(), and BDSExtent::TransverselyLessThan().
Referenced by DetermineExtents().
Inspect a G4Tubs.
Definition at line 170 of file BDSGeometryInspector.cc.
References BDSGlobalConstants::Instance().
Referenced by DetermineExtents().
Inspect a G4UnionSolid.
Definition at line 135 of file BDSGeometryInspector.cc.
References DetermineExtents(), and BDSExtent::TransverselyLessThan().
Referenced by DetermineExtents().
const BDSIntegratorSet * BDS::IntegratorSet | ( | BDSIntegratorSetType | set | ) |
Return the appropriate set of integrators to use for each magnet type.
Definition at line 254 of file BDSIntegratorSet.cc.
References integratorsBDSIMMatrix, and BDSTypeSafeEnum< def, inner >::underlying().
const BDSIntegratorSet * BDS::IntegratorSet | ( | G4String | set | ) |
Return the appropriate set of integrators to use for each magnet type.
Definition at line 249 of file BDSIntegratorSet.cc.
References DetermineIntegratorSetType(), and IntegratorSet().
Referenced by IntegratorSet().
G4bool BDS::InterpolatorTypeIsAuto | ( | BDSInterpolatorType | typeIn | ) |
Return true if the type is one containing 'auto'.
Definition at line 130 of file BDSInterpolatorType.cc.
References BDSTypeSafeEnum< def, inner >::underlying().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
BDSInterpolatorType BDS::InterpolatorTypeSpecificFromAuto | ( | G4int | nDimension, |
BDSInterpolatorType | autoType | ||
) |
Return a specific inteprolator type from the appropriate auto one in combination with the number of dimensions. e.g. 3, cubicauto -> cubic3d.
Definition at line 146 of file BDSInterpolatorType.cc.
Referenced by BDSFieldLoader::LoadMagField(), and BDSFieldFactory::PrepareFieldDefinitions().
G4bool BDS::IsFinite | ( | const G4ThreeVector & | variable, |
G4double | tolerance = std::numeric_limits<double>::epsilon() |
||
) |
Apply IsFinite to each component of a 3-vector.
Definition at line 327 of file BDSUtilities.cc.
References IsFinite().
G4bool BDS::IsFinite | ( | G4double | value, |
G4double | tolerance = std::numeric_limits<double>::epsilon() |
||
) |
Return true if value is consistent with 0. This is done by checking the difference between the value and 0 is within 'tolerance', which is by default the minimum difference from zero, epsilon (~1e-15). If a very small but finite number is a possibility, a different tolerance should be used.
Definition at line 311 of file BDSUtilities.cc.
Referenced by BDSBeamline::AddSingleComponent(), BDSIntegratorDipoleRodrigues2::AdvanceHelixForSpiralling(), BDSLinkOpaqueBox::Angled(), BDSCurvilinearBuilder::Angled(), BDSAcceleratorComponent::AngledInputFace(), BDSAcceleratorComponent::AngledOutputFace(), BDSComponentFactory::AngleFromField(), ArcLengthFromChordLength(), BDSIntegratorDipoleFringe::BaseStepper(), BDSAcceleratorComponent::BDSAcceleratorComponent(), BDSApertureInfo::BDSApertureInfo(), BDSBeamPipeInfo::BDSBeamPipeInfo(), BDSFieldESinusoid::BDSFieldESinusoid(), BDSFieldMagDipole::BDSFieldMagDipole(), BDSFieldMagSolenoidSheet::BDSFieldMagSolenoidSheet(), BDSSamplerCylinder::BDSSamplerCylinder(), BDSTunnelBuilder::BreakTunnel(), BDSCollimator::Build(), BDSCollimatorCrystal::Build(), BDSUndulator::Build(), BDSCollimatorJaw::Build(), BDSDetectorConstruction::BuildBeamline(), BuildBLMs(), BDSUndulator::BuildContainerLogicalVolume(), BDSMagnet::BuildOuterField(), BuildRBendLine(), BDSParallelWorldSampler::BuildSampler(), BuildSBendLine(), BDSShield::BuildShield(), BuildSingleSBend(), BDSComponentFactory::CalculateAngleAndFieldRBend(), BDSComponentFactory::CalculateAngleAndFieldSBend(), BDSParticleDefinition::CalculateRigidity(), CalculateSafeAngledVolumeLength(), BDSFieldMagSolenoidSheet::CEL(), CheckAndSetEnergyValidityRange(), BDSFieldQuery::CheckNStepsAndRange(), BDSParser::CheckOptions(), BDSCollimator::CheckParameters(), BDSCollimatorElliptical::CheckParameters(), BDSCollimatorJaw::CheckParameters(), BDSApertureInfo::CheckRequiredParametersSet(), BDSBeamPipeInfo::CheckRequiredParametersSet(), BDSCollimator::CollimatorUserLimits(), BDSCurvilinearBuilder::CreateBridgeSection(), BDSComponentFactory::CreateComponent(), BDSCrystalFactory::CreateCrystalCylinder(), BDSCrystalFactory::CreateCrystalTorus(), BDSCurvilinearBuilder::CreateCurvilinearElement(), BDSCurvilinearFactory::CreateCurvilinearVolume(), BDSScorerFactory::CreateFilter(), BDSOutput::CreateHistograms(), BDSMagnetOuterFactoryLHC::CreateLHCDipole(), BDSFieldFactory::CreateModulator(), BDSDetectorConstruction::CreatePlacementTransform(), BDSMagnetOuterFactoryCylindrical::CreateRectangularBend(), BDSMagnetOuterFactoryCylindrical::CreateSectorBend(), BDSComponentFactory::CreateTiltOffset(), CreateUserLimits(), BDSCurvilinearBuilder::CurvilinearRadius(), BDSComponentFactory::EFieldFromElement(), BDSComponentFactory::FieldFromAngle(), BDSParallelWorldImportance::GetCellImportanceValue(), GetDipoleIntegratorType(), BDSBeamline::GetGlobalEuclideanTransform(), BDSComponentFactory::GetKickValue(), BDSBeamPipe::GetVolumesForField(), BDSAuxiliaryNavigator::GlobalToCurvilinear(), BDSTiltOffset::HasFiniteOffset(), BDSTiltOffset::HasFiniteTilt(), BDSPrimaryGeneratorFileHEPMC::HepMC2G4(), BDSComponentFactory::IncomingFaceAngle(), BDSIM::Initialise(), BDSBeamlineIntegral::Integrate(), IsFinite(), IsFiniteStrength(), BDSIntegratorMultipoleThin::OneStep(), BDSComponentFactory::OutgoingFaceAngle(), BDSParallelWorldSampler::Place(), BDSLinkOpaqueBox::PlaceOutputSampler(), BDSComponentFactory::PrepareCavityModelInfoForElement(), BDSComponentFactory::PrepareCavityStrength(), BDSFieldFactory::PrepareFieldDefinitions(), BDSComponentFactory::PrepareMagnetStrengthForMultipoles(), BDSSDSampler::ProcessHits(), BDSSDSamplerCylinder::ProcessHits(), BDSSDSamplerSphere::ProcessHits(), BDSSDEnergyDeposition::ProcessHits(), BDSSDEnergyDepositionGlobal::ProcessHits(), BDSSDThinThing::ProcessHitsOrdered(), BDSSDEnergyDeposition::ProcessHitsTrack(), BDSSDEnergyDepositionGlobal::ProcessHitsTrack(), BDSPrimaryGeneratorFileSampler::ReadSingleEvent(), BDSBunchEventGenerator::ReferenceBeamMomentumOffset(), RotateToReferenceFrame(), BDSAcceleratorComponent::Sagitta(), BDSBunch::SetEmittances(), BDSParticleDefinition::SetEnergies(), BDSBunch::SetOptions(), BDSBunchSigmaMatrix::SetOptions(), BDSDetectorConstruction::SideToLocalOffset(), BDSBunchUserFile< T >::SkipNLinesIgnoreIntoFile(), BDSBunchUserFile< T >::SkipNLinesSkip(), BDSIntegratorDipoleQuadrupole::Stepper(), BDSIntegratorEulerOld::Stepper(), BDSIntegratorKickerThin::Stepper(), BDSTrajectoryPoint::StoreExtrasLink(), BDSTunnelFactoryRectAboveGround::TestInputParameters(), BDSExtent::Tilted(), BDSCollimatorCrystal::TransverseOffsetToEdge(), BDSDetectorConstruction::UnsuitableFirstElement(), BDSDetectorConstruction::UpdateSamplerDiameterAndCountSamplers(), WillIntersect(), BDSComponentFactory::YokeOnLeft(), and ZeroStrengthDipole().
G4bool BDS::IsFiniteStrength | ( | G4double | variable | ) |
Test if a number is above a certain tolerance for tracking strength purposes. Currently at 1e-50 as potential can be small and squared. Uses IsFinite() with 1e-50 as tolerance.
Definition at line 322 of file BDSUtilities.cc.
References IsFinite().
Referenced by BDSIntegratorEulerOld::AdvanceChord(), BDSIntegratorDipoleRodrigues::AdvanceHelix(), BDSIntegratorDipoleFringe::BaseStepper(), BDSFieldMagMultipole::GetField(), BDSIntegratorDipoleQuadrupole::Stepper(), BDSIntegratorG4RK4MinStep::Stepper(), BDSIntegratorQuadrupole::Stepper(), BDSIntegratorSolenoid::Stepper(), BDSIntegratorDipoleRodrigues2::Stepper(), BDSIntegratorKickerThin::Stepper(), BDSIntegratorMultipoleThin::Stepper(), and BDSIntegratorEuler::Stepper().
G4bool BDS::IsInteger | ( | const char * | s, |
int & | convertedInteger | ||
) |
Check if character array is an integer, and returns the integer by reference.
Definition at line 336 of file BDSUtilities.cc.
Referenced by BDSExecOptions::Parse().
G4bool BDS::IsIon | ( | const G4DynamicParticle * | paritlce | ) |
Calls IsIon above but also a proton with any bound electrons is considered an ion.
Definition at line 108 of file BDSPhysicsUtilities.cc.
References IsIon().
G4bool BDS::IsIon | ( | const G4ParticleDefinition * | particle | ) |
Whether a particle is an ion. A proton is counted NOT as an ion.
Definition at line 103 of file BDSPhysicsUtilities.cc.
Referenced by BDSLinkStackingAction::ClassifyNewTrack(), IsIon(), BDSSDSamplerLink::ProcessHits(), and BDSTrajectoryPoint::StoreExtrasIon().
G4bool BDS::IsNumber | ( | const char * | s, |
double & | convertedNumber | ||
) |
Check if character array is an integer, and returns the double by reference.
Definition at line 350 of file BDSUtilities.cc.
Referenced by BDSExecOptions::Parse().
T BDS::Linear1D | ( | const T | p[2], |
G4double | x | ||
) |
Linear interpolation in 1 dimension. The "p" is the real value to be interpolated. 'x' must be on the interval [0,1], ie normalised.
Definition at line 45 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator1DLinear::GetInterpolatedValueT(), and Linear1DMag().
T BDS::Linear1DMag | ( | const T | p[2], |
G4double | x | ||
) |
Linear interpolation in 1 dimension including magnitude interpolation.
Definition at line 191 of file BDSInterpolatorRoutines.hh.
References Linear1D(), Linear1DMagOnly(), and mag().
Referenced by BDSInterpolator1DLinearMag::GetInterpolatedValueT().
double BDS::Linear1DMagOnly | ( | const T | p[2], |
G4double | x | ||
) |
Linear interpolation of the magnitude in 1 dimension.
Definition at line 144 of file BDSInterpolatorRoutines.hh.
References mag().
Referenced by Linear1DMag(), Linear2DMagOnly(), Linear3DMagOnly(), and Linear4DMagOnly().
T BDS::Linear2D | ( | const T | p[2][2], |
G4double | x, | ||
G4double | y | ||
) |
Linear interpolation in 2 dimensions.
Definition at line 51 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator2DLinear::GetInterpolatedValueT(), and Linear2DMag().
T BDS::Linear2DMag | ( | const T | p[2][2], |
G4double | x, | ||
G4double | y | ||
) |
Linear interpolation in 2 dimensions including magnitude interpolation.
Definition at line 205 of file BDSInterpolatorRoutines.hh.
References Linear2D(), Linear2DMagOnly(), and mag().
Referenced by BDSInterpolator2DLinearMag::GetInterpolatedValueT().
double BDS::Linear2DMagOnly | ( | const T | p[2][2], |
G4double | x, | ||
G4double | y | ||
) |
Linear interpolation of the magnitude in 2 dimensions.
Definition at line 152 of file BDSInterpolatorRoutines.hh.
References Linear1DMagOnly().
Referenced by Linear2DMag(), and Linear3DMagOnly().
T BDS::Linear3D | ( | const T | p[2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z | ||
) |
Linear interpolation in 3 dimensions.
Definition at line 63 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator3DLinear::GetInterpolatedValueT(), and Linear3DMag().
T BDS::Linear3DMag | ( | const T | p[2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z | ||
) |
Linear interpolation in 3 dimensions including magnitude interpolation.
Definition at line 220 of file BDSInterpolatorRoutines.hh.
References Linear3D(), Linear3DMagOnly(), and mag().
Referenced by BDSInterpolator3DLinearMag::GetInterpolatedValueT().
double BDS::Linear3DMagOnly | ( | const T | p[2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z | ||
) |
Linear interpolation of the magnitude in 3 dimensions.
Definition at line 164 of file BDSInterpolatorRoutines.hh.
References Linear1DMagOnly(), and Linear2DMagOnly().
Referenced by Linear3DMag(), and Linear4DMagOnly().
T BDS::Linear4D | ( | const T | p[2][2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z, | ||
G4double | t | ||
) |
Linear interpolation in 4 dimensions.
Definition at line 76 of file BDSInterpolatorRoutines.hh.
Referenced by BDSInterpolator4DLinear::GetInterpolatedValueT(), and Linear4DMag().
T BDS::Linear4DMag | ( | const T | p[2][2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z, | ||
G4double | t | ||
) |
Linear interpolation in 4 dimensions including magnitude interpolation.
Definition at line 236 of file BDSInterpolatorRoutines.hh.
References Linear4D(), Linear4DMagOnly(), and mag().
Referenced by BDSInterpolator4DLinearMag::GetInterpolatedValueT().
double BDS::Linear4DMagOnly | ( | const T | p[2][2][2][2], |
G4double | x, | ||
G4double | y, | ||
G4double | z, | ||
G4double | t | ||
) |
Linear interpolation of the magnitude in 4 dimensions.
Definition at line 177 of file BDSInterpolatorRoutines.hh.
References Linear1DMagOnly(), and Linear3DMagOnly().
Referenced by Linear4DMag().
std::vector< G4TwoVector > * BDS::LoadAperturePoints | ( | const G4String & | fileName, |
const G4String & | unit = "" |
||
) |
Detect whether gzipped file or not, instantiate right template and load the data. This will expand the path to the full one and check it exists and throw an exception if it doesn't.
Definition at line 125 of file BDSAperturePointsLoader.cc.
References BDSAperturePointsCache::CacheFile(), FileExists(), BDSAperturePointsCache::FindCachedFile(), GetFullPath(), BDSAperturePointsCache::Instance(), BDSAperturePointsLoader< T >::Load(), and LowerCase().
Referenced by BDSBeamPipeFactoryPointsFile::GeneratePoints().
std::vector< BDSFourVector< G4double > > BDS::LoadFieldQueryPoints | ( | const G4String & | fileName, |
std::vector< G4String > * | columnNamesIn | ||
) |
Detect whether gzipped file or not, instantiate right template and load the data. This will expand the path to the full one and check it exists and throw an exception if it doesn't.
Definition at line 183 of file BDSFieldLoaderQueryPoints.cc.
References FileExists(), and GetFullPath().
Referenced by BDSDetectorConstruction::PrepareFieldQueries().
V BDS::mag | ( | const BDSFieldValue< V > & | v | ) |
Specialisation for a 3-vector field value.
Definition at line 40 of file BDSInterpolatorRoutines.hh.
References BDSThreeVector< T >::mag().
T BDS::mag | ( | const T & | v | ) |
Define a magnitude function that will work for numeric types but also for a field value (3 vector).
Definition at line 37 of file BDSInterpolatorRoutines.hh.
Referenced by Linear1DMag(), Linear1DMagOnly(), Linear2DMag(), Linear3DMag(), and Linear4DMag().
V BDS::MapGetWithDefault | ( | const std::map< K, V > & | m, |
const K & | key, | ||
const V & | defaultValue | ||
) |
Generic function to get an item from a map with a default value and not throw an exception from unsafe access. Saves writing the searching code everywhere. Based on: https://stackoverflow.com/questions/2333728/stdmap-default-value
Definition at line 245 of file BDSUtilities.hh.
Referenced by BDSAcceleratorModel::BeamlineIsMassWorld(), and BDSOutput::FillScorerHitsIndividual().
Returns the extent which is the greatest extent in all six directions.
Definition at line 248 of file BDSExtent.cc.
References BDSExtent::XNeg(), BDSExtent::XPos(), BDSExtent::YNeg(), BDSExtent::YPos(), BDSExtent::ZNeg(), and BDSExtent::ZPos().
Referenced by BDSDetectorConstruction::SideToLocalOffset().
G4int BDS::NBeamParametersSet | ( | const GMAD::Beam & | beamDefinition, |
const std::set< std::string > & | keys | ||
) |
Count how many out of the set of keys in a beam instance are set.
Definition at line 216 of file BDSPhysicsUtilities.cc.
References GMAD::Beam::HasBeenSet().
Referenced by ConstructDesignAndBeamParticle(), BDSBunch::SetEmittances(), and BDSBunch::SetOptions().
G4int BDS::NDimensionsOfFieldFormat | ( | const BDSFieldFormat & | ff | ) |
Report the number of dimensions for that format.
Definition at line 76 of file BDSFieldFormat.cc.
References BDSTypeSafeEnum< def, inner >::underlying().
Referenced by BDSFieldLoader::LoadMagField(), and BDSFieldFactory::PrepareFieldDefinitions().
G4int BDS::NDimensionsOfInterpolatorType | ( | const BDSInterpolatorType & | it | ) |
Report the number of dimensions for that interpolator type.
Definition at line 99 of file BDSInterpolatorType.cc.
References BDSTypeSafeEnum< def, inner >::underlying().
Referenced by BDSFieldFactory::PrepareFieldDefinitions().
G4bool BDS::NonZero | ( | G4double | value | ) |
Test whether a number is non-zero - ie abs(number) > minimum number.
Definition at line 317 of file BDSUtilities.cc.
std::vector< BDSParallelWorldInfo > BDS::NumberOfExtraWorldsRequired | ( | ) |
The number of curvilinear and sampler worlds required. This is not curvilinear + curvilinear bridge. This is over and above the one for the main beam line. Note, an extra beam line, if it exists, will require a curvilinear world, but not necessarily a sampler world.
Definition at line 52 of file BDSParallelWorldUtilities.cc.
References BDSParser::GetPlacements(), and BDSParser::Instance().
Referenced by ConstructAndRegisterParallelWorlds().
G4double BDS::ParseAngleUnit | ( | const G4String & | fmt | ) |
Utility function to parse variable and unit string. These are meant for passing to CheckAndParseUnits.
Definition at line 696 of file BDSBunchUserFile.cc.
References ParseAngleUnit(), and BDSBunchUserFile< T >::Doublet::unit.
Referenced by ParseAngleUnit(), and BDSBunchUserFile< T >::ParseFileFormat().
G4double BDS::ParseEnergyUnit | ( | const G4String & | fmt | ) |
Utility function to parse variable and unit string. These are meant for passing to CheckAndParseUnits.
Definition at line 660 of file BDSBunchUserFile.cc.
References ParseEnergyUnit(), and BDSBunchUserFile< T >::Doublet::unit.
Referenced by ParseEnergyUnit(), and BDSBunchUserFile< T >::ParseFileFormat().
G4double BDS::ParseLengthUnit | ( | const G4String & | fmt | ) |
Utility function to parse variable and unit string. These are meant for passing to CheckAndParseUnits.
Definition at line 678 of file BDSBunchUserFile.cc.
References ParseLengthUnit(), and BDSBunchUserFile< T >::Doublet::unit.
Referenced by BDSBunchUserFile< T >::ParseFileFormat(), and ParseLengthUnit().
G4double BDS::ParseTimeUnit | ( | const G4String & | fmt | ) |
Utility function to parse variable and unit string. These are meant for passing to CheckAndParseUnits.
Definition at line 712 of file BDSBunchUserFile.cc.
References ParseTimeUnit(), and BDSBunchUserFile< T >::Doublet::unit.
Referenced by BDSBunchUserFile< T >::ParseFileFormat(), and ParseTimeUnit().
PhaseSpaceCoord BDS::PhaseSpaceCoordFromActionAngle | ( | ActionAngleCoord | aa, |
const TwissPair & | tp | ||
) |
Definition at line 41 of file BDSBunchHaloFlatSigma.cc.
G4String BDS::PrepareSafeName | ( | G4String | name | ) |
Remove white space and special characters in the name.
Definition at line 124 of file BDSUtilities.cc.
G4String BDS::PreprocessGDML | ( | const G4String & | file, |
const G4String & | prefix, | ||
G4bool | preprocessSchema = true |
||
) |
Definition at line 50 of file BDSGDMLPreprocessor.cc.
G4String BDS::PreprocessGDMLSchemaOnly | ( | const G4String & | file | ) |
Definition at line 63 of file BDSGDMLPreprocessor.cc.
void BDS::PrintDefinedParticles | ( | ) |
Print all constructed particle names. Note, this should only be done after the physics lists are fully constructed.
Definition at line 531 of file BDSPhysicsUtilities.cc.
Referenced by ConstructParticleDefinition(), BDSIM::Initialise(), BDSIMLink::Initialise(), and BDSBunchEventGenerator::ParseAcceptedParticleIDs().
void BDS::PrintPrimaryParticleProcesses | ( | const G4String & | primaryParticleName | ) |
Print all the processes by name as registered to the primary particle type. Note, this should only be done after the physics lists are fully constructed.
Definition at line 459 of file BDSPhysicsUtilities.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
void BDS::PrintRotationMatrix | ( | G4RotationMatrix * | rm, |
G4String | keyName = "unknown" |
||
) |
Print out details of a rotation matrix - the matrix itself, unit vectors. Optional keyname to identify in output stream
Definition at line 364 of file BDSUtilities.cc.
Referenced by BDSTunnelBuilder::BuildTunnelSections().
G4bool BDS::ProblemWithArrayReflectionCombination | ( | const BDSArrayReflectionTypeSet & | setIn, |
G4String * | details = nullptr |
||
) |
Return true if there's a conceptual conflict with the set of field reflections requested.
Definition at line 95 of file BDSArrayReflectionType.cc.
Referenced by BDSFieldLoader::CreateOperators().
void BDS::RegisterImportanceBiasing | ( | const std::vector< G4VUserParallelWorld * > & | worlds, |
G4VModularPhysicsList * | physicsList | ||
) |
Create importance geometry sampler and register importance biasing with physics list.
Definition at line 184 of file BDSParallelWorldUtilities.cc.
References GetImportanceSamplingWorld(), and BDSParallelWorldImportance::GetWorldVolume().
Referenced by BDSIM::Initialise().
void BDS::RegisterSamplerPhysics | ( | const std::vector< G4ParallelWorldPhysics * > & | processes, |
G4VModularPhysicsList * | physicsList | ||
) |
Register each parallel physics process to the main physics list.
Definition at line 167 of file BDSParallelWorldUtilities.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
G4double BDS::Rigidity | ( | G4double | momentumMagnitude, |
G4double | charge | ||
) |
Calculate the rigidity for a total momentum and charge.
Definition at line 665 of file BDSUtilities.cc.
References cOverGeV.
Referenced by BDSSDSampler::ProcessHits(), BDSSDSamplerCylinder::ProcessHits(), BDSSDSamplerSphere::ProcessHits(), and BDSTrajectoryPoint::StoreExtrasLink().
G4TwoVector BDS::Rotate | ( | const G4TwoVector & | vec, |
const G4double & | angle | ||
) |
Rotate a two vector in polar coordinates by an angle.
Definition at line 486 of file BDSUtilities.cc.
Referenced by BDSMagnetOuterFactoryPolesBase::CreateDipoleC(), and BDSMagnetOuterFactoryPolesBase::CreateDipoleH().
G4ThreeVector BDS::RotateToReferenceFrame | ( | G4ThreeVector | faceNormal, |
G4double | fullAngle | ||
) |
Rotate a face normal vector for a given component to that of the reference trajectory on that face. This takes the component full angle and assumes the component changes the angle continuously between its faces and therefore half of this angle is used for the rotation.
Definition at line 562 of file BDSUtilities.cc.
References IsFinite().
Referenced by BDSMagnet::BuildBeampipe(), and BDSMagnet::BuildOuter().
G4double BDS::SecondFringeFieldCorrection | ( | BDSMagnetStrength const * | strength, |
G4bool | entranceOrExit | ||
) |
Function to calculate the value of the second fringe field correction term.
Definition at line 391 of file BDSIntegratorDipoleFringe.cc.
void BDS::SetRangeCuts | ( | G4VModularPhysicsList * | physicsList, |
G4int | verbosity = 1 |
||
) |
Set the range cuts on a physics list. This is split into a separate function to allow it to be applied to physics lists both from BDSIM's modular physics list and other sources with the same mechanism.
Definition at line 586 of file BDSPhysicsUtilities.cc.
References BDSGlobalConstants::Instance().
Referenced by BuildPhysics().
G4int BDS::Sign | ( | T | val | ) |
Definition at line 158 of file BDSUtilities.hh.
void BDS::SplitFileAndExtension | ( | const G4String & | fileName, |
G4String & | file, | ||
G4String & | extension | ||
) |
Split a filename.ext into filename and extension. Extension includes '.'.
Definition at line 276 of file BDSUtilities.cc.
Referenced by BDSTemporaryFiles::CreateTemporaryFile().
std::pair< G4String, G4String > BDS::SplitOnColon | ( | const G4String & | formatAndPath | ) |
Split a format and file path string around the ":" character. This format is used for geometry and field maps
Definition at line 571 of file BDSUtilities.cc.
Referenced by BDSPrimaryGeneratorFileHEPMC::BDSPrimaryGeneratorFileHEPMC(), BDSPrimaryGeneratorFileSampler::BDSPrimaryGeneratorFileSampler(), BDSGeometryFactory::BuildGeometry(), BDSBeamPipeInfo::CheckAndSetPointsInfo(), BDSBunchFactory::CreateBunch(), and BDSFieldFactory::PrepareFieldDefinitions().
std::vector< G4String > BDS::SplitOnWhiteSpace | ( | const G4String & | input | ) |
Split a string on whitespace and return a vector of these 'words'.
Definition at line 472 of file BDSUtilities.cc.
Referenced by BDSScorerInfo::BDSScorerInfo(), BuildBLMs(), BDSDetectorConstruction::BuildPhysicsBias(), BDSDetectorConstruction::BuildWorld(), BDSDetectorConstruction::ConstructScoringMeshes(), DetermineArrayReflectionTypeSet(), and BDSAperturePointsLoader< T >::Load().
void BDS::SplitPathAndFileName | ( | const G4String & | filePath, |
G4String & | path, | ||
G4String & | filename | ||
) |
Split a full file path into the path and file components. The path ends with '/'.
Definition at line 259 of file BDSUtilities.cc.
Referenced by BDSTemporaryFiles::CreateTemporaryFile(), GetFullPath(), and BDSGDMLPreprocessor::PreprocessFile().
|
inline |
Return true if a string "expression" starts with "prefix".
Definition at line 266 of file BDSUtilities.hh.
Referenced by BDSMaterials::CacheMaterialsFromGDML(), BDSMaterials::CheckForConflictingMaterialsAfterLoad(), and BDSBeamline::GetElement().
G4int BDS::StrCompare | ( | const G4String & | str, |
const G4String & | test, | ||
G4String::caseCompare | mode = G4String::ignoreCase |
||
) |
Utility function to simplify lots of syntax changes for pedantic g4 changes.
Definition at line 75 of file BDSUtilities.cc.
G4bool BDS::StrContains | ( | const G4String & | str, |
const G4String & | test | ||
) |
Utility function to simplify lots of syntax changes for pedantic g4 changes.
Definition at line 66 of file BDSUtilities.cc.
Referenced by BDSGeometryFactoryBase::ApplyColourMapping(), BDSScorerInfo::BDSScorerInfo(), BDSGeometryFactorySQL::Build(), BuildPhysics(), BDSBeamPipeInfo::CheckAndSetPointsInfo(), BDSPrimaryGeneratorFile::ConstructGenerator(), BDSBunchFactory::CreateBunch(), BDSOutput::CreateHistograms(), DetermineBeamPipeType(), DetermineMagnetGeometryType(), BDSModularPhysicsList::DNA(), BDSOutput::FillScorerHitsIndividual(), BDSParallelWorldImportance::GetCellImportanceValue(), BDSColourFromMaterial::GetColour(), BDSColours::GetColour(), and BDSGeometryWriter::WriteToGDML().
G4String BDS::StrStrip | ( | const G4String & | str, |
char | ch, | ||
StringStripType | stripType = StringStripType::both |
||
) |
Utility function to simplify lots of syntax changes for pedantic g4 changes.
Definition at line 98 of file BDSUtilities.cc.
Referenced by BDSDetectorConstruction::BuildCrossSectionBias().
void BDS::UpdateSegmentAngles | ( | G4int | index, |
G4int | nSBends, | ||
G4double | semiAngle, | ||
G4double | incomingFaceAngle, | ||
G4double | outgoingFaceAngle, | ||
G4double & | segmentAngleIn, | ||
G4double & | segmentAngleOut | ||
) |
Definition at line 459 of file BDSBendBuilder.cc.
G4int BDS::VerboseEventStop | ( | G4int | verboseEventStart, |
G4int | verboseEventContinueFor | ||
) |
Calculate the event number to stop at given a start and number to do. Saturates at the maximum number of an int.
Definition at line 647 of file BDSUtilities.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
G4bool BDS::VerboseThisEvent | ( | G4int | eventIndex, |
G4int | eventStart, | ||
G4int | eventStop | ||
) |
Logic of whether this event should be verbose or not. Code here so it's not duplicated.
Definition at line 658 of file BDSUtilities.cc.
Referenced by BDSLinkTrackingAction::PreUserTrackingAction(), BDSTrackingAction::PreUserTrackingAction(), and BDSSteppingAction::UserSteppingAction().
void BDS::Warning | ( | const G4String & | message | ) |
Definition at line 26 of file BDSWarning.cc.
void BDS::Warning | ( | const G4String & | methodName, |
const G4String & | message | ||
) |
Definition at line 32 of file BDSWarning.cc.
G4bool BDS::WillIntersect | ( | const G4double & | angleIn, |
const G4double & | angleOut, | ||
const G4double & | horizontalWidth, | ||
const G4double & | length | ||
) |
Checking for "cutted crossed Z planes" for a cylinder with angled faces. This utility only works in one dimension unlike the other one with the same name and vector arguments.
Definition at line 533 of file BDSUtilities.cc.
G4bool BDS::WillIntersect | ( | const G4ThreeVector & | incomingNormal, |
const G4ThreeVector & | outgoingNormal, | ||
const G4double & | zSeparation, | ||
const BDSExtent & | incomingExtent, | ||
const BDSExtent & | outgoingExtent | ||
) |
Check if two planes will overlap - as defined by their UNIT normal vectors at 0,0,0 and the z separation of the two. Incoming is assumed to have a positive z component and outgoing a -ve z component in this convention.
Definition at line 493 of file BDSUtilities.cc.
References GetZOfPointOnPlane(), IsFinite(), BDSExtent::XNeg(), BDSExtent::XPos(), BDSExtent::YNeg(), and BDSExtent::YPos().
Referenced by BDSBeamline::AddSingleComponent(), BuildEndPieceBeamline(), BDSBeamPipeFactoryBase::CheckAngledVolumeCanBeBuilt(), and BDSMagnetOuterFactoryPolesBase::DipoleCommonPreConstruction().
G4bool BDS::ZeroStrengthDipole | ( | const BDSMagnetStrength * | st | ) |
Return whether finite angle or field for a dipole.
Definition at line 46 of file BDSBendBuilder.cc.
References IsFinite().
Referenced by BuildRBendLine(), BuildSBendLine(), and BuildSingleSBend().
|
static |
speed of light / 1 GeV, used for scaling in brho calculation
Definition at line 30 of file BDSPhysicalConstants.hh.
Referenced by BDSParticleDefinition::CalculateRigidity(), BDSPrimaryGeneratorFileHEPMC::HepMC2G4(), BDSPrimaryGeneratorFileSampler::ReadSingleEvent(), and Rigidity().
const BDSIntegratorSet* BDS::integratorsBDSIMMatrix |
Mad-x style tracking.
Definition at line 141 of file BDSIntegratorSet.cc.
Referenced by IntegratorSet().
const BDSIntegratorSet* BDS::integratorsBDSIMMatrixFringeScaling |
Definition at line 167 of file BDSIntegratorSet.cc.
const BDSIntegratorSet* BDS::integratorsBDSIMOne |
Definition at line 87 of file BDSIntegratorSet.cc.
const BDSIntegratorSet* BDS::integratorsBDSIMTwo |
Definition at line 114 of file BDSIntegratorSet.cc.
const BDSIntegratorSet* BDS::integratorsGeant4 |
Definition at line 193 of file BDSIntegratorSet.cc.
const BDSIntegratorSet* BDS::integratorsGeant4DP |
Definition at line 220 of file BDSIntegratorSet.cc.
|
static |
Definition at line 47 of file BDSTrajectoryFilter.hh.