Invariant mass spectrum

Dear Experts,
In my simulation i want to calculate energy spectrum of mu+/- and find invariant mass spectrum. Is there a way to keep track on number of event during simulation? For example i user USRYIELD to calculate spectrum of mu+/-, but how can i attach id of event to that spectrum(event 1: mu+ 100MeV, 150MeV, mu-, 240 MeV, 50 MeV, …event 1000…)?
Only idea i have is to make 1 particle in each run and increase number of runs to statistics i want.

Dear Semyon,

analyses of this type can be performed with the MGDRAW user subroutine in mgdraw.f that provides a general event interface. The relevant documentation can be found in Sec. 13.2.13 of the FLUKA manual.

Best regards,
Robert

A post was split to a new topic: Access USERDUMP output via text editor or ROOT