Relies on: nothing
C include file: evsubs.h
FORTRAN include files: subs.i and evsubs.i
This package allows the user to manipulate the properties of reactions which are used by several other packages.
In C the user can declare as many reaction structures as they like and
choose which reaction structure is used when. However, there is one
global variable, reac
, holding a default reaction which
is the one accessed by FORTRAN and the one used for the default
event-struct structure.
The reaction structure in C is as follows:
struct reac { double edisp; double e1; double p1; double mass[]; double q1; double vcm; };
Where the elements have the following meanings:
1000
.
reac_init
sets this automatically
but the other routines don't. It's up to the user to keep this up to
date as several other packages rely on this value.
At the moment, elements of this structure are free to be accessed
directly in C, but note that changing the values may confuse packages
which rely on them and so may give inconsistent results. It is
recommended, therefore, that even in C the user go through the
reacs
routines to set these values so that later code
may be added to these routines to correctly handle any changes.
The reac_init
routine may also be used instead of the
reacs
routines.
At the time of writing, the reacs
and
reac_init
functions do not guarantee safety, so they
should only be called before any routines in packages which rely on
this package.
Initialise the reaction package from the file
calib-inputs/reac.cal
. This filename is hard coded. If you
don't wish to use this, then simply set all the members of the
structure listed above.
The format of the file is:
beam_energy dispersion projectile_mass target_mass hitmass
Anything from a *
, #
or !
to the
end of a line is ignored.
The beam_energy should be specified in MeV. It will be multiplied by edisp before it's inserted into the reaction structure.
This function returns OK
(in C) or SS_OK
(in FORTRAN) if the file loads OK, it returns ABORT
(in
C) or SS_ABORT
(in FORTRAN) if there's a problem.
type should be REAC_SORT
for a sort code or
REAC_SIM
for a simulation.
Returns reac.edisp.
Sets reac.edisp.
Returns reac.e1.
Sets reac.e1.
Returns reac.p1.
Sets reac.p1.
Returns reac.mass[i].
Sets reac.mass[i].
Returns reac.vcm.
Sets reac.vcm.