Next: , Previous: Intro, Up: Top


2 Obtaining, Installing and Running

BDSIM can be downloaded from http://ilc.pp.rhul.ac.uk/bdsim.html. This site also contains some information on planned releases and other issues. 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. You may want to edit the Makefile manually to meet your needs (if your CLHEP version is greater than 2.x put -DCLHEP_VERSION=9). Then start the compilation by typing

make

If the compilation is successful the bdsim executable should be created in $(BDSIM)/bin/$(ARCH) where $(BDSIM) is the directory specified during configuration, and $(ARCH) is of the form $(OSTYPE)-$(COMPILER), eg Linux-g++. Next, set up the (DY)LD_LIBRARY_PATH variable to point to the ./parser directory, and also to the directory where libbdsim.so is if building shared libraries.

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>     : 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
     --outline=<file>     : print geometry/optics info to <file>
     --outline_type=<fmt> : type of outline format
                            where fmt = optics | survey
      --materials         : list materials included in bdsim by default

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.