I am trying to find some peaks in histogram using TSpectrum. The results I have been getting are rather disappointing:
Normally it does not find the right number of peaks.
When it does managed to find the right number and I asked it for their respective positions, I get some non-sesical values, i.e. most of the values are outside even the range of the histogram!
Let me add that frankly the peaks in my histogram are actually “cathedrals”!
Here is a CC of code… perhaps I am missing something on the parameters.
Sorry about that, I did not know the were rules… makes lot of sense!
In your case, indicate which version you use,
send a small script with a data file.
See example at $ROOTSYS/tutorials/peaks.C
Magic! I got it working, but I do not understand why…
The answer (to me at least) is on setting option (below) to “new”, as Rene Brun did in this tutorial - instead of the “goff”, which is the default option.