MGDRAW to score every event of the boundary

Dear experts,
I use neutron to irradiate a scintillate detector, please see the attachments.
abscff.f (1.4 KB)
detector(ZnO).inp (4.1 KB)
surH.f (3.3 KB)
wvlnsh.f (2.7 KB)
I use surH.f to get how many photons per particle generated(originally neutron), but the files (userdump generated) shows that almost zero. Could you help me to see if there any error?
Look forward to your help.

Dear Xiong,

  1. Your routine records the number of triton crossing between the regions, not optical photons.
  2. You use a FLOOD source, so in most of the events the primary particle is not interacting with your geometry.


Dear @horvathd ,

  1. Yes, JTRACK should be -1, I have forget it.
  2. I will instead it with type=positive.