Hi everyone,
I am a newbie with root. I have a histogram with multiple peaks in it. I need to find the standard deviation and no. of counts in each peak. I used TSpectrum to search for all the peaks and the code works fine.
The place I am stuck is I am not sure how to find the Std Deviation and no. of counts in each peak of the histogram. I tried a bunch of things but I am getting an error. Can anyone please help?
The part which works fine is as follows -
TSpectrum *mySpec = new TSpectrum();
Int_t npeaksFound = mySpec->Search(hTOFbacksub,1);
Double_t x[npeaksFound];
cout << "No. of Peaks found is = " << npeaksFound << endl;
Double_t *xpeaks = mySpec->GetPositionX();
for(Int_t iter = 0; iter<npeaksFound; iter++ ) {
cout << xpeaks[iter] << endl;
}
Thank you for your time and help! Really appreciate it!
ROOT Version: 6.18/04
Platform: C++
Compiler: Visual Studio Code