Re: TSpectrum + threshold setting in TSpectrum::Search

From: Marco Calviani <marco.calviani_at_gmail.com>
Date: Wed, 28 Jun 2006 18:17:12 +0200


Hi again,

   i would like to say that i have resolved this problem. This was caused by the fact that i've made the histogram initialization set at -250. After this correction, the TSpectrum::Search() function behave as descripted.

Sorry for the disturb,
Marco

On 6/28/06, Marco Calviani <marco.calviani_at_gmail.com> wrote:
> Hi list,
> sorry for this second question regarding TSpectrum in few
> minutes.... As far as i read in the manual regarding the method
> Search() is the value of threshold is set to 0.05 then all the peaks
> with amplitude less that threshold*maxamplitude are discarded. This in
> my case will be useful as an amplitude selection to avoid noise-caused
> peaks. Unfortunately the threshold setting is behaving in the opposite
> way in my case, keeping only low amplitude signals....
> In the attachment i'm sending two examples:
>
> cc.gif is with the threshold set at 0.01
> cc1.gif is with the threshold set at 0.6
>
> Can be this behaviour depends by the fact that the histogram has also
> negative values? (shown in cc2.gif)
>
> Double_t threshold=0.6;
> TSpectrum *s = new TSpectrum(2*maxpeaks,resolution);
> TSpectrum *sb = new TSpectrum(2*maxpeaksb,resolution);
> Int_t nfoundb = sb->Search(h,sigma,"",threshold);
>
> Float_t *peaksb= (Float_t*)sb->GetPositionX();
>
> int npeaksb=0;
> for(int p=0; p<nfoundb; p++)
> {
> Float_t xpb = peaksb[p];
> Int_t binb = h->GetXaxis()->FindBin(xpb);
> Float_t ypb = h->GetBinContent(binb);
> peaksb++;
> }
>
> Please note that i'm using ROOT from CVS 5.11/07
>
> REgards,
> MC
>
>
>
Received on Wed Jun 28 2006 - 18:17:21 MEST

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