1355 auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
1356 auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().
name;
1358 auto firstiov = theIOVs.front();
1359 std::tuple<cond::Time_t, cond::Hash> lastiov;
1365 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
1366 l_tagname = cond::payloadInspector::PlotBase::getTag<1>().
name;
1367 lastiov = tag2iovs.front();
1369 lastiov = theIOVs.back();
1378 TCanvas
canvas(
"Sim Beam Spot HL-LHC Parameters Difference Summary",
1379 "Sim Beam Spot HL-LHC Parameters Difference summary",
1386 auto h2_SimBSHLLHCParameters = std::make_unique<TH2F>(
1388 h2_SimBSHLLHCParameters->SetStats(
false);
1389 h2_SimBSHLLHCParameters->GetXaxis()->SetBinLabel(1,
"Value");
1390 h2_SimBSHLLHCParameters->GetXaxis()->LabelsOption(
"h");
1391 h2_SimBSHLLHCParameters->GetYaxis()->SetLabelSize(0.05);
1392 h2_SimBSHLLHCParameters->GetXaxis()->SetLabelSize(0.05);
1393 h2_SimBSHLLHCParameters->SetMarkerSize(1.5);
1396 auto h2_SimBSHLLHCParameters_Extras =
1397 std::make_unique<TH2F>(
"Parameters Extras",
"", 1, 0.0, 1.0, span, 0,
static_cast<float>(span));
1398 h2_SimBSHLLHCParameters_Extras->SetStats(
false);
1399 h2_SimBSHLLHCParameters_Extras->GetXaxis()->SetBinLabel(1,
"Value");
1400 h2_SimBSHLLHCParameters_Extras->GetXaxis()->LabelsOption(
"h");
1401 h2_SimBSHLLHCParameters_Extras->GetYaxis()->SetLabelSize(0.05);
1402 h2_SimBSHLLHCParameters_Extras->GetXaxis()->SetLabelSize(0.05);
1403 h2_SimBSHLLHCParameters_Extras->SetMarkerSize(1.5);
1410 std::stringstream ss1, ss2;
1412 fBS.printDebug(ss1);
1415 lBS.printDebug(ss2);
1419 const auto diffPars = fBS.diffCentralValues(lBS);
1422 unsigned int yBin = 8;
1426 h2_SimBSHLLHCParameters->GetYaxis()->SetBinLabel(
yBin, theLabel.c_str());
1427 h2_SimBSHLLHCParameters->SetBinContent(1,
yBin, diffPars[
foo]);
1431 unsigned int yBin_Extras = span;
1435 h2_SimBSHLLHCParameters_Extras->GetYaxis()->SetBinLabel(yBin_Extras, theLabel.c_str());
1436 h2_SimBSHLLHCParameters_Extras->SetBinContent(
1437 1, yBin_Extras, diffPars[
foo]);
1442 auto h2_SimBSHLLHCShadow = (TH2F*)(h2_SimBSHLLHCParameters->Clone(
"shadow"));
1443 h2_SimBSHLLHCShadow->GetZaxis()->SetTitle(
"#Delta Parameter(payload A - payload B)");
1444 h2_SimBSHLLHCShadow->GetZaxis()->CenterTitle();
1445 h2_SimBSHLLHCShadow->GetZaxis()->SetTitleOffset(1.5);
1447 auto h2_SimBSHLLHCShadow_Extras = (TH2F*)(h2_SimBSHLLHCParameters_Extras->Clone(
"shadow"));
1448 h2_SimBSHLLHCShadow_Extras->GetZaxis()->SetTitle(
"#Delta Parameter(payload A - payload B)");
1449 h2_SimBSHLLHCShadow_Extras->GetZaxis()->CenterTitle();
1450 h2_SimBSHLLHCShadow_Extras->GetZaxis()->SetTitleOffset(1.5);
1453 double max =
std::max(h2_SimBSHLLHCShadow->GetMaximum(), h2_SimBSHLLHCShadow_Extras->GetMaximum());
1454 double min =
std::min(h2_SimBSHLLHCShadow->GetMinimum(), h2_SimBSHLLHCShadow_Extras->GetMinimum());
1455 double val_white = 0.;
1456 double per_white = (
max !=
min) ? ((val_white -
min) / (
max -
min)) : 0.5;
1459 double Red[
number] = {0., 1., 1.};
1460 double Green[
number] = {0., 1., 0.};
1461 double Blue[
number] = {1., 1., 0.};
1462 double Stops[
number] = {0., per_white, 1.};
1464 h2_SimBSHLLHCShadow->SetContour(nb);
1465 h2_SimBSHLLHCShadow_Extras->SetContour(nb);
1466 TColor::CreateGradientColorTable(
number, Stops, Red, Green, Blue, nb);
1470 canvas.cd(1)->SetTopMargin(0.10);
1471 canvas.cd(1)->SetBottomMargin(0.06);
1472 canvas.cd(1)->SetLeftMargin(0.35);
1473 canvas.cd(1)->SetRightMargin(0.25);
1474 canvas.cd(1)->Modified();
1476 h2_SimBSHLLHCShadow->Draw(
"colz");
1477 h2_SimBSHLLHCParameters->Draw(
"TEXTsame");
1479 auto ltx = TLatex();
1480 ltx.SetTextFont(62);
1481 ltx.SetTextSize(0.025);
1482 ltx.SetTextAlign(11);
1492 gPad->GetLeftMargin(),
1493 1 - gPad->GetTopMargin() + 0.025,
1495 "#splitline{A = #color[4]{%s}: %s}{B = #color[4]{%s}: %s}", f_tagname, f_runLSs, l_tagname, l_runLSs))
1499 gPad->GetLeftMargin(),
1500 1 - gPad->GetTopMargin() + 0.025,
1501 (fmt::sprintf(
"#splitline{#color[4]{%s}}{A = %s | B = %s}", f_tagname, l_runLSs, f_runLSs)).c_str());
1506 canvas.cd(2)->SetTopMargin(0.10);
1507 canvas.cd(2)->SetBottomMargin(0.06);
1508 canvas.cd(2)->SetLeftMargin(0.35);
1509 canvas.cd(2)->SetRightMargin(0.20);
1510 canvas.cd(2)->Modified();
1512 h2_SimBSHLLHCShadow_Extras->Draw(
"colz");
1513 h2_SimBSHLLHCParameters_Extras->Draw(
"TEXTsame");
1517 gPad->GetLeftMargin(),
1518 1 - gPad->GetTopMargin() + 0.025,
1520 "#splitline{A = #color[4]{%s}: %s}{B = #color[4]{%s}: %s}", f_tagname, f_runLSs, l_tagname, l_runLSs))
1524 gPad->GetLeftMargin(),
1525 1 - gPad->GetTopMargin() + 0.025,
1526 (fmt::sprintf(
"#splitline{#color[4]{%s}}{A = %s | B = %s}", f_tagname, l_runLSs, f_runLSs)).c_str());
std::string m_imageFileName
static std::string to_string(const XMLCh *ch)
std::shared_ptr< PayloadType > l_payload
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
PlotAnnotations m_plotAnnotations
Log< level::Warning, true > LogPrint
std::shared_ptr< PayloadType > f_payload
std::string getStringFromParamEnum(const parameters ¶meter, const bool addUnits=false)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)