Previous: Physical elements, Up: Lattice
The execution control is performed in the GMAD input file through option
and sample
commands. How the results are recorded is controlledby the sample
command.
When the visualization is turned on, it is also controlled through Geant4 command prompt
option
Most of the options in bdsim
are set up by the command
option, <name>=value, ...;
The following options influence the geometry:
beampipeRadius | default beampipe outer radius [m]
|
beampipeThickness | default beampipe thickness [m]
|
beampipeMaterial | default beampipe material
|
tunnelRadius | tunnel Radius [m]
|
boxSize | default accelerator component size [m]
|
The following options influence the tracking:
deltaChord | chord finder precision
|
deltaIntersection | boundary intersection precision
|
chordStepMinimum | minimum step size
|
lengthSafety | element overlap safety
|
minimumEpsilonStep | minimum relative error acceptable in stepping
|
maximumEpsilonStep | maximum relative error acceptable in stepping
|
deltaOneStep | set position error acceptable in an integration steps
|
The following options influence the physics:
physicsList | determines the set of physics processes used
|
thresholdCutCharged | charged particle cutoff energy
|
thresholdCutPhotons | photon cutoff energy
|
stopTracks | if set, tracks are terminated after interaction
|
with material and energy deposit recorded
| |
synchRadOn | turn on Synchrotron Radiation process
|
srTrackPhotons | whether to track the SR photons
|
srLowX | sets lowest energy of SR to X*E_critical
|
srLowGamE | lowest energy of propagating SR photons
|
prodCutPhotons | standard overall production cuts for photons
|
prodCutPhotonsP | precision production cuts for photons in element
|
prodCutElectrons | standard overall production cuts for electrons
|
prodCutElectronsP | precision production cuts for electrons in element
|
prodCutPositrons | standard overall production cuts for positrons
|
prodCutPositronsP | precision production cuts for positrons in element
|
The following options influence the generation:
randomSeed | seed for the random number generator;
|
setting to -1 uses the system clock to generate the seed
| |
ngenerate | number of primary particles fired when in batch mode
|
Miscellaneous options:
nperfile | number of events recorded per file in ROOT output
|
nlinesIgnore | number of lines to skip when reading bunch files
|
For a more detailed description of how the option influence the tracking see
Physics
beam
The parameters related to the beam are set with the beam
command
beam, <name>=value, ...;
There is a set of predefined distribution types that can be generated 1. In this case one needs to specify the following parameters:
particle
- particle name, "e-","e+","gamma","proton", etc
energy
- particle energy
distrType
- type of distribution
and, in addition, other parameters that depend on the distribution type that has been chosen:
X0
- Offset of distribution centre in x
[m]
Y0
- Offset of distribution centre in y
[m]
Z0
- Offset of distribution centre in z
[m]
Xp0
- Angular offset from nominal axis in x-z
plane
Yp0
- Angular offset from nominal z
axis in y-z
plane
Zp0
- Directional flag: Zp0 < 0 points the particle back up the beamline
T0
- Global time offset [s]
distrType
=”gauss”: a gaussian in x
, x'
, y
,
y'
, energy and time, with given widths:
sigmaX
- RMS of x
distribution in [m]
sigmaXp
- RMS of x'
distribution in [rad]
sigmaY
- RMS of y'
distribution in [m]
sigmaYp
- RMS of y'
distribution in [rad]
sigmaE
- RMS of energy distribution divided by nominal beam kinetic energy
sigmaT
- RMS of time distribution in [s]
distrType
=”eshell”: a thin elliptic shell in x,x'
and y,y'
with given semiaxes:
x
xp
y
yp
sigmaE
distrType
=“ring”: in the x
, y
plane the particles
are uniformly distributed in r and in \phi inside a ring
with inner radius Rmin
and outer
radius Rmax
. x'
, y'
and time are exactly Xp0
,Yp0
and T0
respectively for each generated particle.
The kinetic energy distribution is a gaussian of width sigmaE
centered
about the nominal beam kinetic energy.
Rmin
, Rmax
- inner and outer radius in [m]
sigmaE
- RMS energy spread [GeV]
Example:
beam, particle="e+", energy=100*MeV, distrType="gauss", sigmaX=0.01,
sigmaXp=0.1, sigmaY=0.01, sigmaYp=0.1;
In alternative, one can pass to the simulation a file containing a list of particles to be generated. For more details see Bunch description formats.
sample
and csample
To record the tracking results one uses the sample
and csample
commands. To insert a sampling plane before <element>
the following
command should be used:
sample, range=<element>;
Example:
sample, range=d;
To put a cylindrical sampler of length l0
(in [m]) around element
<element>
at distance r0
(in [m]) the following command should
be used:
csample, range=<element>, r=r0, l=l0;
Samplers output the following parameters at the specified location:
E | Energy[GeV] | E0 | Energy at last scatter[Gev]
|
X | Global X position | s | path length
|
Y | Global Y position | t | time of flight
|
Z | Global Z position | t0 | time of flight at last scatter
|
Xp | Global angle in x-z | trackID | trackID of particle
|
Yp | Global angle in y-z | weight | weight of track
|
Zp | 1-sqrt(Xp^2+Yp^2) | parentID | trackID of parent particle
|
x | Relative x position | x0 | x at last scatter
|
y | Relative y position | y0 | y at last scatter
|
z | Relative z position 2 | z0 | z at last scatter
|
xp | Relative angle in x-z | xp0 | xp at last scatter
|
yp | Relative angle in y-z | yp0 | yp at last scatter
|
zp | 1-sqrt(xp^2+yp^2) | zp0 | xp at last scatter
|
nEvent | Event number | partID | PDG particle identifier
|
dump
Used in conjuction with option,fifo=<filename>
to output the bunch
distribution at a given point. If the specified output file is a fifo, the
distribution can be modified by an external program before being piped back in
to continue tracking. This is useful for including
multi-particle effects such as wakefields at given points in the lattice.
dump,range=
dumpMarker1option,fifo="/tmp/temp.dat"
Output is in the standard Guineapig format, with a header line stating the number of particles to be output. The file to be read back should be in the same format as this.
use
use
command selects the beam line for study
use, period=l1,range=q1/q2