Re: TSpectrum + Search() problem

From: Marco Calviani <marco.calviani_at_gmail.com>
Date: Wed, 10 Jan 2007 10:55:27 +0100


Update:
it seems that this happens ONLY when a large number of peaks is present. It does not accept the last peaks.

regards,
mc

On 1/9/07, Marco Calviani <marco.calviani_at_gmail.com> wrote:
> Hi,
> i'm using TSpectrum to find peaks in a histogram, using
> TSpectrum::Search(). However i've a problem regarding how the function
> find the peaks since it recognize peaks only up to a certain x value.
> In the attachment you can find a .root file where horig is the
> original histogram and h is the histogram where polymarkers are put on
> top of the found peaks.
>
> this is the definition of the histogram
> TH1F *h = new TH1F("h","spectrum",time_array.size(),0,time_array.size()-1);
>
> this is how it is filled
> for(int i=0; i<(time_array.size()-1); i++)
> {
> if(time_array[i]>(TIMETHRESHOLD))
> {
> h->SetBinContent(i,-ampl_array[i]+250);
> }
> }
>
> and this is the TSpectrum part
> TSpectrum *sb = new TSpectrum(maxpeaksb,resolution);
> Int_t nfoundb = sb->Search(h,sigma,"",threshold);
>
> In the picture you can find the result (is the same as h->Draw()).
>
> I'm using ROOT version 5.14 but this behaviour is the same also with
> older versions.
>
> Regards,
> Marco
>
>
>
Received on Wed Jan 10 2007 - 10:55:35 CET

This archive was generated by hypermail 2.2.0 : Fri Jan 12 2007 - 11:50:01 CET