Muons, Inc.

G4beamline

http://g4beamline.muonsinc.com
G4beamline
Introduction
Using the Program
Visualizing the System
HistoRoot - program to Create Histograms
References
Appendix: Using the OpenInventor Viewer
Appendix: Using the Wired Viewer
Appendix: G4beamline Commands
Appendix: List of Particles (QGSP)

G4beamline is a particle-at-a-time simulation program based on Geant4 [1] and optimized for the simulation of beamlines. See the G4beamline User's Guide at the above URL for a description of the program (it is also installed with this distribution).

This brief description only discusses how to use the program, it does not describe how to construct a simulation's input file; for that see the G4beamline User's Guide.

Using the Program

NOTE:Before G4beamline can run, it requires that various Geant4 data-sets be downloaded and unpacked; which specific data-sets are required depends on the physics list used in your input.file. When first run, G4beamline prompts the user to download them. If you find you need to download more data-sets, click here.

Select the input file using the "Browse" button above. The directory containing it will become the current directory, and the output file named above will receive the program output, as will this TextArea. Any additional Parameters used by the input file can be entered above. Pushing the "Run" button above will run the program, replacing this text with its output. While the program is running, the "Run" button above will change to "Abort" to permit you to stop the program immediately. Closing this window will also abort g4beamline. After running the simulation (with viewer=none), the simulation usually creates one or more Root files containing the NTuples. You can use the HistoRoot program to generate histograms from these files.

IMPORTANT NOTE: With a viewer selected, NTuple output files are not written. This includes both .root files and ASCII files from vitualdetector-s, zntuple-s, etc.

Several examples are provided in the distribution. They are located in the "examples" directory under the install directory. In Linux the install directory is usually in your HOME directory; in Mac OS X it is usually in /Applications; in Windows a Copy of "G4beamline examples" is placed into "My Documents" (Windows Xp) or "Documents" (Windows Vista).

Visualizing the system

viewer=none will run the simulation and write the NTuple files; any other choice will run the simulation and viewer without writing NTuple files. Each image in the viewer is a single run with the selected number of events.

viewer=best will visualize the system using OpenInventor; use its File/Escape to go to the next image (run). The OpenInventor viewer is part of the G4beamline program. For usage hints, see this Appendix.

The "Other" selection can be used to run any other viewer supported by G4beamline and installed on your system (if necessary). See the output from a G4beamline run with viewer=best to see the list of supported viewers.

viewer=Other:Wired will visualize the system using the Wired3 viewer [2]. The "Run" button will run the selected number of runs, each generating a .heprep file. When that is complete, the Wired viewer will be opened on the first file; it considers them "events". For usage hints in Wired, see this Appendix.

Using HistoRoot to Create Histograms

The HistoRoot program makes it easy to generate plots and histograms from the Root files containing NTuples. A macro version of HistoRoot is included in the G4beamline distribution; it requires a recent version of Root to be installed. NOTE: the macro version of HistoRoot runs about 100 times slower than the compiled version, so should only be used for small files. The compiled version of HistoRoot is available at http://historoot.muonsinc.com; it requires the spedific version of Root from that webpage. G4beamline can create .root files without Root being installed, and you can install Root and/or HistoRootafter generating them, if necessary. HistoRoot has its own Help to assist you in using it.

References

 [1] http://geant4.cern.ch
 [2] http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/
 [3] http://root.cern.ch

Using the OpenInventor Viewer

Because the OpenInventor driver (OIX) is so much more useful than the other drivers, it is the driver of choice (linked to the name "best" whenever possible). This driver will permit you do to almost everything that any other driver can do. It is run synchronously from the G4beamline program, so at the end of a run the veiwer is opened. To go to the next run (image), select File/Escape -- this exits the OpenInventor viewer, and G4beamline will simulate the next run, displaying its image at the end.

Like other X-windows programs, the OpenInventor driver of G4Beamline can operate in either local or remote (networked) mode. Both the X display client and server must have the 3-D display capabilities of OpenGL installed. Operation over a network can be slow, and a good network connection (>1 megabit/sec) is required for useful results.

The Rotx and Roty wheels at the lower left rotate the image relative to the viewer, and the Dolly wheel (Z) at the lower right moves in and out with a corresponding change of scale. The buttons along the right edge do the following:
ArrowSelect pick mode and cursor
HandSelect move mode and cursor (default)
?Help (not implemented)
HouseRestore display to Home position
House with arrowSet Home position to be the current display
EyeZoom so everything is visible
GunsightNot implemented
Perspective box outlineSelect isometric or projected display

When the Hand cursor is active the mouse behaves like this:
Left ButtonClick and drag to rotate the display. It acts as if there were an invisible sphere surrounding the image, and the mouse movements rotate that sphere in any direction. This is quite different from the Rotx and Roty wheels, and takes some getting used to.
Middle ButtonClick and drag to pan the display -- this moves the visible objects around without changing perspective.
Right ButtonBrings up a menu with various functions, Draw Styles, and other items. The most useful is DrawStyles/StillDrawStyle/Wireframe which will draw in the wireframe mode rather than as solid surfaces. This permits you to look inside objects, and is considerably faster drawing. NOTE: daughters are not necessarily visible in wireframe mode -- see the Etc. menu item that makes them visible.

The File menu has several useful items:
PS (gl2ps)Save the current image in PostScript (drawing)
PS (pixmap)Save the current image as PostScript (pixel map)
IVSave the current image as an OpenInventor file
EscapeExit the OpenInventor Viewer. This causes the program to simulate the next run and display the result.

The Etc. menu has several useful items:
Set SolidSet the G4 mode to Solid (default)
Set (G4) reduced wire frameSet the G4 mode to wireframe, real edges only
Set (G4) full wire frameSet the G4 mode to wireframe, including triangles to fill surfaces
Visible mothers + invisible daughtersDaughter volumes are invisible (default)
Visible mothers + visible daughtersMake all objects visible
Note that daughter volumes are by default invisible, so to look inside a solid object you usually need to select wireframe mode and also Etc/VisibleMothers+VisibleDaughters.

The key to understanding how objects are displayed is to know that Geant4 has a solid/wireframe choice, and OpenInventor has a solid/wireframe choice, and they are different:
G4 mode
(Etc menu)
OI mode
(Right click menu)
Description
SolidSolid (as is)Draw solid surfaces
SolidWireframeDraw wireframes with triangles filling visible surfaces
Reduced WireframeEitherDraw reduced wireframes, showing only real edges
Full WireframeEitherDraw wireframes with triangles filling visible surfaces
For instance, in G4 reduced wireframe mode a sphere is invisible as it has no real edges; in G4 full wireframe mode it has triangles filling its visible surface (in such a way you can tell it is a sphere).

The OpenInventor driver has many more features, but this should get you started. It will also do animation: with the hand cursor left click and drag the image, letting go of the button while moving -- the image will continue to rotate until you left click on it (works best locally).

Using the Wired Viewer

The Wired event viewer is a reasonably flexible viewer, and can do most of what users typically need to do. Compared to OpenInventor, it has only the "reduced Wireframe" mode of drawing, and it is somewhat less intuitive how to manipulate the image to look from different perspectives.

On Windows, the Wired viewer is installed with G4beamline, and is used as the "best" viewer. On Linux and Mac OS, you must install it manually [2] and then make a symbolic link from its install directory to [g4beamline install directory]/Wired -- then you can set Other to Wired and use it.

When the Wired viewer comes up, it displays a few centimeters near the point x=0,y=0,z=0. It may happen that your system has no visible objects there and the display may look blank. On the lower left is a set of icons, and a click on the second one (a "plus sign" with 4 arrowheads) will zoom so that your entire system will be in the display.

The Wired viewer is started with the first image file loaded. At the top of the window is a toolbar with icons for "open", "reload", "previous event", "next event", "up (inactive)", "down (inactive)", "Toggle Automatic Updating (looks like a clock)", "Create New Window", and "Show/Hide Data Tree". On the right side of the window is a data visibility tree that permits you to select individual elements of the simulation and toggle their visibility.

At the bottom of the viewer subwindow are 8 icons and 2 sliders. The icons are:
RReset View
+ with arrowheadsFit in Window
+Zoom In
-Zoom Out
+ arrows pointing inReset Translation
CCW arrowRotate Counter Clockwise
CW arrowRotate Clockwise
CircleReset Rotation
The left bottom slider translates the image, and the right bottom slider rotates it. The translate slider does not immediately react to reversals of direction. The rotate slider may look like it goes forward and backwards while sliding in one direction -- this is really due to the fact that you are looking completely through the system, and a right rotation makes components behind the center move to the left (etc).

Along the right edge of the viewer are two sliders. The upper one translates the image and the lower one rotates it. The same remarks apply to these.

A right-click on the viewer window brings up a context menu with several useful choices:
Orientation ActionsPerform the above icon actions, plus more. Includes OrientationActions such as TopView, SideView, CenterInWindow, etc.
Orientation ToolbarTurn the bottom icons on or off
ProjectionSelect projection (Parallel is the default)
Mouse FunctionSelect what mouse actions do
Drawing OptionsVarious drawing options
By selecting MouseFunction/Rotation you can drag the viewer window to rotate it, as in OpenInventor (i.e. the mouse is rotating an invisible sphere containing the system). Similarly, MouseFunction/Translate lets you pan the image using the left mouse buton, as OpenInventor does with the center mouse button.

G4beamline Commands


The help command:
    help         provides interactive help.
    man          Alias for 'help'.

Program control commands:
    define       defines a macro (argument-expanded set of commands).
    do           Do loop.
    endgroup     ends a group definition.
    exit         exit a command file.
    for          For loop.
    g4ui         Accesses the Geant4 user interface
    geometry     Arranges to perform a geometry test.
    group        begins definition of a group.
    if           Conditional execution of command(s), and if/elseif/else/endif.
    include      includes a command file.
    list         provides interactive list of interesting internal tables.
    output       redirects stdout and stderr to a file
    param        Defines parameter values.
    randomseed   control pseudo random number generator seeds
    showmaterial Set the colors for selected materials.
    trackermode  Sets mode for all trackers, manages track fitting.
    tune         Tune a variable used as argument to other elements.

Centerline layout commands:
    corner       Implement a corner in the centerline.
    cornerarc    Implement a cornerarc in the centerline.
    start        Define the initial start of centerline coordinates.

Beam definition commands:
    beam         Define the Beam.
    cosmicraybeam Define a Cosmic-Ray muon 'beam'.
    particlesource Interface to the Geant4 General Particle Source.
    reference    Define a reference particle.

Auxiliary definition commands:
    material     construct a new material.
    particlecolor Set the colors for particle tracks.
    trackcolor   Alias for 'particlecolor'.

Beamline element definition commands:
    absorber     construct an absorber
    box          construct a box.
    coil         defines a coil (part of a solenoid)
    cylinder     Alias for 'tubs'.
    extrusion    construct a solid extrusion with axis along z
    fieldexpr    implements a field map, E and/or B, from expressions.
    fieldmap     implements a field map, E and/or B, from a file.
    genericbend  construct a generic bending magnet.
    genericquad  construct a generic quadrupole magnet.
    helicaldipole construct a helicaldipole magnet.
    helicalharmonic construct a helicalharmonic magnet.
    idealsectorbend construct an ideal sector bending magnet.
    lilens       construct a simple Lithium lens.
    multipole    construct a generic multipole magnet.
    particlefilter Will kill particles from a list, or force particles to decay.
    pillbox      Defines a pillbox RF cavity
    polycone     construct a polycone with axis along z
    rfdevice     Defines an rfdevice (RF cavity)
    solenoid     defines a solenoid (a coil and current)
    sphere       construct a sphere (or section of one)
    torus        construct a torus.
    trap         construct a solid trapezoid with axis along z.
    tube         Alias for 'tubs'.
    tubs         construct a tube or cylinder with axis along z.

The place command:
    place        places an element into the current group (or world).

Track and Event cuts:
    eventcuts    Implements cuts on event number via lists in files.
    trackcuts    Specifies per-track cuts.

Data output commands:
    beamlossntuple NTuple containing particle tracks when lost.
    fieldntuple  Generates an NTuple from B and E fields at specified points.
    newparticlentuple NTuple containing particle tracks when created.
    ntuple       Define an NTuple containing multiple detectors.
    printf       prints track variables and expressions
    printfield   Prints E or B fields, or writes FieldMap file.
    probefield   Prints B and E fields at specified points.
    profile      write beam profile information to a file
    timentuple   Construct an NTuple of tracks at a specified time.
    totalenergy  Print total energy deposited in selected volumes.
    trace        Specifies tracing of tracks.
    tracker      Defines a tracker.
    trackerplane Construct a tracker plane.
    usertrackfilter Construct a usertrackfilter that filters tracks via user code.
    virtualdetector Construct a VirtualDetector that generates an NTuple.
    zntuple      Generate an NTuple for each of a list of Z positions.

Physics commands:
    bug1021      Workaround to improve accuracy of bug1021 in E field
    muminuscapturefix Fixes up the G4MuonMinusCaptureAtRest process.
    physics      Defines the physics processes and controls them.
    reweightprocess modify the cross-section of a physics process.
    setdecay     Set lifetime, decay channels, and branching ratios for a particle's decay.
    spacecharge  Beam-frame Green's function space charge computation
    spacechargelw Lienard-Wiechert space charge computation

Other commands:
    collective   Monitor collective computation
    demo         demo command.
    movie        Generate movie NTuple.
    test         test random number seeds.

Program control Parameters:
    Zcl                 Last centerline Z position used (updated continuously)
    deltaChord          Geant4 tracking parameter
    deltaIntersection   Geant4 tracking parameter
    deltaOneStep        Geant4 tracking parameter
    epsMax              Geant4 tracking parameter
    epsMin              Geant4 tracking parameter
    eventTimeLimit      CPU Time Limit (sec)
    histoFile           Default (Root) NTuple output filename
    histoUpdate         Output update interval (events)
    maxStep             Maximum physics step size (mm)
    minStep             Minimum step size (mm)
    steppingFormat      Format for printing steps
    steppingVerbose     Set nonzero to print each step
    viewer              Visualization driver selected (default=none)
    worldMaterial       Material of the World volume
    zTolerance          Tolerance for Z steps (mm)
steppingFormat is a space- or comma-separated list of items:
        EXT       toggle extended precision (3 more digits)
        TAG       print a '>' (useful to grep output)
        N         step number
        NSTEP     Synonym of N
        GLOBAL    X,Y,Z,T in global coords
        XYZT      Synonym of GLOBAL
        CL        X,Y,Z,dxdz,dydz in CL coords
        CLX       extended precision CL
        KE        kinetic energy
        STEP      step length
        STEPLEN   Synonym of STEP
        VOL       volume name
        VOLNAME   Synonym of VOL
        PROCESS   process name
        B         magnetic field
        E         electric field
        P         3-momentum
        MAT       material name
        ID        event ID, track ID, parent ID
        PART      particle name
        SEG       centerline coord segment number
        WT        weight
        POLAR     polarization
        NL        <newline>
        NEWLINE   Synonym of NL
        \n        Synonym of NL


*
*
*
absorber     construct an absorber

             The absorber has two windows with beampipe and an absorber
             material. Optionally it has an additional two safety windows with
             beampipe. The WindowShape(s) are read from a file, and they
             determine the thickness and length of the beampipe(s). For
             geometry testing, acts like a cylinder enclosing the windows. For
             placing children, acts like a cylinder inside the central
             absorber.
             
             Note that section 4.5 of the User's Guide has a dimensioned
             drawing of an absorber.

             Named Arguments (#=cannot be changed in place cmd):
             absWindow     The name of the absorber window. #
             safetyWindow  The name of the safety window. #
             insideLength  Absorber length inside windows (mm) #
             absMaterial   The material of the absorber #
             windowMaterial The material of the window(s) #
             safetyMaterial The material inside the safety windows. #
             safetyDistance Distance between absorber and safety windows(mm) #
             color         The color of the absorber (''=invisible)
             maxStep       The maximum stepsize in the element (mm)

beam         Define the Beam.

             The beam command is: beam type arg1=v1 ...
             
             Types are: gaussian, rectangular, ellipse, ascii, and root.
             
             Gaussian beams are randomly generated to emanate from
             beamX,beamY,beamZ with the given sigmas; negative sigma means
             flat with |sigma| as halfwidth.
             
             Rectangular beams are randomly generated to emanate from the
             rectangle beamHeight by beamWidth centered at beamX,beamY,beamZ.
             
             Ellipse beams are randomly generated on the ellipses in (X,Xp),
             (Y,Yp), (T,E), with meanE determined from meanP and the sigmas
             used as half-widths; tracks are generated on the ellipse with
             uniform density when plotted with scales such that the ellipse is
             a circle.
             
             ASCII beams are read from a file using the format specified; the
             formats supported are: BLTrackFile
             
             Root beams are read from a .root file using the TNtuple named
             directory/name in the file. It must have the same fields as used
             in BLTrackFile format. Note that EventIDs greater than 16,777,216
             will be trncated.
             
             When reading a file (ascii or root), beamX and beamY are added to
             input tracks; if beamZ is set it will overwrite the z of the
             track, but if it is not set the z of the track in the file is
             kept.
             
             All coordinates are centerline coordinates.
             
             Multiple beam commands can be given, and they will generate
             events in the order they appear in input.file.
             
             Events are generated starting at firstEvent, until either nEvents
             have been generated or lastEvent would be exceeded.
             
             For gaussian, rectangular, and ellipse beams, the beam particle
             can be given as either a particle name or its integer PDGid. Some
             common beam particle names are: proton, anti_proton, pi+, pi-,
             mu+, mu-, e+, e-, kaon+, kaon-, kaon0, nu_e, anti_nu_e. See the
             User's Guide for a complete list of particle names.

             Named Arguments:
             particle      Beam particle name
             nEvents       Number of events to process (default=1 for
                           generating events, default=ALL for reading files)
                           set to lastEvent-firstEvent+1 if both are set.
             firstEvent    First event # to process (default is the next
                           sequential eventID, 1 if none)
             lastEvent     Last (highest) event # to process
             beamX         Beam location in X (mm)
             beamY         Beam location in Y (mm)
             beamZ         Beam location in Z (mm)
             maxR          Beam maximum radius (mm)
             rotation      Rotation of the beam
             renumber      If nonzero, renumber events sequentially.
             weight        Weight for events, overwritten by value from input
                           file (1.0).
             secondaryTrackID The next TrackID for secondaries (1001).
             meanMomentum  Gaussian Beam mean momentum (MeV/c)
             meanP         Synonym for meanMomentum.
             sigmaX        Gaussian Beam sigma in X (mm)
             sigmaY        Gaussian Beam sigma in Y (mm)
             sigmaZ        Gaussian Beam sigma in Z (mm)
             sigmaXp       Gaussian Beam sigma in dxdz (slope)
             sigmaYp       Gaussian Beam sigma in dydz (slope)
             sigmaP        Gaussian Beam sigma in P (MeV/c)
             sigmaT        Gaussian Beam sigma in T (ns)
             sigmaE        Elliptical Beam sigma in E (MeV)
             meanXp        Gaussian Beam mean in Xp (slope)
             meanYp        Gaussian Beam mean in Yp (slope)
             meanT         Gaussian Beam mean in T (ns)
             polarization  Polarization 3-vector (0,0,0)
             beamHeight    Rectangular Beam height (mm)
             beamWidth     Rectangular Beam width (mm)
             filename      input file name
             file          synonym for filename.
             directory     Root-file directory of NTuple
             category      Deprecated synonym for directory.
             uid           HistoScope uid of NTuple
             name          Root name of NTuple.
             format        ASCII file format (Default=BLTrackFile)
             beamXp        Synonym for meanXp.
             beamYp        Synonym for meanYp.

