Hi @nnikolop , my mgdraw generates a _fort.72 file with the content I asked for if a photonuclear reaction takes place:
IF(ICODE.EQ.101.AND.JTRACK.EQ.7) THEN
Likely, this is not your case: you talk about secondary photons, which are generated by other processes, such as electron bremsstrahlung. In this regard, my routine - that was addressing another problem - is not meant as ready for use, rather as an example to be customized by you. You see for instance in the USDRAW entry header that ICODE is equal to 208 (and not 101) in case of bremsstrahlung by electrons and positrons (i.e. EMF particles). Also, JTRACK refers to the parent particle, which in your case may be 3 (electron) and not 7 (photon). As for the variables listed in the mentioned genstk.inc file, you need to print them in mgdraw, as I do for the ones I’m interested in, in order to read their value in the produced _fort.72 file. As @horvathd pointed out
the genstk.inc file is not an output file and remains unchanged, I referred you to it because you find there the variable names to be used in mgdraw according to your specific needs.
User routine customization is an advanced user practice. For the photon spectrum purposes you declared, I’d reiterate my suggestion to use USRTRACK over a region or USRYIELD/USRBDX on a region boundary, which are exactly meant for this and just consist of an input card to be properly filled, opposite to an event-by-event file to be generated by user’s coding according to the FLUKA tracking logic and structure.