BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
optionsBase.h
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef OPTIONSBASE_H
20#define OPTIONSBASE_H
21
22#include <string>
23#include <vector>
24
25namespace GMAD
26{
36 {
37 public:
39
40 std::string inputFileName;
41 std::string visMacroFileName;
42 std::string geant4MacroFileName;
44 bool geant4PhysicsMacroFileNameFromExecOptions;
45 bool visDebug;
47
49 std::string outputFileName;
50 std::string outputFormat;
54
56 bool survey;
57 std::string surveyFileName;
59
60 bool batch;
61
62 // verbosity here done in hierarchy of simulation - overall, run, event
63 // track, step
65 bool verbose;
66
69
71 bool verboseEventBDSIM; // for bdsim print out
72 int verboseEventLevel; // for geant4 print out
76
78
80 bool verboseSteppingBDSIM; // for bdsim print out
81 int verboseSteppingLevel; // for geant4 print out
86
87 int verboseImportanceSampling;
88
89 bool verboseSensitivity;
90
91 bool circular;
92 int seed;
93 std::string randomEngine;
95 bool recreate;
96 std::string recreateFileName;
100 std::string seedStateFileName;
101
104
107 std::string exportType;
108 std::string exportFileName;
110
113 std::string bdsimPath;
114
116 std::string physicsList;
117 bool physicsVerbose;
118 int physicsVerbosity;
119 double physicsEnergyLimitLow;
120 double physicsEnergyLimitHigh;
121 bool g4PhysicsUseBDSIMRangeCuts;
122 bool g4PhysicsUseBDSIMCutsAndLimits;
123
126
127 double elossHistoBinWidth;
128
130 double ffact;
131
133 double beamlineX;
134 double beamlineY;
135 double beamlineZ;
144 double beamlineS;
146
147 int eventNumberOffset;
148
152 double xsize, ysize;
153
156 std::string outerMaterialName;
157 double horizontalWidth; // formerly outerDiameter
158 double thinElementLength;
159 bool hStyle;
160 double vhRatio;
161 double coilWidthFraction;
162 double coilHeightFraction;
163 bool ignoreLocalMagnetGeometry;
164 bool buildPoleFaceGeometry;
165
168 bool preprocessGDMLSchema;
169
172
173 bool yokeFields;
174 bool yokeFieldsMatchLHCGeometry;
175 bool useOldMultipoleOuterFields;
176 double scalingFieldOuter;
177 bool integrateKineticEnergyAlongBeamline;
178
179 std::string cavityFieldType;
180
181 bool includeFringeFields;
182 bool includeFringeFieldsCavities;
183
186 std::string apertureType;
187 double aper1;
188 double aper2;
189 double aper3;
190 double aper4;
191 std::string beampipeMaterial;
194
195 std::string vacMaterial;
196 std::string emptyMaterial;
197 std::string worldMaterial;
198 std::string worldGeometryFile;
199 bool autoColourWorldGeometryFile;
200 std::string importanceWorldGeometryFile;
201 std::string importanceVolumeMap;
202 // see verboseImportance
203
205
206 double vacuumPressure;
207
211 std::string tunnelType;
214 std::string tunnelMaterial;
215 std::string soilMaterial;
225
226 bool removeTemporaryFiles;
227 std::string temporaryDirectory;
228
229 // sampler options
230 double samplerDiameter;
231
238
262
274
275 // biasing options
276 double scaleFactorLaser;
277 std::string defaultBiasVacuum;
278 std::string defaultBiasMaterial;
279 std::string biasForWorldVolume;
280 std::string biasForWorldContents;
281 std::string biasForWorldVacuum;
282 std::string worldVacuumVolumeNames;
283
284 // tracking related parameters
285 std::string integratorSet;
286 std::string fieldModulator;
287 double lengthSafety;
288 double lengthSafetyLarge;
292 double chordStepMinimum;
293 double chordStepMinimumYoke;
294 double deltaIntersection;
295 double minimumEpsilonStep;
296 double maximumEpsilonStep;
297 double minimumEpsilonStepThin;
298 double maximumEpsilonStepThin;
299 double deltaOneStep;
300 bool stopSecondaries;
301 bool killNeutrinos;
302 bool killedParticlesMassAddedToEloss;
304 bool sampleElementsWithPoleface;
307 double dEThresholdForScattering;
309
310 // hit generation - only two parts that go in the same collection / branch
311 bool sensitiveOuter;
312 bool sensitiveBeamPipe;
313
314 // output related options
315 int numberOfEventsPerNtuple;
316
317 bool storeMinimalData;
318
319 bool storeApertureImpacts;
320 bool storeApertureImpactsIons;
321 bool storeApertureImpactsAll;
322 bool storeApertureImpactsHistograms;
323 double apertureImpactsMinimumKE;
324 bool storeCavityInfo;
325 bool storeCollimatorInfo;
326 bool storeCollimatorHits;
327 bool storeCollimatorHitsLinks;
328 bool storeCollimatorHitsIons;
329 bool storeCollimatorHitsAll;
330 double collimatorHitsMinimumKE;
331 bool storeEloss;
332 bool storeElossHistograms;
333 bool storeElossVacuum;
334 bool storeElossVacuumHistograms;
335 bool storeElossTunnel;
336 bool storeElossTunnelHistograms;
337 bool storeElossWorld;
338 bool storeElossWorldIntegral;
339 bool storeElossWorldContents;
340 bool storeElossWorldContentsIntegral;
341 bool storeElossTurn;
342 bool storeElossLinks;
343 bool storeElossLocal;
344 bool storeElossGlobal;
345 bool storeElossTime;
346 bool storeElossStepLength;
347 bool storeElossPreStepKineticEnergy;
348 bool storeElossModelID;
349 bool storeElossPhysicsProcesses;
350 bool storeParticleData;
351 bool storePrimaries;
352 bool storePrimaryHistograms;
353
354 bool storeTrajectory;
355 // filters
356 int storeTrajectoryDepth;
357 int storeTrajectoryStepPoints;
358 bool storeTrajectoryStepPointLast;
359 std::string storeTrajectoryParticle;
360 std::string storeTrajectoryParticleID;
361 bool storeTrajectorySecondaryParticles;
362 double storeTrajectoryEnergyThreshold;
363 std::string storeTrajectorySamplerID;
364 std::string storeTrajectoryELossSRange;
365
366 // for trajectories stored, what data is stored
367 bool storeTrajectoryTransportationSteps;
369 bool storeTrajectoryKineticEnergy;
370 bool storeTrajectoryMomentumVector;
371 bool storeTrajectoryProcesses;
372 bool storeTrajectoryTime;
373 bool storeTrajectoryLocal;
374 bool storeTrajectoryLinks;
375 bool storeTrajectoryIon;
376 bool storeTrajectoryMaterial;
377 bool storeTrajectoryAllVariables;
378
379 // filter logic
380 bool trajectoryFilterLogicAND;
381
382 bool storeSamplerAll;
383 bool storeSamplerPolarCoords;
384 bool storeSamplerCharge;
385 bool storeSamplerKineticEnergy;
386 bool storeSamplerMass;
387 bool storeSamplerRigidity;
388 bool storeSamplerIon;
389
390 double trajCutGTZ;
391 double trajCutLTR;
392 bool trajConnect;
393
394 bool storeModel;
395
396 bool storePerEventHistos;
397
398 int samplersSplitLevel;
399 int modelSplitLevel;
400 int uprootCompatible;
401
402 // circular options
403 int nturns;
404 std::string ptcOneTurnMapFileName;
405
406 double printFractionEvents;
407 double printFractionTurns;
408 bool printPhysicsProcesses;
409
410 // visualisation
412
413 // scoring Map
414 int nbinsx;
415 int nbinsy;
416 int nbinsz;
417 int nbinse;
418 double xmin;
419 double xmax;
420 double ymin;
421 double ymax;
422 double zmin;
423 double zmax;
424 double emin;
425 double emax;
426 bool useScoringMap;
427
428 // millicharge options
429 bool enableMillicharge;
430 std::string millichargeName;
431 double millichargeMass;
432 double millichargeCharge;
433 int millichargeID;
434
436 void print() const;
437
439 std::vector<std::string> setKeys;
440 };
441}
442
443#endif
Basic options class independent of Geant4.
Definition optionsBase.h:36
std::string bdsimPath
std::string seedStateFileName
Seed state file path.
std::string magnetGeometryType
default magnet geometry parameters
double beamlineZ
Initial beam line transform w.r.t. the world coordinate frame.
int nGenerate
The number of primary events to simulate.
Definition optionsBase.h:94
std::string physicsList
list of physics processes
double muonSplittingThresholdParentEk2
physics parameters
double beamlineAngle
Initial beam line transform w.r.t. the world coordinate frame.
double beamlineS
Initial beam line transform w.r.t. the world coordinate frame.
bool survey
Parameter for survey.
Definition optionsBase.h:56
double minimumRange
physics parameters
std::string outputFileName
Parameter for output format.
Definition optionsBase.h:49
int muonSplittingFactor
physics parameters
double tunnelSoilThickness
tunnel geometry parameters
double minimumRadiusOfCurvature
Minimum allowed radius of curvature.
std::string outputFormat
Parameter for output format.
Definition optionsBase.h:50
int verboseSteppingEventContinueFor
Stepping level verbosity.
Definition optionsBase.h:83
bool beamlineAxisAngle
Initial beam line transform w.r.t. the world coordinate frame.
std::string exportFileName
Parameter for controlling geometry export.
int seed
The seed value for the random number generator.
Definition optionsBase.h:92
double tunnelOffsetY
tunnel geometry parameters
double tunnelFloorOffset
tunnel geometry parameters
int verboseEventContinueFor
Event level verbosity.
Definition optionsBase.h:74
bool hStyle
H Style dipoles (if not, C Style).
double xsize
for element specification
std::string particlesToExcludeFromCuts
physics parameters
double ffact
magnetic field flip (+1 default, -1: flip sign)
double tunnelMaxSegmentLength
tunnel geometry parameters
double muonSplittingThresholdParentEk
physics parameters
int verboseEventStart
Event level verbosity.
Definition optionsBase.h:73
bool useLENDGammaNuclear
physics parameters
double maximumTrackingTime
Maximum tracking time per track [s].
bool dontSplitSBends
geometry debug, don't split bends into multiple segments
std::string tunnelMaterial
tunnel geometry parameters
bool useASCIISeedState
Whether to use the seed state from an ASCII file.
Definition optionsBase.h:99
bool tunnelIsInfiniteAbsorber
physics parameters
bool verboseSteppingPrimaryOnly
Stepping level verbosity.
Definition optionsBase.h:84
int visVerbosity
Geant4 vis system verbosity.
Definition optionsBase.h:46
double muonSplittingExclusionWeight
physics parameters
bool collimatorsAreInfiniteAbsorbers
physics parameters
int verboseRunLevel
Run level verbosity.
Definition optionsBase.h:68
bool turnOnOpticalSurface
Physics processes.
double prodCutProtons
physics parameters
int nSegmentsPerCircle
Number of facets per 2pi in visualisation.
std::string soilMaterial
tunnel geometry parameters
bool preprocessGDML
geometry control
int maximumBetaChangePerStep
physics parameters
bool batch
Flag for batch / interactive mode.
Definition optionsBase.h:60
double minimumKineticEnergy
physics parameters
int eventOffset
Event number to start from when recreating from a root file.
int verboseTrackingLevel
Tracking verbosity.
Definition optionsBase.h:77
bool circular
Flag for circular machine.
Definition optionsBase.h:91
bool checkOverlaps
bdsim options
double neutronKineticEnergyLimit
physics parameters
double aper1
default beampipe parameters
double maximumTrackLength
Maximum permitted track length [m].
int verboseEventLevel
Event level verbosity.
Definition optionsBase.h:72
bool restoreFTPFDiffractionForAGreater10
physics parameters
bool turnOnOpticalAbsorption
Physics processes.
bool buildTunnelStraight
tunnel geometry parameters
std::string inputFileName
Input filename.
Definition optionsBase.h:40
long maximumTracksPerEvent
physics parameters
double backupStepperMomLimit
Fractional momentum limit for reverting to backup steppers.
double aper2
default beampipe parameters
int outputCompressionLevel
Parameter for output format.
Definition optionsBase.h:52
double beamlinePhi
Initial beam line transform w.r.t. the world coordinate frame.
double maximumStepLength
Maximum permitted step length in any volume.
std::string exportType
Parameter for controlling geometry export.
double neutronTimeLimit
physics parameters
bool recreateSeedState
Load seed state when recreating events.
std::string vacMaterial
vacuum material
bool verbose
General verbosity.
Definition optionsBase.h:65
std::string recreateFileName
The file path to recreate a run from.
Definition optionsBase.h:96
bool teleporterFullTransform
Whether to use the new Transform3D method for the teleporter.
bool buildTunnelFloor
tunnel geometry parameters
int startFromEvent
Event to start from when recreating.
Definition optionsBase.h:97
std::string emptyMaterial
material in container volumes
bool muonSplittingExcludeWeight1Particles
physics parameters
double prodCutPhotons
physics parameters
bool generatePrimariesOnly
Whether to only generate primary coordinates and quit, or not.
double defaultRangeCut
physics parameters
double beamlineAxisY
Initial beam line transform w.r.t. the world coordinate frame.
double prodCutElectrons
physics parameters
double tunnelAper1
tunnel geometry parameters
bool verboseEventBDSIM
Event level verbosity.
Definition optionsBase.h:71
int maximumPhotonsPerStep
physics parameters
std::string beampipeMaterial
default beampipe parameters
bool exportGeometry
Parameter for controlling geometry export.
int verboseSteppingLevel
Stepping level verbosity.
Definition optionsBase.h:81
double beampipeThickness
default beampipe parameters
bool turnOnRayleighScattering
Physics processes.
std::string geant4PhysicsMacroFileName
Geant4 physics macro.
Definition optionsBase.h:43
void print() const
print some properties
std::string visMacroFileName
Visualisation filename.
Definition optionsBase.h:41
double scintYieldFactor
physics parameters
bool beamPipeIsInfiniteAbsorber
physics parameters
double beamlineX
Initial beam line transform w.r.t. the world coordinate frame.
std::string apertureType
default beampipe parameters
bool verboseSteppingBDSIM
Stepping level verbosity.
Definition optionsBase.h:80
bool useMuonNuclear
physics parameters
bool useElectroNuclear
physics parameters
int verboseSteppingEventStart
Stepping level verbosity.
Definition optionsBase.h:82
std::string surveyFileName
Parameter for survey.
Definition optionsBase.h:57
std::vector< std::string > setKeys
A list of all the keys that have been set in this instance.
bool recreate
Whether to recreate from a file or not.
Definition optionsBase.h:95
double tunnelAper2
tunnel geometry parameters
bool turnOnMieScattering
Physics processes.
double beamlineY
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 tunnelThickness
tunnel geometry parameters
std::string randomEngine
Name of random engine to use.
Definition optionsBase.h:93
double prodCutPositrons
physics parameters
bool buildTunnel
tunnel geometry parameters
bool outputDoublePrecision
Parameter for output format.
Definition optionsBase.h:51
bool writeSeedState
Write the seed state each event to a text file.
Definition optionsBase.h:98
bool visDebug
Flag for visualisation debug.
Definition optionsBase.h:45
bool useGammaToMuMu
physics parameters
double aper4
default beampipe parameters
double aper3
default beampipe parameters
double minimumKineticEnergyTunnel
physics parameters
double tunnelOffsetX
tunnel geometry parameters
bool usePositronToMuMu
physics parameters
std::string tunnelType
tunnel geometry parameters
double beamlineAxisZ
Initial beam line transform w.r.t. the world coordinate frame.
double beamlinePsi
Initial beam line transform w.r.t. the world coordinate frame.
std::string geant4MacroFileName
Geant4 macro to run.
Definition optionsBase.h:42
bool trajNoTransportation
kept only for backwards compatibility.
double xrayAllSurfaceRoughness
physics parameters
bool usePositronToHadrons
physics parameters
bool tunnelVisible
tunnel geometry parameters
int muonSplittingFactor2
physics parameters
double worldVolumeMargin
Padding margin for world volume size.
double nominalMatrixRelativeMomCut
Momentum threshold for nominal dipole matrix tracking.
double beamlineTheta
Initial beam line transform w.r.t. the world coordinate frame.
bool ignoreLocalAperture
default beampipe parameters
Parser namespace for GMAD language. Combination of Geant4 and MAD.