Hello Xu Zhou, welcome to the FLUKA forum.
Let us focus on your original question first. Once that is resolved, we can revisit other related topics if needed.
As I understand it, you would like to obtain results that include only the decay products directly emitted by a radionuclide specified in your source.f routine, excluding contributions from the rest of the decay chain. By default, when running FLUKA in semi-analogue mode, the entire decay chain is simulated.
There are two possible approaches:
-
Suppress the transport of particles that do not originate directly from the radionuclide of interest. This topic points you in this direction.
-
Score only particles that originate directly from the radionuclide of interest. See this topic for a specific example of this approach.
The second approach is somewhat scoring-dependent and therefore more case-specific. For that reason, I will describe the first approach in more detail, as it is likely simpler in your case.
The idea is to prevent the transport of any particle that is not a direct decay product of the radionuclide defined in source.f. This can be achieved by setting the particle statistical weight to zero.
A way to implement this is via the usrmed.f routine, which is called before the transport of any particle in materials specified with the MAT-PROP card.
In usrmed.f, you can check the parent radionuclide of the particle about to be transported. The parent identity is available through the variable IAZTRK (from trackr.inc), defined as IAZTRK = A + 1000·Z + 1000000·M, where A is the mass number, Z the atomic number, and M the isomeric state.
To identify the radionuclide of interest, which you sample in your source.f routine according to your specific logic, you can use the variable LLOUSE available in trackr.inc. This variable is free for the user to fill, is inherited by all daughter particles and can be set in source.f via its counterpart LOUSE.
In practice:
-
In
source.f, setLOUSE = A + 1000·Z + 1000000·Mwhere A, Z and M specify the radionuclide of interest that you are using for the current primary particle. This value will propagate to all decay products. -
In
usrmed.f, ifIAZTRK .NE. LLOUSE, set the particle weightWEE = 0.0D0, effectively killing the particle.
Only particles emitted directly by the radionuclide of interest will satisfy IAZTRK = LLOUSE and be transported. This way, contributions from subsequent decay-chain products are excluded from the simulation results.
I hope this helps. Note that I have only partially tested the approach above so do not hesitate to reach out in case of issues.
Kind regards,
Fran