18 const Int_t nbins = 1024;
26 TString file = dir +
"/legacy/spectrum/TSpectrum.root";
29 h->SetTitle(
"Influence of # of iterations in deconvolution in peak searching");
30 h->GetXaxis()->SetRange(1, nbins);
39 for (i = 0; i < nbins; i++)
40 source[i] =
h->GetBinContent(i + 1);
44 for (i = 0; i < nfound; i++) {
47 fPositionX[i] =
h->GetBinCenter(bin);
48 fPositionY[i] =
h->GetBinContent(bin);
52 h->GetListOfFunctions()->Remove(pm);
55 pm =
new TPolyMarker(nfound, fPositionX, fPositionY);
56 h->GetListOfFunctions()->Add(pm);
63 for (i = 0; i < nbins; i++)
68 for (i = 0; i < nbins; i++)
69 source[i] =
h->GetBinContent(i + 1);
71 for (i = 0; i < nbins; i++)
76 for (i = 0; i < nbins; i++)
77 source[i] =
h->GetBinContent(i + 1);
79 for (i = 0; i < nbins; i++)
84 for (i = 0; i < nbins; i++)
85 source[i] =
h->GetBinContent(i + 1);
87 for (i = 0; i < nbins; i++)
92 printf(
"Found %d candidate peaks\n", nfound);
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
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 file, usually with extension .root, that stores data and code in the form of serialized objects in ...
1-D histogram with a float per channel (see TH1 documentation)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
A PolyMarker is defined by an array on N points in a 2-D space.
Advanced Spectra Processing.
Int_t SearchHighRes(Double_t *source, Double_t *destVector, Int_t ssize, Double_t sigma, Double_t threshold, bool backgroundRemove, Int_t deconIterations, bool markov, Int_t averWindow)
Double_t * GetPositionX() const
const char * Data() const