: The input data card
: Using CERN Library inside
: Using CERN Library inside
Sometimes the use of commonly used output environment can be of help
for some users. A typical example, expecially for users belonging
to the High Energy Physics community, is the case of HBOOK histograms or
ntuple.
In order to illustrate how to make use of the HBOOK interface to generate
an output from FLUKA, we shall consider the case of the test
of the propagation of muons in sea water, where the goal is to
predict the residual energy and the scattering angle of high energy muons
which have crossed a considerable depth of sea water.
This kind of calculation is typically necessary in the framework of the
design of large neutrino telescopes, like the case of the ANTARES
experiment. In this case, a typical approach is to consider muons at
different fixed energies and propagate them through a layer of water having
the proper chemical composition.
In our example, the quantities of interest will be recorded into a HBOOK
ntupla.
In order to do this, the user will prepare some specific user routine
to book, fill and save the HBOOK ntupla. However, there are many different
ways which can be used to arrive at the same result, and
this example does not claim to represent the only efficient way to
accomplish this goal.
We shall describe this application for a unix (Linux) environment, where
we suppose that a standard FLUKA release has been installed. Therefore
we also assume that the environmental variables FLUKA (or FLUPRO) and
FLUTIL have been defined.
In the following, all codewords addressable in the FLUKA User Manual will
be typed in bold characters. File names belonging to the FLUKA package will
be typed in italic style.
In summary, the problem can be faced in the following way.
- The mono-energetic muon beam, the geometry and the
material will be defined in a very simple way, by means of the standard
data cards of FLUKA.
- The user can initialize HBOOK at job start, by filling the
USRINI routine (in the usrini.f file). In our example we have chosen
to prepare a completely new routine for HBOOK initialization, HISTIN (histin.f) and call it from USRINI. In order to activate the call to
USRINI, the user has to invoke USRICALL in the data card file.
- Since muon properties must be measured at a given depth, it is
possible to define within the geometry description a border between two
regions placed at the desired depth.
Then, muons can be intercepted event by event
at run time while crossing this border. This is easily accomplished
by means of the MGDRAW routine (in the mgdraw.f file), and in
particular in the ENTRY BXDRAW. There the ntuple variables can be filled.
In order to activate the call to MGDRAW routine, the user must use
the option USERDUMP in the data card file.
- The HBOOK file can be closed at the end of the run and this can be
done inside the USROUT routine (in the usrout.f file).
In order to activate the call to USROUT, the user must invoke USROCALL in the data card file.
- The user has to build his own FLUKA executable linking the previously
adatapted source files (usrini.f, usrout.f, histin.f, mgdraw.f) by
means of the
proper compiling and linking script available in the $FLUTIL directory.
There, a specific script to link to CERNLIB is already available: lflukac.
In the following we shall see in detail:
- the data card file;
- the beam definition;
- the explanation of geometry (as defined in the data card file);
- the specific material definition;
- the choice of the parameters in the physical processes;
- the user routines;
- the compiling and linking procedure;
- the run of an example;
- example of output analysis.
: The input data card
: Using CERN Library inside
: Using CERN Library inside
Giuseppe Battistoni
平成17年3月7日