Hello,
I am trying to find peak locations and their values in a TH2F histogram. Is
ShowPeaks supposed to do that? I looked also in TSpectrum ans TSpectrum2
Search options but could not get it work. I tried following (inspired by what
I found on the web):
////Use TSpectrum to find the peak candidates
TSpectrum2 *s = new TSpectrum2(2, 1.0);
Int_t nfound = s->Search(ghist,1,"");
Float_t *xpeaks = s->GetPositionX();
cout << nfound <<endl;
for (int p=0;p<nfound;p++)
{
Float_t xp = xpeaks[p]; cout << xp << endl;
where ghist is the 2D histogram. This is probably very wrong for TH2 object. I will appreciate any guidance on the use of TSpectrum and Search functions. Thanks,
This archive was generated by hypermail 2.2.0 : Sun Oct 31 2010 - 11:50:01 CET