17 const Int_t nbins = 1024;
28 h->SetTitle(
"High resolution peak searching, number of iterations = 3");
29 h->GetXaxis()->SetRange(1,nbins);
33 for (i = 0; i < nbins; i++) source[i]=
h->GetBinContent(i + 1);
39 nfound =
s->SearchHighRes(source,
dest, nbins, 8, 2,
kTRUE, 3,
kTRUE, 3);
41 for (i = 0; i < nfound; i++) {
44 fPositionX[i] =
h->GetBinCenter(bin);
45 fPositionY[i] =
h->GetBinContent(bin);
50 h->GetListOfFunctions()->Remove(pm);
53 pm =
new TPolyMarker(nfound, fPositionX, fPositionY);
54 h->GetListOfFunctions()->Add(pm);
59 for (i = 0; i < nbins; i++)
d->SetBinContent(i + 1,
dest[i]);
60 d->SetLineColor(
kRed);
63 printf(
"Found %d candidate peaks\n",nfound);
64 for( i=0;i<nfound;i++) printf(
"posx= %f, posy= %f\n",fPositionX[i], fPositionY[i]);
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a float per channel (see TH1 documentation)}
A PolyMarker is defined by an array on N points in a 2-D space.
Advanced Spectra Processing.
static constexpr double s
#define dest(otri, vertexptr)