Hello,
How do you end up concluding.
Because the output (counts_integral1) gives me the same result before and after background subtraction.
for the range 401 to 500 is because the Y axis bins are 500,0,100, I choose the same range of Background and data, so that I can scale them later.
double counts_integral1 =h2->Integral(h2->FindBin (6.), h2->FindBin (19.));
It is because I want to know the number of counts in the peak in the data runs. so the FindBin(6.,19.) and (401,500) are not related to each other.
Below I will show some of the projections in the canvas c3 below for
h->ProjectionY (Form ("slices_%zu", ibin), ibin, ibin, "");
The corresponding counts_integral1 are the same before and after the background subtraction.
0
6
10
0
4
7
2
The issue is that counts_integral1 should give me the counts after subtraction but it gives me the counts before the subtraction. Or maybe somehow the subtraction is not working correctly, I recently noticed that the before and after the background spectra looks the same but after the subtractions the entries are less.
Thanks.
Let me know if you need some more information.