TSpectrum: Too large clipping window

Hi rooters,

I’m trying to find peaks on a TH1 histogram, with 100 bins, at a range from 0, 20.
When I run the Spectrum finder I get:

Error in TSpectrum::SearchHighRes: Too large clipping window

With the following input:

TSpectrum *sY = new TSpectrum(6);
Int_t nfoundY = sY->Search(slices_Y.at(slice),1,"new", 0.1);

I can’t figure out what goes wrong :frowning:

Best,
Morten

I found that if I disable the background subtraction, it works.

Like so:

     Int_t nfoundY = sY->Search(slices_Y.at(slice),1,"nobackground new", 0.05);

[quote=“mdj”]I found that if I disable the background subtraction, it works.

Like so:

     Int_t nfoundY = sY->Search(slices_Y.at(slice),1,"nobackground new", 0.05);[/quote]

Thanks for posting back, this worked for me too. :slight_smile: