Hi. I am having problems using the TSpectrum::Deconvolution1() implementation. I have a spectrum, y[size] from which I would like to deconvolute the response function, SPR[size]. I have used the following code but this doesn’t seem to work, and I can not find an example of the use of this elsewhere. Can someone give me a few pointers?? Apologies if there is a simple explanatation.
This is my code:
const int size = 6000/25;
TH1F *h = new TH1F(“h”,“FADC trace”,size,0,6000);
//set SPR in an array;
for (int j = 0; j Search(h,2,"");
//deconvolute SPR from trace
spec->Deconvolution1(y,SPR, size, 30);
(This doesn’t compile)
Could you post your code
-as an attachment
-or by using the “code” option AND disabling HTML
Apologies for the delay,
My code is attached.
ROOTFORUMATTACHMENT.c (1.36 KB)
Your code requires an input file and cannot be executed.
Could you post a file h.root containing your histogram “h” ?
Apologies again, I am attatching a new script with an ASCII input for the spectrum. It seems to be able to identify the peaks, but not deconvolve them.
Your help is much appreciated
ROOTFORUMATTACHMENT.c (1.13 KB)
h.txt (5.06 KB)
see your code modified in the attachment (using version 5.14)
You should play a bit with the parameters.
RF.C (1.34 KB)
Thanks!!! This works perfectly!!!