Energy deposition by fluorescence photons in a scintillator, using mgdraw

Dear Fluka experts,
I hope you could help me with my issue. I’m working on a theoretical model to predict the signal output for a given scintillator designed for x-ray imaging. I need to account the contribution to scintillation light given specifically only by fluorescence photons. The trouble is to exclude the contribution by the primary particles, which are also photons. To do so, I decided to first calculate energy deposition, trying with the option ENDRAW of the routine mgdraw. Using a IF condition my idea was to select only photons having energy lower with respect to the primary beam photons. That is the code:
ENTRY ENDRAW ( ICODE, MREG, RULL, XSCO, YSCO, ZSCO )
LFCOPE = .TRUE.
OPEN ( UNIT = 60, FILE = “energyfluo.txt”, STATUS = ‘UNKNOWN’)

  IF(MREG.EQ.4 )THEN !region "4" is the scintillator region
  	IF(JTRACK.EQ.7) THEN 
  	IF(PMOFLK(7).LT. PBEAM) THEN
  	WRITE(60,*) SNGL(RULL)
  	END IF
  	END IF
  END IF  

The fact is that I’m not sure about the variables I used to select energy (since dealing with photons I decided to select fluorescence photons with a condition on momentum), as well as I don’t understand why I get an empty file when IF(JTRACK.EQ.7) condition is activated (when not acivated results seems to be anyway meaningless).

(another question is about EMFFLUO: setting fluorescence “on” or “ignored” I get the same number of optical photns output, while setting “off” I get a very reduced output…so it is not clear to me what is intended with options “off” or “ignored”…)

Thank you in advance for any precious help!
Riccardo

Hi,

If you want to see what’s the contribution/effect of fluorescence in your problem, why not do a run with fluorescence on and one with fluorescence off? The difference in whatever you are scoring (optical photons?) will be your sought quantity.

Cheers,

Cesc

PS: presumably you are using a DEFAULT which already has fluorescence on. That’s why you see no difference when requesting EMFFLUO on or ignored (implying whatever your selected DEFAULT prescribes).

Hi Cesc,
many thanks for your help…I wasn’t considering the DEFAULT options. Therefore, following your advice, I was able to score the effect of fluorescence. I would still be interested in how I could implement the solution using mgdraw.f , justo to get more familiarity using user routines…

Thank you

Cheers
Riccardo