Stupre.f and stuprf.f routines / FLUKA stacks

Dear Andrea,

  • You might want to update your implementation in STUPRE. (1) You have put a printout about the primary only within the secondaries loop, hence the printouts from STUPRE can be a bit confusing. (2) In addition, you might have wanted to print CZTRCK (from trackr.inc) instead of ZFLK (from flkstk.inc).

  • For each “pure” electromagnetic interaction, ie the electromagnetic interactions with atoms and electrons, STUPRE is called.
    It is called once once per interaction, outside of the secondaries loop (hence why there is such a loop inside STUPRE).
    After the call to STUPRE, the EMFSTK (including its user variables) is flushed into the TRACKR stack.

  • For photonuclear and electronuclear interactions, STUPRF is called.
    It is called for each secondary.
    After the calls to STUPRF, the FLKSTK (including its user variables) is flushed into the TRACKR stack.

  • Hence in your case, since you have an electronuclear reaction: you should have 7 calls to STUPRF, and no call to STUPRE.

  • You should hence place your handling inside STUPRF, not STUPRE. You could hence use LOUSE(NPFLKA), from FLKSTK, for tagging the primary electron. FLKSTK will in turn be flushed into the TRACKR stack at the beginning of tracking.

  • I agree the manual can be a bit confusing on this, we should update it.
    It should notably specify when STUPRE and STUPRF are called, ie for which interactions, and how many times (inside/outside secondaries loop). It should stress that it is the interaction defining which between STUPRE and STUPRF is called, not the content of the stacks (notably, e+/e- can be secondaries observed in STUPRF). Finally, it should explicit which stack is being copied to TRACKR after STUPRE / STUPRF call.

Thanks a lot for noticing this,
Hope this helps,

Gabrielle

NB: STUPRE/ STUPRF versus USDRAW calls ordering:

  • “pure” electromagnetic interactions: for γ projectiles, STUPRE is called before USDRAW, while for e+/e- projectiles, STUPRE is called after USDRAW.
  • photonuclear and electronuclear interactions: STUPRF is called after USDRAW.
1 Like