Double_t IdentifyPeaks(TH1F *H, Double_t *X) { /*TSpectrum *spec = new TSpectrum(); Int_t numP = spec -> Search(H, 3, "g", 0.05); H->Draw("same"); */ //alternate option with ShowPeaks() Int_t numP = H->ShowPeaks (ProjSpecSigma, "", ProjSpecResol); if (! numP) {cout<<"the code didnt work";} cout<<"the number of peaks is: "<GetListOfFunctions (); if (! funcP) return 0; TPolyMarker *mX = (TPolyMarker*)funcP->FindObject ("TPolyMarker"); if (! mX) return 0; Double_t tX, *peaks = mX->GetX (); if (! peaks) return 0; cout<< "Peaks have been found and now are being stored in X[]"< peaks [q]) { tX = peaks [p]; peaks [p] = peaks [q]; peaks [q] = tX; } } } TText *markerPrint = new TText(); Int_t numX = 0; Double_t par[10]; for (int i=0; i 0) { printf ("the loop for X[numX]::%3d. %8.2lf %8.2lf %8.2lf %8.2lf\n", i+1, peaks [i], X [numX], par [Sigma], par [SkewLpar]); cout<<"the value of numX is: "< GetBinContent(X[j]) + 150; Double_t x_cord_marker = X[j] - 2; TText *markerPrint = new TText(x_cord_marker, y_cord_marker, Form("%d", jj)); markerPrint -> SetTextSize(0.03); markerPrint -> Draw("SAME"); } return numX; } void F() { if (gCurrentHistogram) { Int_t numX; numX = IdentifyPeaks(gCurrentHistogram, X); for (int i= 0; i cal();"<