Re: Re: TSpectrum + Search() problem

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 10 Jan 2007 11:49:27 +0100


Marco,

Could you send a small ROOT file containing your histograms and a few lines script
using TSpectrum ?

Rene

Marco Calviani wrote:
> 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 - 11:49:34 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 10 2007 - 17:50:00 CET