I write a small script to search peak in a spectrum.
I use TSpectrum::Search() and then Get position of the peak via TSpectrum::GetPositionX(); But the results that I obtained are not correct? I don’t understand why.
I used root 5.34/32.
My script is peak_search.C peak_search.C (891 Bytes)
Spectrum is 8020cS.txt 8020cS.txt (123 KB)
The result that I obtain is below. I would like to obtain list of found peaks positions.
[quote]root [0] .L peak_search.C
root [1] main()
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
5.2951e+027
8.3706e+027
1.54622e+027
6.59106e+027
1.5886e+025
7.75413e+024
1.33828e+027
3.1021e+027
1.03424e+027
7.68424e+025
2.19496e+025
4.42014e+025
8.8312e+026
2.51759e+026
9.95551e+026
3.92145e+025
1.04995e+027
3.92901e+027
9.93254e+027
8.0454e+026
3.75372e+026
3.06161e+026
4.04386e+026
7.80362e+026
2.62821e+027
2.3707e+027
2.20931e+026
1.78075e+027
2.00379e+026
2.31268e+027
1.04187e+023
7.76829e+023
2.08782e+027
1.45676e+027
1.44013e+026
3.32455e+027
3.32832e+025
5.70009e+026
2.12167e+027
1.17417e+026
3.0412e+025
9.7694e+022
1.05025e+026
1.74932e+027
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
[/quote]
Thank you very much,