Re: limits in TSpectrum::Search() ?

From: Kazuyoshi Furutaka <furutaka_at_jb3.so-net.ne.jp>
Date: Fri, 6 Jun 2008 17:16:40 +0900


Dear all,

The day before yesterday I (carelessly) sent a reply with about 440kb of attachments, and it seems that it was undelivered (perhaps due to the size of the attachments).

From: Rene Brun <Rene.Brun_at_cern.ch>
Subject: Re: [ROOT] limits in TSpectrum::Search() ? Date: Wed, 4 Jun 2008 07:07:00 +0200

> Could you post a hist.root file containing your histogram?
> Could you indicate your version of ROOT?

I'm using "ROOT 5.19/05 (trunk_at_24044, May 29 2008, 06:46:01 on linux)".

I put a root file named "test.root", which can be found at   http://www001.upp.so-net.ne.jp/furutaka/test.root

A sample script "testFindPeaks.C" is attached to this mail, which read a histogram named "h" in the "test.root" and search for peaks.

Yours,
Kazuyoshi

--
Kazuyoshi Furutaka
furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp

{ // get the test histogram TFile *rfin = new TFile("test.root","read"); TH1S *h = (TH1S*)rfin->Get("h"); h->tXaxis()->SetAxisRange(15.0,25.0); h->GetXaxis()->SetTitle(""); h->GetYaxis()->SetTitle(""); h->Draw(); // TSpectrum // Int_t maxpositions, Float_t resolutions=1 TSpectrum *s = new TSpectrum(10000,2); s->Search(h,2,"",0.2); s->Background(h,20,"same"); Int_t np = s->GetNPeaks(); cout << "#peaks found " << np << endl; }

Received on Fri Jun 06 2008 - 10:19:14 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 06 2008 - 17:50:01 CEST