Introduction

SIGI

Introduction


Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

Preliminaries

This is an introduction to SIGI and not to Monte Carlo simulations in general. But, if you are new the field, here are some things you should think about and keep in mind. First, the validity of the results and second, the way an experiment looks like from the simulation point of view.
The real, known and virtual world
The known world is a subset of the real world. If we knew everything about the real world, we wouldn't have to make experiments. Further, the known world is not represented in one but in many theories/models - depending on different scales, e.g. energy or length.
The virtual world is a subset of the known world. No code allows the simualtion of the whole known world, but is valid in for example only a special range of energy.
The virtual world is a subset of the real world, i.e. we can't hope to predict the results of experiments.
The essential steps of a simulation
  1. describe the experimental setup, i.e. geometries, materials etc.
  2. generate an event, i.e. give a list of particles and momenta coming from a scattering experiment or a radioactive decay and a creation point
  3. track the generated particles one after another through the detector, i.e. create a path through the detector using Monte Carlo techniques according to the probabilities for e.g. decay or scattering processes until the particle leaves the detector or gets destroyed; in the latter case track all secondaries too; write useful information - e.g. energy losses etc. - to file
  4. repeat steps 2. and 3.

Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

Basic concepts

As mentioned above, all SIGI simulations are set up by editing a text file. There has to be at least one ini file called run.ini - though there can be more. ini files are divided into sections, that look like the following:
[ section_name ]
keyword_1 = blabla_1
keyword_2 = blabla_2
         ...
keyword_n = blabla_n
where section_name is user defined - with only one exception: the run section [ Run ] - and blabla_i is of one of the following kinds: section name, keyword, string, numerical expression. The sections build a tree, with the run section as root. It is connected to two nodes, generator section and geometry section respectively, the latter being a subtree with the master medium section as root.
The ini files are parsed through the GNU C++ preprocessor at SIGI start up time. That offers you all its control mechanisms especially #include and #define statements and two types of comments, i.e.


Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

The run section

has the default name Run and looks like the following
[ Run ]
Type                  = MCRun
Generator             = GENERATOR
MasterMedium          = MASTERMEDIUM
Output                = STRINGIFY(OUTPUT)
Number of Events      = NUMBER
electromagnetic       = EGSInteractor("electromagnetic")
hadronic              = Micres("hadronic")
beam part. flags      = BEAM_PART_INFO
event part. flags     = EVENT_PART_INFO
secondary part. flags = SEC_PART_INFO
Update Frequency = EVENTNUMBER
#ifdef SEED
seed                  = SEED
#endif
#ifdef CALLED
called                = CALLED
#endif
where
TYPE
is a keyword, e.g. MCRun.
GENERATOR
is a user defined section name, e.g. pCH2; compare Event Generators
MASTERMEDIUM
is a user defined section name, e.g. Edda; compare Geometry
OUTPUT
is a string, e.g. "sigi.histo", this is also the default.
NUMBER
is an integer number, e.g. 50000, that sets the number of simulated events
electromagnetic = ... and hadronic = ...
switch on the wanted interactors for tracking. Actually, in the current version of SIGI, there are no alternatives to EGS for electron and MICRES for hadron tracking. So, don't worry about these points.
beam part. flags
event part. flags
secondary part. flags
tell SIGI which particle info should be written to the history tape; e.g. event part. flags = PInfo_hasPartID + PInfo_hasAllMomentum
see flags.ini for details.
EVENTNUMBER
write current event to stdout every EVENTNUMBER event.

Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

The generator section

looks like the following - it depends very much on the type -
[ GENERATOR ]
Typ             = TYPE
T               = EKIN
vertexGenerator = VERTEX

	information about particles in
	the initial and/or final state/s

	further information about concerned
	range of scattering angles
where
GENERATOR
is the user defined section name, see above
TYPE
is a keyword, e.g. FowlGenerator; see section Event Generators below for details
EKIN
- a float number - is the kinetic beam energy in GeV.
VERTEX
is a keyword, it determines the position of the target or radioactive source and if it is pointlike or gaussian distributed; see section Vertex generators for details.
further information
depends very much on the TYPE, see section Event Generators below for details

Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

