How to reduce the statistical error in the tab.lis file of the USRBDX output?

Dear expert,

I hope this email finds you well.

I want to score the gamma ray spectrum after the proton beam hits the solid water with the USRBDX card. The boundary is between the MgO region and the LaBr3 region. When I check the tab.lis file, I found that the error (%, the fourth column) is too large. For example, 99% as shown below
截屏2024-10-11 16.36.44
Does this mean the result is not credible?
I guess 5*10^7 primaries is enough for the statistical error.
After read the post in forum, the manual and the beginner course, I didn’t find the answer.
LaBr3_172_8_0.inp (3.6 KB)

Best regards,
zhen

Dear Zhen,
thank you for your question.

Let’s make a very rough estimation of the accuracy of your simulation using Poisson distribution.

  1. From the electron flux map that you calculate with USRBIN card an number of primaries 5e7, we can suppose about 5e7 * 1e-5 = 500 photons will reach LaBr3 region.

  2. Than, roughly supposing about homogeneous distribution by energies and 4096 energy bins, less than one photon per bin will be “detected”. According to this, average uncertainty of the number of photon per bin will be 1/N! * 100%, which mathematically can be even more than 100%.

In this case the answer is yes, statistics is too low, and there is no error in your model. This is a “theoretical limit” for the accuracy.

The straightforward solution is to increase the number of primaries (and or spawns), and to reduce the number energy bins to improve statistics per bin. I personally would use about 100 - 200 energy bins for a reasonable plot resolution to efficiency ratio.

However, as total number of particles is large in your simulation, and flux is high in the water and air regions, the FLUKA biasing technique can be used to reduce relative “importance” of this regions, increasing “importance” of MGO and LABR3, using a BIASING card:
https://indico.cern.ch/event/1012211/contributions/4247814/attachments/2260657/3836961/15_Biasing_2021_online.pdf.
This will reduce computation time for higher number of primaries and increase number of primaries in your scoring area improving the statistics.

Kind regards,
Illia

Dear lllia Zymak,
Really thanks to your kindly suggestion.
I reset the energy bin from 4096 to 200; the error decreased but was still larger than 10%.
After studying the BIASING course, I added 5 BIASING cards to set the importance of water, air, Al, MgO, and LaBr3 regions (the course said that the importance between adjacent regions should larger than 0.2, small than 5, here R=4 ), but it seems the time didn’t decrease. As for 5*10^7 primaries, I need around 12 hour before biasing, but after biasing, around 24 h are needed for 10^8 primaries, which means the basing didn’t work. Is there any problem about my input file?

Best regards,
zhen
LaBr3_172_8_0_biasing.inp (3.9 KB)

In your input file, you are both reducing and increasing importance of certain regions, and respectively change number of particles and time required to calculate.
As result, the output computation complexity of the simulation remains about the same.

However, with this approach you obtain lower error bars for requred regions for the same computation time, as you do not have exessive number of particles in the “not important” regions. I would also say that importance value you are using are reasonable, probably it is worth to try to reduce importance of the “water” region even more.

Unfortunately, if error bars are still to high, you will need to find PC with higher computation power (may be HPC) or to allocate more time for the simulation.

I would just provide you with the information, that at my desktop PC (not very modern or powerful) 5e7 primaries (according to the *.lis file, which is 1e7 primaries with 5 runs) are achieveble in about 2h for you input file. Probably, you may investigate lower performance of your PC.

Kind regards,
Illia

Dear zhen and Illia,

unfortunately, you cannot use biasing with the DETECT scoring. These results with biasing are meaningless.

Cheers,
David

Thank you for your kind note, yes, sure.
I have disabeled DETECT card in my test, without writing it here. I am not familiar with all aspects of using it and just removed “source of potential complecations”, to have a reasonable error bars for USRBDX card.

My bad!

Kind regrds,
Illia

Dear Lllia and David

Thanks for your advice, but after disabling the DETECT card, the time used just changed a little. That is for 1e7 primaries with 5 runs, the time used is around 11h; for 2e7 primaries with 5 runs, the time used is around 24h.

As Lllia suggested, I changed the importance of the “water” region, from 0.25 to 0.01, and the time used changed a lot. For 2e7 primaries with 5 runs, the time used is around 2h. However, as the BIASING course recommends, the relative importance of two adjacent regions should be between 0.2 and 5. Does this imply that in order for the ratio to fall between 0.2 and 5, ι must alter the importance of other regions?

best regards,
zhen

Dear zhen,

Since your water region mostly stops particles, you need to bias the particle population inside the water region by slicing it into thinner layers and increasing the importance of these layers sequentially.

Please have a look at this lecture:

Cheers,
David

Dear David,

Thanks for your suggestion. Now the relative error decreased a lot, but there is still some confusion on BIASING.
After read the lecture, I sliced the water into thinner water and divided the air into 3 parts.
As can be seen below:


But I am not sure how to set the importance of air1 region, now I set as 0.4 which come from 0.16+(0.64-0.16)/2=0.4, this idea is from the lecture

the R_strange-region_importance=25, I guess is calculated from 16+(32-16)/2=24, is this right?
The relative importance of the R_Sour-region_and R_strange-region is larger than 5, which is 25. As I set the importance of the water0 and water1 regions as 0.01, I accordingly set the importance of the Air region as 0.05 in order to make the ratio larger than 0.2. So how to understand the relative importance between two adjacent regions should between 0.2-5?
LaBr3_172_8_0_biasing.inp (4.4 KB)

Best regards,
zhen

Dear zhen,

You may slice the AIR1 region also into multiple layers, and use the same importance values you use the water layer.

Another solution would be to set its importance equal to that of the last water layer, so no Russian Roulette would be used in any case.

The lecture doesn’t offer a solution for the “strange” region’s importance, it just points out, that biasing is not always simple.

You can set up relative importance rations of neighboring regions outside the range of 0.2 … 5, but FLUKA internally will limit the biasing to this range.

Cheers,
David

P.S.:
Please ensure that the AIR region’s importance is not higher than that of the first water layer; otherwise, Russian Roulette would kill a fraction of your primary particles.

Dear David,

Really thanks to your reply, it’s now clear to me.

Best Regards,
zhen