Re: TSpectrum + Search() problem

From: Marco Calviani <marco.calviani_at_gmail.com>
Date: Fri, 12 Jan 2007 11:01:55 +0100


Hi list,

   actually the problem was connected to the fact that i was applying a Markov algorithm to my spectrum. When the option "noMarkov", as suggested by Rene Brun, has been applied, the peaks where correctly detected.

Thanks again,
marco

On 1/10/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
> Int_t maxpeaksb=200;
> Double_t resolution=5.;
> Double_t threshold=0.18;
> Double_t sigma=10.;
> 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 Fri Jan 12 2007 - 11:02:09 CET

This archive was generated by hypermail 2.2.0 : Fri Jan 12 2007 - 17:50:00 CET