Simulating Isotopic Source

In order to understand the matter, I decided to dump the information in the decay events, and this post provides a way to do it.

I attempted to write my own mgdraw.f and usrrnc.f user routines accordingly, but I’m confused of the output they produced. The essential files are attached below. In the mgdraw.f script, I called SODRAW and USDRAW subprocesses, with the former serving as a delimeter. A particular section of the output file looks like this:

SODRAW 1(NCASE)
USDRAW(condition: ICODE=110)
parent: 85(IZADCY) 211(IARDCY) 0(ISRDCY)
secondary: -6(KPART(I)) 7.4502998031675816E-003(TKI(I)) 6642.5749039295160(AGESEC(I))
USRRNC(condition: none)
daughter: 84(IZ) 211(IA) 0(IS)
USRRNC(condition: none)
daughter: 82(IZ) 207(IA) 0(IS)

I find that there are many things I’m unclear about. The first one is the execution order. It seems USDRAW is called once and USRRNC is called twice, and USRRNC is called after USDRAW is done. From this, I assume the ICODE=110 event only happened once per primary, with all decay products and secondary particles sampled out. But then how is USRRNC triggered for each daughter after the event is done? The second issue is that the info about the secondaries sometimes doesn’t make physical sense. Take a look at the snippet above. it seems only a single α particle is sampled out inthe decay chain. Where is the β electron? And where are the photons? There are more snippets that looks starange, some of which are listed below.

SODRAW 7
USDRAW
parent: 85 211 0
secondary: 3 7.9700002970639616E-006 1341670824.0425866
secondary: 7 1.0599999768601265E-005 1341670824.0425866
secondary: 7 7.4969000706914812E-005 1341670824.0425866
secondary: 7 5.6969799334183335E-004 1341670824.0425866
secondary: 7 5.6970200967043638E-004 1341670824.9115376
secondary: 7 1.0636619990691543E-003 1341670824.9115376
USRRNC
daughter: 83 207 0
USRRNC
daughter: 82 207 1
USRRNC
daughter: 82 207 0

SODRAW 10
USDRAW
parent: 85 211 0
secondary: -6 5.8694998733699322E-003 12725.112812810523
secondary: -6 7.4502998031675816E-003 12726.934907365894
USRRNC
daughter: 84 211 0
USRRNC
daughter: 82 207 0

In the snippet wher NCASE=7, there is no α particle emitted, whereas in the NCASE=10 snippet, there are 2 α particles emitted. Both of the cases doesn’t match the printed out decay chain. I printed out the age information, hoping to seperate the different decay stages in one decay chain. But if not all stages produces a secondary particle, it’ll be a challenge to tell them apart.

My key questions are:

  1. Is my interpretation of USDRAW / USRRNC call sequencing correct? I’m mostly confused of what triggered the calls, and how it is done in a single-thread environment(as I understaind it, each primary only uses one thread).

  2. Why might secondary particle listings appear physically inconsistent or incomplete? Could this be related to how FLUKA samples decays in semi-analogue mode, or might it point to an issue in my routine implementation?

  3. If this method is not reliable for decomposing decay stages, is there a recommended alternative within FLUKA to trace radiation back to its parent nuclide in a decay chain?

I recognize that some behavior may stem from my limited understanding of the internal sampling mechanics. I would greatly appreciate your guidance in interpreting these outputs or suggestions for a more robust approach to isolate parent-nuclide contributions.

Thank you once again for your time and expertise.

mgdraw_empty.f (10.4 KB)
model-v5.flair (2.3 KB)
model-v5001_udump.txt (49.3 KB)
usrrnc.f (1.4 KB)
iso_source.f (12.2 KB)
nuc_input(Bi_5hAt).dat (40 Bytes)