# Question about TSpectrum alternatives

**URL:** <https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447>\
**Category:** Newbie\
**Tags:** root\
**Created:** [January 19, 2022, 9:58am UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447 "2022-01-19T09:58:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvsouza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hvsouza/32/23711_2.png) [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Post date:** [January 19, 2022, 9:58am UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/1 "2022-01-19T09:58:45Z")

</div>

Hi all,

in the TSpectrum documentation is written now:  
" TSpectrum is a legacy interface: it is not recommended to use it in new code. There will be no bug fixes nor new developments."

Is there any other alternative to TSpectrum at this point?

Cheers,  
Henrique

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 19, 2022, 10:12am UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/2 "2022-01-19T10:12:25Z")

</div>

I think @moneta should know

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [January 19, 2022, 12:24pm UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/3 "2022-01-19T12:24:05Z")

</div>

Hi,

We don’t have an alternative dedicated for analysis of nuclear physics spectra. You would need to use just the standard ROOT classes (e.g. TH1) and its fitting functionality and/or for more complex modelling and fitting, we have RooFit.  
Which particular functionality of TSpectrum are you interested on ?

Cheers

Lorenzo

---

<div class="post-metadata">

**Author:** ![hvsouza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hvsouza/32/23711_2.png) [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Post date:** [January 19, 2022, 1:12pm UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/4 "2022-01-19T13:12:34Z")

</div>

Hello,

Thanks for the reply. It is the gold deconvolution method, peak finder and background estimation.

Cheers

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [January 19, 2022, 1:39pm UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/5 "2022-01-19T13:39:03Z")

</div>

Hi,

Thank you for the answer.  
As alternative, for deconvolution of spectra you could try to use the `TUnfold` class, while for background estimation you can perform a fit to spectrum using RooFit for the model.

If you still want to use TSpectrum, you can still continue using it as it is; we will not remove it from ROOT, but we will not apply fixes or develop it more.

Best regards

Lorenzo

---

<div class="post-metadata">

**Author:** ![hvsouza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hvsouza/32/23711_2.png) [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Post date:** [January 20, 2022, 12:18am UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447/6 "2022-01-20T00:18:53Z")

</div>

Hi Lorenzo,

Thanks again for the information!

Cheers,  
Henrique
