Background subtraction

Hi all,

I have a spectra and I need to subtract the background. Is there a quick/easy way of doing this in ROOT?

Thanks,

Chloe.

Assuming that your “spectra” is some kind of a histogram and your “background” is another histogram or a function or a simple number, see, for example:

  1. search for “background” in the TH1 class description http://root.cern.ch/root/html/TH1.html
  2. search for “operations” in the TH1 class description http://root.cern.ch/root/html/TH1.html
    3.“Adding, Dividing, and Multiplying” in the “Histograms” chapter of the “User’s Guide” http://root.cern.ch/drupal/content/users-guide
  3. “Combining Functions” in the “Fitting Histograms” chapter of the “User’s Guide” http://root.cern.ch/drupal/content/users-guide
  4. search for “background” in the “Fitting tutorials” http://root.cern.ch/root/html/tutorials/fit/index.html
  5. see “Peak Finder, Deconvolutions” tutorials http://root.cern.ch/root/html/tutorials/spectrum/index.html