How to eliminate background counts?

I have made an histogram and fitted the peaks using the given data. Now, how to eliminate background counts?

ROOT Version: 6.14
Platform: Ubuntu
Compiler: Not Provided


You need to use one of the two:

  1. first eliminate the background and then fit your (clean) peaks,
  2. fit your histogram using a fit function which simultaneously models the peaks and the background.

BTW. The TSpectrum class provides some background estimation / elimination methods.

fithisto.C (3.7 KB)
I am getting some error.
But i don’t know how to resolve it and the spectrum is shown that is the same as before.
Nothing has happened after adding the code for background part.

Unable to execute my code using https://root.cern.ch/doc/master/classTSpectrum.html
Please help me.

You can get an estimation of the “background counts” if you subtract the fitted peak areas from the corresponding histogram integrals.

Thanks a lot!
I am getting what you are trying to tell me but to show background on my histogram how should i deal with my code that’s the main issue.

According to your statement, if i subtract areas of the fitted peak from the histogram integral then i will get the area of the background peaks. but what if i want to calculate the value of background counts for each point in the ascii file.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.