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:
- search for “background” in the TH1 class description http://root.cern.ch/root/html/TH1.html
- 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
- “Combining Functions” in the “Fitting Histograms” chapter of the “User’s Guide” http://root.cern.ch/drupal/content/users-guide
- search for “background” in the “Fitting tutorials” http://root.cern.ch/root/html/tutorials/fit/index.html
- see “Peak Finder, Deconvolutions” tutorials http://root.cern.ch/root/html/tutorials/spectrum/index.html