%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% FLUKA codes for the set-ups described in Rutjes & Sarria, "Evaluation of Monte Carlo tools for high energy atmospheric physics"
%%% Contact : Gabriel Diniz, gdiniz93@gmail.com

• General comments:

The files available  in this article do not run independently, they are inputs for FLUKA program.
The user must download the programs on:
 
http://www.fluka.org/fluka.php ; for FLUKA


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

• FLUKA:

- The files use standard FLUKA engine.
- During FLUKA installation, it is required for the user some specification on the bash profile for the program to run properly:
  . "export FLUFOR=gfortran"; fortran compilers
  . "export F77=gfortran" ; fortran compilers
  . "export FLUPRO= .../FLUKA"

- Further details on FLUKA installation and running can be found at: http://www.fluka.org/fluka.php?id=man_onl
- FLUKA .inp file is written following a rigid format explained in detail on the manual: http://www.fluka.org/fluka.php?id=man_onl .
- The .inp files can be kept in separated directories from the main program, the output is localized in the same directory than the .inp file.


- The particle detection is done by the USERDUMP card which was personalized by modifications on the mgdraw.f file.
  . The mgdraw.f is localized in the ".../FLUKA/usermvax/" directory.
  . The file was modified to have an output similar to the EGS5 output.
  . The mgdraw.f can be modified to print any possibility the user wants.
  . A list of FLUKA variables can be found in the file "(TRACKR)" in the ".../FLUKA/flupro/" directory.

- In order to run the FLUKA with the modified file, the user needs to link the modified file with the main program with the following commands:
  . $FLUPRO/flutil/fff *name_of_modified_mgdraw*.f
  . $FLUPRO/flutil/lfluka -o myfluka -m fluka *name_of_modified_mgdraw*.o
  . $FLUPRO/flutil/rfluka -NX -MY *name_of_inp_card*  -e myfluka
- X and Y are integer numbers refering to user specified number of cycles and runs. In this work X = 0 and Y = 1.

- The used variables in the program output were:

  . XSCO    - Particle x position [cm]
  . YSCO    - Particle y position [cm]
  . ZSCO    - Particle z position [cm]
  . ATRACK  - Particle "age" - time variable [s] (standard); it was pos-processed to [ns]
  . ETRACK  - Particle total energy [GeV] (standard); modified to [keV]
  . AMELCT  - Electron rest energy [GeV] (standard); Used to obtain the particles kinetic energy
  . JTRACK  - Particle ID; 7 for photons, 3 for electrons and 4 for positrons. (rearranged for 0 ; -1 and 1)
  
- We do not made available the mgdraw.f modifications due to license limitations:

"3. FLUKA is  licensed for  Use by the  Licensee  only,  and  the
Licensee shall not market,  distribute,  transfer, license or
sub-license, or in any way make available  ("Make Available")
FLUKA  or  Modifications,  in  whole  or  in  part,  to third
parties, without prior written permission. The Licensee shall
not assign or transfer this license."

See further in: http://www.fluka.org/fluka.php?id=license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%