Re: Histogram splitting and TSpectrum::Background

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Sun, 25 Jun 2006 21:54:25 +0200


You forgot the attachement.

Anyhow, TSpectrum::Background evaluates the background only the defined range
of the input histogram. Simply do
  h->GetXaxis()->SetRange(binmin,binmax);   TSpectrum s;
  TH1 *hback = s.Background(h);

Rene Brun

Marco Calviani wrote:
> Hi list,
> i have an histogram as shown in the attached picture. I would like
> to estimate the background of these signals using
> TSpectrum::Background. As you can see from the image the background is
> correctly estimated starting from channel ~47000 since the absence of
> signals in the region between ~20000 and ~43000, and before ~17000 is
> hindering the correct determination of the background where the signal
> is present.
> In order to correct for this phenomenon i would like to produce a code
> where this kind of histogram is currently splitted into two different
> histograms that containts only the bins which are different from -250.
> Is it possible to perform this task using a predefined ROOT function
> or do i have to do it by my own?
> And secondly, it is correct that is not possible to tell
> TSpectrum::Background to evaluate the background in specified zones
> only?
>
> Sorry for the lenghty question,
> Regards,
> Marco
Received on Sun Jun 25 2006 - 21:54:42 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET