Combine of EVENT and USRBDX

Dear @horvathd ,
I want to get every primaries’ generated photon numbers at the end surface, somewhat similar to the function combines EVENTBIN and USRBDX(not Part/cmq/pr, just like primary n1 generate how many photons pass the surface, primary n2…, primary n3…primary N…, get all of them). How can I achieve it?
Look forward to your help.

Dear @xiongbp,

this is not possible with build in scorings of FLUKA, you need to use the BXDRAW entry of the mgdraw.f user rountine.

See: 13.2.13} mgdraw.f general event interface | FLUKA

Cheers,
David

Dear @horvathd ,
I want to get how many photons cross the surface from TARG1 to TARG2 by every primary particle, the routine is that I wrote with reference to other netizens, could you help me to see if it right and whether it can achieve my goal?
Photon-surface-event.f (9.8 KB)
mix.flair (3.7 KB)


Thank you in advance.

Dear @xiongbp,

please find the a working mgdraw.f user routine below.

I used the BXDRAW entry to count the optical photons, and the EEDRAW entry to print to total number of optical photons crossing at each event. Please take a look at the comments in the file for further explanation.

Photon-surface-event_DH.f (2.3 KB)

Cheers,
David

1 Like

Dear @horvathd ,
I am sorry for late.
The file solved my problem and your explanation is very clear, thank you!