I am trying to make a simple program to plot a random 2D gaussian, find the peak, and make a fit. I am attaching my code, which I am running on SL5 CMSSW_5_3_16 root version 5.13. However, when it gets to line 60 it returns the error:
Error: Can’t call TSpectrum2::Search(h1,2,“col”) in current scope Owen2DFitExampleFunc.C:59:
Possible candidates are…
/cvmfs/cms.cern.ch/slc5_amd64_gcc462/lcg/root/5.32.00-cms21/lib/libSpectrum.so -1:-1 0 public: virtual Int_t TSpectrum2::Search(const TH1* hist,Double_t sigma=2,Option_t* option="",Double_t threshold=0.05);
*** Interpreter error recovered ***[/quote]
It seems to me that this means there is a problem with one of the arguments, but I am not sure what. I am probably doing something very simple wrong, but I’ve looked through the documentation and compared with the tutorial for TSpectrum2 and can’t figure out what it is. I would greatly appreciate it if someone could take a look.
Owen2DFitExampleFunc.C (2.17 KB)