Example to illustrate the influence of number of iterations in deconvolution in high resolution peak searching function (class TSpectrum).
Processing /mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/tutorials/spectrum/SearchHR3.C...
Found 11 candidate peaks
void SearchHR3() {
const Int_t nbins = 1024;
TString file = dir+
"/spectrum/TSpectrum.root";
h->SetTitle("Influence of # of iterations in deconvolution in peak searching");
h->GetXaxis()->SetRange(1,nbins);
TH1F *d1 =
new TH1F(
"d1",
"",nbins,xmin,xmax);
TH1F *d2 =
new TH1F(
"d2",
"",nbins,xmin,xmax);
TH1F *d3 =
new TH1F(
"d3",
"",nbins,xmin,xmax);
TH1F *d4 =
new TH1F(
"d4",
"",nbins,xmin,xmax);
for (i = 0; i <
nbins; i++) source[i]=h->GetBinContent(i + 1);
for (i = 0; i < nfound; i++) {
a=xpeaks[i];
bin = 1 +
Int_t(a + 0.5);
fPositionX[i] = h->GetBinCenter(bin);
fPositionY[i] = h->GetBinContent(bin);
}
if (pm) {
h->GetListOfFunctions()->Remove(pm);
delete pm;
}
h->GetListOfFunctions()->Add(pm);
h->Draw("L");
for (i = 0; i <
nbins; i++) source[i]=h->GetBinContent(i + 1);
for (i = 0; i <
nbins; i++) source[i]=h->GetBinContent(i + 1);
for (i = 0; i <
nbins; i++) source[i]=h->GetBinContent(i + 1);
printf("Found %d candidate peaks\n",nfound);
}
- Authors
- Miroslav Morhac, Olivier Couet
Definition in file SearchHR3.C.