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 fromSTUPRE
can be a bit confusing. (2) In addition, you might have wanted to printCZTRCK
(fromtrackr.inc
) instead ofZFLK
(fromflkstk.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 insideSTUPRE
).
After the call toSTUPRE
, theEMFSTK
(including its user variables) is flushed into theTRACKR
stack. -
For photonuclear and electronuclear interactions,
STUPRF
is called.
It is called for each secondary.
After the calls toSTUPRF
, theFLKSTK
(including its user variables) is flushed into theTRACKR
stack. -
Hence in your case, since you have an electronuclear reaction: you should have 7 calls to
STUPRF
, and no call toSTUPRE
. -
You should hence place your handling inside
STUPRF
, notSTUPRE
. You could hence useLOUSE(NPFLKA)
, fromFLKSTK
, for tagging the primary electron.FLKSTK
will in turn be flushed into theTRACKR
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 whenSTUPRE
andSTUPRF
are called, ie for which interactions, and how many times (inside/outside secondaries loop). It should stress that it is the interaction defining which betweenSTUPRE
andSTUPRF
is called, not the content of the stacks (notably, e+/e- can be secondaries observed inSTUPRF
). Finally, it should explicit which stack is being copied toTRACKR
afterSTUPRE
/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 beforeUSDRAW
, while for e+/e- projectiles,STUPRE
is called afterUSDRAW
. - photonuclear and electronuclear interactions:
STUPRF
is called afterUSDRAW
.