Download GLoBES GLoBES

Transcript
8.3 Introduction to the syntax of AEDL
65
Now one can refer to the name #ch2, while the actual channel definition comes later. The
internal representation of this automatic variable is a number, which obtains its value
from a counter for each type of environment. For example, for channel the counter is
numofchannels. The counter keeps track of how many different names there are for one
type of environment, which means that it counts the number of channels, rules, energy
resolution functions etc.. Thus, the automatic variables are numbered in the order of their
definition, and the number can later be used to refer to them in the C code (from 0 to
numof...−1). In order to facilitate the the mapping from names in AEDL to indices in C
there are two functions glbNameToValue and glbValueToName which make this transition
(see Sec. 6.2, page 43).
Within each environment type, there are several variables beginning with @, which can
only be used within the appropriate type of environment. In many cases, they have a
special syntax, such as @channel.
If you want to have several experiments in one file, separate the different experiments
by
#NEXT#
This command resets the counters for channels, rules, fluxes, cross section and energy resolution environments. All variables have their scope limited by either %!GLoBES, #NEXT#
or EOF. This allows a consistent treatment of various experiments in one file.
As another feature of AEDL one can use include files with the include command.
Includes can be nested up to MAX_INCLUSION_DEPTH, which is currently set to 10. Error
reporting works for nested includes, too. The included file is not required to begin with
%!GLoBES to facilitate cut and paste:
include "./file_1"
With this include mechanism, one can use constructions such as
include "NuFact.gls"
#NEXT#
include "JHFHK.gls"
in order to initialize a combined analysis of the experiments defined in the files NuFact.gls
and JHFHK.gls. Note that one has to use quotation marks for filenames in AEDL. Even
if one uses the automatic variable #CC in both experiments, but the cross section data are
different (for example, because of different target nuclei), the correct cross section data will
be applied to each of the experiments. Note that, alternatively, one can also load both files
successively by two separate calls of glbInitExperiment.
Furthermore, one can define constants such as
Pi = 3.141
These constants can not only be defined within one AEDL file, but also by the calling C
program, which allows to use a simple but powerful variable substitution mechanism as
described in Sec. 7.3.
In addition, some simple algebraic manipulations are possible, such as