Re: List of particles produced

From: Alberto Fasso' <>
Date: Fri, 17 Jul 2009 19:01:26 -0700 (PDT)

Dear Johannes,

it is true, as Anna says, that the use of the user routine MGDRAW
is not for beginners. However, if you know Fortran, it can provide a
straightforward answer to your request.

Invoke the mgdraw ENTRY USDRAW by the command USERDUMP, with
WHAT(1) = 100. and WHAT(4) = 1.

Do your programming after the entry USDRAW in the
$FLUPRO/usermvax/mgdraw.f file:

ICODE = 101 means that a hadronic inelastic interaction has just occurred.
The particles generated and their properties are in the COMMON block
GENSTK (GENerator STacK). I copy here part of the content of GENSTK from the
INCLUDE file $FLUPRO/flukapro/(GENSTK). The file is already INCLUDEd
at the beginning of the mgdraw.f file.

* /Genstk/ is the storage for secondaries created in hadronic *
* events *
* Np = total number of secondaries *
* Kpart (ip) = id of the ip_th secondary *
* Cxr (ip) = x-axis direction cosine of the ip_th secondary *
* Cyr (ip) = y-axis direction cosine of the ip_th secondary *
* Czr (ip) = z-axis direction cosine of the ip_th secondary *
* Tki (ip) = laboratory kinetic energy of ip_th secondary (GeV)*
* Plr (ip) = laboratory momentum of the ip_th secondary (GeV/c)*
* Wei (ip) = statistical weight of the ip_th secondary *
* Agesec (ip) = "age" of the ip_th secondary with respect to the *
* interaction time *

Do a DO loop from 1 to NP (number of secondaries generated):

       IF(ICODE .EQ. 101) THEN
          DO IP = 1, NP
             here you can see which particle it is: KPART(IP)
             which direction: CXR, CYR, CZR(IP)
             note that the position is the same for all, and is given
                 by the entry arguments XSCO, YSCO, ZSCO
             the energy and momentum: TKI, PLR(IP)
             the weight (WEI(IP), important if you did any biasing, explicitly
                 or implicitly)
             the age: AGESEC(IP)
          END DO
       END IF

Compile and link.

Best regards,


On Wed, 15 Jul 2009, wrote:

> Dear FLUKA experts,
> I am sending a proton beam on a fixed copper target.
> Is there a possibility to get a "list" of particles which where produced,
> i.e. do I have to use a certain card?
> Thank you very much,
> Johannes

Alberto Fasso`
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762   Fax: (1 650) 926 3569
Received on Sat Jul 18 2009 - 13:44:09 CEST

This archive was generated by hypermail 2.2.0 : Sat Jul 18 2009 - 13:44:12 CEST