694 float mean = tresHist->GetMean();
695 float rms = tresHist->GetRMS();
698 for (
int j=1; j<=tresHist->GetNbinsX()+1;j++){
699 val=tresHist->GetBinContent(j);
708 float fitmean=tresHist->GetBinCenter(maxbin);
709 if (std::abs(fitmean)>5.0){
717 if (fitrms>5.0) fitrms=5.0;
720 if (tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2) < m_mintres ||
721 tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2) > m_maxtres) {
728 tresHist->Fit(
"gaus",
"QR",
"",tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2),tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2));
729 if (tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2) < m_mintres ||
730 tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2) > m_maxtres) {
731 data[
key].tres = tresHist->GetFunction(
"gaus")->GetParameter(2);
732 data[
key].tresMean = tresHist->GetFunction(
"gaus")->GetParameter(1);
733 data[
key].t0err = tresHist->GetFunction(
"gaus")->GetParError(1);
735 return tresHist->GetFunction(
"gaus")->GetParameter(1);
738 tresHist->Fit(
"gaus",
"QR",
"",tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2),tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2));
739 if (tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2) < m_mintres ||
740 tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2) > m_maxtres) {
741 data[
key].tres = tresHist->GetFunction(
"gaus")->GetParameter(2);
742 data[
key].tresMean = tresHist->GetFunction(
"gaus")->GetParameter(1);
743 data[
key].t0err = tresHist->GetFunction(
"gaus")->GetParError(1);
745 return tresHist->GetFunction(
"gaus")->GetParameter(1);
748 tresHist->Fit(
"gaus",
"QR",
"",tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2),tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2));
749 if (tresHist->GetFunction(
"gaus")->GetParameter(1) - tresHist->GetFunction(
"gaus")->GetParameter(2) < m_mintres ||
750 tresHist->GetFunction(
"gaus")->GetParameter(1) + tresHist->GetFunction(
"gaus")->GetParameter(2) > m_maxtres) {
757 data[
key].tres = tresHist->GetFunction(
"gaus")->GetParameter(2);
758 data[
key].tresMean = tresHist->GetFunction(
"gaus")->GetParameter(1);
759 data[
key].t0err = tresHist->GetFunction(
"gaus")->GetParError(1);
763 if ( std::abs(tresHist->GetFunction(
"gaus")->GetParameter(2))>10 || std::abs(tresHist->GetFunction(
"gaus")->GetParameter(1))>10 ) {
765 data[
key].tres = tresHist->GetRMS();
766 data[
key].tresMean = tresHist->GetMean();
767 data[
key].t0err = tresHist->GetRMS();
769 return tresHist->GetMean();
773 gStyle->SetOptFit(1111);
775 return tresHist->GetFunction(
"gaus")->GetParameter(1);