_ROOT Version: 5.34/09
_Platform: Linux 3.11.10-100.fc18.x86_64
_Compiler: gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)
Hello,
I am using “peaks.C” file available at https://root.cern.ch/doc/v608/peaks_8C.html to learn and to see how the peak searching and fitting works. I am using “.x peaks.C” command to execute the code. With this the histogram “h” displays 10 peaks. However, histogram"h2" shows ONLY peaks with linearly decreasing background. But peak fitting is NOT working. Below, please find some information which might be helpful to diagnose the issue:
++++++++++++++++++++++
Now fitting: Be patient
FCN=18902.2 FROM HESSE STATUS=FAILED 15 CALLS 1169 TOTAL
EDM=7.34152e-22 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 100.0 per cent
EXT PARAMETER APPROXIMATE STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 5.65386e+02 8.01205e-01 5.37875e-02 3.38181e-11
2 p1 -4.06380e-01 1.20528e-03 8.09144e-05 0.00000e+00
3 p2 -3.88877e+05 4.24264e-01 -0.00000e+00 0.00000e+00
4 p3 5.67454e+17 1.41421e+00 -0.00000e+00 0.00000e+00
++++++++++++++++++++++++++
I have also noticed that when I tried to the compiler it throws the following error:
=================================
root [0] .x peaks.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/ajay/Downloads/./peaks_C.so
In file included from /home/ajay/Downloads/peaks_C_ACLiC_dict.h:34:0,
from /home/ajay/Downloads/peaks_C_ACLiC_dict.cxx:17:
/home/ajay/Downloads/./peaks.C: In function ‘void peaks(Int_t)’:
/home/ajay/Downloads/./peaks.C:57:39: error: cannot convert ‘Float_t* {aka float*}’ to ‘Double_t* {aka double*}’ in initialization
g++: error: /home/ajay/Downloads/peaks_C_ACLiC_dict.o: No such file or directory
Error in <ACLiC>: Compilation failed!
Error: Function peaks() is not defined in current scope :0:
*** Interpreter error recovered ***
root [1]
=================================
Please help.
With best regards,
Ajay