# Understanding USR-1D plot

**URL:** <https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842>\
**Category:** Flair\
**Created:** [26 May 2021 12:47 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842 "2021-05-26T12:47:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [26 May 2021 12:47 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/1 "2021-05-26T12:47:42Z")

</div>

Dear adonadon,  
Thank you for you useful answer,I have understand this problem.  
I plot Det:2 double differential distributions,  
just like this:

 ![image](https://fluka-forum.web.cern.ch/uploads/default/original/2X/a/a4f39f0c504ad30654ae49af21c7b12e84568a43.jpeg)  
This is three omega bins’ curve in one graph ,right?Then,How to use different color to differentiate it and what is the fourth line on X-axis?

---

<div class="post-metadata">

**Author:** ![adonadon](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/adonadon/32/2241_2.png) [@adonadon](https://fluka-forum.web.cern.ch/u/adonadon)\
**Post date:** [26 May 2021 14:53 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/2 "2021-05-26T14:53:20Z")

</div>

Dear @xiongbp,

Could you send me the input file please?  
Just to see how you defined everything in the end.

Thanks

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [1 June 2021 02:11 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/4 "2021-06-01T02:11:56Z")

</div>

Dear @adonadon ,  
The attachment is my file,Look forward to your help.  
[LiF+ZnS.flair](https://fluka-forum.web.cern.ch/uploads/short-url/fx1EM5EjGAMJni8HPYUSWH4x2QO.flair) (3.7 KB)

---

<div class="post-metadata">

**Author:** ![adonadon](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/adonadon/32/2241_2.png) [@adonadon](https://fluka-forum.web.cern.ch/u/adonadon)\
**Post date:** [3 June 2021 20:11 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/5 "2021-06-03T20:11:08Z")

</div>

Dear @xiongbp,

Sorry for the delay in replying!

Doing that plot, you should observe the spectra at different angles, depending of the number of angular bins that you selection in you USRBDX card. I see that you used 2 in your input file. It means that you should be looking only the superposition of two graphs, then… it’s weird that you are getting three.

Anyway, I modified your input file a little bit in order to obtain a cleaner result:  
[LiF+ZnS.flair](https://fluka-forum.web.cern.ch/uploads/short-url/4SusCgZCkmfQB2iaFlVgvepvDBL.flair) (4.9 KB)

Here the most important changes:

1. Changed the USRBDX linE → logE
2. I changed the number of cycles to 5: It’s always recommended to choose a value above 5 ( 5-10 is ok) in order to have good statistics.
3. I added a few plots: For triton and 4He, the superposition of the two distributions (in different colors) obtained for the different angles, and the integrated case.
4. You will see also that I selected the ‘Lethargy plot’ ( \< X \>\*Y). Considering that we have chosen log(E) for the scoring, it’s important to use the lethargy plot in order to avoid misleading regarding to the contribution according to the energy, i.e. doing this plot you are assigning the correct importance to different energy ranges in the plot.  
[This thread](https://fluka-forum.web.cern.ch/t/the-difference-between-x-y-and-dx-y/793) is also related to this.

I hope it can be helpful,  
Cheers

André

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [4 June 2021 03:01 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/6 "2021-06-04T03:01:55Z")

</div>

Dear@adonadon ,  
Thank you for your help,I have download the file and will try it afternoon.

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [7 June 2021 07:44 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/7 "2021-06-07T07:44:21Z")

</div>

Dear @adonadon  
Thank for your help,I am sorry for late and a little confused about plot value too.  
please help me to see below right or not:  
Y=dN/dE,(cm^-2\* GeV^-1)  
\< X\>\* Y=dN/dlogE=E\* dN/dE,(cm^-2)  
DX\*Y=dE \*dN/dE=dN,(cm^-2)  
if it is right,at the second formula,“dE” represent every energy bin of x-axis,then what is “E” represent?  
I want to get the relationship between every energy bin and counts,so should I choose DX \*Y?

---

<div class="post-metadata">

**Author:** ![adonadon](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/adonadon/32/2241_2.png) [@adonadon](https://fluka-forum.web.cern.ch/u/adonadon)\
**Post date:** [8 June 2021 10:16 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/8 "2021-06-08T10:16:13Z")

</div>

Dear @xiongbp ,

What you are describing there is correct.  
But let’s define ‘dE’ and ‘E’ properly:

dE is the width of the bin (energy in our case)  
E (or better ‘\< E \>’ ) is the average value of the bin, i.e. In our case is the average energy of the bin

I’m not sure If I understand what you say with ‘relationship between every energy bin and counts’.  
But, If it means that you are looking for the number of count, in a particular \< E \> in an energy bin,  
your option is Y \* \< X \>. Which is also recommended due to the nature of your simulation (low energy neutrons). More info. [here](https://indico.cern.ch/event/677259/contributions/2815150/attachments/1585765/2507230/Vassilis_Zermatt2018.pdf) (pag. 28/30)  
In the case of Y\*DX, you get the value of fluence per energy interval in units of counts/cm^2/primary, because you are integrating the spectrum. The problem is that you would not obtain any relevant information **from the plot** (the values could be useful, of course) due to the fact that the plot varies arbitrarily with the DX=dE bin width

I hope it is useful,

Cheers!  
Andre

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [9 June 2021 13:08 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/9 "2021-06-09T13:08:01Z")

</div>

Dear@adonadon ,

If Y-axis choose Y,it equal to dn/dE,the area of the graph is dn1/dE1\* dE1+dn2/dE2\* dE2+…=N;  
If choose \< x \> _y,it equal to E_dn/dE,the area of the graph is E1\* dn1/dE1\* dE1+…=sum(Ei\* dni) may be meaningless?  
If choose DX\* Y,it equal to dE\* dn/dE=dn,the area of the graph is dn1\* dE1+dn2\* dE2+…,still meaningless?  
What I want to get is the relationship of a specific energy value and its count,maybe I should choose \< X \>\* Y from your help ,but I feel that the formula is not represent what it really express.

---

<div class="post-metadata">

**Author:** ![ceruttif](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/ceruttif/32/23_2.png) [@ceruttif](https://fluka-forum.web.cern.ch/u/ceruttif)\
**Post date:** [9 June 2021 14:23 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/10 "2021-06-09T14:23:25Z")

</div>

> [@xiongbp](#):
>
> If choose \< x \> _y,it equal to E_dn/dE,the area of the graph is E1\* dn1/dE1\* dE1+…=sum(Ei\* dni) may be meaningless?

It’s not meaningless if your x = E axis is set on logarithmic scale, since in this case the area of the graph becomes actually the sum of (Ei \* dni/dEi) \* **dlogEi** = dni/(dEi/Ei) \* dlogEi = dni/dlogEi \* dlogEi = dni, which is as it should be.

> [@xiongbp](#):
>
> If choose DX\* Y,it equal to dE\* dn/dE=dn,the area of the graph is dn1\* dE1+dn2\* dE2+…,still meaningless?

Right.

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [9 June 2021 14:52 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/11 "2021-06-09T14:52:44Z")

</div>

Dear @ceruttif ,  
So,that is to say if X-axis is E,Y-axis should choose Y;if X-axis is logE,Y-axis should choose \< x \> _y,they express the same meaning, and DX_Y maybe used in another special case,right?

---

<div class="post-metadata">

**Author:** ![ceruttif](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/ceruttif/32/23_2.png) [@ceruttif](https://fluka-forum.web.cern.ch/u/ceruttif)\
**Post date:** [9 June 2021 15:52 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/12 "2021-06-09T15:52:40Z")

</div>

> [@xiongbp](#):
>
> if X-axis is E, Y-axis should choose Y; if X-axis is logE, Y-axis should choose \< X \> \* Y

**exactly**

> [@xiongbp](#):
>
> DX\*Y maybe used in another special case

actually I miss a good example

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [10 June 2021 07:50 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/13 "2021-06-10T07:50:40Z")

</div>

Dear @adonadon @ceruttif ,  
I have understand it ,thank you.

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [10 June 2021 07:58 UTC](https://fluka-forum.web.cern.ch/t/understanding-usr-1d-plot/1842/14 "2021-06-10T07:58:05Z")

</div>

Closed on 10 June 2021 07:58 UTC


