Scoring the information of all the secondaries from inelastic nuclear interactions

Hello Kaiwen,

Welcome to the FLUKA Forum.

To attain your goal, the missing relevant piece I did not see in your suggested course of action is to use a thin target as your geometry and to use the LAM-BIAS card to shorten the inelastic scattering length of your beam particles accordingly. Feel free to take a look at the relevant section of the manual or this lecture from the last FLUKA Beginner Online Training.

A possible/natural way to score secondaries from a nuclear inelastic interaction consists in issuing a USRYIELD card, requesting Type: EMERGING. You will need need several cards for the various angular domains and particle species you’re interested in. With a sufficiently thin target and a sufficiently biased (nuclear) inelastic scattering length for beam particles, the risk of scoring spurious contribution from reinteraction secondaries should be negligible (going overboard one can do a sensitivity study to make sure spectra do not change significantly). To be absolutely sure, though, you could look into the usrmed.f routine (needs to be requested with MAT-PROP) and set the statistical weight to zero for those particles you wish to effectively discard. The USRYIELD approach has the advantage that all the well-tested scoring, processing, and plotting machinery is at your fingertips with Flair.

Alternatively, in a more “do it yourself” way, you could proceed via ENTRY USDRAW in mgdraw.f as you report, keeping an eye on / making sure that you filter by JTRACK=-2, IBARCH(-2)=12, and ICHRGE(-2)=6 (your primary 12C), as well as by LTRACK=1 (beam particle) and by incoming energy ETRACK-AM(-2) not too far away from the beam kinetic energy (kinetic energy as is, not per nucleon). You can e.g. print all secondary info (including their statistical weight) out to a file and apply your own careful post-processing (it’s very easy to slip here and there, so be on your toes). With this filtering conditions prior to your WRITE statement you’re sure to be free from reinteraction secondaries; you can still look at usrmed.f to kill particles at your discretion if you wish. Do keep an eye open in case you stumble upon surviving biased primaries (see manual LAM-BIAS).

Regarding the definition of secondaries, there is no formal problem, it’s only an operational question. In FLUKA you get heavy fragments in include/fheavy.inc, the rest of secondaries in include/genstk.inc, and the residual (if any) in include/resnuc.inc, as you indeed witnessed in your attempt.

Incidentally, do not forget to add a PHYSICS card with SDUM=COALESCE and WHAT(1)=1, and another PHYSICS card with SDUM=EVAPORAT and WHAT(1)=3. Beware to link with ldpmqmd / run with flukadpm if your run ecounters ions with kinetic energy in excess of 100 MeV/n.

Cheers,

Cesc

PS1: If you call your sample thickness dz, a reasonable estimate for the factor f<1 by which to shorten the inelastic scattering length lambda_i (“between consecutive nuclear inelastic interactions” implicitly understood) can be obtained as follows. You extract lambda_i from the table of inelastic scattering lengths in the output file for beam particles in the relevant material. You then set f such that dz/ (f * lambda_i) ~ 1, so that every primary will (on average) undergo roughly one nuclear inelastic interaction. Note that this deliberate distortion of the interaction length is automatically accompanied by the corresponding modification of the statistical weight of the concerned particles and their secondaries, so that the expectation value of physical observables is respected.

PS2: when using the LAM-BIAS card, make sure you select SDUM=INEPRI to just bias the primaries (beam particles).