18 inline bool PlotCompareUtility::compare<Plot1D>(
HistoData *HD) {
24 if (hnew ==
nullptr ||
href ==
nullptr || hnew->GetEntries() <= 1 ||
href->GetEntries() <= 1) {
36 double ksScore = hnew->KolmogorovTest(
href,
"D");
37 double chi2Score = hnew->Chi2Test(
href,
"uup");
46 HD->
setLowScore(ksScore < chi2Score ? ksScore : chi2Score);
47 HD->
setHighScore(ksScore > chi2Score ? ksScore : chi2Score);
55 std::cerr <<
"error: no test performed? chi2Threshold and ksThreshold <= 0\n";
67 inline void PlotCompareUtility::makePlots<Plot1D>(
HistoData *HD) {
82 href->SetStats(
false);
83 href->SetLineWidth(2);
84 href->SetLineColor(14);
85 href->SetMarkerColor(14);
86 href->SetFillColor(18);
89 hnew->SetStats(
false);
90 hnew->SetLineWidth(2);
98 title +=
" KS Score = ";
102 title +=
" Chi^2 Score = ";
112 TCanvas hCanvas(
"hCanvas",
"hCanvas", plotsCanvasWidth, plotsCanvasHeight);
117 hCanvas.SetFrameFillColor(10);
122 TText canvasTitle(0.1, 0.97,
title.Data());
123 canvasTitle.Draw(
"SAME");
129 hnew->Draw(
"E1SAME");
132 TLegend
legend(0.15, 0.01, 0.3, 0.08);
133 legend.AddEntry(hnew,
"New",
"lF");
144 std::cerr <<
"About to print" << gifName <<
"\n";
145 hCanvas.Print(gifName.c_str());
149 inline void PlotCompareUtility::makeHTML<Plot1D>(
HistoData *HD) {