Next: , Previous: Intro, Up: Top


2 Obtaining, Installing and Running

BDSIM can be downloaded from http://flc.pp.rhul.ac.uk/bdsim.html. Alternatively, a development version is accessible under http://cvs.pp.rhul.ac.uk. Download the tarball and extract the source code. Make sure Geant4 is installed and appropriate environment variables defined. Then go through the configuration procedure by running the ./configure script.

./configure

It will create a Makefile from template defined in Makefile.in. Then start the compilation by typing

./make

If the compilation is successful bdsim executable should be created in the current directory of in the $G4WORKDIR directory in case this variable is defined. Next, set up the LD_LIBRARY_PATH variable to point to the ./parser directory and to the directory where libbdsim.so is.

BDSIM is invoked by the command bdsim options

where the options are

     --file=<filename>   : specify the lattice file
     --output=<fmt>      : output format (root|ascii), default ascii
     --outfile=<file>    : output file name. Will be appended with _N
                           where N = 0, 1, 2, 3... etc.
     --vis_mac=<file>    : file with the visualization macro script, default vis.mac
     --help              : display this message
     --verbose           : display general parameters before run
     --verbose_event     : display information for every event
     --verbose_step=N    : display tracking information after each step
     --verbose_event_num : display tracking information for event number N
     --batch             : batch mode - no graphics

A shell script (bdsimrun) is also provided which handles batch job support and opther features.

To run bdsim one first has to define the beamline geometry in a file which is then passes to bdsim via the --file command line option, for example

     bdsim --file=line.gmad --output=root --batch

The next section describes how to do it in more detail.