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 fromSTUPREcan 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,
STUPREis 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 theTRACKRstack. -
For photonuclear and electronuclear interactions,
STUPRFis called.
It is called for each secondary.
After the calls toSTUPRF, theFLKSTK(including its user variables) is flushed into theTRACKRstack. -
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.FLKSTKwill in turn be flushed into theTRACKRstack at the beginning of tracking. -
I agree the manual can be a bit confusing on this, we should update it.
It should notably specify whenSTUPREandSTUPRFare called, ie for which interactions, and how many times (inside/outside secondaries loop). It should stress that it is the interaction defining which betweenSTUPREandSTUPRFis called, not the content of the stacks (notably, e+/e- can be secondaries observed inSTUPRF). Finally, it should explicit which stack is being copied toTRACKRafterSTUPRE/STUPRFcall.
Thanks a lot for noticing this,
Hope this helps,
Gabrielle
NB: STUPRE/ STUPRF versus USDRAW calls ordering:
- “pure” electromagnetic interactions: for γ projectiles,
STUPREis called beforeUSDRAW, while for e+/e- projectiles,STUPREis called afterUSDRAW. - photonuclear and electronuclear interactions:
STUPRFis called afterUSDRAW.