11 void DeconvolutionRL_wide() {
13 const Int_t nbins = 256;
15 Double_t xmax = nbins;
16 Double_t source[nbins];
17 Double_t response[nbins];
20 TString dir = gROOT->GetTutorialDir();
21 TString file = dir+
"/spectrum/TSpectrum.root";
22 TFile *f =
new TFile(file.Data());
23 TH1F* h = (TH1F*) f->Get(
"decon3");
24 h->SetTitle(
"Deconvolution of closely positioned overlapping peaks using Richardson-Lucy deconvolution method");
25 TH1F* d = (TH1F*) f->Get(
"decon_response_wide");
27 for (i = 0; i < nbins; i++) source[i]=h->GetBinContent(i + 1);
28 for (i = 0; i < nbins; i++) response[i]=d->GetBinContent(i + 1);
32 TSpectrum *s =
new TSpectrum();
33 s->DeconvolutionRL(source,response,256,10000,1,1);
35 for (i = 0; i < nbins; i++) d->SetBinContent(i + 1,source[i]);
36 d->SetLineColor(kRed);