[fluka-discuss]: RE: Extracting and propagating information on secondaries from interactions

From: Kristian Ytre-Hauge <Kristian.Ytre-Hauge_at_uib.no>
Date: Wed, 4 Jul 2018 11:42:28 +0000

Dear Vasilis,
Thank you for pointing me in the right direction. I think I have a working solution now. My implementation was inspired by the lecture notes advanaced-userroutines2016 slide 52 (stuprf: an example (I)). However, what was not written in the slide was the need to include the secondary particle stack:
INCLUDE '(GENSTK)'
Below are the relevant parts of my code from stuprf.f. Please comment if anything seems wrong.
      IF (LINEVT) THEN
         IF(KPART(NPSECN) .EQ. 8 ) THEN
            SPAREK(1,NPFLKA)=XX
            SPAREK(2,NPFLKA)=YY
            SPAREK(3,NPFLKA)=ZZ
            SPAREK(4,NPFLKA)=Cxr(NPSECN)
            SPAREK(5,NPFLKA)=Cyr(NPSECN)
            SPAREK(6,NPFLKA)=Czr(NPSECN)
            SPAREK(7,NPFLKA)=Tki(NPSECN)
            SPAREK(8,NPFLKA)=MREG ! Identifies region of origin (water phantom =10)
         END IF
      END IF
Best,
Kristian

From: Vasilis Vlachoudis [mailto:Vasilis.Vlachoudis_at_cern.ch]
Sent: onsdag 9. mai 2018 15:09
To: Kristian Ytre-Hauge <Kristian.Ytre-Hauge_at_uib.no>; fluka-discuss_at_fluka.org
Subject: RE: Extracting and propagating information on secondaries from interactions

Hi Kristian,

you should use the stuprf.f (not mgdraw) to flag your particles
and maybe later recover the information with the mgdraw.f

Vasilis
________________________________
From: owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it> [owner-fluka-discuss_at_mi.infn.it] on behalf of Kristian Ytre-Hauge [Kristian.Ytre-Hauge_at_uib.no]
Sent: Tuesday, May 08, 2018 13:40
To: fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
Subject: [fluka-discuss]: Extracting and propagating information on secondaries from interactions
Dear Fluka users and experts,
I am trying to store information on secondaries from inelastic interactions. I need to assign this information to the secondaries and propagate the information further to their respective daughter particles and so on. I was hoping to do this using mgdraw.f or stuprf.f, however, with the available user variables (e.g. SPAUSR) I am so far only able to assign/propagate the same information for all secondaries. An example of this is given in the code below. Here I am interested in storing (and also propagating) position and direction of neutrons created in an interaction. The information entered in SPAUSR seems to be inherited by all secondaries. This means, as far as I understand, that if there is more than one neutron created in the interaction, only the information on the last neutron (in the loop up to NP) is stored. Of course I could write all the information to a separate file, but my goal is however to separately store, and also propagate to daughter particles, information on secondaries.
More specifically, secondary neutrons (daughters) produced in inelastic proton collisions can further produce protons (granddaughters) through elastic or inelastic scatters in my setup. I need to be able to identify exactly the neutron (and its initial properties), i.e. the daughter, that produced a proton, i.e. a granddaughter, through (n,p) reactions.
Any suggestions on how to achieve this would be much apprciated.
Best regards,
Kristian Smeland Ytre-Hauge

from usdraw:
      IF(ICODE .EQ. 101 .AND. MREG .EQ. 10) THEN
         DO IP = 1, NP
            IF(KPART(IP) .EQ. 8) THEN
* Store origin and direction of neutron (x,y,z)
               SPAUSR(1)=XSCO
               SPAUSR(2)=YSCO
               SPAUSR(3)=ZSCO
               SPAUSR(4)=Cxr(IP)
               SPAUSR(5)=Cyr(IP)
              SPAUSR(6)=Czr(IP)
            ENDIF
        END DO
      END IF



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Wed Jul 04 2018 - 22:20:27 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 04 2018 - 22:20:45 CEST