Order of Events: mgdraw.f Output

Hello @rross ,

Looping over the tree of events in FLUKA is indeed done in a sequential manner. Let’s say your primary neutron A has an inelastic interaction producing secondaries B and C which are explicitly transported. If in turn secondary B produces tertiary particles D and E, these are tracked first and sequence, then the code goes again one level up in the tree to particle C and tracking all it’s possible subsequent interactions and daughter particles, and so on… .

It is not entirely clear to me where your problem exactly is situated or how the code gives problems. Perhaps you can try in incremental steps, simulating only one primary interaction but already stopping the (pseudo-) code before producing more secondaries and checking if they are written out in the order you expect. You can make sure to each time use the same random number seed to do these tests by correctly setting the RANDOMIZ card.

Allow me to also point you to a couple of other threads which could give some inspiration for your work (in case you didn’t check these yet), on getting isotope information, on extracting parent particle information and on accessing secondary particle information.

Hope this is helpful, cheers,

Andreas