RE: [fluka-discuss]: Tracking particle origin and TOF

From: Anton Lechner <Anton.Lechner_at_cern.ch>
Date: Fri, 7 Feb 2014 14:48:45 +0000

Dear Alfredo,

It is possible to keep track of where certain interactions happened and to propagate this information even to daughter particles. I provide you some example below, but let me first remark the following: assume an electron is created in a pair production event, but then undergoes an ionization event where a delta-ray is produced. FLUKA does then not distinguish which of the electrons coming out of this ionization event was the incoming electron and which the delta-ray. In this sense, it is also ambiguous to say which of these two electrons was originally created by pair production. Eventually, there might be many ionization events before the relevant part of your detector is reached (evidently depending on the production cut you set!).

Now to the technical part: in the MGDRAW user routine, one has an entry (USDRAW) which is called whenever you have an interaction (if this entry is activated by means of the USERDUMP card). In particular, in this entry, one can distinguish the type of interaction (via the value of ICODE), one can determine the current region/position in the geometry (via MREG, XSCO, YSCO, ZSCO), and one can access information about secondaries produced in this interaction (looping over particles in GENSTK). You can then store this information in some user variables in TRACKR (=current particle tracked), which are eventually also inherited by daughter particles. For example:

* ICODE 217 is pair production
        IF (ICODE .EQ. 217) THEN
* SPAUSR and ISPUSR are arrays which can be filled by user to keep track of particle information across generations
* Storing position of pair production:
           SPAUSR(1) = XSCO
           SPAUSR(2) = YSCO
           SPAUSR(3) = ZSCO
* Storing energy of incident photon (from TRACKR)
           SPAUSR(4) = ETRACK
* Storing generation of incident photon (from TRACKR)
           ISPUSR(1) = LTRACK
        END IF

The user variables are inherited by daughter particles (here: the electron and positron created in pair production). This is done by the STUPRF and STUPRE routines, which copy this variables to the relevant stack variables (STUPRF is for hadrons, muons, neutrinos, etc., while STUPRE is for electrons, positrons, photons). When secondaries are eventually tracked, the user variables are copied back to TRACKR and they are again inherited by new particle generations (if they are not overwritten meanwhile).

You can then use the user variables later on for example when a particle crosses a boundary (in entry BXDRAW) or even for any arbitrary particle step (in MGDRAW).

To make things even more complicated you could even modify the user variables when they are copied from TRACKR to the stack variables (in STUPRF and STUPRE). Further details can be found under:
http://www.fluka.org/web_archive/earchive/prova/1606.html
https://www.fluka.org/free_download/course/triumf2012/Lectures/AdvancedUserRoutines2012.pdf

Finally, to come to your question concerning time of flight: there is a variable in TRACKR (called ATRACK) which gives you the time passed since the creation of the primary particle. You can for example make use these variable in various MGDRAW entries.
To use timing information with FLUKA built-in scoring, I also refer you to following discussion on the mailing list:
http://www.fluka.org/web_archive/earchive/new-fluka-discuss/1968.html
http://www.fluka.org/web_archive/earchive/new-fluka-discuss/1984.html

Cheers, Anton




________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of Alfredo Martin Castaneda Hernandez [amch031182_at_gmail.com]
Sent: 04 February 2014 14:02
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: Tracking particle origin and TOF

Dear FLUKA experts.

I would like to ask you if there is a way to track the origin of particles, let say
I am looking at the flux of elecrons+positions in some region of my detector,
I want to know from where those particles are originated,

All of them are coming from photon conversion? and what is the percentage from prompt interactions?

Another question is related to the Time Of Flight of each particle, the reason I am asking this
is because I want to use FLUKA to estimate the flux of particles for long living particles, so I need to consider only particles with TOF>500ns, is there a way to make this consideration?

Thanks.

--
Alfredo
Received on Fri Feb 07 2014 - 17:00:46 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 07 2014 - 17:00:47 CET