How to get number of photons crossing from region to region

Hello dear experts, I am a beginner at FLUKA and I have been trying to get the number of photons passing from the region of glue to glass. How can I get the data using USRBDX card or should I use some other card. I have attached the input file below. Also how I can using Fortran’s mgdraw file, find the energy spectrum of the optical photons coming out of the scintillator.
scintillator.flair (3.2 KB)
scintillator.inp (3.1 KB)

Dear SRUJAN KULKARNI,

First, I would like to point out a few errors in your flair file which would prevent you from getting any meaningful result. You are using particle OPTIPHOT as source, which is fine, but with an energy of 511 keV. This is outside the default FLUKA cut for optical photons. Use a more realistic value such as 2.5 eV:
image
Also, you are generating your optical photons in the material Barium, for which there is no assigned OPT-PROP card to define the index of refraction. This card is needed otherwise optical photons will not propagate further in the material. You should also fix the energy range in the USRBDX card. For example it could be between 0 and 10 eV:
image
After fixing these issues, you will obtain a photon count from the regions Glue to Glass. You must first run the simulation then “Process” (all in the run tab). A file with extension _23_sum.lis is created. You can open such data files in Flair in the Run/Files tab. In it, you will see the integrated spectrum in units of particles per primary (Part/pr) with the percent error:
image
The spectrum is in the file with extension _23_tab.lis. You can plot the spectrum using tools of the plot tab.

Therefore, you do not require USERDUMP to obtain the spectrum. I would strongly recommend you run without it if you don’t need it.

1 Like

Dear @blefebvre ,

Thank you for pointing out the errors, I have fixed them. Could you please help me to get a plot for the output data. When I try to plot I’m getting the following.


Regards,
Srujan Kulkarni

Dear SRUJAN KULKARNI,

You got the plot right. It is just a peak because you have a monochromatic source. You might want to uncheck the log scale option for the x-axis since you scored linearly on your USRBDX card.

For details on how to plot with Flair, I invite you to consult the Beginner’s course content. A dedicated lecture on optical photons is part of the advanced course.

1 Like

Dear @blefebvre ,
Thank you so much.

Regards,
Srujan Kulkarni