Re: Histogram splitting and TSpectrum::Background

From: Rene Brun <>
Date: Mon, 26 Jun 2006 16:40:18 +0200

I am afraid that you have to set the range yourself (via h.GetXaxis()->SetRange(binmin,binmax)

You can use the information from TSpectrum::Search to locate automatically some peaks.

Rene Brun

Marco Calviani wrote:
> Hi Rene,
>> 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);
> thanks for your help. But as of now the problem i'm facing is how to
> define that range automatically; this is because i have to analyze a
> lot of spectra of that type and everyone has different ranges of
> signals. Some spectra also have more that one gap, as the one i'm
> attaching (now i hope...)
> best regards,
> Marco
Received on Mon Jun 26 2006 - 16:40:23 MEST

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