Re: FLUKA: ntuple output from FLUKA?
Hi,
On Wed, 31 Jan 2001, Bob Zwaska wrote:
> I'm working on creating particle distributions from proton collisions
> with various targets in FLUKA. So far I have been using the USRBDX
> option and generating a histogram. But now we would like more
> particular information on the particles and would like to create an
> ntuple (suitable for use with PAW) carrying a limited, individual record
> for each particle. Does anyone know if there have been any routines
> created for ntuple output from FLUKA? And if not, what is the best way
> to access information on individual events? Would the collision tape be
> the best way going about getting the data?
You don't need to write a collision type: it is easier to
modify the user routine GEODEN, under ENTRY GEOBDX.
I copy here part of a new chapter I am writing for the manual
about the preparation of user routines, which could be useful
for your case.
Note that HBOOK takes only single precision data. Don't forget to
convert to single [ SNGL(RULL) ] all FLUKA floating point data, which are
in double precision
Alberto
************************************************************************
--------
geoden.f FLUKA general scoring routine
--------
Subroutine GEODEN is the highest level scoring routine in FLUKA,
which is called at all events where something happens which
could contribute to an estimator response (energy deposition,
end of a step, crossing of a region boundary, elastic or
inelastic interaction).
It is not really a user routine, but it has been included in the
list of user routines because it can be modified to replace
standard FLUKA scoring with alternative histogramming packages).
Each type of scorable event corresponds to a different ENTRY
with its own argument list, which acts as a "switch" to call one
or more corresponding specific lower-level subroutines. These
calls can be replaced by calls to other packages desired by the
user. Please remember that the scored amount (variable RULL), as
all other FLUKA variables, is in double precision and may need
to be converted to SNGL(RULL) if transmitted to single precision
histogramming packages.
Entries:
GEODEN (energy deposition events).
Estimators: SCORE, USRBIN, EVENTBIN, DETECT
Argument list (all variables are input only):
IJ : particle or generalized particle type
XA,YA,ZA: particle position
MREG: current region
RULL: amount of energy to be deposited (multiplied by particle's
weight)
ICALL: internal code calling flag (not for general use)
LLO: particle generation
ECONTR: kinetic energy of contributing particle
ICNTR: flag = 1 for particle escaping from system, discarded, or
in general depositing energy in the blackhole;
otherwise = 0
....... skip ...............
GEOSTR (spallations and fission events).
....... skip ...............
GEOTRK (particle step event)
....... skip ...............
GEOBDX (boundary crossing event) <===== THIS IS WHAT YOU NEED
Estimator: USRBDX
Argument list (all variables are input only):
IJ, XA, YA, ZA: see GEODEN above
TXX, TYY, TZZ: direction cosines of the particle
MREG: region before boundary crossing
NWREG: region after boundary crossing
RULL: amount to be scored (weight of the particle if current
is being scored; weight of the particle divided by the
cosine between its trajectory and the normal to the
surface if fluence is being scored)
ICALL, LLO, ECONTR: see GEODEN above
GEOBDX handles indirectly boundary crossing fluence (requested
by the USRBDX commands) via a call to USRSCX.
Note that fluence weighting via user routine FLUSCW is
done only inside USRSCX: if the latter are bypassed by
the user, no weighting can be applied, even if
EXTRAWEIgh has been requested.
GEOCLL (collision events)
....... skip ...............
GEORSN (production of residual nuclei)
....... skip ...............
************************************************************************
--
Alberto Fasso'
Stanford Linear Accelerator Center
Radiation Physics Dept. ms 48, 2575 Sand Hill Road, Menlo Park, CA 94025
Tel. +1 650 926 4062 Fax: +1 650 926 3569
fasso@slac.stanford.edu
>From March 1st, 2001:
CERN-EP
CH-1211 Geneve 23 (Switzerland)
Alberto.Fasso@cern.ch
Partial thread listing: