20#include "BDSException.hh"
21#include "BDSParser.hh"
22#include "BDSUtilities.hh"
32 std::cerr <<
"BDSParser has not been initialised!" << std::endl;
42 std::cerr <<
"WARNING BDSParser was already initialised!" << std::endl;
62 std::cout << __METHOD_NAME__ <<
"Using input file: "<< name << std::endl;
89 if (
options.lengthSafety < 1e-15)
91 std::cerr <<
"Dangerously low \"lengthSafety\" value of: " <<
options.lengthSafety
92 <<
" m that will result in potential geometry overlaps!" << std::endl;
93 std::cerr <<
"This affects all geometry construction and should be carefully chosen!!!" << std::endl;
94 std::cerr <<
"The default value is 1 pm" << std::endl;
99 {
throw BDSException(__METHOD_NAME__,
"thinElementLength must be at least 3x lengthSafety");}
General exception with possible name of object and message.
Const entry to parser objects.
void AmalgamateBeam(const GMAD::Beam &beamIn, bool recreate)
Amalgamate the input beam definition with the ones stored in teh parser.
void CheckOptions()
Check options for consistency. This also checks the beam options.
static BDSParser * Instance()
Access method.
static BDSParser * instance
Instance.
static bool IsInitialised()
Returns if parser is initialised.
BDSParser()=delete
No default constructor.
void AmalgamateOptions(const GMAD::Options &optionsIn)
Amalgamate the input options with the ones stored in the parser.
virtual ~BDSParser()
Destructor.
double S0
initial beam centroid
void Amalgamate(const Beam &optionsIn, bool override, int startFromEvent=0)
int nGenerate
The number of primary events to simulate.
double beamlineS
Initial beam line transform w.r.t. the world coordinate frame.
bool recreate
Whether to recreate from a file or not.
void Amalgamate(const Options &optionsIn, bool override)
Options options
General options.
G4bool IsFinite(G4double value, G4double tolerance=std::numeric_limits< double >::epsilon())
Parser namespace for GMAD language. Combination of Geant4 and MAD.