The geometry section

looks like following
[ MASTERMEDIUM ]
Volumentyp = TYPE
Material   = MATERIAL
T (cutoff) = T_CUTOFF
Max. Step  = MAXSTEP
DrawParam  = DRAWPARAM

	information on size 

Position   = vector(X,Y,Z)
Rotation   = rotation(ALPHA,BETA,GAMMA)
Number     = NUMBER
Child1     = CHILD_1
Child2     = CHILD_2
          ...
Childn     = CHILD_N
where
MASTERMEDIUM
is the user defined section name, see above
MATERIAL
is a string, e.g. "Polyethylen", the material data file MATERIAL.mat must exist; see section Material for details
T_CUTOFF
a float number, e.g. 0.03 MeV is the lower kinetic cutoff energy, particles with this or a lower energy are stopped.
MAXSTEP
an integer number, e.g. 500; an event gets rejected if one particle makes more than MAXSTEP steps during tracking
DRAWPARAM
a keyword, that determines wether or not a volume is shown as wire frame when running SIGI X-display mode; see section Draw parameters for details.
size information
of course depends very much on TYPE.
Position and Rotation
are optional, see Position and Rotation for details.
NUMBER
is the integer number of children.
CHILD_i
are user defines section names of geometry sections like this master medium section.

Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.

Get started

If any of your answers to the following questions is "No!", this section will be less useful to you. Nevertheless, you should at least have a look at our locally installed ini files to get a feeling for the opportunities this formalism offers.
You are a local - i.e. @iskp.uni-bonn.de - user ?
You are working at a dec-alpha machine running with OSF1 operating system ?
You added /usr/local/edda/sigi to your PATH environment variable ?
You want to make EDDA specific simulations ?
If you are not familiar with the the C++ preprocessor click here. Now, let's start with the run.ini. We will describe some parts of in detail below but first have a look at the whole file. What do you see ? After a polyline comment nested in /* and */ you see how default values are set. For example:
#ifndef NUMBER
#define NUMBER 50000
#endif  
sets the number of simulated events to 50000 unless you redefine this value. If you want to simulate e.g. 17 events and to write the results to "testfile" start SIGI with the -d option. Actually, the file you'll get on disc will be named testfile.histo.
sigi -d "-DNUMBER=17 -DOUTPUT=testfile"
The run section is described above. But there we have not mentioned the lines
#ifdef SEED
seed	= SEED
#endif  
#ifdef CALLED
called  = CALLED
#endif
You may set a seed to the random number generator, its default value is compiled in, so there is no need to set a default value in the ini file. You may too set number of times the random number generator is CALLED before the first simulation. This allows you to start with exactly reproduced initial conditions. You may wonder about the Micres section too.
#ifndef MICRES
#define MICRES

[ Micres ]
EVAP Flag        = EVAPORATION    // en/disable evaporation-code
secondaries Flag = 1    // wird zur Zeit von MICRES benutzt, kommt aber wieder raus

#endif
It allows you to switch on/off the EVAP part of MICRES, that simulates the evaporation of the excited nucleus after the intra-nuclear cascade. The default is EVAP off. To turn it on run
sigi -d "-DEVAPORATION=1"
Remember that the MICRES code may be used for both tracking and event generating, and the EVAP flag must have a value but it may only be set once. You will find the same Micres section in generator.ini.

The rest of run.ini is not too difficult to understand. generator.ini and geometry.ini or myGeometry.ini respectively are included. These files again include other files and take #defines or MACRO_NAMEs, but we will not go into the details here. You find a list of all pre#defined MACROs in the section on our local Installation @iskp.


Go to Table of contents, Top of this page, Preliminaries, Basic concepts, The run section,
The generator section, The geometry section, Get started, Bottom.


Questions ? Comments ! etc. to Rüdiger Groß-Hardt or Uwe Roß.



                                    last changed by Uwe Roß on 7 Feb 1996