BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
#include <options.h>
Public Member Functions | |
Options (const GMAD::OptionsBase &options) | |
template<typename T > | |
void | set_value (std::string name, T value) |
set methods by property name | |
double | get_value (std::string property_name) const |
get method (only for doubles) | |
std::string | get_value_string (std::string property_name) const |
void | Amalgamate (const Options &optionsIn, bool override) |
bool | HasBeenSet (const std::string &name) const |
Whether a parameter has been set using the set_value method or not. | |
const std::vector< std::string > & | KeysOfSetValues () const |
![]() | |
bool | NameExists (const std::string &name) const |
Published< OptionsBase >::template AttributeMap< T > & | attribute_map () const |
![]() | |
OptionsBase () | |
void | print () const |
print some properties | |
Private Member Functions | |
void | PublishMembers () |
publish members so these can be looked up from parser | |
Additional Inherited Members | |
![]() | |
std::string | inputFileName |
Input filename. | |
std::string | visMacroFileName |
Visualisation filename. | |
std::string | geant4MacroFileName |
Geant4 macro to run. | |
std::string | geant4PhysicsMacroFileName |
Geant4 physics macro. | |
bool | geant4PhysicsMacroFileNameFromExecOptions |
bool | visDebug |
Flag for visualisation debug. | |
bool | batch |
Flag for batch / interactive mode. | |
bool | verbose |
General verbosity. | |
int | verboseRunLevel |
Run level verbosity. | |
int | verboseTrackingLevel |
Tracking verbosity. | |
int | verboseImportanceSampling |
bool | verboseSensitivity |
bool | circular |
Flag for circular machine. | |
int | seed |
The seed value for the random number generator. | |
std::string | randomEngine |
Name of random engine to use. | |
int | nGenerate |
The number of primary events to simulate. | |
bool | recreate |
Whether to recreate from a file or not. | |
std::string | recreateFileName |
The file path to recreate a run from. | |
int | startFromEvent |
Event to start from when recreating. | |
bool | writeSeedState |
Write the seed state each event to a text file. | |
bool | useASCIISeedState |
Whether to use the seed state from an ASCII file. | |
std::string | seedStateFileName |
Seed state file path. | |
bool | generatePrimariesOnly |
Whether to only generate primary coordinates and quit, or not. | |
std::string | bdsimPath |
std::string | physicsList |
list of physics processes | |
bool | physicsVerbose |
int | physicsVerbosity |
double | physicsEnergyLimitLow |
double | physicsEnergyLimitHigh |
bool | g4PhysicsUseBDSIMRangeCuts |
bool | g4PhysicsUseBDSIMCutsAndLimits |
int | eventOffset |
Event number to start from when recreating from a root file. | |
bool | recreateSeedState |
Load seed state when recreating events. | |
double | elossHistoBinWidth |
double | ffact |
magnetic field flip (+1 default, -1: flip sign) | |
int | eventNumberOffset |
bool | checkOverlaps |
bdsim options | |
double | xsize |
for element specification | |
double | ysize |
std::string | magnetGeometryType |
default magnet geometry parameters | |
std::string | outerMaterialName |
double | horizontalWidth |
double | thinElementLength |
bool | hStyle |
H Style dipoles (if not, C Style). | |
double | vhRatio |
double | coilWidthFraction |
double | coilHeightFraction |
bool | ignoreLocalMagnetGeometry |
bool | buildPoleFaceGeometry |
bool | preprocessGDML |
geometry control | |
bool | preprocessGDMLSchema |
bool | dontSplitSBends |
geometry debug, don't split bends into multiple segments | |
bool | yokeFields |
bool | yokeFieldsMatchLHCGeometry |
bool | useOldMultipoleOuterFields |
double | scalingFieldOuter |
bool | includeFringeFields |
bool | includeFringeFieldsCavities |
std::string | vacMaterial |
vacuum material | |
std::string | emptyMaterial |
material in container volumes | |
std::string | worldMaterial |
std::string | worldGeometryFile |
bool | autoColourWorldGeometryFile |
std::string | importanceWorldGeometryFile |
std::string | importanceVolumeMap |
double | worldVolumeMargin |
Padding margin for world volume size. | |
double | vacuumPressure |
bool | removeTemporaryFiles |
std::string | temporaryDirectory |
double | samplerDiameter |
std::string | defaultBiasVacuum |
std::string | defaultBiasMaterial |
std::string | biasForWorldVolume |
std::string | biasForWorldContents |
std::string | biasForWorldVacuum |
std::string | worldVacuumVolumeNames |
std::string | integratorSet |
std::string | fieldModulator |
double | lengthSafety |
double | lengthSafetyLarge |
double | maximumTrackingTime |
Maximum tracking time per track [s]. | |
double | maximumStepLength |
Maximum permitted step length in any volume. | |
double | maximumTrackLength |
Maximum permitted track length [m]. | |
double | chordStepMinimum |
double | chordStepMinimumYoke |
double | deltaIntersection |
double | minimumEpsilonStep |
double | maximumEpsilonStep |
double | deltaOneStep |
bool | stopSecondaries |
bool | killNeutrinos |
bool | killedParticlesMassAddedToEloss |
double | minimumRadiusOfCurvature |
Minimum allowed radius of curvature. | |
bool | sampleElementsWithPoleface |
double | nominalMatrixRelativeMomCut |
Momentum threshold for nominal dipole matrix tracking. | |
bool | teleporterFullTransform |
Whether to use the new Transform3D method for the teleporter. | |
double | dEThresholdForScattering |
double | backupStepperMomLimit |
Fractional momentum limit for reverting to backup steppers. | |
bool | sensitiveOuter |
bool | sensitiveBeamPipe |
int | numberOfEventsPerNtuple |
bool | storeMinimalData |
bool | storeApertureImpacts |
bool | storeApertureImpactsIons |
bool | storeApertureImpactsAll |
bool | storeApertureImpactsHistograms |
double | apertureImpactsMinimumKE |
bool | storeCavityInfo |
bool | storeCollimatorInfo |
bool | storeCollimatorHits |
bool | storeCollimatorHitsLinks |
bool | storeCollimatorHitsIons |
bool | storeCollimatorHitsAll |
double | collimatorHitsMinimumKE |
bool | storeEloss |
bool | storeElossHistograms |
bool | storeElossVacuum |
bool | storeElossVacuumHistograms |
bool | storeElossTunnel |
bool | storeElossTunnelHistograms |
bool | storeElossWorld |
bool | storeElossWorldIntegral |
bool | storeElossWorldContents |
bool | storeElossWorldContentsIntegral |
bool | storeElossTurn |
bool | storeElossLinks |
bool | storeElossLocal |
bool | storeElossGlobal |
bool | storeElossTime |
bool | storeElossStepLength |
bool | storeElossPreStepKineticEnergy |
bool | storeElossModelID |
bool | storeElossPhysicsProcesses |
bool | storeParticleData |
bool | storePrimaries |
bool | storePrimaryHistograms |
bool | storeTrajectory |
int | storeTrajectoryDepth |
int | storeTrajectoryStepPoints |
bool | storeTrajectoryStepPointLast |
std::string | storeTrajectoryParticle |
std::string | storeTrajectoryParticleID |
bool | storeTrajectorySecondaryParticles |
double | storeTrajectoryEnergyThreshold |
std::string | storeTrajectorySamplerID |
std::string | storeTrajectoryELossSRange |
bool | storeTrajectoryTransportationSteps |
bool | trajNoTransportation |
kept only for backwards compatibility. | |
bool | storeTrajectoryKineticEnergy |
bool | storeTrajectoryMomentumVector |
bool | storeTrajectoryProcesses |
bool | storeTrajectoryTime |
bool | storeTrajectoryLocal |
bool | storeTrajectoryLinks |
bool | storeTrajectoryIon |
bool | storeTrajectoryMaterial |
bool | storeTrajectoryAllVariables |
bool | trajectoryFilterLogicAND |
bool | storeSamplerAll |
bool | storeSamplerPolarCoords |
bool | storeSamplerCharge |
bool | storeSamplerKineticEnergy |
bool | storeSamplerMass |
bool | storeSamplerRigidity |
bool | storeSamplerIon |
double | trajCutGTZ |
double | trajCutLTR |
bool | trajConnect |
bool | storeModel |
int | samplersSplitLevel |
int | modelSplitLevel |
int | uprootCompatible |
int | nturns |
std::string | ptcOneTurnMapFileName |
double | printFractionEvents |
double | printFractionTurns |
bool | printPhysicsProcesses |
int | nSegmentsPerCircle |
Number of facets per 2pi in visualisation. | |
int | nbinsx |
int | nbinsy |
int | nbinsz |
int | nbinse |
double | xmin |
double | xmax |
double | ymin |
double | ymax |
double | zmin |
double | zmax |
double | emin |
double | emax |
bool | useScoringMap |
std::vector< std::string > | setKeys |
A list of all the keys that have been set in this instance. | |
std::string | outputFileName |
Parameter for output format. | |
std::string | outputFormat |
Parameter for output format. | |
bool | outputDoublePrecision |
Parameter for output format. | |
int | outputCompressionLevel |
Parameter for output format. | |
bool | survey |
Parameter for survey. | |
std::string | surveyFileName |
Parameter for survey. | |
bool | verboseEventBDSIM |
Event level verbosity. | |
int | verboseEventLevel |
Event level verbosity. | |
int | verboseEventStart |
Event level verbosity. | |
int | verboseEventContinueFor |
Event level verbosity. | |
bool | verboseSteppingBDSIM |
Stepping level verbosity. | |
int | verboseSteppingLevel |
Stepping level verbosity. | |
int | verboseSteppingEventStart |
Stepping level verbosity. | |
int | verboseSteppingEventContinueFor |
Stepping level verbosity. | |
bool | verboseSteppingPrimaryOnly |
Stepping level verbosity. | |
bool | exportGeometry |
Parameter for controlling geometry export. | |
std::string | exportType |
Parameter for controlling geometry export. | |
std::string | exportFileName |
Parameter for controlling geometry export. | |
double | beamlineX |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineY |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineZ |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlinePhi |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineTheta |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlinePsi |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineAxisX |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineAxisY |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineAxisZ |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineAngle |
Initial beam line transform w.r.t. the world coordinate frame. | |
bool | beamlineAxisAngle |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beamlineS |
Initial beam line transform w.r.t. the world coordinate frame. | |
double | beampipeThickness |
default beampipe parameters | |
std::string | apertureType |
default beampipe parameters | |
double | aper1 |
default beampipe parameters | |
double | aper2 |
default beampipe parameters | |
double | aper3 |
default beampipe parameters | |
double | aper4 |
default beampipe parameters | |
std::string | beampipeMaterial |
default beampipe parameters | |
bool | ignoreLocalAperture |
default beampipe parameters | |
bool | buildTunnel |
tunnel geometry parameters | |
bool | buildTunnelStraight |
tunnel geometry parameters | |
std::string | tunnelType |
tunnel geometry parameters | |
double | tunnelThickness |
tunnel geometry parameters | |
double | tunnelSoilThickness |
tunnel geometry parameters | |
std::string | tunnelMaterial |
tunnel geometry parameters | |
std::string | soilMaterial |
tunnel geometry parameters | |
bool | buildTunnelFloor |
tunnel geometry parameters | |
double | tunnelFloorOffset |
tunnel geometry parameters | |
double | tunnelAper1 |
tunnel geometry parameters | |
double | tunnelAper2 |
tunnel geometry parameters | |
bool | tunnelVisible |
tunnel geometry parameters | |
double | tunnelOffsetX |
tunnel geometry parameters | |
double | tunnelOffsetY |
tunnel geometry parameters | |
double | tunnelMaxSegmentLength |
tunnel geometry parameters | |
bool | turnOnOpticalAbsorption |
Physics processes. | |
bool | turnOnMieScattering |
Physics processes. | |
bool | turnOnRayleighScattering |
Physics processes. | |
bool | turnOnOpticalSurface |
Physics processes. | |
double | scintYieldFactor |
physics parameters | |
int | maximumPhotonsPerStep |
physics parameters | |
int | maximumBetaChangePerStep |
physics parameters | |
long | maximumTracksPerEvent |
physics parameters | |
double | minimumKineticEnergy |
physics parameters | |
double | minimumKineticEnergyTunnel |
physics parameters | |
double | minimumRange |
physics parameters | |
std::string | particlesToExcludeFromCuts |
physics parameters | |
double | defaultRangeCut |
physics parameters | |
double | prodCutPhotons |
physics parameters | |
double | prodCutElectrons |
physics parameters | |
double | prodCutPositrons |
physics parameters | |
double | prodCutProtons |
physics parameters | |
double | neutronTimeLimit |
physics parameters | |
double | neutronKineticEnergyLimit |
physics parameters | |
bool | useLENDGammaNuclear |
physics parameters | |
bool | useElectroNuclear |
physics parameters | |
bool | useMuonNuclear |
physics parameters | |
bool | useGammaToMuMu |
physics parameters | |
bool | usePositronToMuMu |
physics parameters | |
bool | usePositronToHadrons |
physics parameters | |
bool | restoreFTPFDiffractionForAGreater10 |
physics parameters | |
bool | beamPipeIsInfiniteAbsorber |
physics parameters | |
bool | collimatorsAreInfiniteAbsorbers |
physics parameters | |
bool | tunnelIsInfiniteAbsorber |
physics parameters | |
int | muonSplittingFactor |
physics parameters | |
double | muonSplittingThresholdParentEk |
physics parameters | |
int | muonSplittingFactor2 |
physics parameters | |
double | muonSplittingThresholdParentEk2 |
physics parameters | |
bool | muonSplittingExcludeWeight1Particles |
physics parameters | |
double | muonSplittingExclusionWeight |
physics parameters | |
![]() | |
using | AttributeMap = typename std::unordered_map< std::string, T C::* > |
Define AttributeMap of string and class member pointer. | |
![]() | |
void | publish (const std::string &name, T C::*mp) |
Make pointer to member from class C and type T with accessible with a name. | |
void | set (OptionsBase *instance, const OptionsBase *instance2, const std::string &name) |
Set member with name of class instance to value of second instance. | |
AttributeMap< T > & | attribute_map () const |
Access method to static map for type T and class C. | |
T | get (const OptionsBase *instance, const std::string &name) const |
Get method for class C. | |
void | set (OptionsBase *instance, const std::string &name, double value) |
void | set (OptionsBase *instance, const std::string &name, GMAD::Array *const &value) |
void | set (OptionsBase *instance, const std::string &name, const T &value) |
Options class.
Options passed with option command. This inherits the OptionsBase class which contains all the members and provides templated filling functions. This separation allows the OptionsBase class to be more easily written out to ROOT files or other formats for strong reproducibility in a BDSIM run.
Options::Options | ( | ) |
Definition at line 28 of file options.cc.
|
explicit |
Definition at line 34 of file options.cc.
void Options::Amalgamate | ( | const Options & | optionsIn, |
bool | override | ||
) |
Take another instance of options and copy the values that have been set (through setKeys, which although private each instance has access to as C++ treats encapsulation at the class level). If override is true, the input option will override the existing one in this instance.
Definition at line 98 of file options.cc.
References GMAD::Published< OptionsBase >::set(), and GMAD::OptionsBase::setKeys.
Referenced by BDSParser::AmalgamateOptions(), and BDSExecOptions::BDSExecOptions().
double Options::get_value | ( | std::string | property_name | ) | const |
get method (only for doubles)
Definition at line 40 of file options.cc.
std::string Options::get_value_string | ( | std::string | property_name | ) | const |
Definition at line 64 of file options.cc.
bool Options::HasBeenSet | ( | const std::string & | name | ) | const |
Whether a parameter has been set using the set_value method or not.
Definition at line 139 of file options.cc.
References GMAD::OptionsBase::setKeys.
Referenced by BDSGlobalConstants::BDSGlobalConstants().
|
inline |
|
private |
publish members so these can be looked up from parser
< kept only for backwards compatibility.
< alternative for backwards compatibility.
< alternative
Definition at line 144 of file options.cc.
References GMAD::OptionsBase::aper1, GMAD::OptionsBase::aper2, GMAD::OptionsBase::aper3, GMAD::OptionsBase::aper4, GMAD::OptionsBase::apertureType, GMAD::OptionsBase::backupStepperMomLimit, GMAD::OptionsBase::batch, GMAD::OptionsBase::bdsimPath, GMAD::OptionsBase::beamlineAngle, GMAD::OptionsBase::beamlineAxisAngle, GMAD::OptionsBase::beamlineAxisX, GMAD::OptionsBase::beamlineAxisY, GMAD::OptionsBase::beamlineAxisZ, GMAD::OptionsBase::beamlinePhi, GMAD::OptionsBase::beamlinePsi, GMAD::OptionsBase::beamlineS, GMAD::OptionsBase::beamlineTheta, GMAD::OptionsBase::beamlineX, GMAD::OptionsBase::beamlineY, GMAD::OptionsBase::beamlineZ, GMAD::OptionsBase::beamPipeIsInfiniteAbsorber, GMAD::OptionsBase::beampipeMaterial, GMAD::OptionsBase::beampipeThickness, GMAD::OptionsBase::buildTunnel, GMAD::OptionsBase::buildTunnelFloor, GMAD::OptionsBase::buildTunnelStraight, GMAD::OptionsBase::checkOverlaps, GMAD::OptionsBase::circular, GMAD::OptionsBase::collimatorsAreInfiniteAbsorbers, GMAD::OptionsBase::defaultRangeCut, GMAD::OptionsBase::dontSplitSBends, GMAD::OptionsBase::emptyMaterial, GMAD::OptionsBase::eventOffset, GMAD::OptionsBase::exportFileName, GMAD::OptionsBase::exportGeometry, GMAD::OptionsBase::exportType, GMAD::OptionsBase::ffact, GMAD::OptionsBase::geant4MacroFileName, GMAD::OptionsBase::geant4PhysicsMacroFileName, GMAD::OptionsBase::generatePrimariesOnly, GMAD::OptionsBase::hStyle, GMAD::OptionsBase::ignoreLocalAperture, GMAD::OptionsBase::inputFileName, GMAD::OptionsBase::magnetGeometryType, GMAD::OptionsBase::maximumBetaChangePerStep, GMAD::OptionsBase::maximumPhotonsPerStep, GMAD::OptionsBase::maximumStepLength, GMAD::OptionsBase::maximumTrackingTime, GMAD::OptionsBase::maximumTrackLength, GMAD::OptionsBase::maximumTracksPerEvent, GMAD::OptionsBase::minimumKineticEnergy, GMAD::OptionsBase::minimumKineticEnergyTunnel, GMAD::OptionsBase::minimumRadiusOfCurvature, GMAD::OptionsBase::minimumRange, GMAD::OptionsBase::muonSplittingExcludeWeight1Particles, GMAD::OptionsBase::muonSplittingExclusionWeight, GMAD::OptionsBase::muonSplittingFactor, GMAD::OptionsBase::muonSplittingFactor2, GMAD::OptionsBase::muonSplittingThresholdParentEk, GMAD::OptionsBase::muonSplittingThresholdParentEk2, GMAD::OptionsBase::neutronKineticEnergyLimit, GMAD::OptionsBase::neutronTimeLimit, GMAD::OptionsBase::nGenerate, GMAD::OptionsBase::nominalMatrixRelativeMomCut, GMAD::OptionsBase::nSegmentsPerCircle, GMAD::OptionsBase::outputCompressionLevel, GMAD::OptionsBase::outputDoublePrecision, GMAD::OptionsBase::outputFileName, GMAD::OptionsBase::outputFormat, GMAD::OptionsBase::particlesToExcludeFromCuts, GMAD::OptionsBase::physicsList, GMAD::OptionsBase::preprocessGDML, GMAD::OptionsBase::prodCutElectrons, GMAD::OptionsBase::prodCutPhotons, GMAD::OptionsBase::prodCutPositrons, GMAD::OptionsBase::prodCutProtons, GMAD::Published< OptionsBase >::publish(), GMAD::OptionsBase::randomEngine, GMAD::OptionsBase::recreate, GMAD::OptionsBase::recreateFileName, GMAD::OptionsBase::recreateSeedState, GMAD::OptionsBase::restoreFTPFDiffractionForAGreater10, GMAD::OptionsBase::scintYieldFactor, GMAD::OptionsBase::seed, GMAD::OptionsBase::seedStateFileName, GMAD::OptionsBase::soilMaterial, GMAD::OptionsBase::startFromEvent, GMAD::OptionsBase::survey, GMAD::OptionsBase::surveyFileName, GMAD::OptionsBase::teleporterFullTransform, GMAD::OptionsBase::trajNoTransportation, GMAD::OptionsBase::tunnelAper1, GMAD::OptionsBase::tunnelAper2, GMAD::OptionsBase::tunnelFloorOffset, GMAD::OptionsBase::tunnelIsInfiniteAbsorber, GMAD::OptionsBase::tunnelMaterial, GMAD::OptionsBase::tunnelMaxSegmentLength, GMAD::OptionsBase::tunnelOffsetX, GMAD::OptionsBase::tunnelOffsetY, GMAD::OptionsBase::tunnelSoilThickness, GMAD::OptionsBase::tunnelThickness, GMAD::OptionsBase::tunnelType, GMAD::OptionsBase::tunnelVisible, GMAD::OptionsBase::turnOnMieScattering, GMAD::OptionsBase::turnOnOpticalAbsorption, GMAD::OptionsBase::turnOnOpticalSurface, GMAD::OptionsBase::turnOnRayleighScattering, GMAD::OptionsBase::useASCIISeedState, GMAD::OptionsBase::useElectroNuclear, GMAD::OptionsBase::useGammaToMuMu, GMAD::OptionsBase::useLENDGammaNuclear, GMAD::OptionsBase::useMuonNuclear, GMAD::OptionsBase::usePositronToHadrons, GMAD::OptionsBase::usePositronToMuMu, GMAD::OptionsBase::vacMaterial, GMAD::OptionsBase::verbose, GMAD::OptionsBase::verboseEventBDSIM, GMAD::OptionsBase::verboseEventContinueFor, GMAD::OptionsBase::verboseEventLevel, GMAD::OptionsBase::verboseEventStart, GMAD::OptionsBase::verboseRunLevel, GMAD::OptionsBase::verboseSteppingBDSIM, GMAD::OptionsBase::verboseSteppingEventContinueFor, GMAD::OptionsBase::verboseSteppingEventStart, GMAD::OptionsBase::verboseSteppingLevel, GMAD::OptionsBase::verboseSteppingPrimaryOnly, GMAD::OptionsBase::verboseTrackingLevel, GMAD::OptionsBase::visDebug, GMAD::OptionsBase::visMacroFileName, GMAD::OptionsBase::worldVolumeMargin, GMAD::OptionsBase::writeSeedState, and GMAD::OptionsBase::xsize.
void Options::set_value | ( | std::string | name, |
T | value | ||
) |
set methods by property name
Definition at line 76 of file options.h.
References GMAD::Published< OptionsBase >::set(), and GMAD::OptionsBase::setKeys.
Referenced by BDSExecOptions::BDSExecOptions(), and BDSExecOptions::Parse().