Customized energy distribution

Dear FLUKA experts,
I am trying to build an electron beam using the user routine. While trying to verify if the energy distribution curve is similar to what I would like to obtain, I have noticed that the plot reproduced by USRBDX has some issues with the x axis (Energy values).
In particular, as specified in the user routine I would like to have the energy values between 2 MeV and 12 MeV as shown in the figure


where on the y axis I have the particle weight.
However, when I try to reproduce the same curve in FLUKA, I get the following plot

where the values of energies are completely different.
I am not able to understand the reason of this difference.
Source_try.flair (3.7 KB)
WPTE_W.f (11.3 KB)

Best regards,
Lovepreet

Dear Lovepreet,

it is working for me correctly:
Source_try_51_plot

Since your USRBDX scoring is also limited to maximum 12 MeV, I can only think that there are some unwanted instructions added to your gnuplot command.

You can check the full gnuplot command on the Output page of Flair, the Gnuplot preferences in Flair, and the .gnuplot file in your home directory.

Cheers,
David

Thanks for your reply, Sir.
These are the gnuplot command:


Is there any error?

Lovepreet

Dear Lovepreet,

the gnuplot commands look correct.

Could you also verify that the Source_try_51_tab.lis file contains the correct energy values?
If yes, what happens if you try to plot it with gnuplot directly?

Cheers,
David

The file does not contain the correct values, Sir.
Source_try_51_tab.lis (17.9 KB)

Thanks,
Lovepreet

Dear Lovepreet,

could you upload your Source_try001.out file?

Cheers,
David

Source_try001.out (69.5 KB)

Thanks Sir,
Lovepreet

Dear Lovepreet,

the output file is correct. My only guess is that the results files are from an older simulation, and you did forget to process after the last run.

If I’m mistaken, could you copy only your Flair project file and user routine to a new folder and run it again?

Cheers,
David

You are right, Sir, I solved the problem. I will keep this issue in mind.

Thanks a lot,
Lovepreet