How to show the shower spread along beam axis by FLUKA?

Dear experts, we know that the shower transverse size would change to be larger along the beam axis when beam impinging a target. The transverse size affect the operation temperature and the energy deposition distribution. Now I want to create a graph shows transverse size along beam axis like the following picture but I have not found cards with similar function in the FM of FLUKA. Could experts provide some suggestion on how to show the shower spread along beam axis by FLUKA ? Thank you.

Hello Jia,

Since you are concerned about the energy deposition, the appropriate card in FLUKA is the USRBIN card with the ENERGY option for the scoring. It will provide you the energy deposition per unit volume in the mesh you require.

Now, since you question is just focused on the transverse beam size of the energy deposition, there are two viables option:

  1. You can collect the energy deposition matrix from the FLUKA simulation and postprocess the data.
  2. You can exploit the 1D Trace-H & 1D Trace-V plots in the flair interface (give a look at this discussion: Question on USRBIN plot "Type")

To further comment about the latter, the 1D Trace plot will provide the position of the maximum and the FWHM (remember to correct it to the rms beam size). Since you are interested only in the beam size you will need to just import this quantity and plot it against the longitudinal coordinate.

Taking the input file from your previous question (Peak energy deposition density and longitudinal power - #5 by dcalzola) I was able to give you a quick example of what I mean:
ILC_dcalzola_trace.flair (2.1 KB)

As you can see, the USRBIN you can adopt is a normal X-Y-Z binning.
In the plot section, I have chosen to check the horizontal beam size around y=0, and the agreement with your plots is acceptable, considering that my cuts for the simulation are extremely rough.
The only downside point of this procedure is that you will not have any statistics of the FWHM produced, at least to my knowledge.

rms_beam

Let me know if you have any further doubts.
Cheers,
Daniele

1 Like

Dear Daniele, thank you so much for your help. I have another questions if you do not mind:

  1. “1D Trace-H & 1D Trace-V trace of the horizontal and vertical of the maximum value. It will display the spatial X or Y position of the peak value for each Z slice as well the FWHM for each Z”. Can you explain this sentence in further? I try to find the explanation in the reference guide but little was found. The following picture is the plot of 1D Trace-H, could you take it as an example to say something?

image

2)the command of (($5-$4)/(2sqrt(2log(2)))) is to correct to the rms beam size. What dose $5/ $4 refer to? How could I find the value of $5/ $4 in the output data ?

Thank you very much again.

Hi Jia,
With pleasure. Maybe before answering your question in detail let’s clarify a couple of aspects. Under the assumption that you rely on the flair interface for the plotting, the actions that flair will execute are:

You can see what happens by clicking on the black “output” in the bottom right corner. With this in mind:

  1. The 1D Trace-H will call usbmax program with a set of instructions to find the values we need. Now, let’s look at the produced .dat file.
    In the detector named “Horiz …” you can find the values you need (respectively: low and high value for the longitudinal bin, the maximum and the lowest and higher extremes of the FWHM in the horizontal coordinate). An analogous process happens with the 1D Trace-V.
    By default, flair will plot those three data against the longitudinal coordinate, so you can see the FWHM as the interval between your errorbars, while the point in the middle of those is the position of the maximum.

  2. The command given to gnuplot takes advantage of the aforementioned knowledge: $5 and $4 are the fifth and fourth columns in the table, so their difference is the FWHM. The numerical coefficient in is just to get the rms from the FWHM.

I hope that this will help you. Cheers,
Daniele

1 Like

Dear Daniele, your reply is quite clear and it help me a lot. Thank you very much.

Best wishes.
Jia

Dear Daniele, your reply is quite clear and it help me a lot. Thank you very much and a small question if you do not mind. The following is the detector named “Horiz…”.

I am a little confused about the meaning of “the maximum and the lowest and higher extremes of the FWHM in the horizontal coordinate” .For example in the first line, binf of [0,4], -0.01 and -0.13 is the maximum and lowest of what value respectively? since they are obviously not energy I think. And how to understang the higher extremes of the FWHM is 0.13 mm? Why you say it is higher extreme? Only after understanding the physical meaning they represent, I can understand the meaning of “their difference is the FWHM”, which also confused me. Thank you very much.

image

Best wishes.
Jia
[/quote]

Hello Jia,

Let’s try to further clarify:

For example in the first line, binf of [0,4], -0.01 and -0.13 is the maximum and lowest of what value respectively?

The columns have a slightly different meaning:

  1. [0,4] are the bin extremes
  2. -0.01 is the position of the maximum energy deposition along the horizontal coordinate
  3. -0.13 and 0.13 are the extremes of the FWHM. In other words, at -0.13 and 0.13 the energy deposition is half of the one at the position of the maximum (-0.01).

And how to understang the higher extremes of the FWHM is 0.13 mm? Why you say it is higher extreme?

With the correct columns interpretation, those values are the ones directly provided by FLUKA. In case the results seem untrustworthy, the only other way to proceed is to export the matrix of data and do its own interpolation.

Only after understanding the physical meaning they represent, I can understand the meaning of “their difference is the FWHM”, which also confused me.

The FWHM is the width of the energy deposition distribution measured between those points on the y-axis which are half the maximum amplitude. Since FLUKA provides the position of the two points on the x-axis where the energy deposition is half its maximum amplitude (i.e. the extremes of the FWHM), we just need to make the difference for getting the width.

Cheers,
Daniele

1 Like

Dear Daniele, it is quite clear and I fully understand. I am so happy and terrible thanks for your patient instruction. Thank you very much.
Have a good day.
Jia