Hello Everyone,
I am trying to project a 2D spectrum to 1D and use a SearchHighRes function to find the peaks in the spectrum. However, I have difficulty using the parameters. Is there anyone who can help?
here is a small piece of my code.
for(int bin = 1; bin <= last_bin; bin++)
double temp_ratio;
TH1D *h = hp_energy->ProjectionY("_py", bin, bin);
TSpectrum *s = new TSpectrum(5);
Double_t *xpeaks;
Double_t *ypeaks;
for (int j = 0; j < max_ch; j++) source[j]=h->GetBinContent(j + 1);
nfound = s->SearchHighRes(source, dest, max_ch, 1.5, 4, kTRUE, 3, kTRUE, 3);
xpeaks = s->GetPositionX();
ypeaks = s->GetPositionY();
printf("\n%d ", bin);
_ROOT Version:_6.16/00
Platform: Ubuntu 18.04.3
regards,
Nastaran