beamlossntuple NTuple containing particle tracks when lost.

             The NTuple contains the usual track data:
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             format        The NTuple format (see above for list).
             filename      The filename for the NTuple.
             file          Synonym for filename.
             require       Expression which must be nonzero to include the
                           track (default=1) #
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).

box          construct a box.

             This is a direct interface to G4Box.

             Named Arguments:
             height        The height of the box (mm)
             width         The width of the box (mm)
             length        The length of the box (mm)
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the box
             color         The color of the box (''=invisible)
             kill          Set nonzero to kill every track that enters.

bug1021      Workaround to improve accuracy of bug1021 in E field

             When a charged particle turns around in an E field, a bug in the
             Geant4 transportation process can sometimes give it a
             wildly-incorrect kinetic energy. This workaround computes the
             distance to turn-around, and limits the step to half that vlue
             until minStep is reached; at that point the track is reflected.
             
             Simulations in which there are no E fields, or no charged
             particle ever gets below ~0.001 MeV in an E field, have no need
             to apply this workaround.

             Named Arguments:
             minStep       Minimum step in space (mm, default=0.002)

coil         defines a coil (part of a solenoid)

             A coil is a geometrical tube that can carry current when part of
             a solenoid. The field is computed for a set of nSheets
             infinitely-thin current sheets evenly spread radially. The
             solenoid specifies the actual current. For tracking the
             computation is too slow, so a field map on a grid in r and z is
             computed and written to filename (defaults to coilname.dat).
             While there are lots of parameters specifying the field map it is
             recommended to simply accept the defaults for all but
             innerRadius, outerRadius, length, material, and possibly
             tolerance. The other parameters will be determined so that the
             largest error is less than tolerance times the value of Bz at the
             center of the coil. If mapFile is given, the file is read in
             BLFieldMap format. The cache file contains the parameters, and is
             a field map in a binary format; it is automatically regenerated
             if any parameter changes.
             
             Note that maxR and maxZ are by default determined to be large
             enough so that the field falls below tolerance; this can be quote
             large.

             Named Arguments (#=cannot be changed in place cmd):
             innerRadius   Inside radius of the coil (mm) #
             outerRadius   Outside radius of the coil (mm) #
             length        Length of the coil along z (mm) #
             material      The material of the conductor (default=Cu) #
             tolerance     The acceptable tolerance of the map. #
             nSheets       Number of sheets used in the computation #
             maxR          Maxmum r value for the map (automatically
                           determined by default). #
             maxZ          Maxmum z value for the map (automatically
                           determined by default). #
             dR            R interval between points of the map (automatically
                           determined by default). #
             dZ            Z interval between points of the map (automatically
                           determined by default). #
             filename      Filename for cache; deaults to name.dat. #
             mapFile       Filename for map (e.g. from TOSCA). #
             exactComputation Set nonzero to use the exact computation without
                           any field map (0).

collective   Monitor collective computation

             This command computes the means and sigmas related to the time
             stepping in BLRunManager (global coordinates), generating a
             TimeStep NTuple. If the simulation has multiple bunches, this
             NTuple combines them all (and is thus almost useless).
             
             This command can also generate field NTuple-s at specified points
             in x,y,z -- unnamed parameters should be 'x,y,z' values for
             monitoring E and B fields (global coordinates).
             
             NOTE: This command must come AFTER other commands that compute
             collective fields; otherwise stale field values will be used from
             the previous time step. If deltaT is set > 0.0, this command will
             put the RunManager into collective mode and set its deltaT;
             otherwise the previous commands should do that, and this command
             won't modify deltaT.

             Named Arguments:
             deltaT        Time step (-1 ns).
             format        Format of NTuples.
             filenamePrefix Prefix of NTuple filenames.

corner       Implement a corner in the centerline.

             The centerline is bent by a rotation. Every track that enters the
             volume also gets rotated. The z value is for the corner and the
             front face of the volume (if any). If the corner is paired with a
             bending magnet or other mechanism to bend the beam, no volume
             should be used.
             
             NOTE: This command is self-placing, do not use the place command;
             it also affects all following placements, and it cannot be issued
             inside a group. If radius=height=width=0 then no volume is
             associated with the corner, and a bending magnet should be placed
             nearby to bend the particles around the corner. Normally the
             bending magnet is placed before the corner, and is rotated by
             half the bend angle. For a sector bend, it's usually best to use
             the cornerarc command rather than this one.
             
             NOTE: all placements before this command must have z values
             before the corner, and all placements after this command must
             have z values after the corner. Note also that the angle is
             limited to 90 degrees.
             
             Note that the radiusCut is important to reduce or eliminate
             ambiguities in the global to centerline coordinate transform. It
             can also be used to 'shield' the beamline to prevent particles
             from taking unusual paths around the outside of beamline
             elements.

             Named Arguments:
             z             The centerline Z of the corner (mm).
             rotation      The rotation of the corner (see above).
             radiusCut     The radius cut for this following segment (mm
                           default=previous).
             radius        The radius of the circular corner volume (mm).
             height        The height of the rectangular corner volume (mm).
             width         The width of the rectangular corner volume (mm).
             length        The length of the corner volume (mm).
             maxStep       The maximum stepsize in the element (mm).
             material      The material of the corner volume.
             color         The color of the corner volume (''=invisible).

cornerarc    Implement a cornerarc in the centerline.

             The centerline is bent by a rotation. Three corners are used to
             approximate an arc; the total angle and path-length are equal to
             those for the arc. Should be used immediately after an
             idealsectorbend or a genericbend. The z value is for the front
             face of the arc.
             
             NOTE: This command is self-placing, do not use the place command;
             it also affects all following placements, and it cannot be issued
             inside a group.
             
             This command is well matched to a sector bend, but can also be
             used with a normal bending magnet -- normally the magnet is
             placed before the cornerarc and is rotated by half the bend
             angle.
             
             The only useful rotations are those around the centerline Z.
             
             z, angle, and centerRadius are required parameters.
             
             NOTE: all placements before this command must have z values
             before the corner, and all placements after this command must
             have z values after the corner. Note also that the angle is
             limited to 90 degrees.
             
             Note that the radiusCut is important to reduce or eliminate
             ambiguities in the global to centerline coordinate transform. It
             can also be used to 'shield' the beamline to prevent particles
             from taking unusual paths around the outside of beamline
             elements.

             Named Arguments:
             z             The centerline Z of the cornerarc (mm).
             centerRadius  The radius of the centerline arc (mm).
             angle         The angle of bend, >0=left, <0=right (degrees).
             rotation      The rotation of the cornerarc (see above).
             radiusCut     The radius cut for this following segment (mm).

cosmicraybeam Define a Cosmic-Ray muon 'beam'.

             The muon beam is nominally headed in the +Z direction, implying
             that +Z is physically DOWN. The beam intersects a box defined by
             beamWidth, beamHeight, and beamLength, centered at X=Y=0 and
             beamZ. For each event a point is selected randomly within this
             box, angles theta and phi and the muon momentum are generated
             according to a fit to their sea-level distributions, the track is
             extended backwards to the 'celestial sphere', and that is the
             initial beam position for the event. The muon flux through the
             rectangle at Z=beamZ is used to display an estimate of the
             sea-level exposure time for the run.

             Named Arguments:
             nEvents       Number of events to process
             beamZ         Beam location in Z (mm)
             radius        Radius of celestial sphere (mm)
             beamHeight    Rectangular Beam height (mm)
             beamWidth     Rectangular Beam width (mm)
             beamLength    Rectangular Beam length (mm)

cylinder     Alias for 'tubs'.


define       defines a macro (argument-expanded set of commands).

             The first argument is the macro name, additional arguments become
             lines in the body of the expanded macro. The macro name becomes a
             command with up to 9 positional arguments. When the command is
             issued, the body is expanded and executed, with these
             substitutions:
               $0     MacroName
               $1-$9  Positional arguments of the command
               $#     # macro expansions (for generating unique names)
             NOTE: $paramname is expanded in the define command, but
             $$paramname is expanded when the macro is invoked.

demo         demo command.

             This demo command takes both positional and named args, and is
             the prototype class for all commands. All argument values are
             merely displayed. 'demo default name=value...' sets default
             values.

             Named Arguments:
             s1            a demo string argument.
             s2            a demo string argument.
             d1            a demo double argument.
             d2            a demo double argument.

do           Do loop.

             Syntax:
                 do i 1 10 [1]
                     commands ...
                 enddo
             
             Sets the parameter i to values 1, 2, 3, ... 10, and executes the
             commands. The increment is 1 by default, and negative increments
             are allowed (with limits reversed). 'do i 1 0' and 'do i 0 1 -1'
             will execute no commands. After completion, i retains its last
             value. Do-s, for-s, and multi-line if-s can be nested in any
             manner.
             
             Note: the do command will not work from standard-input or as a
             command in a single-line if.

endgroup     ends a group definition.

             The group may then be placed as any other element. If the group
             was not given a length via an argument, endgroup computes the
             length and adjusts the offsets of all elements in the group so
             they refer to the center of the group.

eventcuts    Implements cuts on event number via lists in files.

             The files are ASCII, with one event number per line. If the keep
             file is not empty, only event numbers listed in it will be
             analyzed (except those listed in the skip file). The skip file
             lists event numbers that will be skipped, and event numbers
             listed in both files will be skipped. When reading the files,
             lines beginning with '#' are ignored; blank lines are interpreted
             as event 0.

             Named Arguments:
             keep          The file containing a list of event numbers to
                           analyze (default is all).
             skip          The file containing a list of event numbers to
                           skip.
             filename      Synonym for keep.
             file          Synonym for keep.

exit         exit a command file.

             The exit command ceases reading the input file, and starts the
             simulation immediately (ignoring the remainder of the input
             file).

extrusion    construct a solid extrusion with axis along z

             This is a basic interface to G4ExtrudedSolid. A simple polygon in
             the X-Y plane is extruded along z, with optional scales in XY at
             the two ends (which generate a linear scaling along z).
             
             The polygon must be simple (no two sides intersect, no two
             vertices are equal). The vertices are listed starting from any
             vertex and traversing the polygon in either direction without
             lifting the pencil from the paper (Geant4 requires the traversal
             to be clockwise but this element internally reverses it if
             required). For an N-sided polygon give N vertices -- a side will
             be added from last to first to close the polygon; N is determined
             by counting the entries in the vertices argument.
             
             Note that while you cannot make an extrusion with a hole, you can
             make such an object in two parts or by placing a daughter volume
             in this one.
             
             Note the position placed is x=0,y=0,z=0, which is centered along
             z, but need not be near the center of the polygon in XY.
             
             With scale1!=scale2 this is not really an extrusion; by making
             one of them 0.001 or so, you can construct a sharp apex.
             
             Any x or y value in vertices can be an expression using double
             constants and the usual C operators and functions.

             Named Arguments (#=cannot be changed in place cmd):
             length        Length of the extrusion (mm). #
             vertices      List of vertices of the XY polygon (mm):
                           'x0,y0;x1,y1;...'; a line from last to first is
                           added. A 2 mm square is: '-1,-1;-1,1;1,1;1,-1' #
             scale1        The XY scale at the upstream (-z) end (1.0). #
             scale2        The XY scale at the downstream (+z) end (1.0). #
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the extrusion
             color         The color of the extrusion (''=invisible)
             kill          Set nonzero to kill every track that enters.
             vertexes      Synonym for vertices. #

fieldexpr    implements a field map, E and/or B, from expressions.

             A fieldexpr element can be either a box or a cylinder; set length
             and radius for cylinder, set length and width and height for a
             box. Units are Tesla, MegaVolts/meter, mm, and ns. Expressions
             for the field components can use {x,y,z} for a box or {z,r} for a
             cylinder; the time expression can use {t}. If present, the time
             expression multiples all components.
             
             Expressions can use all C operators except ?:, and x^n is x to
             the nth power (n integer). The following functions are available:
             abs(), min(),max(), sqrt(), pow(), sin(), cos(), tan(), asin(),
             acos(), atan(), atan2(), sinh(), cosh(), tanh(), exp(), log(),
             log10(), floor(), ceil(), if(). if(condition,a,b) replaces the C
             (condition? a : b).
             
             A field map is used for tracking efficiency; the number of points
             in the map is increased until the largest map error divided by
             the maximum field is smaller than tolerance, or 1M points is
             exceeded. Similarly for the time dependence.
             
             For time dependence: if t-timeOffset<tmin, the value at tmin is
             used; if t-timeOffset>tmax, the value at tmax is used.
             
             Note that divide by zero is reported as invalid expression. For a
             Li lens you probably want to use an expression like this:
             'if(r<100,500.0*r/100,500.0*100/(r+0.000001))', where 100mm is
             the radius, and 500T is the field at r=100mm.

             Named Arguments (#=cannot be changed in place cmd) (@=Tunable):
             factorB       Factor for the B-field (1.0). @
             factorE       Factor for the E-field (1.0). @
             timeOffset    Time offset (ns).
             Bx            Expression for Bx (Tesla), use {x,y,z}. #
             By            Expression for By (Tesla), use {x,y,z}. #
             Bz            Expression for Bz (Tesla), use {x,y,z} or {r,z}. #
             Br            Expression for Br (Tesla), use {r,z}. #
             Bphi          Expression for Bphi (Tesla), use {r,z}. #
             Ex            Expression for Ex (MV/m), use {x,y,z}. #
             Ey            Expression for Ey (MV/m), use {x,y,z}. #
             Ez            Expression for Ez (MV/m), use {x,y,z} or {r,z}. #
             Er            Expression for Er (MV/m), use {r,z}. #
             time          Expression for time-dependence factor, use {t}. #
             nX            Number of grid points in x. #
             nY            Number of grid points in y. #
             nZ            Number of grid points in z. #
             nR            Number of grid points in r. #
             nT            Number of grid points in t. #
             tolerance     Required relative accuracy (0.001). #
             length        Length of field map (mm). #
             width         Width of rectangular field map (mm). #
             height        Height of rectangular field map (mm). #
             radius        Radius of cylindrical field map (mm). #
             tmin          Minimum value of t (ns). #
             tmax          Maximum value of t (ns). #

fieldmap     implements a field map, E and/or B, from a file.

             Reads an input file in BLFieldMap format to define E and/or B
             fields, optionally with time dependence. See the Users Guide for
             a description of the BLFieldMap format.

             Named Arguments (#=cannot be changed in place cmd) (@=Tunable):
             filename      Filename for the Field Map. #
             file          Synonym for filename. #
             current       Current of the B-field. @
             gradient      Gradient of the E-field. @
             timeOffset    Time offset (ns).

fieldntuple  Generates an NTuple from B and E fields at specified points.

             Intended primarily for debugging. This command makes it easy to
             plot fields as a function of position and time, using existing
             NTuple plotting tools. Outputs x,y,z,t,Bx,By,Bz,Ex,Ey,Ez into an
             NTuple. Units are mm, ns, Tesla, and MegaVolts/meter. Runs after
             the reference particle is tracked. Only global coordinates are
             used.
             
             The single positional argument is the name of the NTuple. Named
             arguments {x,y,z,t} are of two forms specifying coordinate
             values: x=Xmin,Xmax,dX or x=X1:X2:X3:... which generate the
             obvious loops (single value is OK). Expressions can be used.
             Omitted coordinates are held fixed at 0.0.

             Named Arguments:
             category      The category of the NTuple.
             format        NTuple format (see above for list).
             filename      Name of file.
             x             Loop for x values: Xmin,Xmaz,dX or X1:X2:... (mm)
             y             Loop for y values: Ymin,Ymaz,dY or Y1:Y2:... (mm)
             z             Loop for z values: Zmin,Zmaz,dZ or Z1:Z2:... (mm)
             t             Loop for t values: Tmin,Tmaz,dT or T1:T2:... (ns)
             exit          Set nonzero to exit after generating NTuple (0).
             file          Synonym for filename.

for          For loop.

             Syntax:
                 for i v1 v2 v3 ...
                     commands ...
                 endfor
             
             Sets the parameter i to values v1, v2, v3, ..., and executes the
             commands. Values can be any strings, including numbers, except
             they cannot contain an '=' (named parameter). After completion, i
             retains its last value.
             
             Do-s, for-s, and multi-line if-s can be nested in any manner.
             
             Note: the for command will not work from standard-input or as a
             command in a single-line if.

g4ui         Accesses the Geant4 user interface

             Each positional argument is executed as a Geant4 UI command,
             according to the when parameter. No positional arguments means
             open a UI session on stdout/stdin. For a given value of when, the
             UI commands from all g4ui commands are executed in order.

             Named Arguments:
             when          0=before reference, 1=before beam, 2=after beam,
                           3=cannot be used, 4=visualization.

genericbend  construct a generic bending magnet.

             The field region is a box with By specified. A fringe field
             computation based on the method of COSY INFINITY is included by
             default, extending the field in a rectangle extending the
             straight aperture along the local z. This is first order only,
             and assumes the magnet is infinitely wide; the fringe field
             extends outside of the magnet aperture only in a region extending
             the aperture in x and y. As the fringe field is first order only,
             it is slightly non-Maxwellian.
             
             By default, the aperture is filled with a box volume of the
             fieldMaterial; this prevents placing any object inside the
             aperture. With openAperture=1 no aperture volume is used, and
             objects can be placed into the parent volume that are inside the
             aperture.

             Named Arguments (#=cannot be changed in place cmd) (@=Tunable):
             fieldWidth    The width of the field region (mm)
             fieldHeight   The height of the field region (mm)
             fieldLength   The length of the field region (mm)
             ironWidth     The width of the iron region (mm)
             ironHeight    The height of the iron region (mm)
             ironLength    The length of the iron region (mm)
             By            The magnetic field (Tesla) @
             maxStep       The maximum stepsize in the element (mm)
             fieldMaterial The material of the field region.
             fieldColor    The color of the field region.
             ironMaterial  The material of the iron region.
             ironColor     The color of the iron region.
             kill          Set nonzero to kill particles hitting the iron.
             fringe        Fringe field computation, set to 0 to disable, or a
                           comma-separated list of 6 Enge function parameters.
             fringeFactor  Fringe depth factor (1.0).
             openAperture  Set nonzero to omit the aperture volume. #

genericquad  construct a generic quadrupole magnet.

             The field region is a tubs with gradient specified. A positive
             gradient yields a horizontally-focusing quad for positive
             particles. If apertureRadius>0 the quad has a circular aperture.
             For a 'rounded +' aperture using circles for the poles, set
             poleTipRadius, coilRadius, coilHalfwidth. Due to visualization
             bugs, in the latter case you cannot see through the aperture; it
             is solid black. A fringe field computation based on the method of
             COSY INFINITY is included by default, extending the field region.
             This is first order only, and the fringe field extends outside of
             the magnet aperture only in a cylinder extending the aperture
             straight along local z. As the fringe field is first order only,
             it is slightly non-Maxwellian.

             Named Arguments (#=cannot be changed in place cmd):
             fieldLength   The length of the field region (mm)
             ironLength    The length of the iron (mm)
             ironRadius    The outer radius of the iron (mm)
             apertureRadius The radius of the aperture (mm)
             poleTipRadius The inner radius of the pole tips (mm).
             coilRadius    The radius of the inside of the coil (mm).
             coilHalfwidth The halfwidth of the coil (mm).
             coilHalfWidth Synonym for coilHalfwidth.
             gradient      The magnetic field gradient, dBy/dx (Tesla/meter)
             maxStep       The maximum stepsize in the element (mm)
             ironMaterial  The material of the iron region.
             fieldMaterial The material of the field region.
             ironColor     The color of the iron region.
             kill          Set nonzero to kill tracks hitting the iron.
             fringe        Fringe field computation, set to 0 to disable, or a
                           comma-separated list of 6 Enge function parameters.
             fringeFactor  Fringe depth factor (1.0).
             openAperture  Set nonzero to omit the aperture volume. #

geometry     Arranges to perform a geometry test.

             The geometry test checks nPoints points on the surface of each
             element, verifying that they are inside the parent element and
             that they are not inside any sibling element. The default of 100
             points is usually sufficient; 0 means omit the geometry test. The
             first 20-40 points (depending on element) test 'corners', the
             rest are randomly distributed on the surface. The default
             tolerance is 0.002 mm.

             Named Arguments:
             nPoints       The number of surface points to test per element
             printGeometry Set nonzero to print the entire geometry.
             visual        Set nonzero to display the geometry test points.
             tolerance     Tolerance for inside/outside tests (mm).

group        begins definition of a group.

             A group is a collection of elements that can be placed together,
             preserving their relative positions. The group is a LogicalVolume
             in the geant4 geometry -- this means that a group cannot overlap
             any other group or object, even if the overlapping portion of the
             group is empty. If you need to permit overlaps, consider using a
             macro instead (the define command).
             
             If the group is given a length, then children can be placed at
             specific z offsets relative to the center of the group. If the
             group is not given a length, then children can only be placed
             sequentially along z, and the length will be computed by the
             endgroup command. Width and height are computed from the largest
             child or the argument. If radius is set to 0, the group will be a
             cylinder with radius determined by the largest width or height
             placed into it; if >0 then that is the fixed radius. If radius is
             not set then a box is used.
             
             Note: when placing objects into a group, if the rename argument
             is used, it should begin with a '+' to include the group's name
             in the object's name; otherwise there may be multiple objects
             with the same name -- this is only a major problem for
             virtualdetector-s and other output objects. The group's name is
             included by default if no rename is used on the place command.

             Named Arguments (#=cannot be changed in place cmd):
             length        Overall group length along z (mm) #
             width         Overall group width (mm) #
             height        Overall group height (mm) #
             radius        Radius for a cylindrical group (mm) #
             material      Material of the volume outside children
             color         Color of the volume of the group
             maxStep       The maximum stepsize in the volume (mm)

helicaldipole construct a helicaldipole magnet.

             The field region is a cylinder with a helical dipole field plus a
             solenoidial field. The simple model=1 provides just a sine and
             cosine transverse dependence, while the maxwellian model=2 has
             both dipole and quadrupole terms. Both the dipole scale bD [T]
             and quadrupole scale bQ [T/m] are now at rho=0; the user must
             determine the correct values externally.
             
             Note that this Element generates a magnetic field only, and only
             within the cylinder defined by length and radius. So it has no
             solid associated with it, and is invisible.

             Named Arguments:
             radius        The radius of the field region (mm)
             model         The model of field calculated(simple=1, rpj and ysd
                           model=2, ttominaka et al model=3), modulations in
                           bd,bq,bz= 4
             length        The length of the field region (mm)
             bD            The dipole magnitude at rho=0 (Tesla).
             lambda        Helix period along the Z axis (mm).
             phi0          The phase of the XY field at the entrance (deg).
             Bsolenoid     The value of Bsolenoid (Tesla).
             bQ            The quadrupole magnitude at rho=0 (Tesla).
             bs            The sextupole magnitude at rho=0 (Tesla).
             rr            Reference radius (mm)
             psi0          The offset between the dipole term and the
                           quadrupole term (Degrees).
             ez            The base electric field inside the helix channel
                           (GV/m).

helicalharmonic construct a helicalharmonic magnet.

             Creates a cylindrical region containing the field of a magnetic
             helical harmonic of given order [n]. The field is defined by the
             value of the (n-1) order derivative [b] of the vertical field
             component (when the initial phase is 0) with respect to the
             horizontal coordinate at the center of the helix:
               b=d^(n-1)B_phi/dr^(n-1) @ [r=0 & phi-k*z+phi0=0], 
             where k=2*pi/lambda is the helix's wave number, [lambda] is the
             length of the helix's period, and phi0 is the initial phase. The
             field components in the cylindrical frame are given by:
               B_phi=(2/(n*k))^(n-1)*b*(I[n-1](n*k*r)-I[n+1](n*k*r))* 
                     cos(n*(phi-k*z+phi0)), 
               B_r  =(2/(n*k))^(n-1)*b*(I[n-1](n*k*r)+I[n+1](n*k*r))* 
                     sin(n*(phi-k*z+phi0)), 
               B_z  =-2*(2/(n*k))^(n-1)*b*I[n](n*k*r)*cos(n*(phi-k*z+phi0)), 
             where I[n](x) is the modified Bessel function of the first kind
             of order [n].
             
             Note that this Element generates magnetic field only, and only
             within the cylinder defined by length and radius. So it has no
             solid associated with it, and is invisible.

             Named Arguments:
             radius        The radius of the field region (mm)
             length        The length of the field region (mm)
             n             Order of helical harmonic (i.e. n=1 for dipole)
             b             (n-1)-order derivative of the field at the center
                           (T/m^(n-1))
             lambda        Helix period along the Z axis (mm).
             phi0          The phase of the XY field at the entrance (rad).

help         provides interactive help.

             help with no arguments lists all commands. 'help command' gives
             more detailed help on that command. 'help *' gives detailed help
             for all commands. If the first argument is -exit the program will
             exit after printing the help.

idealsectorbend construct an ideal sector bending magnet.

             The field region is a sector with By specified. Unlike most
             Elements, the position of the idealsectorbend is the center of
             the front face of its field (aperture). angle>0 bends to the left
             around Y; angle<0 bends right. The only useful rotations are
             around the centerline Z. Should be followed immediately by a
             cornerarc. Note that -90<angle<90 degrees.

             Named Arguments (@=Tunable):
             angle         Angle of bend (degrees).
             fieldCenterRadius Center radius of field (mm).
             fieldInnerRadius Inner radius of field (mm).
             fieldOuterRadius Outer radius of field (mm).
             fieldHeight   Height of field (mm).
             ironInnerRadius Inner radius of iron (mm).
             ironOuterRadius Outer radius of iron (mm).
             ironHeight    Height of iron (mm).
             By            Magnetic field (Tesla). @
             fieldMaterial Material of field.
             fieldColor    Color of field.
             ironMaterial  Material of iron.
             ironColor     Color of iron.
             maxStep       The maximum stepsize in the element (mm)
             kill          Set nonzero to kill particles hitting the iron.

if           Conditional execution of command(s), and if/elseif/else/endif.

             Single-line format:
                 if $i==1 CMD1 CMD2 ...
             
             If the expression is true (nonzero), the commands are executed.
             The commands usually need to be quoted.
             
             Multi-line format:
                 if $i==1
                     CMD1 ...
                 elseif $i==2
                     CMD2 ...
                 else
                     CMD3 ...
                 endif
             
             The commands are executed in the usual way; elseif and else are
             optional, but endif is mandatory. Any number of elseif-s and
             commannds can be used. Do-s, for-s, and multi-line if-s can be
             nested in any manner.

include      includes a command file.

             include requires one argument, the file to include.

lilens       construct a simple Lithium lens.

             This element consists of a current-carrying cylinder and its
             field. The field exists only between the end planes of the
             cylinder, out to adial infinity.

             Named Arguments:
             radius        The radius of the current-carrying cylinder (5 mm)
             length        The length of the cylinder (100 mm).
             current       The current in the cylinder (100000 Amp).
             material      The material of the cylinder (Li).
             color         The color of the tube or cylinder (''=invisible)
             maxStep       The maximum stepsize in the element (mm).

list         provides interactive list of interesting internal tables.

             list with no arguments lists all lists except processes. 'list
             name' lists that specific one. 'list -exit name(s)' will exit
             after listing. List names are:
                 commands    all commands
                 materials   currently known materials
                 physics     all physics lists
                 particles   currently known particles
                 processes   currently known physics processes ***
             NOTE: the particles and processes lists are not populated until
             the physics list is selected (via the physics command). Different
             physics lists use different processes and particles.
             
             ***NOTE: listing processes will prevent any simulating, as will a
             non-empty particle list.

             Named Arguments:
             particle      Comma-separated list of particles for which details
                           will be printed

man          Alias for 'help'.


material     construct a new material.

             This is an interface to G4Material. This command is rarely
             required, because elements and most common materials are
             available via the NIST database. Any material available from the
             NIST database can simply be used -- if it is unknown then it will
             be automatically defined from the database. Uncommon materials or
             nonstandard densities must be defined with this command.
             
             The first argument to this command is the material name, which is
             always required; density is also required. The command to define
             an element (e.g. with non-standard density) is:
                 material H2 Z=1 A=1.01 density=0.000090
             A mixture or compound is a combination of known materials and/or
             elements; the command is:
                 material water H,0.1119 O,0.8881 density=1.0
             The numbers following the element names are their mass fractions
             (note that WATER is available from the NIST db). Either type of
             command can optionally have: pressure, temperature, state.
             
             With no arguments, this command prints the current material
             table. Note that 'G4_' is prepended to the names of most
             materials that are obtained from the NIST database; 'G4_Al' and
             'Al' refer to the same material (unless one was previously
             defined using this command).
             
             The following three arguments permit track filtering for all
             volumes made of this material:
               keep    A comma-separated list of particle names to keep.
               kill    A comma-separated list of particle names to kill.
               require An expression that must evaluate nonzero or the track
                       is killed.
             The require expression uses global coordinates and can use the
             followng track variables:
               x,y,z,Px,Py,Pz,t,PDGid,EventID,TrackID,ParentID,wt
             
             The following materials are known from the NIST database, and
             will be automatically created on first use:
             
             H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn
             Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag
             Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm
             Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa
             U Np Pu Am Cm Bk Cf A-150_TISSUE ACETONE ACETYLENE ADENINE
             ADIPOSE_TISSUE_ICRP AIR ALANINE ALUMINUM_OXIDE AMBER AMMONIA
             ANILINE ANTHRACENE B-100_BONE BAKELITE BARIUM_FLUORIDE
             BARIUM_SULFATE BENZENE BERYLLIUM_OXIDE BGO BLOOD_ICRP
             BONE_COMPACT_ICRU BONE_CORTICAL_ICRP BORON_CARBIDE BORON_OXIDE
             BRAIN_ICRP BUTANE N-BUTYL_ALCOHOL C-552 CADMIUM_TELLURIDE
             CADMIUM_TUNGSTATE CALCIUM_CARBONATE CALCIUM_FLUORIDE
             CALCIUM_OXIDE CALCIUM_SULFATE CALCIUM_TUNGSTATE CARBON_DIOXIDE
             CARBON_TETRACHLORIDE CELLULOSE_CELLOPHANE CELLULOSE_BUTYRATE
             CELLULOSE_NITRATE CERIC_SULFATE CESIUM_FLUORIDE CESIUM_IODIDE
             CHLOROBENZENE CHLOROFORM CONCRETE CYCLOHEXANE 1,2-DICHLOROBENZENE
             DICHLORODIETHYL_ETHER 1,2-DICHLOROETHANE DIETHYL_ETHER
             N,N-DIMETHYL_FORMAMIDE DIMETHYL_SULFOXIDE ETHANE ETHYL_ALCOHOL
             ETHYL_CELLULOSE ETHYLENE EYE_LENS_ICRP FERRIC_OXIDE FERROBORIDE
             FERROUS_OXIDE FERROUS_SULFATE FREON-12 FREON-12B2 FREON-13
             FREON-13B1 FREON-13I1 GADOLINIUM_OXYSULFIDE GALLIUM_ARSENIDE
             GEL_PHOTO_EMULSION Pyrex_Glass GLASS_LEAD GLASS_PLATE GLUCOSE
             GLUTAMINE GLYCEROL GUANINE GYPSUM N-HEPTANE N-HEXANE KAPTON
             LANTHANUM_OXYBROMIDE LANTHANUM_OXYSULFIDE LEAD_OXIDE
             LITHIUM_AMIDE LITHIUM_CARBONATE LITHIUM_FLUORIDE LITHIUM_HYDRIDE
             LITHIUM_IODIDE LITHIUM_OXIDE LITHIUM_TETRABORATE LUNG_ICRP M3_WAX
             MAGNESIUM_CARBONATE MAGNESIUM_FLUORIDE MAGNESIUM_OXIDE
             MAGNESIUM_TETRABORATE MERCURIC_IODIDE METHANE METHANOL MIX_D_WAX
             MS20_TISSUE MUSCLE_SKELETAL_ICRP MUSCLE_STRIATED_ICRU
             MUSCLE_WITH_SUCROSE MUSCLE_WITHOUT_SUCROSE NAPHTHALENE
             NITROBENZENE NITROUS_OXIDE NYLON-8062 NYLON-6-6 NYLON-6-10
             NYLON-11_RILSAN OCTANE PARAFFIN N-PENTANE PHOTO_EMULSION
             PLASTIC_SC_VINYLTOLUENE PLUTONIUM_DIOXIDE POLYACRYLONITRILE
             POLYCARBONATE POLYCHLOROSTYRENE POLYETHYLENE MYLAR PLEXIGLASS
             POLYOXYMETHYLENE POLYPROPYLENE POLYSTYRENE TEFLON
             POLYTRIFLUOROCHLOROETHYLENE POLYVINYL_ACETATE POLYVINYL_ALCOHOL
             POLYVINYL_BUTYRAL POLYVINYL_CHLORIDE POLYVINYLIDENE_CHLORIDE
             POLYVINYLIDENE_FLUORIDE POLYVINYL_PYRROLIDONE POTASSIUM_IODIDE
             POTASSIUM_OXIDE PROPANE lPROPANE N-PROPYL_ALCOHOL PYRIDINE
             RUBBER_BUTYL RUBBER_NATURAL RUBBER_NEOPRENE SILICON_DIOXIDE
             SILVER_BROMIDE SILVER_CHLORIDE SILVER_HALIDES SILVER_IODIDE
             SKIN_ICRP SODIUM_CARBONATE SODIUM_IODIDE SODIUM_MONOXIDE
             SODIUM_NITRATE STILBENE SUCROSE TERPHENYL TESTIS_ICRP
             TETRACHLOROETHYLENE THALLIUM_CHLORIDE TISSUE_SOFT_ICRP
             TISSUE_SOFT_ICRU-4 TISSUE-METHANE TISSUE-PROPANE TITANIUM_DIOXIDE
             TOLUENE TRICHLOROETHYLENE TRIETHYL_PHOSPHATE
             TUNGSTEN_HEXAFLUORIDE URANIUM_DICARBIDE URANIUM_MONOCARBIDE
             URANIUM_OXIDE UREA VALINE VITON WATER WATER_VAPOR XYLENE GRAPHITE
             lH2 lN2 lO2 lAr lKr lXe PbWO4 Galactic GRAPHITE_POROUS LUCITE
             BRASS BRONZE STAINLESS-STEEL CR39 OCTADECANOL KEVLAR DACRON
             NEOPRENE DNA_ADENINE DNA_GUANINE DNA_CYTOSINE DNA_THYMINE
             DNA_URACIL DNA_ADENOSINE DNA_GUANOSINE DNA_CYTIDINE DNA_URIDINE
             DNA_METHYLURIDINE DNA_MONOPHOSPHATE DNA_A DNA_G DNA_C DNA_U
             DNA_MU Stainless304 Stainless316 lHe
             
             Aliases: LHe=lHe Air=AIR, H2O=WATER, Vacuum=Galactic, LH2=lH2,
             Scintillator=POLYSTYRENE

             Named Arguments:
             a             Effective Atomic Weight of the material (g/mole)
             z             Effective Atomic Number of the material
             density       Density of the material (gm/cm^3)
             pressure      Pressure of the material (Atm)
             temperature   Temperature of the material (K)
             state         State of the material (g,l, or s)
             A             Synonym for a (g/mole)
             Z             Synonym for z
             keep          A comma-separated list of particle names to keep
                           (all others are killed; ignored if empty).
             kill          A comma-separated list of particle names to kill.
             require       An expression that must evaluate nonzero or the
                           track is killed.

movie        Generate movie NTuple.

             This command outputs a set of NTuples suitable for generating a
             movie.

             Named Arguments:
             coordinates   Coordinates: global, centerline, or reference
                           (default=r).

multipole    construct a generic multipole magnet.

             Multipole magnetic fields from dipole through dodecapole are
             implemented with a cylindrical field region and optional
             surrounding iron (ironLength=0 or ironRadius=0 omits it). All
             fields with positive strengths are oriented so in the X-Z plane
             for X>0 (beam left) the field is purely By. Negative strengths
             are allowed and reverse the field. The fringe field computation
             is not implemented.

             Named Arguments (#=cannot be changed in place cmd):
             fieldLength   The length of the field region (mm)
             ironLength    The length of the iron (mm)
             ironRadius    The outer radius of the iron (mm)
             apertureRadius The radius of the aperture (mm)
             ironMaterial  The material of the iron region.
             fieldMaterial The material of the field region.
             dipole        Strength of dipole (Tesla)
             quadrupole    Strength of quadrupole (T/m)
             sextupole     Strength of sextupole (T/m^2)
             octopole      Strength of octopole (T/m^3)
             decapole      Strength of decapole (T/m^4)
             dodecapole    Strength of dodecapole (T/m^5)
             ironColor     The color of the iron region.
             kill          Set nonzero to kill tracks hitting the iron.
             maxStep       The maximum stepsize in the element (mm)
             fringe        Fringe field computation, set to 0 to disable
             fringeFactor  Fringe depth factor (1.0).
             openAperture  Set nonzero to omit the aperture volume. #

muminuscapturefix Fixes up the G4MuonMinusCaptureAtRest process.

             This class adds extra neutrons to mu- capture. The neutrons are
             added with a Poisson distribution having a mean of
             neutronMeanNumber, and with an exponential distribution in
             kinetic energy:
                 (1/neutronMeanEnergy)*exp(-KE/neutronMeanEnergy)
             As the muonic atom cascades to its ground state it forgets the
             incident mu- direction, so the extra neutrons are generated
             isotropically in the lab.
             
             The extra neutrons are added only to those captures that are
             hadronic (i.e. not decay in orbit). The value of
             neutronMeanNumber should reflect this.
             
             The default values correspond to Aluminum.

             Named Arguments:
             neutronMeanNumber Mean mumber of extra neutrons per nuclear
                           capture (2.5).
             neutronMeanEnergy Mean energy of neutron spectrum (MeV)

newparticlentuple NTuple containing particle tracks when created.

             Note that initial beam particles are included, unless require is
             set to 'ParentID>0'.
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             format        The NTuple format (see above for list).
             filename      The filename for the NTuple.
             file          Synonym for filename.
             require       Expression which must be nonzero to include the
                           track (default=1) #
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).
             kill          Set nonzero to kill tracks after entering into
                           NTuple; does not kill track if require fails (0).

ntuple       Define an NTuple containing multiple detectors.

             An ntuple holds the data from multiple detectors in a single
             NTuple, with one row (entry) per event or per track. This permits
             the generation of plots that compare different detectors. Up to
             64 detectors can be used. While 'detector' is used in this
             description, any existing NTuple can be used, generated by any
             command, such as: virtualdetector, zntuple, beamlossntuple,
             timentuple, and newparticlentuple.
             
             There are two ways the detectors can be combined: the default
             method is to construct a new NTuple that combines the fields of
             all the detectors, each prepended with the detector name. If
             union=1 is given, then all detectors must have the same list of
             fields, and that list is used for this NTuple; any hit in any
             detector is simply copied to this NTuple -- this permits multiple
             detectors to be combined into a single NTuple (you may want
             noSingles=1 for the detectors). With union=1, the 'required',
             'veto' and 'minHit' arguments cannot be used.
             
             By default, an entry in this ntuple is made for each event
             satisfying the require, veto, and minHit conditions; if
             perTrack=1 then an entry is made for each track that satisfies
             the require, veto, and minHit conditions. Any hit in any detector
             matching the patterns in veto will prevent the event/track from
             being entered into the ntuple.
             
             If multiple hits occur in a given detector during the event or
             track, only the first one is kept in this ntuple. Detectors are
             specified by patterns identical to UNIX file-matching, so '*Det*'
             matches any detector with 'Det' anywhere in its name, etc. The
             'required' argument permits events to be omitted unless all of
             the matching detectors were hit at least once in the event or
             track. The patterns in 'required' are applied only to detectors
             in the ntuple, so a simple '*' only matches detectors named in
             the 'detectors' argument.
             
             If union is nonzero, the hits in each detector are entered into
             this NTuple as they occur; each hit in any detector is included
             as a row in this NTuple. All detectors must have the same fields,
             which are used for this NTuple.
             
             NOTE: the name of a detector is by default the concatenation of
             its ancestors' names before its own (except World), unless
             rename=NAME was used in its place command. The patterns are
             applied to the names of the virtualdetectors as they were placed
             (including rename), not the bare name of the virtualdetector
             command. If 'rename=det#' was used when placing the
             virtualdetector-s, you probably want a * to match the #, or list
             them individually (det1,det2,det3...).
             
             NOTE: This command does not work correctly in collective tracking
             mode, unless union=1.
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile

             Named Arguments:
             category      The category of the NTuple.
             detectors     A comma-separated list of detector patterns.
             required      A comma-separated list of required detector
                           patterns(default=*).
             veto          A comma-separated list of detector patterns, any
                           hit cancels entry into the NTuple (default='').
             format        NTuple format (see above for list).
             filename      Name of file.
             minHit        Minimum number of detectors hit (default 0).
             perTrack      Nonzero for an entry per track; 0 for an entry per
                           event (default 0).
             union         Set nonzero to perform a union of the detectors,
                           rather than combining them.
             require       Synonym for required.
             minHits       Synonym for minHit.
             file          Synonym for filename.

output       redirects stdout and stderr to a file

             output requires one argument, the new output file. Any output
             generated before this command will not appear in the file, so
             this command should come at the start of the input.file, preceded
             only by setting parameters. After the redirection, it will
             re-print the G4beamline version and the current parameter values
             to the file. The most common usage is to redirect output to a
             file named like the .root file, when that is determined by
             parameter values:
                 param -unset param1=1.0 param2=3.0
                 param histofile=$param1,$param2
                 output $histofile.out

param        Defines parameter values.

             Parameters are named strings used to parameterize the input file;
             a few are used for program control. Parameters are set by the
             param commend, and on the command line (all program arguments
             after the first are interpreted as name=value).
             
             'param name=value ...' defines parameters. If no arguments are
             present, all parameters are displayed. If the first argument is
             '-unset', this command will not overwrite parameters that are
             already set (e.g. from the command line - this permits the
             input.file to set defaults that can be overridden on the command
             line).
             
             Parameters are expanded only in the arguments of commands: 'cmd
             argname=$paramname [...]'; real-valued expressions for arguments
             can use $paramname as a value, as long as paramname contains a
             valid real expression.
             
             Parameters are most useful for setting global things like viewer
             and histoFile, or as parameters used in the input.file.
             
             When a parameter is used, if it has not been defined, it will be
             defined from the environment if possible; if it is not defined in
             the environment then this generates an error message.
             
             The values of parameters are strings, but if the value of a
             parameter is set to a valid real expression including at least
             one operator {+-*/^<>=()!~&%|?}, the parameter value will be set
             to the numerical value of the expression to 8 significant digits.
             
             NOTE: pre-defined Program control parameters (listed below) are
             defined before the command-line and are not affected by -unset.

Program control Parameters:
    Zcl                 Last centerline Z position used (updated continuously)
    deltaChord          Geant4 tracking parameter
    deltaIntersection   Geant4 tracking parameter
    deltaOneStep        Geant4 tracking parameter
    epsMax              Geant4 tracking parameter
    epsMin              Geant4 tracking parameter
    eventTimeLimit      CPU Time Limit (sec)
    histoFile           Default (Root) NTuple output filename
    histoUpdate         Output update interval (events)
    maxStep             Maximum physics step size (mm)
    minStep             Minimum step size (mm)
    steppingFormat      Format for printing steps
    steppingVerbose     Set nonzero to print each step
    viewer              Visualization driver selected (default=none)
    worldMaterial       Material of the World volume
    zTolerance          Tolerance for Z steps (mm)
steppingFormat is a space- or comma-separated list of items:
        EXT       toggle extended precision (3 more digits)
        TAG       print a '>' (useful to grep output)
        N         step number
        NSTEP     Synonym of N
        GLOBAL    X,Y,Z,T in global coords
        XYZT      Synonym of GLOBAL
        CL        X,Y,Z,dxdz,dydz in CL coords
        CLX       extended precision CL
        KE        kinetic energy
        STEP      step length
        STEPLEN   Synonym of STEP
        VOL       volume name
        VOLNAME   Synonym of VOL
        PROCESS   process name
        B         magnetic field
        E         electric field
        P         3-momentum
        MAT       material name
        ID        event ID, track ID, parent ID
        PART      particle name
        SEG       centerline coord segment number
        WT        weight
        POLAR     polarization
        NL        <newline>
        NEWLINE   Synonym of NL
        \n        Synonym of NL



particlecolor Set the colors for particle tracks.

             Arguments are of the form 'name=1,1,0', where name is the
             standard name of a particle, and 1,1,0 is the R,G,B value desired
             for its color ('' for invisible) The special names plus, minus,
             and neutral will set colors for unnamed particles of each charge.
             The name reference will apply to the reference track (defaults to
             invisible).

particlefilter Will kill particles from a list, or force particles to decay.

             A particlefilter will force the decay of certain particles when
             they enter the physical volume of the element. The list of
             affected particles is in the 'decay' argument, and the normal
             Decay process is disabled for them. In addition, the 'kill'
             argument is a list of particles to kill when they enter the
             element, and the 'keep' argument will kill all particles not
             named, if it is not empty.
             
             require is an expression invloving track parameters that will
             kill the track if it evaluates to zero (use a comparison
             operator). The variables available are:
                 x,y,z,t,Px,Py,Pz,Ptot,PDGid,EventID,TrackID,ParentID
             Units are mm, ns, MeV/c.
             
             If nWait > 1, particles will not be killed until they hit this
             element nwait times; this can be used to limit the number of
             revolutions around a ring. Decays are unaffected by nWait.
             referenceWait does the same for the reference particle The
             element can be either a cylinder or a box: set length and radius,
             or set length and width and height.

             Named Arguments (#=cannot be changed in place cmd):
             radius        The radius of the cylindrical particlefilter (mm).
             innerRadius   The inner radius of the cylindrical particlefilter
                           (0 mm, solid).
             height        The height of the rectangular particlefilter (mm).
             width         The width of the rectangular particlefilter (mm).
             length        The length of the particlefilter (mm).
             maxStep       The maximum stepsize in the element (mm).
             material      The material (default=parent's).
             color         The color of the particlefilter (white).
             decay         A comma-separated list of particle names to decay.
                           #
             kill          A comma-separated list of particle names to kill. #
             keep          A comma-separated list of particle names to keep. #
             nWait         Intersection # to do the kill (default = 1)
             referenceWait Intersection # for reference (default = 1)
             require       Expression which will kill the track if zero. #
             steppingVerbose Nonzero to display track kills.
             decays        Synonym for decay. #

particlesource Interface to the Geant4 General Particle Source.

             The Geant4 General Particle Source (GPS) is a very flexible and
             general way to generate events. It is controlled by Geant4
             commands which should follow this command in the input.file. If
             you have a macro, you can include it using either the G4beamline
             'include' command or the Geant4 command '/control/execute'. Note
             that G4beamline only recognizes Geant4 commands when the '/' is
             in column 1.
             
             Due to the design of the GPS, only one particlesource command can
             be used, but the GPS permits multiple sources to be combined.
             
             NOTE: the Geant4 General Particle Source inherently uses global
             coordinates, so this is most useful at the beginning of a
             beamline when global=centerline. Note also that it is very easy
             to generate a beam headed in the -z direction (this command will
             rotate to the +z direction: '/gps/ang/rot1 -1 0 0').
             
             To use this, see the User Manual for the GPS at
             http://reat.space.qinetiq.com/gps

             Named Arguments:
             nEvents       Number of events to process (default=1), set to
                           lastEvent-firstEvent+1 if both are set.
             firstEvent    First event # to process (default is the next
                           sequential eventID, 1 if none)
             lastEvent     Last (highest) event # to process
             secondaryTrackID The next TrackID for secondaries (1001).

physics      Defines the physics processes and controls them.

             Exactly one physics command must be present. This command
             implements the geant4 physics lists of physics processes. The
             command is 'physics QGSP' for the QGSP list, and similarly for
             the other lists. With no argument it prints the available physics
             lists.
             
             Note that stochastic processes are always disabled while tracking
             the tune and reference particles. The only non-stochastic
             processes are Transportation and ionization energy loss (with
             fluctuations disabled).
             
             For muon beam studies you may want to disable the Decay process.
             
             spinTracking=1 will enable tracking the spins of e+, e-, mu+, and
             mu- (only), including pion decays to polarized muons, polarized
             muon decays, and the force from the particle's magnetic moment.
             The rare pion decay to e nu is included, but the e are
             unpolarized. The muon decays give the correct distribution for
             the electron, but only approximate distributions for the
             neutrinos, and all are unpolarized.
             
             NOTE: this command defines the particles used throughout the
             simulation, so this command must come before others that use
             particle names.
             
             NOTE: the rare decay mode for pi+/pi- to e nu is always added,
             with branching ratio 1.230E-4.
             
             The default all-around physics list for HEP is called
             'QGSP_BERT'.
             
             NOTE: At present there is a bug in Geant4 tracking and the
             magnetic moment is not used. For >~ 1 GeV muons and practical
             fields this is a very small error.

             Named Arguments:
             disable       Comma-separated list of processes to disable (e.g.
                           'Decay,msc').
             inactivate    Synonym of disable.
             deactivate    Synonym of disable.
             doStochastics Set to zero to disable all stochastic processes.
             minRangeCut   Minimum range cut for particle production (1 mm)
             list          Nonzero to list the processes (later in output).
             gammaToMuPair Nonzero to add gamma->mu+mu- (0).
             spinTracking  Nonzero to track particle spins (0).
             synchrotronRadiation Nonzero to add synchrotron radiation to the
                           physics list for e- and e+.
             synchrotronRadiationMuon Nonzero to add synchrotron radiation to
                           the physics list for mu- and mu+ NOTE: This is
                           experimental, and may not work correctly.

             ----- PHYSICS LISTS -----

             Further guidance in selecting physics lists is available at:
http://geant4.web.cern.ch/geant4/support/physicsLists/referencePL/index.shtml

             The default all-around physics list for HEP is called 'QGSP_BERT'.

             LHEP uses exclusively parameterized modeling.
             FTF lists use the FRITIOF description of string excitation
                  and fragmentation.
             QGSP lists use the quark gluon string model
             QGSC are as QGSP except applying CHIPS modeling for the nuclear
                  de-excitation.
             _BERT uses Geant4 Bertini cascade below ~ 10 GeV.
             _BIC uses Geant4 Binary cascade below ~ 10 GeV.
             _EMV suffix indicates a faster but less accurate EM modeling.
             _EMX suffix indicates the low-energy EM processes.
             _HP suffix uses the data driven high precision neutron package
                  (thermal to 20 MeV).
             _NQE suffix indicates a list for comparison with earlier release.

             List of available physics lists:
             CHIPS  No synopsis available.
             FTFP_BERT For calorimetry. The FTF model is based on the FRITIOF
                    description of string excitation and fragmentation. Uses
                    Geant4 Bertini cascade for primary protons, neutrons,
                    pions and Kaons below ~10GeV.
             FTFP_BERT_TRV A variant of QGSP_BERT where the Geant4 Bertini
                    cascade is only used for particles below ~5.5 GeV.
             FTF_BIC No synopsis available.
             LBE    For low background experiments (e.g. underground)
             LHEP   For calorimetry -- is the fastest, when it comes to CPU.
                    It uses the LEP and HEP parametrized models for inelastic
                    scattering. The modeling parametrizes the final states
                    individual inelastic reactions, so you will not see
                    resonances, and the detailed secondary angular
                    distributions for O(100MeV) reactions may not be described
                    perfectly. The average quantities will be well described.
             QBBC   No synopsis available.
             QGSC_BERT For calorimetry and high energy physics trackers -- is
                    as QGSP for the initial reaction, but uses chiral
                    invariant phase-space decay (multi-quasmon fragmentation)
                    to model the behavior of the system's fragmentation. Uses
                    Geant4 Bertini cascade for nucleon and pion induced
                    reactions.
             QGSP   For calorimetry and high energy physics trackers and
                    high-energy and medium-energy production targets -- uses
                    theory driven modeling for the reactions of energetic
                    pions, kaons, and nucleons. It employs quark gluon string
                    model for the 'punch-through' interactions of the
                    projectile with a nucleus, the string excitation
                    cross-sections being calculated in quasi-eikonal
                    approximation. A pre-equilibrium decay model with an
                    extensive evaporation phase to model the behavior of the
                    nucleus 'after the punch'. It uses current best pion
                    cross-section.
             QGSP_BERT Like QGSP, but using Geant4 Bertini cascade for primary
                    protons, neutrons, pions and Kaons below ~10GeV. In
                    comparison to experimental data we find improved agreement
                    to data compared to QGSP which uses the low energy
                    parameterised (LEP) model for all particles at these
                    energies. The Bertini model produces more secondary
                    neutrons and protons than the LEP model, yielding a better
                    agreement to experimental data.
             QGSP_BERT_CHIPS No synopsis available.
             QGSP_BERT_HP Like QGSP_BERT but with _HP modeling for neutrons.
             QGSP_BIC Like QGSP, but using Geant4 Binary cascade for primary
                    protons and neutrons with energies below ~10GeV, thus
                    replacing the use of the LEP model for protons and
                    neutrons In comparison to teh LEP model, Binary cascade
                    better describes production of secondary particles
                    produced in interactions of protons and neutrons with
                    nuclei.
             QGSP_BIC_HP Like QGSP_BIC but with _HP modeling for neutrons.
             QGSP_FTFP_BERT No synopsis available.
             QGS_BIC No synopsis available.
             QGSP_INCLXX No synopsis available.
             QGSP_INCL_ABLA No synopsis available.
             Shielding No synopsis available.

pillbox      Defines a pillbox RF cavity

             A Pillbox RF cavity is the basic RF element used to construct a
             linac. The phaseAcc parameter sets the phase of the tune particle
             at the center of the cavity, and the timing offset of the cavity
             is determined from that the first time that the Tune particle is
             tracked through the cavity. Zero degrees is the rising
             zero-crossing of the Ez field. If timeOffset is specified, it is
             used rather than setting it from the Tune particle.
             
             The Pipe, walls, and collars are always made of copper. Pipe,
             wall, collar, win1, and win2 can be omitted by setting their
             thickness to 0. Common usage is to set the collar values so by
             placing multiple pillboxes sequentially the collars form a beam
             pipe between them.
             
             Note that section 4.4 of the User's Guide has a dimensioned
             drawing of a pillbox.

             Named Arguments (#=cannot be changed in place cmd) (@=Tunable):
             maxGradient   The peak gradient of the cavity (MV/m) @
             color         The color of the cavity
             frequency     The frequency of the cavity (GHz) #
             innerLength   The inside length of the cavity (mm) #
             innerRadius   The inside radius of the cavity (mm) #
             pipeThick     The thickness of the pipe wall (mm) #
             wallThick     The thickness of the cavity walls (mm) #
             irisRadius    The radius of the iris (mm) #
             collarRadialThick The radial thickness of the collar (mm) #
             collarThick   The thickness of the collar along z(mm) #
             win1Thick     The thickness of the central portion of the
                           windows; zero for no window (mm) #
             win1OuterRadius The radius of the central portion of the windows
                           (mm) #
             win2Thick     The thickness of the outer portion of the windows;
                           zero for no window (mm) #
             winMat        The material of the windows
             phaseAcc      The reference phase of the cavity (degrees)
             skinDepth     The skin depth (mm) #
             timingTolerance Tolerance for timing tuning (ns)
             maxStep       The maximum stepsize in the element (mm).
             cavityMaterial Material of cavity volume (Vacuum).
             timeOffset    Time offset for cavity (default: tuned by tune
                           particle) (ns).
             timeIncrement Increment to timeOffset, applied AFTER tuning.
                           (ns).
             fieldMapFile  Filename for BLFieldMap (pillbox if null). #
             kill          Set nonzero to kill tracks that hit the pipe,
                           walls, or collars (0).

place        places an element into the current group (or world).

             Every element can be placed multiple times into the beamline. For
             most elements the geometrical centerpoint is placed; for polycone
             the local x=y=z=0 point is placed. If front is nonzero then the
             front of the element is placed. If z is specified, then the
             element is placed at that z position relative to the center of
             the enclosing group. If z is not specified, then the element is
             placed immediately downstream (higher z) of the previous element
             in the group, or at the upstream edge of the group if this is the
             first element in the group.
             
             The 'rename' argument can be used to change the name of the
             element (applies to traces and other uses of object names, such
             as the NTuple name of a virtualdetector). When placing into a
             group or other object, the rename argument should normally begin
             with '+' to include the parent's name; otherwise multiple
             placements of the parent will generate multiple objects with
             identical names -- that should be avoided for output objects like
             virtualdetector. Without a rename argument, the parent's name is
             included automatically.
             
             When multiple copies are placed, z refers to the first, and the
             rest are placed sequentially along z. When placing an element
             into the World group, Centerline coordinates are used unless
             coordinates=global is present. When centerline coordinates are
             used, the parameter 'Zcl' is set to the highest Z value used;
             this is normally the Z value for the front of the next element
             when placed sequentially (i.e. with no z value given).
             
             Rotations: The rotation parameter can be used to rotate this
             element relative to the enclosing group. The object is rotated,
             not the axes. Rotations are specified as a comma-separated list
             of axes and angles (in degrees): rotate=Z90,X45 rotates first by
             90 degrees around Z and then by 45 degrees around X. The axes are
             the local X,Y,Z coordinate axes of the enclosing group
             (centerline or global coordinate axes for the World group);
             groups can be rotated when placed, and are rotated as a rigid
             unit (including children).
             
             If parent=name is present, then the name must be an element that
             accepts children, and it is used as the enclosing group; in this
             case the size of the group is implied by the size of the parent
             element, and z must be given (defaults to 0). Note that a given
             element cannot be the parent of any other element once it has
             been placed, so you must place children into their parent before
             placing their parent.
             
             If the special element 'OFFSET' is given, x, y, and z specify
             offsets for every following place command into the current group
             (incl. World), that gives a z position.

             Named Arguments:
             z             Z position of element's center relative to the
                           center of the enclosing group (mm).
             x             X position of element's center [default=0] (mm)
             y             Y position of element's center [default=0] (mm)
             parent        Parent element name (must accept children).
             rename        Name to use for this placement; '#' will be
                           substituted by the number of placements. If the
                           value begins with '+', it is replaced with the
                           parent's name.
             copies        Number of copies (placed sequentially along z).
             front         Nonzero to specify z for the front, not the center.
             rotation      Rotation of this object.
             coordinates   Coordinates: global or centerline (default=c).

polycone     construct a polycone with axis along z

             This is a direct interface to G4Polycone. For a solid polycone,
             omit innerRadius and it will be filled with zeroes. The number of
             entries in z, innerRadius, and outerRadius must be the same. Note
             that a polycone is placed at its z=0,r=0 point, which need not be
             its geometric center.

             Named Arguments (#=cannot be changed in place cmd):
             innerRadius   Comma-separated list of inner radii (mm) #
             outerRadius   Comma-separated list of outer radii (mm) #
             z             Comma-separated list of z positions (mm) #
             initialPhi    The initial Phi value (deg; 0 for all)
             finalPhi      The final Phi value (deg; 360 for all)
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the polycone
             color         The color of the polycone (''=invisible)
             kill          Set nonzero to kill every track that enters.

printf       prints track variables and expressions

             This is an interface to the C printf() function. The first
             positional argument is the format, and the following positional
             arguments are double expressions printed with the % fields in the
             format. Up to 16 expressions can be printed. The print is
             performed only if the 'required' expression is nonzero, as each
             track reaches one of the Z positions in the 'z' argument
             (centerline coordinates). Multiple printf commands with the same
             'file' will be combined into the file as tracks reach any of
             their Z positions. More than 16 expressions can be broken into
             multiple printf-s with noNewline=1 for all but the last.
             
             The following variables can be used in expressions:
                x,y,z,t,Px,Py,Pz
                PDGid,EventID,TrackID,ParentId,Weight
                Bx,By,Bz, Ex,Ey,Ez
                tune (nonzero only for the Tune particle)
                reference (nonzero only for the Reference particle)
                beam (nonzero for any Beam particle)
             
             Each value in z and zloop can be an expression using double
             constants and the usual C operators and functions.
             
             Example:
              printf z=0 'Momentum is %.3f GeV/c' sqrt(Px*Px+Py*Py+Pz*Pz)/1000
             
             NOTE: if format begins 'Ptot=...' the parsing will think it is a
             named argument; put a space before the '=' to avoid that error.

             Named Arguments:
             z             Comma-separated list of Z positions for printing
                           (mm)
             zloop         Loop in z, first:last:incr (mm)
             require       logical expression for cutting (default=true)
             file          Output filename (default=stdout)
             filename      Synonym for file
             noNewline     set nonzero to omit final newline.
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).

printfield   Prints E or B fields, or writes FieldMap file.

             Prints the value of the electromagnetic field components. For
             type=print, prints one component of the field in a 2-d table. Any
             coordinate plane can be printed (XY ... ZT). For type=grid or
             type=cylinder, writes a file in fieldmap format. Global
             coordinates are used. Units are Tesla for B and MV/meter for E.
             
             NOTE: This command cannot handle time dependency in the output
             BLFieldMap file, but can in the printout.
             
             Note: if you want to plot field vs position or time, the
             'fieldntuple' command is probably better, as it is not limited to
             the 2-d paper, is easier to use, and lets you use existing NTuple
             plotting tools. If you just want to test a few points, the
             'probefield' command lets you do that interactively.

             Named Arguments:
             type          print, grid, or cylinder.
             exit          Set nonzero to exit after printing field
             Arguments for type=print:
             field         The field to print (Bx,By,Bz,Ex,Ey,Ez,Btot,Etot).
             layout        Layout (RowCol) - 2 chars 'AB' each of {xyzt}.
             x             The starting value of x (mm).
             y             The starting value of y (mm).
             z             The starting value of z (mm).
             t             The starting value of time (ns).
             drow          The incr between points in each row (mm|ns).
             dcol          The incr between points in each column (mm|ns).
             nrow          The number of rows.
             ncol          The number of columns.
             Arguments for type=grid:
             file          Filename to write fieldmap to.
             comment       Comment for fieldmap.
             X0            Initial value of X (mm, default=0).
             Y0            Initial value of Y (mm, default=0).
             Z0            Initial value of Z (mm, default=0).
             nX            Number of points in X.
             nY            Number of points in Y.
             nZ            Number of points in Z.
             dX            Interval in X between points (mm).
             dY            Interval in Y between points (mm).
             dZ            Interval in Z between points (mm).
             Arguments for type=cylinder:
             file          Filename to write fieldmap to.
             comment       Comment for fieldmap.
             Z0            Initial value of Z (mm, default=0).
             nR            Number of points in R.
             dR            Interval in R between points (mm).
             nZ            Number of points in Z.
             dZ            Interval in Z between points (mm).

probefield   Prints B and E fields at specified points.

             Intended primarily for debugging. Prints Bx,By,Bz in Tesla, and
             Ex,Ey,Ez in MegaVolts/meter. Each input line is x,y,z,t separated
             by spaces or commas; omitted values are set to 0.0.
             
             Field Values are printed after the reference particle is tracked.
             Only global coordinates are used.
             
             Positional arguments are used as input lines before reading the
             file.

             Named Arguments:
             file          Filename for reading list of points (- = stdin)
             outputFile    Filename for output (- = stdout)
             exit          Set nonzero to exit after printing field

profile      write beam profile information to a file

             This command accumulates the moments of the track distributions
             during the run, and at the end of run prints the mean, sigma,
             emittance, alpha, and beta (Twiss parameters) for the tracks.
             Each z position generates a line in the output file.
             
             Each value in z and zloop can be an expression using double
             constants and the usual C operators and functions.

             Named Arguments:
             z             Comma-separated list of Z positions for profiling
                           (mm)
             zloop         Loop in z, first:last:incr (mm)
             require       logical expression for cutting (default=true)
             particle      Name of particle to profile (default=mu+)
             file          Output filename (default=stdout)
             filename      Synonym for file
             coordinates   Coordinates: centerline or reference (default=c).

randomseed   control pseudo random number generator seeds

             This randomseed command controls the pseudo random number
             generator seed at the start of each event. The unnamed argument
             can be any of (case insensitive):
                EventNumber
                None
                Time
                Set 12345
                Now 12345
             EventNumber is the default and permits events to be re-run; None
             does not re-seed the PRNG at each event, and Time is like None
             after seeding with the time of day in microseconds; Set (Now)
             seeds the generator immediately with the value of the second
             argument (a long), and then acts like None.

reference    Define a reference particle.

             The reference particle is nominally headed in the +Z direction.
             Multiple reference particles can be defined, at different
             positions, momenta, particle types, etc. All coordinates are
             centerline coordinates.
             
             If desired, the referenceMomentum will be tuned to a specific
             value at a later z position in the beamline by giving values for
             tuneZ, and tuneMomentum; tolerance can be set if desired.
             
             Normally used in conjunction with a 'beam' command.

             Named Arguments:
             particle      Reference particle name
             beamX         Reference location in X (mm)
             beamY         Reference location in Y (mm)
             beamZ         Reference location in Z (mm)
             beamT         Reference time (ns)
             rotation      Rotation of the beam
             referenceMomentum Reference particle momentum (MeV/c)
             beamXp        Reference particle Xp (radians)
             beamYp        Reference particle Yp (radians)
             meanMomentum  Synonymn for referenceMomentum
             meanXp        Synonym for beamXp.
             meanYp        Synonym for beamYp.
             tuneZ         Z position for momentum tuning.
             tuneMomentum  Desired momentum for momentum tuning.
             tolerance     tolerance for momentum tuning (0.001 MeV/c).
             noEfield      Set nonzero to make this Tune and Reference
                           particle not respond to E fields (ICOOL style)
             noEloss       Set nonzero to make this Tune and Reference
                           particle not respond to ionization energy loss
                           (ICOOL style)

reweightprocess modify the cross-section of a physics process.

             This command will modify the cross-section of a physics process,
             modifying the track weights so that weighted histograms give the
             same statistical result as if the command were not used. Used
             properly, this can greatly reduce the variance of the result.
             
             Care should be taken to ensure that all regions that should be
             sampled actually are sampled. For instance, if ratio>1 the
             interaction length will be reduced, and deep inside an absorber
             there may be no sampling because no simulated tracks ever get
             there, even though real tracks will. If ratio<1 then the upstream
             regions of absorbers will be under sampled; this is usually OK,
             as the desired result is to increase the sampling deep inside the
             absorber.
             
             For ratio>>1 this command can be used to examine rare processes.
             This can induce multiple rare interactions in an event when
             normally none would be expected; the weights will still correctly
             correspond to the real interaction, even though the event
             topologies don't.
             
             This command cannot reweight any continuous process (e.g.
             multiple scattering, ionization energy loss, etc.) -- it will
             issue a fatal exception if applied to such a process.
             
             This command should not be applied to other processes that
             re-weight tracks (e.g. the neutrino command). Indeed it probably
             won't give the correct weights if any such process applies to the
             particle (except for itself, it cannot determine the unmodified
             interaction length of such procsses, which is needed to compute
             the weight).
             
             The re-weighting applies to both PostStep and AtRest processes,
             but some AtRest processes do not work with this re-weighting; for
             instance, Decay works properly in PostStep for a moving particle,
             but not for a stopped one AtRest. This is related to the Geant4
             limitation that exactly one process be active AtRest, and exactly
             one step be taken.
             
             Be sure to test your use of this commnd for a simple physical
             situation before believing its results.

             Named Arguments:
             particle      Comma-separated list of particle patterns ('' =>
                           all).
             process       Comma-separated list of process patterns.
             ratio         Ratio of artificial to real cross-section.

rfdevice     Defines an rfdevice (RF cavity)

             An rfdevice (RF cavity) is the basic RF element used to construct
             a linac. The G4beamline convention is that 0degRF is the positive
             going zero crossing of the electric field, so generally
             phaseAcc=90 (degRF) is on-crest.
             
             The timeOffset parameter, if set, fixes the overall global
             absolute timing of the cavity relative to time=0 of the
             simulation. If unspecified, 0degRF is determined via the
             timingMethod setting. The default, timingMethod=atZlocal, defines
             0degRF such that the test particle will arrive at the timingAtZ=#
             location then.
             
             For longitudinal cavities, timingMethod=maxEnergyGain emulates
             how most cavities in linacs have their overall timing determined;
             while maxX would be appropriate for a horizontal transverse
             deflecting cavity.
             
             Independent of how 0degRF is found, exactly two of the set of
             maxGradient, phaseAcc, and one fixed output quantity
             (fixMomentum, fixEnergyGain, fixTransitTime, fixXdeflection, or
             fixYdeflection) must be specified to deterimine the final
             rfdevice timing. For example, with maxGradient and phaseAcc set,
             the energy gain would be determined, while if maxGradient and
             fixEnergyGain were set, the phaseAcc would be determined.
             
             The pipe, walls, and collars are made of copper by default. Pipe,
             wall, collar, win1, and win2 may be omitted by setting their
             thickness to 0. Common usage is to set the collar values such
             that, by placing multiple rfdevices sequentially, the collars
             form a beam pipe between them.
             
             Note that section 4.4 of the User's Guide has a dimensioned
             drawing of a pillbox. Due to the presence of an (usually)
             invisible timing volume, care must be taken when placing objects
             within an rfdevice.
             
             See the User's Guide for details on how to use this complex
             element.

             Named Arguments (#=cannot be changed in place cmd) (@=Tunable):
             maxGradient   The peak gradient of the cavity (MV/m) @
             color         The color of the cavity
             frequency     The frequency of the cavity (GHz) #
             innerLength   The inside length of the cavity (mm) #
             innerRadius   The inside radius of the cavity (mm) #
             pipeThick     The thickness of the pipe wall (mm) #
             wallThick     The thickness of the cavity walls (mm) #
             wallMat       The material of all the walls [Cu]
             irisRadius    The radius of the iris (mm) #
             collarRadialThick The radial thickness of the collar (mm) #
             collarThick   The thickness of the collar along z(mm) #
             win1Thick     The thickness of the central portion of the
                           windows; zero for no window (mm) #
             win1OuterRadius The radius of the central portion of the windows
                           (mm) #
             win2Thick     The thickness of the outer portion of the windows;
                           zero for no window (mm) #
             winMat        The material of the windows [Be].
             phaseAcc      The reference phase of the cavity (degrees).
             skinDepth     The skin depth (mm). #
             timingTolerance Tolerance for timing tuning (ns)
             maxStep       The maximum stepsize in the element (mm).
             cavityMaterial Material of cavity volume [Vacuum].
             timeOffset    Time offset for cavity [set via timingMethod] (ns).
                           @
             timeIncrement Increment to timeOffset, applied AFTER tuning.
                           (ns).
             timingMethod  Method for determining the nominal timeOffset {atZ,
                           maxE, noE, minE, maxT, nomT, minT, maxX, noX, minX,
                           maxY, noY, minY}.
             timingAtZ     Local Z location for timing (mm).
             fixMomentum   Specify total output momentum (MeV/c).
             fixEnergyGain Specify energy gain (MeV).
             fixTransitTime Specify transit time (ns).
             fixXdeflection Specify local output XZ angle (deg).
             fixYdeflection Specify local output YZ angle (deg).
             fixTolerance  Specify allowable error on fixed settings [1.e-3].
             verbose       Set nonzero to show timing volume and print info
                           messages [1].
             fieldMapFile  Filename for BLFieldMap (pillbox if null). #
             kill          Set nonzero to kill tracks that hit the pipe,
                           walls, or collars [0].

setdecay     Set lifetime, decay channels, and branching ratios for a particle's decay.

             The particle is specified by name as the first positional
             argument.
             
             The lifetime of the particle can be set, unless it is a
             short-lived particle (for which lifetime is fixed at 0 -- these
             are particles like quarks, Zs, and Ws). Units are ns.
             
             Decay channels are specified 'daughter1,daughter2=BR', where the
             daughter names are separated by commas, and the branching ratio
             is a value between 0 and 1 (inclusive); the order of daughters
             does not matter. The sum of all BRs must be 1.0. It is best to
             use existing channels for the particle, because the code for the
             decay distribution is retained; new decay channels are given a
             default phase-space distribution, which is probably valid only
             for a 2-body decay of a spin 0 particle. New channels are limited
             to 4 daughters. Note that all desired decay channels must be
             listed.
             
             Example to force fast decay (0.1 ns) of pi+ to a positron:
                 setdecay pi+ lifetime=0.1 e+,nu_e=1.0

showmaterial Set the colors for selected materials.

             Arguments are of the form 'name=1,1,0', where name is the name of
             a material, and 1,1,0 is the R,G,B value desired for its color
             ('' for invisible) Set hideOthers=1 to make all other materials
             invisible. BEWARE: 'Vacuum' and 'vacuum' are different materials,
             as are 'Iron' and 'Fe'.

solenoid     defines a solenoid (a coil and current)

             A solenoid is a coil and a current. If alternate is nonzero, then
             each placement of the solenoid (or an enclosing group) will flip
             the sign of current.

             Named Arguments (#=cannot be changed in place cmd):
             coilName      The name of the coil (must exist) #
             current       The current density in the conductor (Amp/mm^2)
             color         The color of the solenoid (''=invisible).
             alternate     Set nonzero to alternate sign each placement.
             kill          Set nonzero to kill all tracks that hit the coil.
             coil          Synonym for coilName. #

spacecharge  Beam-frame Green's function space charge computation

             This is a space charge computation for bunched beams. It uses a
             grid in the beam frame to solve Poisson's equation via a Green's
             function with infinite boundary conditions; the E field is
             boosted back to the lab frame E and B for tracking.
             
             Macro-particles are used to enable the simulation of larger
             bunches than can be feasibly simulated as individual particles;
             the macro-particles have zero radius, but are pro-rated into the
             nearest eight grid points when placed into the grid. This
             computation can handle up to about a million macro-particles, but
             100,000 is more sensible for all but the simplest physical
             situations.
             
             The bunch is created from the beam tracks before tracking begins.
             There is one bunch for each reference particle. Particles in the
             bunch must be the same particle as the reference, must initially
             be within {dx,dy,dz} of the reference particle, and when boosted
             to the reference particle's rest frame must initially have beta <
             maxBeta.
             
             After boosting the particles to the beam frame, they are placed
             into the grid, pro-rating to the eight nearest grid points. The
             grid is dynamically re-sized to keep the 99th percentile of the
             particles between 0.5 and 0.67 of the grid size. This maintains a
             reasonable balance between resolution of grid points within the
             bunch and covering all of the particles. Particles located at
             >85% of the grid size do not contribute to the field computation,
             but are tracked using the field of the rest of the bunch (and
             other bunches).
             
             The grid has {nx,ny,nz} points; there is a small computational
             advantage to using powers of 2, but any values >1 can be used.
             For efficiency, the convolution of the Green's function with the
             charge grid is performed using FFTs; the grid is doubled in each
             dimension with the proper symmetry applied to the Green's
             function, so the cyclical convolution of the FFTs gives the
             proper potential with infinite boundary conditions.
             
             Outside the grid an approximation is used. An approximation grid
             is constructed, with the same size of the Poisson grid, but using
             {nxApprox,nyApprox,nzApprox} points. Particles are placed into
             this approximation grid, and the mean position is kept as well as
             the charge. Approximation grid points with less than 1% of the
             total charge are consolidated with their inner neighbors. The
             non-zero approximation grid points are treated as point charges
             when computing the potential outside the grid. For reasonably
             Gaussian bunches, {7,7,7} are reasonable values for the
             approximation grid sizes.
             
             The E field in the beam frame is computed via the derivatives of
             the linear interpolating function using the eight nearest grid
             points, and is boosted back to the lab frame E and B for tracking
             by the usual Geant4 routines.
             
             Bunch particles that get destroyed cease contributing to the
             bunch. As the bunch particles are selected during start-up, no
             additional particles are ever added to a bunch. This algorithm
             handles multiple bunches of any particle types.
             
             NOTE: For now, the reference MUST be parallel to the Z axis.

             Named Arguments:
             deltaT        Time step (ns).
             charge        Charge of macro particles (times particle charge).
             nx            Number of grid points in x (65).
             ny            Number of grid points in y (65).
             nz            Number of grid points in z (65).
             dx            Max distance of particle to reference in x (mm)
             dy            Max distance of particle to reference in y (mm)
             dz            Max distance of particle to reference in z (mm)
             nxApprox      # bins in x in approximation (7).
             nyApprox      # bins in y in approximation (7).
             nzApprox      # bins in z in approximation (7).
             maxBeta       Max beta (v/c) of particle in beam frame (0.1).
             verbose       Non-zero for verbose prints (0).
             ignoreFieldWhenTracking For testing only (0).
             useApproximationOnly For testing only (0).
             fixedGrid     Nonzero prevents re-sizing the grid (0).
             percentile    Percentile of charge distribution used for grid
                           sizing (99).
             minActive     Minimum # active tracks in bunch; if < 0 is % of
                           initial bunch size (-95).

spacechargelw Lienard-Wiechert space charge computation

             This is a space charge computation that uses macro-particles to
             simulate more particles than is feasible to track individually.
             Each macro-particle is tracked as a single particle, but its
             charge is multiplied by the macro-particle charge when computing
             the field. The radius of the macro-particle is used to avoid the
             singularity from a point charge; outside the radius the
             macro-particle is treated as a point charge; inside the radius
             the point-charge field is multiplied by (r/radius)^K (radius and
             K are parameters).
             
             The trajectory of every particle is kept, and when computing the
             field at a point, the intersection of the point's past lightcone
             with the trajectory is used to determine the field from the
             macro-particle; there is a loop over all particles except the one
             currently being tracked. This computation scales as N^2, where N
             is the number of macro-particles; that makes it computationally
             infeasible for more than a few hundred macro-particles. But for
             the particles used, it is correct to within the following
             approximations: a) using macro-particles, b) linearly
             interpolating between steps, c) omitting the radiation term in
             the L-W potential.
             
             The fields are computed using eq. 63.8-9 (p 162) of Landau and
             Lifshitz, _Classical_Theory_of_Fields_, ignoring the radiation
             term. The computed fields are used in the usual Geant4 tracking.
             Particle creation and destruction are handled properly.
             
             This algorithm is primarily intended to test other space charge
             algorithms.

             Named Arguments:
             deltaT        Time step (ns).
             radius        Radius of macro-particles (mm).
             charge        Charge of macro-particles (times particle charge).
             trackTwice    0=linear extrapolation, 1=track (0)
             verbose       Non-zero for verbose prints (0).
             K             Exponent for macro-particle density (1).
             ignoreFieldWhenTracking For testing only (0).

sphere       construct a sphere (or section of one)

             This is a direct interface to G4Sphere.

             Named Arguments:
             innerRadius   The inside radius of the sphere (mm)
             outerRadius   The outer radius of the sphere (mm)
             initialPhi    The initial Phi value (deg; 0 for all)
             finalPhi      The final Phi value (deg; 360 for all)
             initialTheta  The initialTheta of the sphere (deg, 0 for all)
             finalTheta    The finalTheta of the sphere (deg, 180 for all)
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the sphere
             color         The color of the sphere (''=invisible)
             kill          Set nonzero to kill every track that enters.

start        Define the initial start of centerline coordinates.

             If used, this command must come before any other command that
             puts an element into the world or affects the centerline
             coordinates (place, beam, corner, cornerarc, and reference
             commands). This command may not always be needed, but it is
             needed to eliminate the ambiguities in the global to centerline
             coordinate transform, and when simulating a ring to ensure that
             sensible values of the centerline coordinates are used.
             
             Note that the radiusCut is important to reduce or eliminate
             ambiguities in the global to centerline coordinate transform. It
             can also be used to 'shield' the beamline to prevent particles
             from taking unusual paths around the outside of beamline
             elements.

             Named Arguments:
             x             The global x position of the start.
             y             The global y position of the start.
             z             The global z position of the start.
             initialZ      The initial centerline z value.
             rotation      The initial rotation of the centerline.
             radiusCut     The radius cut for the initial segment (mm).
             ring          Set nonzero to indicate a ring is present.

test         test random number seeds.

             Test

timentuple   Construct an NTuple of tracks at a specified time.

             A time NTuple generates an NTuple of every track at a specified
             global time. It uses a linear interpolation in the step that
             straddles the required time, so accuracy will suffer for large
             steps. The NTuple uses centerline coordinates, if available.
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             time          The global time of the sampling (ns).
             format        The NTuple format (see above for list).
             filename      The filename of the NTuple.
             file          Synonym for filename.
             require       Expression which must be nonzero to include the
                           track (default=1) #
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).
             referenceParticle Set to 1 to include the Reference Particle.

torus        construct a torus.

             This is a direct interface to G4Torus. The major radius is in the
             X-Y plane, with phi=0 along X.

             Named Arguments:
             innerRadius   The inner radius of the torus (mm)
             outerRadius   The outer radius of the torus (mm)
             majorRadius   The major radius of the torus (mm)
             initialPhi    The initial phi around major radius (0 degrees).
             finalPhi      The final phi around major radius (360 degrees).
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the torus
             color         The color of the torus (''=invisible)
             kill          Set nonzero to kill every track that enters.

totalenergy  Print total energy deposited in selected volumes.

             At end of run, prints the total energy deposited in the selected
             volumes.
             
             Volume-name patterns are like UNIX filename patterns: e.g.
             '*[AB]*' matches any name containing an A or a B.
             
             Tracks that are killed have their kinetic energy summed into the
             volume where they were killed, unless they are killed because
             they leave the World.
             
             With ancestors=1, energy deposited in matching volumes is added
             into their ancestors; energy deposited directly into those
             ancestors is not summed into them unless their names also match.
             That is, if A is a child of B, but only A matches the list of
             volume-names, energy deposited into A will be reported in both A
             and B, but energy deposited directly into B is ignored.

             Named Arguments:
             volumes       Comma-separated list of Volume-Name patterns (*)
             ancestors     Set nonzero to sum energy into all ancestor
                           (enclosing) volumess (0).
             enclosing     Synonym for ancestors.
             filename      Filename to write summary (stdout).
             file          Synonym for filename.

trace        Specifies tracing of tracks.

             Generates a separate NTuple for each track, with 1 row per step,
             unless oneNTuple is nonzero (in which case all tracks are put
             into a single NTuple). So format=ascii generates one file per
             track with names generated by the pattern in filename (first %d
             is replaced by event #, second %d is replaced by trackId); for
             oneNTuple, the default filename is AllTracks.txt.
             
             Note that without a trace command no traces are generated, so to
             trace just the tune and reference particles include a trace
             command with no arguments.
             
             In collective tracking mode, oneNTuple must be nonzero, and the
             entries will be generated only at collective steps (usually at a
             specified deltaT).
             
             Unlike other NTuple commands, the require expression applies to
             entire tracks, not individual entries.
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             The trace includes the following fields:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             nTrace        Number of tracks to trace.
             format        Format of the NTuple (see above for list).
             oneNTuple     Nonzero to put all traces into a single NTuple.
             primaryOnly   Nonzero to trace only primary tracks.
             traceTune     Nonzero to trace tune tracks (default=1).
             filename      Filename (Ev%dTrk%d.txt or AllTracks.txt).
             file          synonym for filename.
             require       Expression which must be nonzero to trace the track
                           (default=1) #
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).

trackcolor   Alias for 'particlecolor'.


trackcuts    Specifies per-track cuts.

             Applied to each track before tracking, and at each step.

             Named Arguments:
             kill          List of particles to kill (comma separated).
             keep          List of particles to keep (kill all others).
             killSecondaries Set nonzero to kill all secondaries.
             kineticEnergyCut Minimum K.E. to track (0 MeV).
             kineticEnergyMax Maximum K.E. to track (infinite MeV).
             maxTime       Maximum lab time to track (1000000 ns).
             keepPrimaries Set nonzero to keep tracks with ParentID==0
                           regardless of other tests.
             steppingVerbose Set nonzero to print kills (defaults to parameter
                           value).

tracker      Defines a tracker.

             A tracker consists of several trackerplane-s and can fit a track
             to wire hits and times in the trackerplanes. This is a simple
             algorithm that does not handle backgrounds or multiple hits. It
             assumes that every track hits each trackerplane at most once. It
             is intended to be used to explore resolutions and the effects of
             survey errors. A tracker is a logical combination of its
             trackerplanes -- the tracker cannot be placed, but its
             trackerplanes must be placed into the system.
             
             The fitting algorithm used requires that all of its parameters
             have comparable scales, so the 'scaleX', 'scaleXp', 'scalePtot',
             and 'scaleT' arguments should be set to the approximate sigmas of
             the tracker. They should be within a factor of 10 of the actual
             values, but closer is better. At the end of fitting tracks a
             summary is printed that flags each parameter with 'RESCALE' if
             its scale is too different from its sigma (factor of 5 or more).
             
             NOTE: if the tracker cannot measure Ptot, then 'scalePtot' MUST
             be set to zero. If the tracker cannot measure T, then scaleT MUST
             be set to zero. Parameters with zero scales are held fixed at
             their true-track values.
             
             NOTE: the trackerplane-s of a tracker MUST be placed in the order
             that particles will hit them; the code does not sort them.
             Usually this means that each place command of a trackerplane must
             have a larger z value than the previous place command. They must
             also come after the trackerZ value of the tracker command.
             
             A tracker has 3 modes of operation:
                true      Each track of each event is written to a
                          TrackerHits NTuple if it hits all trackerplanes;
                          the NTuple includes both the true track values
                          and the individual wire hits for each trackerplane.
                fit       A track is fit to the wire hits from a previous
                          run, and the fit track is written to a TrackerFit
                          NTuple (includes true values).
                ignore    Any track is ignored.
             
             See the 'trackermode' command to control the mode of trackers.
             
             The TrackerHits NTuple written in 'true' mode contains:
               true_x, true_y, true_z, true_Px, true_Py, true_Pz, true_t, 
               true_PDGid, true_EventID, true_TrackID, true_ParentID, 
               true_Weight, ... plus 1 hit and 1 time per trackerplane.
               (the first 12 are the same as a BLTrackFile.)
             
             The TrackerFit Ntuple written in 'fit' mode contains:
               x, y, z, Px, Py, Pz, t, PDGid, EventID, TrackID, ParentID,
               Weight, ChisqPerDF, nDF, nHit, nIter, true_x, true_y, true_z, true_Px,
               true_Py, true_Pz, true_t.
             (the first 12 are from the fit and are the same as a
             BLTrackFile.)
             
             The parameters of the fit are: x, y, dxdz, dydz, Ptot, time. You
             must ensure that there are at least as many data points as free
             parameters (scaleT=0 fixes time; scalePtot=0 fixes Ptot). Each
             trackerplane with nonzero wireSpacing provides a data point; each
             trackerplane with nonzero sigmaT provides a data point;
             trackerplanes that measure both provide two data points. You must
             have enough trackerplanes to meet this requirement, and must set
             minHits large enough to meet it. The TrackerFit NTuple has a
             field nDF that gives the number of degrees of freedom for the
             fit, which is defined as (#DataPoints)-(#FreeParameters); it also
             has nHit which gives the number of trackerplane-s hit.
             
             Note the tracker can simulate survey errors -- see the
             'trackerplane' command for details (each plane can have different
             errors).
             
             Both the true and the fit tracks are reported at reportZ, which
             defaults to the Z position of the tracker.
             
             Note that beamlossntuple and newparticlentuple will get many
             entries per track when used in mode=fit -- the fit runs the track
             many times through the tracker (30-100, up to maxIter).
             
             NOTE: the trackermode command must preceed all tracker commands
             in the input file, and each tracker command must preceed all of
             its trackerplane commands. The trackerZ value must also preceed
             all trackerplane-s, but reportZ can be equal to or anywhere after
             trackerZ.
             
             Note that each trackerplane must have a unique name. This means
             you should either have a separate trackerplane command for each
             one (with unique name), or use the rename= argument to the place
             command (again with unique name). If you use groups for
             trackerplane-s, use rename=+ in the group.
             
             NOTE: This command does not work properly in collective tracking
             mode.

             Named Arguments:
             trackerZ      The Z position of the tracker (Centerline, mm).
             reportZ       The Z position at which fit tracks are reported
                           (Centerline, mm, default=trackerZ).
             scaleX        Scale for X and Y (mm); default=1mm.
             scaleXp       Scale for dxdz and dydz (radians), default=0.001.
             scalePtot     Scale for Ptot (MeV), default=0. Set to 0.0 if
                           tracker cannot determine momentum.
             scaleT        Scale for t (ns), default=0. Set to 0.0 if tracker
                           cannot determine time.
             minPz         Minimum Pz for valid tracks (default=10 MeV/c)
             minHits       Minimum number of hits for fitting (# planes).
             tolerance     Track fitting tolerance (mm) (default=0.01 mm)
             maxIter       Maximum iterations during fitting (default=200).
             verbose       0=none, 1=result, 2=iterations, 3=detail,
                           default=0.
             format        Format of output NTuple.
             filename      Filename of output NTuple.
             for009        Set nonzero to also output TrackerFit as
                           FOR009.Dat.
             file          Synonym for filename.

trackermode  Sets mode for all trackers, manages track fitting.

             USAGE: trackermode mode [file=...]
              mode can be any of:
                 true     tracks true tracks (normal operation)
                 fit      fits tracks to previous 'true' output
                 both     does both true and fit at once
             'fit' requires the filename argument to be the output of a
             previous 'true' run (filename is ignored in other modes); each
             tracker processes all of its tracks in the file. 'true' mode
             simply denotes the standard G4beamline operation, and the
             simulated tracks are taken to be the 'true' tracks of the system;
             the response of the tracker(s) to these tracks is then simulated
             in 'fit' mode. 'both' tracks a 'true' event, and then a fit is
             peerformed in each tracker for which its first track hit all
             trackerplane-s.
             
             Note that in 'true' mode every track that hits all trackerplane-s
             is considered, but in 'both' mode only the first track of the
             event can be considered.
             
             In fit mode, the filename argument MUST be different from the
             parameter 'histoFile', because this run must not overwrite the
             Root file from the previous (true) run.
             
             One trackermode command controls the mode of all trackers. 'true'
             mode is normal G4beamline operation, and is the same as if no
             trackermode command was present.
             
             Note that the geometry of the system must not change between a
             'true' run and a 'fit' run. You can, however, make small
             variations in fields to explore how errors in setting them will
             affect the fitted tracks. The trackerplane command can simulate
             survey errors.
             
             NOTE: the trackermode command must preceed all tracker commands
             in the input file.

             Named Arguments:
             filename      Filename to read for fitting tracks.
             file          Synonym for filename.

trackerplane Construct a tracker plane.

             A trackerplane belongs to a specific tracker, and represents one
             measuring element of the tracker. While the term 'wire' is used,
             a trackerplane can model any planar measuring device that
             measures one dimension using equally spaced detectors that are
             either on or off (hit or not hit). A trackerplane can be circular
             (specify radius and possibly innerRadius) or rectangular (specify
             height and width).
             
             The wires are at angle theta from the vertical, so theta=0 means
             vertical wires that measure x; theta=90 means horizontal wires
             that measure y; theta=180 also measures x, but increasing x means
             decreasing wire #.
             
             Setting wireSpacing=0 means there are no wires, which is useful
             for a trackerplane that models a scintillator used for track
             timing (set sigmaTime >= 0 to indicate that).
             
             sigmaTime>0 means this plane can measure the time of the track
             with that resolution. A Gaussian random number is added to the
             true track's time at this plane when reading the TrackHit NTuple.
             
             Survey errors can be modeled using the err-arguments -- the
             values they specify are applied during trackfitting (but not for
             true tracks). errType: 'fixed' means error values given are the
             actual values, 'gaussian' means error values are the sigma of a
             Gaussian random number, 'rect' means error values are the
             half-width of a uniform random number. The random number is
             picked before the run begins; the random-number seed is set from
             the clock so every run will have different random errors.
             
             trackerplane has 3 modes:
               true    The trackerplane reports the hit wire and time to
                       the tracker;
               fit     The trackerplane reports the Chisq contribution of
                       the fit track distance to the true track's hit wire
                       center, plus survey errors (if any). The track time
                       also contributes to the chisq.
               ignore  Any track is ignored.
             
             NOTE: the trackerplane-s of a tracker MUST be placed in the order
             that particles will hit them; the code does not sort them.
             Usually this means that each place command of a trackerplane must
             have a larger z value than the previous place command. They must
             also come after the trackerZ value of the tracker command.

             Named Arguments:
             tracker       The tracker to which this plane belongs; REQUIRED.
             radius        The radius of the circular tracker plane (mm).
             innerRadius   The inner radius of the circular tracker plane (0
                           mm).
             height        The height of the rectangular tracker plane (mm).
             width         The width of the rectangular tracker plane (mm).
             length        The length of the tracker plane (mm).
             theta         Wire angle in X-Y plane (deg). 0=>x, 90=>y...
             wireSpacing   Wire spacing (mm).
             wireOffset    Wire # 0 offset (mm).
             errType       Error type: fixed, gaussian, rect.
             errTheta      Error in wire angle (deg).
             errSpacing    Error in wire spacing (mm).
             errOffset     Error in wire offset (mm).
             sigmaTime     Sigma for timing plane (ns), default=-1.
             maxStep       The maximum stepsize in the element (mm).
             material      The material of the tracker plane.
             color         The color of the tracker plane (''=invisible).

trap         construct a solid trapezoid with axis along z.

             This is a direct interface to G4Trap. The trapezoid is
             symmetrical left-right, but upper or lower width can be larger or
             smaller.

             Named Arguments:
             height        The height of the solid trapezoid (mm)
             upperWidth    The upper width solid trapezoid (mm)
             lowerWidth    The lowerWidth of the solid trapezoid (mm)
             Xul           X position of upper left corner (mm)
             Xur           X position of upper right corner (mm)
             Xll           X position of lower left corner (mm)
             Xlr           X position of lower right corner (mm)
             length        The length of the solid trapezoid (mm)
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the trapezoid
             color         The color of the trapezoid (''=invisible)
             kill          Set nonzero to kill every track that enters.

tube         Alias for 'tubs'.


tubs         construct a tube or cylinder with axis along z.

             This is a direct interface to G4Tubs, which can implement a tube
             or cylinder; either can subtend less than 360 degrees in phi.

             Named Arguments:
             innerRadius   The inside of the tube, 0.0 for cylinder (mm)
             outerRadius   The outer radius of the tube or cylinder (mm)
             initialPhi    The initial Phi value (deg; 0 for all)
             finalPhi      The final Phi value (deg; 360 for all)
             length        The length of the tube or cylinder (mm)
             maxStep       The maximum stepsize in the element (mm)
             material      The material of the tube or cylinder
             color         The color of the tube or cylinder (''=invisible)
             kill          Set nonzero to kill every track that enters.
             radius        Synonym for outerRadius (mm)

tune         Tune a variable used as argument to other elements.

             This command samples the Tune particle track at z0, samples it
             again at z1, and varies its tune variable in order to bring the
             expression to zero. The tune variable is the first positional
             argument, and can be used in the argument expression(s) for
             tunable arguments located after z0. Due to the simple solver
             used, there should be an approximately linear dependence between
             the tune variable and the expression. This is suitable for tuning
             the By field of a genericbend or the maxGradient of a pillbox. At
             each solver step the saved Tune particle is re-started from z0,
             and when it reaches z1 the next step in the solver is taken.
             
             Note that multiple tune commands can be used together, as long as
             their z0-z1 regions are properly nested by at least 0.5 mm (i.e.
             each pair of regions must either not overlap at all, or one must
             be wholly contained in the other). This command can be
             complicated to use; see the User's Guide for more description and
             examples.

             Named Arguments:
             z0            The starting z position in CL coordinates.
             z1            The ending z position in CL coordinates.
             initial       Initial value of the variable 'name'
             initialStep   Initial step (0 to disable tuning)
             step          Synonym for initialStep
             start         An expression that must be nonzero to start tuning
                           (default=1)
             expr          The expression to tune to zero
             tolerance     The tolerance for expr to be zero
             maxIter       The maximum number of iterations (10).

usertrackfilter Construct a usertrackfilter that filters tracks via user code.

             ...

             Named Arguments:
             radius        The radius of the circular element (mm).
             innerRadius   The inner radius of the circular element (0 mm,
                           solid).
             height        The height of the rectangular element (mm).
             width         The width of the rectangular element (mm).
             length        The length of the element (mm).
             maxStep       The maximum stepsize in the element (mm).
             material      The material of the element.
             color         The color of the element (''=invisible).
             filterName    Name of the UserTrackFilter.
             filter        Synonym for filterName.
             init          Initialization string passed to user setup().

virtualdetector Construct a VirtualDetector that generates an NTuple.

             A VirtualDetector generates an NTuple of any track when it enters
             the physical volume of the VirtualDetector. It may be placed via
             multiple place commands (usually with a 'rename=det#' argument to
             distinguish the different placements). If material is not
             specified, it uses the material of the enclosing element. Every
             placement creates an individual NTuple. For a circular
             VirtualDetector give radius; for a rectangular one give height
             and width; length is usually left at 1 mm, but can be set to
             correspond to the length of a physical detector. The NTuple by
             default uses centerline coordinates. The NTuple of the
             virtualdetector can be included in an ntuple command by including
             a pattern that matches its name in the 'detectors' argument to
             the ntuple command. Note that must match the name as placed (i.e.
             includes rename=), not the name given to this command. The
             noSingles argument may be useful in this case to avoid a huge
             NTuple of singles (an empty NTuple may be created).
             
             Note that secondary particles created within the virtualdetector
             will not get an entry until they have taken one step. They are
             guaranteed to do so.
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             radius        The radius of the circular VirtualDetector (mm).
             innerRadius   The inner radius of the circular VirtualDetector (0
                           mm, solid).
             height        The height of the rectangular VirtualDetector (mm).
             width         The width of the rectangular VirtualDetector (mm).
             length        The length of the VirtualDetector (mm).
             maxStep       The maximum stepsize in the element (mm).
             material      The material of the VirtualDetector.
             color         The color of the VirtualDetector (''=invisible).
             noSingles     Set to 1 to omit the NTuple for singles.
             format        NTuple format: (see above for list).
             filename      filename ('' uses name to determine filename)
             file          alias for filename
             require       Expression which must be nonzero to include the
                           track (default=1) #
             referenceParticle Set to 1 to include the Reference Particle.
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).
             kill          Set to 1 kill all tracks after entering them into
                           NTuple(s).

zntuple      Generate an NTuple for each of a list of Z positions.

             Generates an NTuple like a virtualdetector, but without a
             physical volume. Tracks are forced to take steps within 2mm
             surrounding each desired z position, and they are interpolated to
             the desired z position. Each z position generates a separate
             NTuple named Z123 (etc.). z accepts a list of z positions, and
             zloop can generate a set of equally spaced z positions; both can
             be used.
             
             Each value in z and zloop can be an expression using double
             constants and the usual C operators and functions.
             
             The standard NTuple fields are:
                 x,y,z (mm)
                 Px,Py,Pz (MeV/c)
                 t (ns)
                 PDGid (11=e-, 13=mu-, 22=gamma, 211=pi+, 2212=proton, ...)
                 EventID (may be inexact above 16,777,215)
                 TrackID
                 ParentID (0 => primary particle)
                 Weight (defaults to 1.0)
             
             The following additional fields are appended for format=Extended,
             format=asciiExtended, and format=rootExtended:
                 Bx, By, Bz (Tesla)
                 Ex, Ey, Ez (Megavolts/meter)
                 ProperTime (ns)
                 PathLength (mm)
                 PolX, PolY, PolZ (polarization)
                 InitialKE (MeV when track was created)
             
             Valid Formats (ignore case): ascii bltrackfile dummy for009
             for009.dat root trackfile Extended asciiExtended rootExtended

             Named Arguments (#=cannot be changed in place cmd):
             z             Comma-separated list of Z positions (mm)
             zloop         Loop in z, first:last:incr (mm)
             noSingles     Set to 1 to omit the NTuple for singles.
             format        NTuple format (see above for list)
             file          Output filename ('' uses name to determine
                           filename)
             filename      Synonym for file
             require       Expression which must be nonzero to include the
                           track (default=1) #
             referenceParticle Set to 1 to include the Reference Particle.
             coordinates   Coordinates: global, centerline, or reference
                           (default=c).

List of Particles (QGSP)

G4BL_DIR=/vols/escience01/martynia/MAUS-v0.9.3/third_party/build/G4beamline-2.12-source
G4ABLADATA=/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/share/Geant4-9.6.2/data/G4NEUTRONXS1.2/
G4LEDATA=/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/share/Geant4-9.6.2/data/G4EMLOW6.32/
G4LEVELGAMMADATA=/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/share/Geant4-9.6.2/data/PhotonEvaporation2.3/
G4RADIOACTIVEDATA=/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/share/Geant4-9.6.2/data/RadioactiveDecay3.6/
LD_LIBRARY_PATH=/vols/escience01/martynia/MAUS-v0.9.3/third_party/build/G4beamline-2.12-source/lib:/vols/escience01/martynia/MAUS-v0.9.3/third_party/build/root_v5.34.07/lib:/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/lib64:/vols/escience01/martynia/MAUS-v0.9.3/src/common_py:/vols/escience01/martynia/MAUS-v0.9.3/build:/vols/escience01/martynia/MAUS-v0.9.3/build:/vols/escience01/martynia/MAUS-v0.9.3/third_party/install/lib
G4beamline Process ID 7292

*************************************************************
 g4beamline version: 2.12-martynia                    (17-Feb-2015-18:28)
                      Copyright : Tom Roberts, Muons, Inc.
                        License : Gnu Public License
                            WWW : http://g4beamline.muonsinc.com
*************************************************************
 Geant4 version Name: geant4-09-05-patch-01    (20-March-2012)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

*** g4beamline: invalid arg 'sed' ignored
*** g4beamline: invalid arg '-e' ignored
*** g4beamline: invalid arg '1,/^----/d' ignored
*** g4beamline: invalid arg '-e' ignored
*** g4beamline: invalid arg 's/&/\&/g' ignored
*** g4beamline: invalid arg '-e' ignored
*** g4beamline: invalid arg 's/>/\>/g' ignored
*** g4beamline: invalid arg '-e' ignored
*** g4beamline: invalid arg 's/  EMoption= 0
<<< Geant4 Physics List simulation engine: QGSP_BERT 3.4

<<< Reference Physics List QGSP_BERT is built

physics      QGSP_BERT     disable= inactivate= deactivate= doStochastics=1
                           minRangeCut=1 list=0 gammaToMuPair=0 spinTracking=0
                           synchrotronRadiation=0 synchrotronRadiationMuon=0
*
*
*

Particles:
----------
             B+ PDGid=521
             B- PDGid=-521
             B0 PDGid=511
            Bc+ PDGid=541
            Bc- PDGid=-541
            Bs0 PDGid=531
             D+ PDGid=411
             D- PDGid=-411
             D0 PDGid=421
            Ds+ PDGid=431
            Ds- PDGid=-431
     GenericIon PDGid=0
            He3 PDGid=1000020030
          J/psi PDGid=443
       N(1440)+ PDGid=12212
       N(1440)0 PDGid=12112
       N(1520)+ PDGid=2124
       N(1520)0 PDGid=1214
       N(1535)+ PDGid=22212
       N(1535)0 PDGid=22112
       N(1650)+ PDGid=32212
       N(1650)0 PDGid=32112
       N(1675)+ PDGid=2216
       N(1675)0 PDGid=2116
       N(1680)+ PDGid=12216
       N(1680)0 PDGid=12116
       N(1700)+ PDGid=22124
       N(1700)0 PDGid=21214
       N(1710)+ PDGid=42212
       N(1710)0 PDGid=42112
       N(1720)+ PDGid=32124
       N(1720)0 PDGid=31214
       N(1900)+ PDGid=42124
       N(1900)0 PDGid=41214
       N(1990)+ PDGid=12218
       N(1990)0 PDGid=12118
       N(2090)+ PDGid=52214
       N(2090)0 PDGid=52114
       N(2190)+ PDGid=2128
       N(2190)0 PDGid=1218
       N(2220)+ PDGid=100002210
       N(2220)0 PDGid=100002110
       N(2250)+ PDGid=100012210
       N(2250)0 PDGid=100012110
        Upsiron PDGid=553
      a0(1450)+ PDGid=10211
      a0(1450)- PDGid=-10211
      a0(1450)0 PDGid=10111
       a0(980)+ PDGid=9000211
       a0(980)- PDGid=-9000211
       a0(980)0 PDGid=9000111
      a1(1260)+ PDGid=20213
      a1(1260)- PDGid=-20213
      a1(1260)0 PDGid=20113
      a2(1320)+ PDGid=215
      a2(1320)- PDGid=-215
      a2(1320)0 PDGid=115
          alpha PDGid=1000020040
        anti_B0 PDGid=-511
       anti_Bs0 PDGid=-531
        anti_D0 PDGid=-421
       anti_He3 PDGid=-1000020030
  anti_N(1440)+ PDGid=-12212
  anti_N(1440)0 PDGid=-12112
  anti_N(1520)+ PDGid=-2124
  anti_N(1520)0 PDGid=-1214
  anti_N(1535)+ PDGid=-22212
  anti_N(1535)0 PDGid=-22112
  anti_N(1650)+ PDGid=-32212
  anti_N(1650)0 PDGid=-32112
  anti_N(1675)+ PDGid=-2216
  anti_N(1675)0 PDGid=-2116
  anti_N(1680)+ PDGid=-12216
  anti_N(1680)0 PDGid=-12116
  anti_N(1700)+ PDGid=-22124
  anti_N(1700)0 PDGid=-21214
  anti_N(1710)+ PDGid=-42212
  anti_N(1710)0 PDGid=-42112
  anti_N(1720)+ PDGid=-32124
  anti_N(1720)0 PDGid=-31214
  anti_N(1900)+ PDGid=-42124
  anti_N(1900)0 PDGid=-41214
  anti_N(1990)+ PDGid=-12218
  anti_N(1990)0 PDGid=-12118
  anti_N(2090)+ PDGid=-52214
  anti_N(2090)0 PDGid=-52114
  anti_N(2190)+ PDGid=-2128
  anti_N(2190)0 PDGid=-1218
  anti_N(2220)+ PDGid=-100002210
  anti_N(2220)0 PDGid=-100002110
  anti_N(2250)+ PDGid=-100012210
  anti_N(2250)0 PDGid=-100012110
     anti_alpha PDGid=-1000020040
   anti_b_quark PDGid=-5
   anti_c_quark PDGid=-4
   anti_d_quark PDGid=-1
anti_dd1_diquark PDGid=-1103
anti_delta(1600)+ PDGid=-32214
anti_delta(1600)++ PDGid=-32224
anti_delta(1600)- PDGid=-31114
anti_delta(1600)0 PDGid=-32114
anti_delta(1620)+ PDGid=-2122
anti_delta(1620)++ PDGid=-2222
anti_delta(1620)- PDGid=-1112
anti_delta(1620)0 PDGid=-1212
anti_delta(1700)+ PDGid=-12214
anti_delta(1700)++ PDGid=-12224
anti_delta(1700)- PDGid=-11114
anti_delta(1700)0 PDGid=-12114
anti_delta(1900)+ PDGid=-12122
anti_delta(1900)++ PDGid=-12222
anti_delta(1900)- PDGid=-11112
anti_delta(1900)0 PDGid=-11212
anti_delta(1905)+ PDGid=-2126
anti_delta(1905)++ PDGid=-2226
anti_delta(1905)- PDGid=-1116
anti_delta(1905)0 PDGid=-1216
anti_delta(1910)+ PDGid=-22122
anti_delta(1910)++ PDGid=-22222
anti_delta(1910)- PDGid=-21112
anti_delta(1910)0 PDGid=-21212
anti_delta(1920)+ PDGid=-22214
anti_delta(1920)++ PDGid=-22224
anti_delta(1920)- PDGid=-21114
anti_delta(1920)0 PDGid=-22114
anti_delta(1930)+ PDGid=-12126
anti_delta(1930)++ PDGid=-12226
anti_delta(1930)- PDGid=-11116
anti_delta(1930)0 PDGid=-11216
anti_delta(1950)+ PDGid=-2218
anti_delta(1950)++ PDGid=-2228
anti_delta(1950)- PDGid=-1118
anti_delta(1950)0 PDGid=-2118
    anti_delta+ PDGid=-2214
   anti_delta++ PDGid=-2224
    anti_delta- PDGid=-1114
    anti_delta0 PDGid=-2114
  anti_deuteron PDGid=-1000010020
  anti_k(1460)0 PDGid=-100311
anti_k0_star(1430)0 PDGid=-10311
 anti_k1(1270)0 PDGid=-10313
 anti_k1(1400)0 PDGid=-20313
 anti_k2(1770)0 PDGid=-10315
anti_k2_star(1430)0 PDGid=-315
anti_k2_star(1980)0 PDGid=-100315
anti_k3_star(1780)0 PDGid=-317
anti_k_star(1410)0 PDGid=-100313
anti_k_star(1680)0 PDGid=-30313
   anti_k_star0 PDGid=-313
     anti_kaon0 PDGid=-311
    anti_lambda PDGid=-3122
anti_lambda(1405) PDGid=-13122
anti_lambda(1520) PDGid=-3124
anti_lambda(1600) PDGid=-23122
anti_lambda(1670) PDGid=-33122
anti_lambda(1690) PDGid=-13124
anti_lambda(1800) PDGid=-43122
anti_lambda(1810) PDGid=-53122
anti_lambda(1820) PDGid=-3126
anti_lambda(1830) PDGid=-13126
anti_lambda(1890) PDGid=-23124
anti_lambda(2100) PDGid=-3128
anti_lambda(2110) PDGid=-23126
  anti_lambda_b PDGid=-5122
 anti_lambda_c+ PDGid=-4122
   anti_neutron PDGid=-2112
      anti_nu_e PDGid=-12
     anti_nu_mu PDGid=-14
    anti_nu_tau PDGid=-16
    anti_omega- PDGid=-3334
  anti_omega_b- PDGid=-5332
  anti_omega_c0 PDGid=-4332
    anti_proton PDGid=-2212
   anti_s_quark PDGid=-3
anti_sd0_diquark PDGid=-3101
anti_sd1_diquark PDGid=-3103
anti_sigma(1385)+ PDGid=-3224
anti_sigma(1385)- PDGid=-3114
anti_sigma(1385)0 PDGid=-3214
anti_sigma(1660)+ PDGid=-13222
anti_sigma(1660)- PDGid=-13112
anti_sigma(1660)0 PDGid=-13212
anti_sigma(1670)+ PDGid=-13224
anti_sigma(1670)- PDGid=-13114
anti_sigma(1670)0 PDGid=-13214
anti_sigma(1750)+ PDGid=-23222
anti_sigma(1750)- PDGid=-23112
anti_sigma(1750)0 PDGid=-23212
anti_sigma(1775)+ PDGid=-3226
anti_sigma(1775)- PDGid=-3116
anti_sigma(1775)0 PDGid=-3216
anti_sigma(1915)+ PDGid=-13226
anti_sigma(1915)- PDGid=-13116
anti_sigma(1915)0 PDGid=-13216
anti_sigma(1940)+ PDGid=-23224
anti_sigma(1940)- PDGid=-23114
anti_sigma(1940)0 PDGid=-23214
anti_sigma(2030)+ PDGid=-3228
anti_sigma(2030)- PDGid=-3118
anti_sigma(2030)0 PDGid=-3218
    anti_sigma+ PDGid=-3222
    anti_sigma- PDGid=-3112
    anti_sigma0 PDGid=-3212
  anti_sigma_b+ PDGid=-5222
  anti_sigma_b- PDGid=-5112
  anti_sigma_b0 PDGid=-5212
  anti_sigma_c+ PDGid=-4212
 anti_sigma_c++ PDGid=-4222
  anti_sigma_c0 PDGid=-4112
anti_ss1_diquark PDGid=-3303
anti_su0_diquark PDGid=-3201
anti_su1_diquark PDGid=-3203
   anti_t_quark PDGid=-6
    anti_triton PDGid=-1000010030
   anti_u_quark PDGid=-2
anti_ud0_diquark PDGid=-2101
anti_ud1_diquark PDGid=-2103
anti_uu1_diquark PDGid=-2203
 anti_xi(1530)- PDGid=-3314
 anti_xi(1530)0 PDGid=-3324
 anti_xi(1690)- PDGid=-23314
 anti_xi(1690)0 PDGid=-23324
 anti_xi(1820)- PDGid=-13314
 anti_xi(1820)0 PDGid=-13324
 anti_xi(1950)- PDGid=-33314
 anti_xi(1950)0 PDGid=-33324
 anti_xi(2030)- PDGid=-13316
 anti_xi(2030)0 PDGid=-13326
       anti_xi- PDGid=-3312
       anti_xi0 PDGid=-3322
     anti_xi_b- PDGid=-5132
     anti_xi_b0 PDGid=-5232
     anti_xi_c+ PDGid=-4232
     anti_xi_c0 PDGid=-4132
      b1(1235)+ PDGid=10213
      b1(1235)- PDGid=-10213
      b1(1235)0 PDGid=10113
        b_quark PDGid=5
        c_quark PDGid=4
chargedgeantino PDGid=0
        d_quark PDGid=1
    dd1_diquark PDGid=1103
   delta(1600)+ PDGid=32214
  delta(1600)++ PDGid=32224
   delta(1600)- PDGid=31114
   delta(1600)0 PDGid=32114
   delta(1620)+ PDGid=2122
  delta(1620)++ PDGid=2222
   delta(1620)- PDGid=1112
   delta(1620)0 PDGid=1212
   delta(1700)+ PDGid=12214
  delta(1700)++ PDGid=12224
   delta(1700)- PDGid=11114
   delta(1700)0 PDGid=12114
   delta(1900)+ PDGid=12122
  delta(1900)++ PDGid=12222
   delta(1900)- PDGid=11112
   delta(1900)0 PDGid=11212
   delta(1905)+ PDGid=2126
  delta(1905)++ PDGid=2226
   delta(1905)- PDGid=1116
   delta(1905)0 PDGid=1216
   delta(1910)+ PDGid=22122
  delta(1910)++ PDGid=22222
   delta(1910)- PDGid=21112
   delta(1910)0 PDGid=21212
   delta(1920)+ PDGid=22214
  delta(1920)++ PDGid=22224
   delta(1920)- PDGid=21114
   delta(1920)0 PDGid=22114
   delta(1930)+ PDGid=12126
  delta(1930)++ PDGid=12226
   delta(1930)- PDGid=11116
   delta(1930)0 PDGid=11216
   delta(1950)+ PDGid=2218
  delta(1950)++ PDGid=2228
   delta(1950)- PDGid=1118
   delta(1950)0 PDGid=2118
         delta+ PDGid=2214
        delta++ PDGid=2224
         delta- PDGid=1114
         delta0 PDGid=2114
       deuteron PDGid=1000010020
             e+ PDGid=-11
             e- PDGid=11
            eta PDGid=221
      eta(1295) PDGid=100221
      eta(1405) PDGid=9020221
      eta(1475) PDGid=100331
     eta2(1645) PDGid=10225
     eta2(1870) PDGid=10335
      eta_prime PDGid=331
           etac PDGid=441
       f0(1370) PDGid=10221
       f0(1500) PDGid=9030221
       f0(1710) PDGid=10331
        f0(600) PDGid=9000221
        f0(980) PDGid=9010221
       f1(1285) PDGid=20223
       f1(1420) PDGid=20333
       f2(1270) PDGid=225
       f2(1810) PDGid=9030225
       f2(2010) PDGid=9060225
 f2_prime(1525) PDGid=335
          gamma PDGid=22
       geantino PDGid=0
          gluon PDGid=21
       h1(1170) PDGid=10223
       h1(1380) PDGid=10333
       k(1460)+ PDGid=100321
       k(1460)- PDGid=-100321
       k(1460)0 PDGid=100311
 k0_star(1430)+ PDGid=10321
 k0_star(1430)- PDGid=-10321
 k0_star(1430)0 PDGid=10311
      k1(1270)+ PDGid=10323
      k1(1270)- PDGid=-10323
      k1(1270)0 PDGid=10313
      k1(1400)+ PDGid=20323
      k1(1400)- PDGid=-20323
      k1(1400)0 PDGid=20313
      k2(1770)+ PDGid=10325
      k2(1770)- PDGid=-10325
      k2(1770)0 PDGid=10315
 k2_star(1430)+ PDGid=325
 k2_star(1430)- PDGid=-325
 k2_star(1430)0 PDGid=315
 k2_star(1980)+ PDGid=100325
 k2_star(1980)- PDGid=-100325
 k2_star(1980)0 PDGid=100315
 k3_star(1780)+ PDGid=327
 k3_star(1780)- PDGid=-327
 k3_star(1780)0 PDGid=317
  k_star(1410)+ PDGid=100323
  k_star(1410)- PDGid=-100323
  k_star(1410)0 PDGid=100313
  k_star(1680)+ PDGid=30323
  k_star(1680)- PDGid=-30323
  k_star(1680)0 PDGid=30313
        k_star+ PDGid=323
        k_star- PDGid=-323
        k_star0 PDGid=313
          kaon+ PDGid=321
          kaon- PDGid=-321
          kaon0 PDGid=311
         kaon0L PDGid=130
         kaon0S PDGid=310
         lambda PDGid=3122
   lambda(1405) PDGid=13122
   lambda(1520) PDGid=3124
   lambda(1600) PDGid=23122
   lambda(1670) PDGid=33122
   lambda(1690) PDGid=13124
   lambda(1800) PDGid=43122
   lambda(1810) PDGid=53122
   lambda(1820) PDGid=3126
   lambda(1830) PDGid=13126
   lambda(1890) PDGid=23124
   lambda(2100) PDGid=3128
   lambda(2110) PDGid=23126
       lambda_b PDGid=5122
      lambda_c+ PDGid=4122
            mu+ PDGid=-13
            mu- PDGid=13
        neutron PDGid=2112
           nu_e PDGid=12
          nu_mu PDGid=14
         nu_tau PDGid=16
          omega PDGid=223
    omega(1420) PDGid=100223
    omega(1650) PDGid=30223
         omega- PDGid=3334
   omega3(1670) PDGid=227
       omega_b- PDGid=5332
       omega_c0 PDGid=4332
  opticalphoton PDGid=0
            phi PDGid=333
      phi(1680) PDGid=100333
     phi3(1850) PDGid=337
      pi(1300)+ PDGid=100211
      pi(1300)- PDGid=-100211
      pi(1300)0 PDGid=100111
            pi+ PDGid=211
            pi- PDGid=-211
            pi0 PDGid=111
     pi2(1670)+ PDGid=10215
     pi2(1670)- PDGid=-10215
     pi2(1670)0 PDGid=10115
         proton PDGid=2212
     rho(1450)+ PDGid=100213
     rho(1450)- PDGid=-100213
     rho(1450)0 PDGid=100113
     rho(1700)+ PDGid=30213
     rho(1700)- PDGid=-30213
     rho(1700)0 PDGid=30113
           rho+ PDGid=213
           rho- PDGid=-213
           rho0 PDGid=113
    rho3(1690)+ PDGid=217
    rho3(1690)- PDGid=-217
    rho3(1690)0 PDGid=117
        s_quark PDGid=3
    sd0_diquark PDGid=3101
    sd1_diquark PDGid=3103
   sigma(1385)+ PDGid=3224
   sigma(1385)- PDGid=3114
   sigma(1385)0 PDGid=3214
   sigma(1660)+ PDGid=13222
   sigma(1660)- PDGid=13112
   sigma(1660)0 PDGid=13212
   sigma(1670)+ PDGid=13224
   sigma(1670)- PDGid=13114
   sigma(1670)0 PDGid=13214
   sigma(1750)+ PDGid=23222
   sigma(1750)- PDGid=23112
   sigma(1750)0 PDGid=23212
   sigma(1775)+ PDGid=3226
   sigma(1775)- PDGid=3116
   sigma(1775)0 PDGid=3216
   sigma(1915)+ PDGid=13226
   sigma(1915)- PDGid=13116
   sigma(1915)0 PDGid=13216
   sigma(1940)+ PDGid=23224
   sigma(1940)- PDGid=23114
   sigma(1940)0 PDGid=23214
   sigma(2030)+ PDGid=3228
   sigma(2030)- PDGid=3118
   sigma(2030)0 PDGid=3218
         sigma+ PDGid=3222
         sigma- PDGid=3112
         sigma0 PDGid=3212
       sigma_b+ PDGid=5222
       sigma_b- PDGid=5112
       sigma_b0 PDGid=5212
       sigma_c+ PDGid=4212
      sigma_c++ PDGid=4222
       sigma_c0 PDGid=4112
    ss1_diquark PDGid=3303
    su0_diquark PDGid=3201
    su1_diquark PDGid=3203
        t_quark PDGid=6
           tau+ PDGid=-15
           tau- PDGid=15
         triton PDGid=1000010030
        u_quark PDGid=2
    ud0_diquark PDGid=2101
    ud1_diquark PDGid=2103
    uu1_diquark PDGid=2203
      xi(1530)- PDGid=3314
      xi(1530)0 PDGid=3324
      xi(1690)- PDGid=23314
      xi(1690)0 PDGid=23324
      xi(1820)- PDGid=13314
      xi(1820)0 PDGid=13324
      xi(1950)- PDGid=33314
      xi(1950)0 PDGid=33324
      xi(2030)- PDGid=13316
      xi(2030)0 PDGid=13326
            xi- PDGid=3312
            xi0 PDGid=3322
          xi_b- PDGid=5132
          xi_b0 PDGid=5232
          xi_c+ PDGid=4232
          xi_c0 PDGid=4132