@@ -381,7 +381,7 @@ void HFInvMassFitter::doFit()
381381 countSignal (mRawYieldCounted , mRawYieldCountedErr );
382382 calculateSignificance (mSignificance , mSignificanceErr );
383383 // Fit to data ratio
384- mRatioFrame = mass->frame (Title (" Fit/Data Ratio " ));
384+ mRatioFrame = mass->frame (Title (Form ( " %s " , mHistoInvMass -> GetTitle ()) ));
385385 calculateFitToDataRatio ();
386386 }
387387}
@@ -669,21 +669,9 @@ void HFInvMassFitter::drawResidual(TVirtualPad* pad)
669669void HFInvMassFitter::drawRatio (TVirtualPad* pad)
670670{
671671 pad->cd ();
672- mRatioFrame ->GetYaxis ()->SetTitle (" " );
673- TPaveText* textInfo = new TPaveText (0.12 , 0.65 , 0.47 , .89 , " NDC" );
674- textInfo->SetBorderSize (0 );
675- textInfo->SetFillStyle (0 );
676- textInfo->SetTextColor (kBlue );
677- textInfo->AddText (Form (" S = %.0f #pm %.0f " , mRawYield , mRawYieldErr ));
678- textInfo->AddText (Form (" S_{count} = %.0f #pm %.0f " , mRawYieldCounted , mRawYieldCountedErr ));
679- textInfo->AddText (Form (" mean = %.3f #pm %.3f" , mRooMeanSgn ->getVal (), mRooMeanSgn ->getError ()));
680- if (mTypeOfSgnPdf == DoubleGaus) {
681- textInfo->AddText (Form (" sigma = %.3f #pm %.3f" , mRooSigmaSgn ->getVal (), mRooSigmaSgn ->getError ()));
682- textInfo->AddText (Form (" sigma 2 = %.3f #pm %.3f" , mRooSecSigmaSgn ->getVal (), mRooSecSigmaSgn ->getError ()));
683- } else {
684- textInfo->AddText (Form (" sigma = %.3f #pm %.3f" , mRooSigmaSgn ->getVal (), mRooSigmaSgn ->getError ()));
685- }
686- mRatioFrame ->addObject (textInfo);
672+ mRatioFrame ->GetXaxis ()->SetTitleOffset (1.2 );
673+ mRatioFrame ->GetYaxis ()->SetTitleOffset (1.5 );
674+ mRatioFrame ->GetYaxis ()->SetTitle (" Fit / Data" );
687675 double xMin = mRatioFrame ->GetXaxis ()->GetXmin ();
688676 double xMax = mRatioFrame ->GetXaxis ()->GetXmax ();
689677 TLine* line = new TLine (xMin, 1.0 , xMax, 1.0 );
@@ -883,7 +871,7 @@ void HFInvMassFitter::plotRefl(RooAbsPdf* pdf)
883871}
884872
885873// Calculate fit to data ratio
886- void HFInvMassFitter::calculateFitToDataRatio ()
874+ void HFInvMassFitter::calculateFitToDataRatio () const
887875{
888876 if (!mInvMassFrame )
889877 return ;
@@ -911,9 +899,9 @@ void HFInvMassFitter::calculateFitToDataRatio()
911899 ratioHist->SetPointError (i, 0 , 0 , err, err);
912900 }
913901
902+ mRatioFrame ->addPlotable (ratioHist, " P" );
914903 mRatioFrame ->SetMinimum (0.5 );
915904 mRatioFrame ->SetMaximum (1.5 );
916- mRatioFrame ->addPlotable (ratioHist, " P" );
917905}
918906
919907// Fix reflection pdf
0 commit comments