Home | News | Documentation | Download

Problem in calculating areas under fitted peak

A question that is still a mystery for me is
fithisto.C (4.2 KB) (code)
eu_gu_1.txt (44.1 KB) (data )
In the above code, i have written //Area1 and //Area2
Area1 is calculating the area of the fitted peaks but // Area2 is calculating the area of the fitted peaks when the background subtraction is done.
I expected the two areas to be almost equal.
In other words, Area2 is slightly lesser than Area1.
but results are given below:(one can observe the large differences between the two areas)
Ist peak 15483
2 peak 6177
3 peak 16218
4 peak 1922
5 peak 4446
6 peak 1561
7 peak 4310
8 peak 3567
9 peak 4553
1 peak 985.818
2 peak 958.479
3 peak 530.542
4 peak 417.44
5 peak 399.915
6 peak 657.501
7 peak 349.103
8 peak 173.916
9 peak 57.8716
Have a good day.

_ROOT Version:6.14
Compiler: Not Provided

Thanks for replying @Wile_E_Coyote.
I haven’t got the answer of my question.

Your supervisor should easily be able to explain the nonnegligible differences between the fitted peak areas and the corresponding histogram integrals.

Thanks for your suggestion @Wile_E_Coyote
The problem is not about the non-negligible differences between the fitted peak areas and the corresponding histogram integrals that i already understood and my supervisor had already told me what mistake i was making.

Please listen carefully.
First, run the code with commenting the area2 part
i.e.fithisto.C (4.1 KB)

Secondly, run the code[fithisto.C|attachment] (commented the area1part)(upload://8RsSLniSC8LpvaVWYqfFk2h5G57.C) (4.1 KB)

My question is only that when i change the position of the code (keeping limits and everything same)
then why am i getting this differences? Would you be able to explain that?

In the middle you have s->Background(h->GetArray() + 1, ...); which modifies the histogram contents.

Thanks @Wile_E_Coyote.
So, if i want to calculate the areas under the fitted peaks i should have taken only area1 part.
and please explain me this part.

No, you are expected to use “gausn”, instead of “gaus”, as shown in my previous examples (and use “LBR+” fit options, instead of “BR+”, for better agreement).

Thanks @Wile_E_Coyote
Does BR+ part belongs to gaus function and LBR+ part belongs to gausn function?
Am I right?


Thanks @Wile_E_Coyote.
For helping me so much.

Please tell me about this one also.