Last version:
FLUKA 2023.3.3, January 31st 2024
(last respin 2023.3.3)
flair-2.3-0d 13-Sep-2023

News:

-- Fluka Release
( 31.01.2024 )

FLUKA 2023.3.3 has been released.
Next FLUKA Course
The 23rd FLUKA course
will be held at the Lanzhou University, China, on June 1-8, 2024


font_small font_med font_big print_ascii

 [ 1 ]  [ 2 ]  [ 3 ]  [ 4 ]  [ 5 ]  [ 6 ]  [ 7 ]  [ 8 ]  [ 9 ]  [ 10 ]  [ 11 ]  [ 12 ]  [ 13 ]  [ 14 ]  [ 15 ]  [ back ] 


Sometimes the use of commonly used output environment can be of help for some users. A typical example, especially 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 variable FLUPRO has 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 must 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), in particular at the ENTRY BXDRAW. There the ntupla 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 $FLUPRO/flutil directory. There, a specific script to link to CERNLIB is already available: lflukac.

In the following we shall see in detail:

  1. the data card file;
  2. the beam definition;
  3. the explanation of the geometry (as defined in the data card file);
  4. the specific material definition;
  5. the choice of the parameters in the physical processes;
  6. the user routines;
  7. the compiling and linking procedure;
  8. the run of the example;
  9. an example of output analysis.

Giuseppe Battistoni; INFN, Milano
Francesco Cerutti; CERN, Geneva


Last updated: 10th of December, 2008

© FLUKA Team 2000–2024

Informativa cookies