Next: Run control, Previous: Arithmetical expressions, Up: Lattice
GMAD implements almost all the standard MAD elements, but also allows to define arbitrary geometric entities and magnetic field configurations. The geometry description capabilities are extended by using “drivers” to other geometry description formats, which makes interfacing and standardisation easier. The syntax of a physical element declaration is
element_name : element_type, attributes;
for example
qd : quadrupole, l = 0.1*m, k1 = 0.01;
element_type
can be of basic type or inherited. Allowed basic types are
All elements except marker
, element
, ecol
, and rcol
are modeled by default with an inner cylindrical beampipe and an outer
cylindrical volume. (FOR MAD COMPATIBILITY sbend
SHOULD BE A TORUS).
The beampipe outer radius and thickness are defined by the
global beampipeRadius
and beampipeThickness
options; the beampipe outer radius can be redefined for almost every element
with the aper
option.
The beampipe material is defined by the global beampipeMaterial
option
(default: “Vacuum”), while the residual gas in the beampipe at the moment
cannot be changed by the user and is set to “Vacuum”.
The outer volume is represented (with the exception of the drift
element) by a cylinder with inner radius equal to the beampipe outer radius and
with outer radius given by default by the global boxSize
option, which
can usually be overridden with the “outR” option.
In Geant4 it is possible to drive different “regions” each with their own production cuts and user limits.
In BDSIM three different regions exist, each with their own user defined production cuts (see Physics).
These are the default region, the precision region and the approximation region. Beamline elements
can be set to the precision region by setting the attribute precisionRegion
equal to 1. For example:
d1: drift, l=1*m, precisionRegion=1;
creates a drift
element in the precision region. Elements in the precision region also retain detailed
information about energy deposition (every individual hit is stored rather than binned into a histogram).
The third and final region is the “approximation region”. Volumes within the “mokka” defined elements can be assigned to this region (see Geometry).
An already defined element can be used as a new element type. The child element will have the attributes of the parent.
q:quadrupole, l=1*m, k1=0.1; qq:q,k1=0.2;