EVENTBIN output simplification?

Dear FLUKA community

I’m using EVENTBIN for the scoring of energy deposition event-by-event on 24 detectors/regions. The problem is with the output generated by EVENTBIN, because it is usually a huge file given all the lines in the form:

Binning n: 1, "De19 ", Event #: 1, Primary(s) weight 1.0000E+00
Number of hit cells: 0

If I run, say, 1e8 primary particles, I got this message 1e8 times, even when I ask to print only non-zero events!

My first idea was to use the DETECT option, but the limit of 20 detectors seems a little tricky to override (I changed NDTCM2 = 24 in detloc.inc and NDTCMX = 24 in detect.inc without success).

Any ideas on how to get the EVENTBIN output in a straight column way, or how solve the issue of 20+ DETECT cards? That would be very helpful.

Thank you all in advance!

Kind regards
Federico

Dear Federico,

To suppress the printing of zero events in the EVENTBIN scorings, you can add a ROTPRBIN card with WHAT(3) equal to 100000 for the scoring. (Storage field in Flair.)

Unfortunately, the number of DETECT scorings are fixed in FLUKA. Changing the maximum number requires a new patch release.

Cheers,
David

1 Like

Dear Dávid,

Thank you for your answer!

Indeed, the WHAT(3) in ROTPRBIN removed the zero events. One last thing: is it possible to completely remove the messages of the form

Binning n: 1, "De19 ", Event #: 1, Primary(s) weight 1.0000E+00
Number of hit cells: 1

for all events? To get a raw column of data? Just to avoid offline processing.

Thank you very much once again!

Cheers,
Federico

Dear Federico,

you can select the binary (unformatted) output, and then read the values and process them in a single a single step with your external program.

Here you can find a skeleton Fortran program reading an unformatted file, containing only one Region type EVENTBIN scoring, where the Print: Non-Zero Cells option is selected.

eventbin.f90 (1.1 KB)

Cheers,
David

Hi Dávid,

Thank you again for your answer and predisposition! So, offline it should be. That fortran script will for sure come in handy.

Cheers,
Federico

Dear Federico,

I was able to find a way to access FLUKA’s internal storage during the run with some user routines, so you can implement an online processing of your own.

usreou.f (1.3 KB) user routine is called at the end of each event. Here you can implement your data processing code.
usrout.f (461 Bytes) is called at the end of the run. This can be used for final processing and printout. You need to add an USROCALL card to your FLUKA input to activate it.
mycommon.inc (55 Bytes) In this include you can define your custom variables, which will be kept during the FLUKA run.

These routines should work with multiple EVENTBIN scorings with many regions.
I think the example printout is self explanatory. If something is not clear, please let me know.

Also, please test it first by yourself as well, if it is working correctly.

Cheers,
David

2 Likes

Dear Dávid,

This approach looks certainly promising. I will take a look at it, and come back if something exceeds me.

Thank you for your engagement!

Cheers,
Federico