CMS 3D CMS Logo

SiPixelGainCalibHelper.h
Go to the documentation of this file.
1 #ifndef CONDCORE_SIPIXELPLUGINS_SIPIXELGAINCALIBHELPER_H
2 #define CONDCORE_SIPIXELPLUGINS_SIPIXELGAINCALIBHELPER_H
3 
16 
17 #include <type_traits>
18 #include <memory>
19 #include <sstream>
20 #include <fmt/printf.h>
21 
22 // include ROOT
23 #include "TH2F.h"
24 #include "TH1F.h"
25 #include "TLegend.h"
26 #include "TCanvas.h"
27 #include "TLine.h"
28 #include "TStyle.h"
29 #include "TLatex.h"
30 #include "TPave.h"
31 #include "TPaveStats.h"
32 #include "TGaxis.h"
33 
34 namespace gainCalibHelper {
35 
36  using AvgMap = std::map<uint32_t, float>;
37 
38  namespace gainCalibPI {
39 
40  enum type { t_gain = 0, t_pedestal = 1, t_correlation = 2 };
41 
42  //===========================================================================
43  // helper method to fill the ratio and diff distributions
44  template <typename PayloadType>
45  static std::array<std::shared_ptr<TH1F>, 2> fillDiffAndRatio(const std::shared_ptr<PayloadType>& payload_A,
46  const std::shared_ptr<PayloadType>& payload_B,
47  const gainCalibPI::type& theType) {
48  std::array<std::shared_ptr<TH1F>, 2> arr;
49 
50  std::vector<uint32_t> detids_A;
51  payload_A->getDetIds(detids_A);
52  std::vector<uint32_t> detids_B;
53  payload_B->getDetIds(detids_B);
54 
55  std::vector<float> v_ratios;
56  std::vector<float> v_diffs;
57 
58  if (detids_A != detids_B) {
59  edm::LogError("fillDiffAndRatio") << "the list of DetIds for the two payloads are not equal"
60  << " cannot make any comparison!" << std::endl;
61  }
62 
63  assert(detids_A == detids_B);
64  for (const auto& d : detids_A) {
65  auto range = payload_A->getRange(d);
66  int numberOfRowsToAverageOver = payload_A->getNumberOfRowsToAverageOver();
67  int ncols = payload_A->getNCols(d);
68  int nRocsInRow = (range.second - range.first) / ncols / numberOfRowsToAverageOver;
69  unsigned int nRowsForHLT = 1;
70  int nrows = std::max((payload_A->getNumberOfRowsToAverageOver() * nRocsInRow),
71  nRowsForHLT); // dirty trick to make it work for the HLT payload
72 
73  auto rAndCol_A = payload_A->getRangeAndNCols(d);
74  auto rAndCol_B = payload_B->getRangeAndNCols(d);
75  bool isDeadCol, isNoisyCol;
76 
77  float ratio(-.1), diff(-1.);
78  for (int col = 0; col < ncols; col++) {
79  for (int row = 0; row < nrows; row++) {
80  switch (theType) {
81  case gainCalibPI::t_gain: {
82  auto gainA = payload_A->getGain(col, row, rAndCol_A.first, rAndCol_A.second, isDeadCol, isNoisyCol);
83  auto gainB = payload_B->getGain(col, row, rAndCol_B.first, rAndCol_B.second, isDeadCol, isNoisyCol);
84  ratio = gainB != 0 ? (gainA / gainB) : -1.; // if the ratio does not make sense the default is -1
85  diff = gainA - gainB;
86  break;
87  }
89  auto pedA = payload_A->getPed(col, row, rAndCol_A.first, rAndCol_A.second, isDeadCol, isNoisyCol);
90  auto pedB = payload_B->getPed(col, row, rAndCol_B.first, rAndCol_B.second, isDeadCol, isNoisyCol);
91  ratio = pedB != 0 ? (pedA / pedB) : -1.; // if the ratio does not make sense the default is -1
92  diff = pedA - pedB;
93  break;
94  }
95  default:
96  edm::LogError("gainCalibPI::fillTheHisto") << "Unrecognized type " << theType << std::endl;
97  break;
98  }
99  // fill the containers
100  v_diffs.push_back(diff);
101  v_ratios.push_back(ratio);
102  } // loop on rows
103  } // loop on cols
104  } // loop on detids
105 
106  std::sort(v_diffs.begin(), v_diffs.end());
107  std::sort(v_ratios.begin(), v_ratios.end());
108 
109  double minDiff = v_diffs.front();
110  double maxDiff = v_diffs.back();
111  double minRatio = v_ratios.front();
112  double maxRatio = v_ratios.back();
113 
114  arr[0] = std::make_shared<TH1F>("h_Ratio", "", 50, minRatio - 1., maxRatio + 1.);
115  arr[1] = std::make_shared<TH1F>("h_Diff", "", 50, minDiff - 1., maxDiff + 1.);
116 
117  for (const auto& r : v_ratios) {
118  arr[0]->Fill(r);
119  }
120  for (const auto& d : v_diffs) {
121  arr[1]->Fill(d);
122  }
123  return arr;
124  }
125 
126  //============================================================================
127  // helper method to fill the gain / pedestals distributions
128  template <typename PayloadType>
129  static void fillTheHisto(const std::shared_ptr<PayloadType>& payload,
130  std::shared_ptr<TH1F> h1,
131  gainCalibPI::type theType,
132  const std::vector<uint32_t>& wantedIds = {}) {
133  std::vector<uint32_t> detids;
134  if (wantedIds.empty()) {
135  payload->getDetIds(detids);
136  } else {
137  detids.assign(wantedIds.begin(), wantedIds.end());
138  }
139 
140  for (const auto& d : detids) {
141  // skip the special case used to signal there are no attached dets
142  if (d == 0xFFFFFFFF)
143  continue;
144 
145  auto range = payload->getRange(d);
146  int numberOfRowsToAverageOver = payload->getNumberOfRowsToAverageOver();
147  int ncols = payload->getNCols(d);
148  int nRocsInRow = (range.second - range.first) / ncols / numberOfRowsToAverageOver;
149  unsigned int nRowsForHLT = 1;
150  int nrows = std::max((payload->getNumberOfRowsToAverageOver() * nRocsInRow),
151  nRowsForHLT); // dirty trick to make it work for the HLT payload
152 
153  auto rangeAndCol = payload->getRangeAndNCols(d);
154  bool isDeadColumn;
155  bool isNoisyColumn;
156 
157  COUT << "NCOLS: " << payload->getNCols(d) << " " << rangeAndCol.second << " NROWS:" << nrows
158  << ", RANGES: " << rangeAndCol.first.second - rangeAndCol.first.first
159  << ", Ratio: " << float(rangeAndCol.first.second - rangeAndCol.first.first) / rangeAndCol.second
160  << std::endl;
161 
162  float quid(-99999.);
163 
164  for (int col = 0; col < ncols; col++) {
165  for (int row = 0; row < nrows; row++) {
166  switch (theType) {
167  case gainCalibPI::t_gain:
168  quid = payload->getGain(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
169  break;
171  quid = payload->getPed(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
172  break;
173  default:
174  edm::LogError("gainCalibPI::fillTheHisto") << "Unrecognized type " << theType << std::endl;
175  break;
176  }
177  h1->Fill(quid);
178  } // loop on rows
179  } // loop on cols
180  } // loop on detids
181  } // fillTheHisto
182 
183  //============================================================================
184  // helper method to fill the gain / pedestal averages per module maps
185  template <typename PayloadType>
186  static void fillThePerModuleMap(const std::shared_ptr<PayloadType>& payload,
187  AvgMap& map,
188  gainCalibPI::type theType) {
189  std::vector<uint32_t> detids;
190  payload->getDetIds(detids);
191 
192  for (const auto& d : detids) {
193  auto range = payload->getRange(d);
194  int numberOfRowsToAverageOver = payload->getNumberOfRowsToAverageOver();
195  int ncols = payload->getNCols(d);
196  int nRocsInRow = (range.second - range.first) / ncols / numberOfRowsToAverageOver;
197  unsigned int nRowsForHLT = 1;
198  int nrows = std::max((payload->getNumberOfRowsToAverageOver() * nRocsInRow),
199  nRowsForHLT); // dirty trick to make it work for the HLT payload
200 
201  auto rangeAndCol = payload->getRangeAndNCols(d);
202  bool isDeadColumn;
203  bool isNoisyColumn;
204 
205  float sumOfX(0.);
206  int nPixels(0);
207  for (int col = 0; col < ncols; col++) {
208  for (int row = 0; row < nrows; row++) {
209  nPixels++;
210  switch (theType) {
211  case gainCalibPI::t_gain:
212  sumOfX +=
213  payload->getGain(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
214  break;
216  sumOfX += payload->getPed(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
217  break;
218  default:
219  edm::LogError("gainCalibPI::fillThePerModuleMap") << "Unrecognized type " << theType << std::endl;
220  break;
221  } // switch on the type
222  } // rows
223  } // columns
224  // fill the return value map
225  map[d] = sumOfX / nPixels;
226  } // loop on the detId
227  } // fillThePerModuleMap
228 
229  //============================================================================
230  // helper method to fill the gain / pedestals distributions
231  template <typename PayloadType>
232  static void fillTheHistos(const std::shared_ptr<PayloadType>& payload,
233  std::shared_ptr<TH1> hBPix,
234  std::shared_ptr<TH1> hFPix,
235  gainCalibPI::type theType) {
236  std::vector<uint32_t> detids;
237  payload->getDetIds(detids);
238 
239  bool isCorrelation_ = hBPix.get()->InheritsFrom(TH2::Class()) && (theType == gainCalibPI::t_correlation);
240 
241  for (const auto& d : detids) {
242  int subid = DetId(d).subdetId();
243  auto range = payload->getRange(d);
244  int numberOfRowsToAverageOver = payload->getNumberOfRowsToAverageOver();
245  int ncols = payload->getNCols(d);
246  int nRocsInRow = (range.second - range.first) / ncols / numberOfRowsToAverageOver;
247  unsigned int nRowsForHLT = 1;
248  int nrows = std::max((payload->getNumberOfRowsToAverageOver() * nRocsInRow),
249  nRowsForHLT); // dirty trick to make it work for the HLT payload
250 
251  auto rangeAndCol = payload->getRangeAndNCols(d);
252  bool isDeadColumn;
253  bool isNoisyColumn;
254 
255  for (int col = 0; col < ncols; col++) {
256  for (int row = 0; row < nrows; row++) {
257  float gain = payload->getGain(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
258  float ped = payload->getPed(col, row, rangeAndCol.first, rangeAndCol.second, isDeadColumn, isNoisyColumn);
259 
260  switch (subid) {
262  if (isCorrelation_) {
263  hBPix->Fill(gain, ped);
264  } else {
265  hBPix->Fill((theType == gainCalibPI::t_gain ? gain : ped));
266  }
267  break;
268  }
270  if (isCorrelation_) {
271  hFPix->Fill(gain, ped);
272  } else {
273  hFPix->Fill((theType == gainCalibPI::t_gain ? gain : ped));
274  }
275  break;
276  }
277  default:
278  edm::LogError("gainCalibPI::fillTheHistos") << d << " is not a Pixel DetId" << std::endl;
279  break;
280  } // switch on subid
281  } // row loop
282  } // column loop
283  } // detid loop
284  } // filltheHistos
285  } // namespace gainCalibPI
286 
287  constexpr char const* TypeName[2] = {"Gains", "Pedestals"};
288 
289  /*******************************************************************
290  1d histogram of SiPixelGainCalibration for Gains of 1 IOV
291  ********************************************************************/
292  template <gainCalibPI::type myType, class PayloadType>
294  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
295  public:
297  : cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV>(
298  Form("SiPixelGainCalibration %s Values", TypeName[myType])) {
299  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
300  isForHLT_ = false;
301  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
302  } else {
303  isForHLT_ = true;
304  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
305  }
306  }
307 
308  bool fill() override {
309  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
310  auto iov = tag.iovs.front();
311 
312  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
313 
314  gStyle->SetOptStat("emr");
315 
316  float minimum(9999.);
317  float maximum(-9999.);
318 
319  switch (myType) {
320  case gainCalibPI::t_gain:
321  maximum = payload->getGainHigh();
322  minimum = payload->getGainLow();
323  break;
325  maximum = payload->getPedHigh();
326  minimum = payload->getPedLow();
327  break;
328  default:
329  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
330  break;
331  }
332 
333  TCanvas canvas("Canv", "Canv", 1200, 1000);
334  auto h1 = std::make_shared<TH1F>(Form("%s values", TypeName[myType]),
335  Form("SiPixel Gain Calibration %s - %s;per %s %s;# %ss",
336  (isForHLT_ ? "ForHLT" : "Offline"),
337  TypeName[myType],
338  (isForHLT_ ? "Column" : "Pixel"),
339  TypeName[myType],
340  (isForHLT_ ? "column" : "pixel")),
341  200,
342  minimum,
343  maximum);
344  canvas.cd();
345  SiPixelPI::adjustCanvasMargins(canvas.cd(), 0.06, 0.12, 0.12, 0.05);
346  canvas.Modified();
347 
348  // fill the histogram
349  gainCalibPI::fillTheHisto(payload, h1, myType);
350 
351  canvas.cd()->SetLogy();
352  h1->SetTitle("");
353  h1->GetYaxis()->SetRangeUser(0.1, h1->GetMaximum() * 10.);
354  h1->SetFillColor(kBlue);
355  h1->SetMarkerStyle(20);
356  h1->SetMarkerSize(1);
357  h1->Draw("bar2");
358 
360  h1->SetStats(true);
361 
362  canvas.Update();
363 
364  TLegend legend = TLegend(0.40, 0.88, 0.94, 0.93);
365  legend.SetHeader(("Payload hash: #bf{" + (std::get<1>(iov)) + "}").c_str(),
366  "C"); // option "C" allows to center the header
367  //legend.AddEntry(h1.get(), ("IOV: " + std::to_string(std::get<0>(iov))).c_str(), "PL");
368  legend.SetLineColor(10);
369  legend.SetTextSize(0.025);
370  legend.Draw("same");
371 
372  TPaveStats* st = (TPaveStats*)h1->FindObject("stats");
373  st->SetTextSize(0.03);
374  SiPixelPI::adjustStats(st, 0.15, 0.83, 0.39, 0.93);
375 
376  auto ltx = TLatex();
377  ltx.SetTextFont(62);
378  //ltx.SetTextColor(kBlue);
379  ltx.SetTextSize(0.05);
380  ltx.SetTextAlign(11);
381  ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.1,
382  1 - gPad->GetTopMargin() + 0.01,
383  ("SiPixel Gain Calibration IOV:" + std::to_string(std::get<0>(iov))).c_str());
384 
386  canvas.SaveAs(fileName.c_str());
387 
388  return true;
389  }
390 
391  protected:
392  bool isForHLT_;
394  };
395 
396  /*******************************************************************
397  1d histograms per region of SiPixelGainCalibration for Gains of 1 IOV
398  ********************************************************************/
399  template <bool isBarrel, gainCalibPI::type myType, class PayloadType>
401  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
402  public:
404  : cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV>(
405  Form("SiPixelGainCalibration %s Values Per Region", TypeName[myType])) {
407 
408  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
409  isForHLT_ = false;
410  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
411  } else {
412  isForHLT_ = true;
413  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
414  }
415  }
416 
417  bool fill() override {
418  gStyle->SetOptStat("mr");
419 
420  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
421  auto iov = tag.iovs.front();
422 
423  // parse first if log
424  bool setLog(true);
426  auto ip = paramValues.find("SetLog");
427  if (ip != paramValues.end()) {
428  auto answer = boost::lexical_cast<std::string>(ip->second);
429  if (!SiPixelPI::checkAnswerOK(answer, setLog)) {
430  throw cms::Exception(label_)
431  << "\nERROR: " << answer
432  << " is not a valid setting for this parameter, please use True,False,1,0,Yes,No \n\n";
433  }
434  }
435 
436  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
437 
438  std::vector<uint32_t> detids;
439  payload->getDetIds(detids);
440 
441  float minimum(9999.);
442  float maximum(-9999.);
443 
444  switch (myType) {
445  case gainCalibPI::t_gain:
446  maximum = payload->getGainHigh();
447  minimum = payload->getGainLow();
448  break;
450  maximum = payload->getPedHigh();
451  minimum = payload->getPedLow();
452  break;
453  default:
454  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
455  break;
456  }
457 
458  TCanvas canvas("Canv", "Canv", isBarrel ? 1400 : 1800, 1200);
459  if (detids.size() > SiPixelPI::phase1size) {
460  SiPixelPI::displayNotSupported(canvas, detids.size());
462  canvas.SaveAs(fileName.c_str());
463  return false;
464  }
465 
466  canvas.cd();
467 
468  SiPixelPI::PhaseInfo phaseInfo(detids.size());
469  const char* path_toTopologyXML = phaseInfo.pathToTopoXML();
470 
471  TrackerTopology tTopo =
473 
474  auto myPlots = PixelRegions::PixelRegionContainers(&tTopo, phaseInfo.phase());
475  myPlots.bookAll(Form("SiPixel Gain Calibration %s - %s", (isForHLT_ ? "ForHLT" : "Offline"), TypeName[myType]),
476  Form("per %s %s", (isForHLT_ ? "Column" : "Pixel"), TypeName[myType]),
477  Form("# %ss", (isForHLT_ ? "column" : "pixel")),
478  200,
479  minimum,
480  maximum);
481 
482  canvas.Modified();
483 
484  // fill the histograms
485  for (const auto& pixelId : PixelRegions::PixelIDs) {
486  auto wantedDets = PixelRegions::attachedDets(pixelId, &tTopo, phaseInfo.phase());
487  gainCalibPI::fillTheHisto(payload, myPlots.getHistoFromMap(pixelId), myType, wantedDets);
488  }
489 
490  if (setLog) {
491  myPlots.setLogScale();
492  }
493  myPlots.beautify(kBlue, -1);
494  myPlots.draw(canvas, isBarrel, "HIST");
495 
496  TLegend legend = TLegend(0.45, 0.88, 0.91, 0.92);
497  legend.SetHeader(("hash: #bf{" + (std::get<1>(iov)) + "}").c_str(),
498  "C"); // option "C" allows to center the header
499  //legend.AddEntry(h1.get(), ("IOV: " + std::to_string(std::get<0>(iov))).c_str(), "PL");
500  legend.SetLineColor(10);
501  legend.SetTextSize(0.025);
502  legend.Draw("same");
503 
504  unsigned int maxPads = isBarrel ? 4 : 12;
505  for (unsigned int c = 1; c <= maxPads; c++) {
506  canvas.cd(c);
507  SiPixelPI::adjustCanvasMargins(canvas.cd(c), 0.06, 0.12, 0.12, 0.05);
508  legend.Draw("same");
509  canvas.cd(c)->Update();
510  }
511 
512  myPlots.stats();
513 
514  auto ltx = TLatex();
515  ltx.SetTextFont(62);
516  ltx.SetTextSize(0.05);
517  ltx.SetTextAlign(11);
518 
519  for (unsigned int c = 1; c <= maxPads; c++) {
520  auto index = isBarrel ? c - 1 : c + 3;
521  canvas.cd(c);
522  auto leftX = setLog ? 0. : 0.1;
523  ltx.DrawLatexNDC(gPad->GetLeftMargin() + leftX,
524  1 - gPad->GetTopMargin() + 0.01,
525  (PixelRegions::IDlabels.at(index) + ", IOV:" + std::to_string(std::get<0>(iov))).c_str());
526  }
527 
529  canvas.SaveAs(fileName.c_str());
530 
531  return true;
532  }
533 
534  protected:
535  bool isForHLT_;
537  };
538 
539  /*******************************************************************
540  1d histograms comparison per region of SiPixelGainCalibration for Gains of 2 IOV
541  ********************************************************************/
542  template <bool isBarrel,
543  gainCalibPI::type myType,
545  int ntags,
546  class PayloadType>
548  : public cond::payloadInspector::PlotImage<PayloadType, nIOVs, ntags> {
549  public:
552  Form("SiPixelGainCalibration %s Values Per Region %i tag(s)", TypeName[myType], ntags)) {
554 
555  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
556  isForHLT_ = false;
557  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
558  } else {
559  isForHLT_ = true;
560  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
561  }
562  }
563 
564  bool fill() override {
565  gStyle->SetOptStat("mr");
566 
567  COUT << "ntags: " << ntags << " this->m_plotAnnotations.ntags: " << this->m_plotAnnotations.ntags << std::endl;
568 
569  // trick to deal with the multi-ioved tag and two tag case at the same time
570  auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
571  auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().name;
572  std::string l_tagname = "";
573  auto firstiov = theIOVs.front();
574  std::tuple<cond::Time_t, cond::Hash> lastiov;
575 
576  // we don't support (yet) comparison with more than 2 tags
577  assert(this->m_plotAnnotations.ntags < 3);
578 
579  if (this->m_plotAnnotations.ntags == 2) {
580  auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
581  l_tagname = cond::payloadInspector::PlotBase::getTag<1>().name;
582  lastiov = tag2iovs.front();
583  } else {
584  lastiov = theIOVs.back();
585  }
586 
587  // parse first if log
588  bool setLog(true);
590  auto ip = paramValues.find("SetLog");
591  if (ip != paramValues.end()) {
592  auto answer = boost::lexical_cast<std::string>(ip->second);
593  if (!SiPixelPI::checkAnswerOK(answer, setLog)) {
594  throw cms::Exception(label_)
595  << "\nERROR: " << answer
596  << " is not a valid setting for this parameter, please use True,False,1,0,Yes,No \n\n";
597  }
598  }
599 
600  std::shared_ptr<PayloadType> last_payload = this->fetchPayload(std::get<1>(lastiov));
601  std::shared_ptr<PayloadType> first_payload = this->fetchPayload(std::get<1>(firstiov));
602 
603  std::string lastIOVsince = std::to_string(std::get<0>(lastiov));
604  std::string firstIOVsince = std::to_string(std::get<0>(firstiov));
605 
606  std::vector<uint32_t> f_detids, l_detids;
607  last_payload->getDetIds(l_detids);
608  first_payload->getDetIds(f_detids);
609 
610  float minimum(9999.);
611  float maximum(-9999.);
612 
613  switch (myType) {
614  case gainCalibPI::t_gain:
615  maximum = std::max(last_payload->getGainHigh(), first_payload->getGainHigh());
616  minimum = std::min(last_payload->getGainLow(), first_payload->getGainLow());
617  break;
619  maximum = std::max(last_payload->getPedHigh(), first_payload->getPedHigh());
620  minimum = std::min(last_payload->getPedLow(), first_payload->getPedLow());
621  break;
622  default:
623  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
624  break;
625  }
626 
627  TCanvas canvas("Canv", "Canv", isBarrel ? 1400 : 1800, 1200);
628  if (std::max(l_detids.size(), f_detids.size()) > SiPixelPI::phase1size) {
629  SiPixelPI::displayNotSupported(canvas, std::max(f_detids.size(), l_detids.size()));
631  canvas.SaveAs(fileName.c_str());
632  return false;
633  }
634 
635  canvas.cd();
636 
637  SiPixelPI::PhaseInfo l_phaseInfo(l_detids.size());
638  SiPixelPI::PhaseInfo f_phaseInfo(f_detids.size());
639  const char* path_toTopologyXML = l_phaseInfo.pathToTopoXML();
640 
641  auto l_tTopo =
643 
644  auto l_myPlots = PixelRegions::PixelRegionContainers(&l_tTopo, l_phaseInfo.phase());
645  l_myPlots.bookAll(
646  Form("Last SiPixel Gain Calibration %s - %s", (isForHLT_ ? "ForHLT" : "Offline"), TypeName[myType]),
647  Form("per %s %s", (isForHLT_ ? "Column" : "Pixel"), TypeName[myType]),
648  Form("# %ss", (isForHLT_ ? "column" : "pixel")),
649  200,
650  minimum,
651  maximum);
652 
653  path_toTopologyXML = f_phaseInfo.pathToTopoXML();
654 
655  auto f_tTopo =
657 
658  auto f_myPlots = PixelRegions::PixelRegionContainers(&f_tTopo, f_phaseInfo.phase());
659  f_myPlots.bookAll(
660  Form("First SiPixel Gain Calibration %s - %s", (isForHLT_ ? "ForHLT" : "Offline"), TypeName[myType]),
661  Form("per %s %s", (isForHLT_ ? "Column" : "Pixel"), TypeName[myType]),
662  Form("# %ss", (isForHLT_ ? "column" : "pixel")),
663  200,
664  minimum,
665  maximum);
666 
667  // fill the histograms
668  for (const auto& pixelId : PixelRegions::PixelIDs) {
669  auto f_wantedDets = PixelRegions::attachedDets(pixelId, &f_tTopo, f_phaseInfo.phase());
670  auto l_wantedDets = PixelRegions::attachedDets(pixelId, &l_tTopo, l_phaseInfo.phase());
671  gainCalibPI::fillTheHisto(first_payload, f_myPlots.getHistoFromMap(pixelId), myType, f_wantedDets);
672  gainCalibPI::fillTheHisto(last_payload, l_myPlots.getHistoFromMap(pixelId), myType, l_wantedDets);
673  }
674 
675  if (setLog) {
676  f_myPlots.setLogScale();
677  l_myPlots.setLogScale();
678  }
679 
680  l_myPlots.beautify(kRed, -1);
681  f_myPlots.beautify(kAzure, -1);
682 
683  l_myPlots.draw(canvas, isBarrel, "HIST", f_phaseInfo.isPhase1Comparison(l_phaseInfo));
684  f_myPlots.draw(canvas, isBarrel, "HISTsames", f_phaseInfo.isPhase1Comparison(l_phaseInfo));
685 
686  // rescale the y-axis ranges in order to fit the canvas
687  l_myPlots.rescaleMax(f_myPlots);
688 
689  // done dealing with IOVs
690  auto colorTag = isBarrel ? PixelRegions::L1 : PixelRegions::Rm1l;
691  std::unique_ptr<TLegend> legend;
692  if (this->m_plotAnnotations.ntags == 2) {
693  legend = std::make_unique<TLegend>(0.36, 0.86, 0.94, 0.92);
694  legend->AddEntry(l_myPlots.getHistoFromMap(colorTag).get(), ("#color[2]{" + l_tagname + "}").c_str(), "F");
695  legend->AddEntry(f_myPlots.getHistoFromMap(colorTag).get(), ("#color[4]{" + f_tagname + "}").c_str(), "F");
696  legend->SetTextSize(0.024);
697  } else {
698  legend = std::make_unique<TLegend>(0.58, 0.80, 0.90, 0.92);
699  legend->AddEntry(l_myPlots.getHistoFromMap(colorTag).get(), ("#color[2]{" + lastIOVsince + "}").c_str(), "F");
700  legend->AddEntry(f_myPlots.getHistoFromMap(colorTag).get(), ("#color[4]{" + firstIOVsince + "}").c_str(), "F");
701  legend->SetTextSize(0.040);
702  }
703  legend->SetLineColor(10);
704 
705  unsigned int maxPads = isBarrel ? 4 : 12;
706  for (unsigned int c = 1; c <= maxPads; c++) {
707  canvas.cd(c);
708  SiPixelPI::adjustCanvasMargins(canvas.cd(c), 0.06, 0.12, 0.12, 0.05);
709  legend->Draw("same");
710  canvas.cd(c)->Update();
711  }
712 
713  f_myPlots.stats(0);
714  l_myPlots.stats(1);
715 
716  auto ltx = TLatex();
717  ltx.SetTextFont(62);
718  ltx.SetTextSize(0.05);
719  ltx.SetTextAlign(11);
720 
721  for (unsigned int c = 1; c <= maxPads; c++) {
722  auto index = isBarrel ? c - 1 : c + 3;
723  canvas.cd(c);
724  auto leftX = setLog ? 0. : 0.1;
725  ltx.DrawLatexNDC(gPad->GetLeftMargin() + leftX,
726  1 - gPad->GetTopMargin() + 0.01,
727  (PixelRegions::IDlabels.at(index) + " : #color[4]{" + std::to_string(std::get<0>(firstiov)) +
728  "} vs #color[2]{" + std::to_string(std::get<0>(lastiov)) + "}")
729  .c_str());
730  }
731 
733  canvas.SaveAs(fileName.c_str());
734 
735  return true;
736  }
737 
738  protected:
739  bool isForHLT_;
741  };
742 
743  /*******************************************************************
744  1d histogram of SiPixelGainCalibration for Gain/Pedestals
745  correlation of 1 IOV
746  ********************************************************************/
747  template <class PayloadType>
749  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
750  public:
753  "SiPixelGainCalibration gain/pedestal correlations") {
754  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
755  isForHLT_ = false;
756  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
757  } else {
758  isForHLT_ = true;
759  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
760  }
761  }
762 
763  bool fill() override {
764  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
765  auto iov = tag.iovs.front();
766 
767  gStyle->SetOptStat("emr");
768  gStyle->SetPalette(1);
769 
770  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
771 
772  TCanvas canvas("Canv", "Canv", 1400, 800);
773  canvas.Divide(2, 1);
774  canvas.cd();
775 
776  auto hBPix = std::make_shared<TH2F>("Correlation BPIX",
777  Form("SiPixel Gain Calibration %s BPIx;per %s gains;per %s pedestals",
778  (isForHLT_ ? "ForHLT" : "Offline"),
779  (isForHLT_ ? "column" : "pixel"),
780  (isForHLT_ ? "column" : "pixel")),
781  200,
782  payload->getGainLow(),
783  payload->getGainHigh(),
784  200,
785  payload->getPedLow(),
786  payload->getPedHigh());
787 
788  auto hFPix = std::make_shared<TH2F>("Correlation FPIX",
789  Form("SiPixel Gain Calibration %s FPix;per %s gains;per %s pedestals",
790  (isForHLT_ ? "ForHLT" : "Offline"),
791  (isForHLT_ ? "column" : "pixel"),
792  (isForHLT_ ? "column" : "pixel")),
793  200,
794  payload->getGainLow(),
795  payload->getGainHigh(),
796  200,
797  payload->getPedLow(),
798  payload->getPedHigh());
799 
800  for (unsigned int i : {1, 2}) {
801  SiPixelPI::adjustCanvasMargins(canvas.cd(i), 0.04, 0.12, 0.15, 0.13);
802  canvas.cd(i)->Modified();
803  }
804 
805  // actually fill the histograms
807 
808  canvas.cd(1)->SetLogz();
809  hBPix->SetTitle("");
810  hBPix->Draw("colz");
811 
812  SiPixelPI::makeNicePlotStyle(hBPix.get());
813  hBPix->GetYaxis()->SetTitleOffset(1.65);
814 
815  canvas.cd(2)->SetLogz();
816  hFPix->SetTitle("");
817  hFPix->Draw("colz");
818 
819  SiPixelPI::makeNicePlotStyle(hFPix.get());
820  hFPix->GetYaxis()->SetTitleOffset(1.65);
821  canvas.Update();
822 
823  TLegend legend = TLegend(0.3, 0.92, 0.70, 0.95);
824  legend.SetHeader(("Payload hash: #bf{" + (std::get<1>(iov)) + "}").c_str(),
825  "C"); // option "C" allows to center the header
826  legend.SetLineColor(10);
827  legend.SetTextSize(0.025);
828  canvas.cd(1);
829  legend.Draw("same");
830  canvas.cd(2);
831  legend.Draw("same");
832 
833  auto ltx = TLatex();
834  ltx.SetTextFont(62);
835  //ltx.SetTextColor(kBlue);
836  ltx.SetTextSize(0.045);
837  ltx.SetTextAlign(11);
838  canvas.cd(1);
839  ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
840  1 - gPad->GetTopMargin() + 0.01,
841  ("SiPixel Gain Calibration IOV:" + std::to_string(std::get<0>(iov))).c_str());
842 
843  ltx.DrawLatexNDC(0.75, 0.15, "BPIX");
844 
845  canvas.cd(2);
846  ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
847  1 - gPad->GetTopMargin() + 0.01,
848  ("SiPixel Gain Calibration IOV:" + std::to_string(std::get<0>(iov))).c_str());
849 
850  ltx.DrawLatexNDC(0.75, 0.15, "FPIX");
851 
853  canvas.SaveAs(fileName.c_str());
854 #ifdef MMDEBUG
855  canvas.SaveAs("out.root");
856 #endif
857  return true;
858  }
859 
860  protected:
861  bool isForHLT_;
863  };
864 
865  /*******************************************************************
866  1d histogram of SiPixelGainCalibration for Pedestals of 1 IOV
867  ********************************************************************/
868  template <gainCalibPI::type myType, class PayloadType>
870  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
871  public:
874  Form("SiPixelGainCalibrationOffline %s Values By Partition", TypeName[myType])) {
875  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
876  isForHLT_ = false;
877  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
878  } else {
879  isForHLT_ = true;
880  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
881  }
882  }
883 
884  bool fill() override {
885  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
886  auto iov = tag.iovs.front();
887 
888  gStyle->SetOptStat("emr");
889 
890  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
891 
892  TCanvas canvas("Canv", "Canv", 1400, 800);
893  canvas.Divide(2, 1);
894  canvas.cd();
895 
896  float minimum(9999.);
897  float maximum(-9999.);
898 
899  switch (myType) {
900  case gainCalibPI::t_gain:
901  maximum = payload->getGainHigh();
902  minimum = payload->getGainLow();
903  break;
905  maximum = payload->getPedHigh();
906  minimum = payload->getPedLow();
907  break;
908  default:
909  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
910  break;
911  }
912 
913  auto hBPix = std::make_shared<TH1F>(Form("%s BPIX", TypeName[myType]),
914  Form("SiPixel Gain Calibration %s BPIx -%s;per %s %s (BPix);# %ss",
915  (isForHLT_ ? "ForHLT" : "Offline"),
916  TypeName[myType],
917  (isForHLT_ ? "Column" : "Pixel"),
918  TypeName[myType],
919  (isForHLT_ ? "column" : "pixel")),
920  200,
921  minimum,
922  maximum);
923 
924  auto hFPix = std::make_shared<TH1F>(Form("%s FPIX", TypeName[myType]),
925  Form("SiPixel Gain Calibration %s FPix -%s;per %s %s (FPix);# %ss",
926  (isForHLT_ ? "ForHLT" : "Offline"),
927  TypeName[myType],
928  (isForHLT_ ? "Column" : "Pixel"),
929  TypeName[myType],
930  (isForHLT_ ? "column" : "pixel")),
931  200,
932  minimum,
933  maximum);
934 
935  for (unsigned int i : {1, 2}) {
936  SiPixelPI::adjustCanvasMargins(canvas.cd(i), 0.04, 0.12, 0.12, 0.02);
937  canvas.cd(i)->Modified();
938  }
939 
940  // actually fill the histograms
941  fillTheHistos(payload, hBPix, hFPix, myType);
942 
943  canvas.cd(1)->SetLogy();
944  hBPix->SetTitle("");
945  hBPix->GetYaxis()->SetRangeUser(0.1, hBPix->GetMaximum() * 10);
946  hBPix->SetFillColor(kBlue);
947  hBPix->SetMarkerStyle(20);
948  hBPix->SetMarkerSize(1);
949  hBPix->Draw("hist");
950 
951  SiPixelPI::makeNicePlotStyle(hBPix.get());
952  hBPix->SetStats(true);
953 
954  canvas.cd(2)->SetLogy();
955  hFPix->SetTitle("");
956  hFPix->GetYaxis()->SetRangeUser(0.1, hFPix->GetMaximum() * 10);
957  hFPix->SetFillColor(kBlue);
958  hFPix->SetMarkerStyle(20);
959  hFPix->SetMarkerSize(1);
960  hFPix->Draw("hist");
961 
962  SiPixelPI::makeNicePlotStyle(hFPix.get());
963  hFPix->SetStats(true);
964 
965  canvas.Update();
966 
967  TLegend legend = TLegend(0.32, 0.92, 0.97, 0.95);
968  legend.SetHeader(("Payload hash: #bf{" + (std::get<1>(iov)) + "}").c_str(),
969  "C"); // option "C" allows to center the header
970  //legend.AddEntry(h1.get(), ("IOV: " + std::to_string(std::get<0>(iov))).c_str(), "PL");
971  legend.SetLineColor(10);
972  legend.SetTextSize(0.025);
973  canvas.cd(1);
974  legend.Draw("same");
975  canvas.cd(2);
976  legend.Draw("same");
977 
978  canvas.cd(1);
979  TPaveStats* st1 = (TPaveStats*)hBPix->FindObject("stats");
980  st1->SetTextSize(0.03);
981  SiPixelPI::adjustStats(st1, 0.13, 0.815, 0.44, 0.915);
982 
983  canvas.cd(2);
984  TPaveStats* st2 = (TPaveStats*)hFPix->FindObject("stats");
985  st2->SetTextSize(0.03);
986  SiPixelPI::adjustStats(st2, 0.14, 0.815, 0.44, 0.915);
987 
988  auto ltx = TLatex();
989  ltx.SetTextFont(62);
990  //ltx.SetTextColor(kBlue);
991  ltx.SetTextSize(0.045);
992  ltx.SetTextAlign(11);
993  canvas.cd(1);
994  ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
995  1 - gPad->GetTopMargin() + 0.01,
996  ("SiPixel Gain Calibration IOV:" + std::to_string(std::get<0>(iov))).c_str());
997 
998  canvas.cd(2);
999  ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
1000  1 - gPad->GetTopMargin() + 0.01,
1001  ("SiPixel Gain Calibration IOV:" + std::to_string(std::get<0>(iov))).c_str());
1002 
1004  canvas.SaveAs(fileName.c_str());
1005 
1006  return true;
1007  }
1008 
1009  protected:
1010  bool isForHLT_;
1012  };
1013 
1014  /************************************************
1015  1d histogram comparison of SiPixelGainCalibration
1016  *************************************************/
1017  template <gainCalibPI::type myType, class PayloadType>
1019  public:
1022  Form("SiPixelGainCalibration %s Values Comparison", TypeName[myType])) {
1023  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
1024  isForHLT_ = false;
1025  } else {
1026  isForHLT_ = true;
1027  }
1028  }
1029  bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash>>& iovs) override {
1030  gStyle->SetOptStat("emr");
1031  TGaxis::SetExponentOffset(-0.1, 0.01, "y"); // Y offset
1032  TH1F::SetDefaultSumw2(true);
1033 
1034  std::vector<std::tuple<cond::Time_t, cond::Hash>> sorted_iovs = iovs;
1035  // make absolute sure the IOVs are sortd by since
1036  std::sort(begin(sorted_iovs), end(sorted_iovs), [](auto const& t1, auto const& t2) {
1037  return std::get<0>(t1) < std::get<0>(t2);
1038  });
1039  auto firstiov = sorted_iovs.front();
1040  auto lastiov = sorted_iovs.back();
1041 
1042  std::shared_ptr<PayloadType> last_payload = this->fetchPayload(std::get<1>(lastiov));
1043  std::shared_ptr<PayloadType> first_payload = this->fetchPayload(std::get<1>(firstiov));
1044 
1045  std::string lastIOVsince = std::to_string(std::get<0>(lastiov));
1046  std::string firstIOVsince = std::to_string(std::get<0>(firstiov));
1047 
1048  float minimum(9999.);
1049  float maximum(-9999.);
1050 
1051  switch (myType) {
1052  case gainCalibPI::t_gain:
1053  maximum = std::max(last_payload->getGainHigh(), first_payload->getGainHigh());
1054  minimum = std::min(last_payload->getGainLow(), first_payload->getGainLow());
1055  break;
1057  maximum = std::max(last_payload->getPedHigh(), first_payload->getPedHigh());
1058  minimum = std::min(last_payload->getPedLow(), first_payload->getPedLow());
1059  break;
1060  default:
1061  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
1062  break;
1063  }
1064 
1065  TCanvas canvas("Canv", "Canv", 1200, 1000);
1066  canvas.cd();
1067  auto hfirst = std::make_shared<TH1F>(Form("First, IOV %s", firstIOVsince.c_str()),
1068  Form("SiPixel Gain Calibration %s - %s;per %s %s;# %ss",
1069  (isForHLT_ ? "ForHLT" : "Offline"),
1070  TypeName[myType],
1071  (isForHLT_ ? "Column" : "Pixel"),
1072  TypeName[myType],
1073  (isForHLT_ ? "column" : "pixel")),
1074  200,
1075  minimum,
1076  maximum);
1077 
1078  auto hlast = std::make_shared<TH1F>(Form("Last, IOV %s", lastIOVsince.c_str()),
1079  Form("SiPixel Gain Calibration %s - %s;per %s %s;# %ss",
1080  (isForHLT_ ? "ForHLT" : "Offline"),
1081  TypeName[myType],
1082  (isForHLT_ ? "Column" : "Pixel"),
1083  TypeName[myType],
1084  (isForHLT_ ? "column" : "pixel")),
1085  200,
1086  minimum,
1087  maximum);
1088 
1089  SiPixelPI::adjustCanvasMargins(canvas.cd(), 0.05, 0.12, 0.12, 0.03);
1090  canvas.Modified();
1091 
1092  gainCalibPI::fillTheHisto(first_payload, hfirst, myType);
1093  gainCalibPI::fillTheHisto(last_payload, hlast, myType);
1094 
1095  canvas.cd()->SetLogy();
1096  auto extrema = SiPixelPI::getExtrema(hfirst.get(), hlast.get());
1097  //hfirst->GetYaxis()->SetRangeUser(extrema.first, extrema.second * 1.10);
1098  hfirst->GetYaxis()->SetRangeUser(1., extrema.second * 10);
1099 
1100  hfirst->SetTitle("");
1101  hfirst->SetLineColor(kRed);
1102  hfirst->SetBarWidth(0.95);
1103  hfirst->Draw("hist");
1104 
1105  hlast->SetTitle("");
1106  hlast->SetFillColorAlpha(kBlue, 0.20);
1107  hlast->SetBarWidth(0.95);
1108  hlast->Draw("histsames");
1109 
1110  SiPixelPI::makeNicePlotStyle(hfirst.get());
1111  hfirst->SetStats(true);
1112  SiPixelPI::makeNicePlotStyle(hlast.get());
1113  hlast->SetStats(true);
1114 
1115  canvas.Update();
1116 
1117  TLegend legend = TLegend(0.45, 0.86, 0.74, 0.94);
1118  //legend.SetHeader("#font[22]{SiPixel Offline Gain Calibration Comparison}", "C"); // option "C" allows to center the header
1119  //legend.AddEntry(hfirst.get(), ("IOV: " + std::to_string(std::get<0>(firstiov))).c_str(), "FL");
1120  //legend.AddEntry(hlast.get(), ("IOV: " + std::to_string(std::get<0>(lastiov))).c_str(), "FL");
1121  legend.AddEntry(hfirst.get(), ("payload: #color[2]{" + std::get<1>(firstiov) + "}").c_str(), "F");
1122  legend.AddEntry(hlast.get(), ("payload: #color[4]{" + std::get<1>(lastiov) + "}").c_str(), "F");
1123  legend.SetTextSize(0.022);
1124  legend.SetLineColor(10);
1125  legend.Draw("same");
1126 
1127  TPaveStats* st1 = (TPaveStats*)hfirst->FindObject("stats");
1128  st1->SetTextSize(0.021);
1129  st1->SetLineColor(kRed);
1130  st1->SetTextColor(kRed);
1131  SiPixelPI::adjustStats(st1, 0.13, 0.86, 0.31, 0.94);
1132 
1133  TPaveStats* st2 = (TPaveStats*)hlast->FindObject("stats");
1134  st2->SetTextSize(0.021);
1135  st2->SetLineColor(kBlue);
1136  st2->SetTextColor(kBlue);
1137  SiPixelPI::adjustStats(st2, 0.13, 0.77, 0.31, 0.85);
1138 
1139  auto ltx = TLatex();
1140  ltx.SetTextFont(62);
1141  //ltx.SetTextColor(kBlue);
1142  ltx.SetTextSize(0.047);
1143  ltx.SetTextAlign(11);
1144  ltx.DrawLatexNDC(gPad->GetLeftMargin(),
1145  1 - gPad->GetTopMargin() + 0.01,
1146  ("SiPixel Gain Calibration IOV:#color[2]{" + std::to_string(std::get<0>(firstiov)) +
1147  "} vs IOV:#color[4]{" + std::to_string(std::get<0>(lastiov)) + "}")
1148  .c_str());
1149 
1151  canvas.SaveAs(fileName.c_str());
1152 #ifdef MMDEBUG
1153  canvas.SaveAs("out.root");
1154 #endif
1156  return true;
1157  }
1158 
1159  protected:
1160  bool isForHLT_;
1162  };
1163 
1164  template <gainCalibPI::type myType, class PayloadType>
1166  : public SiPixelGainCalibrationValueComparisonBase<myType, PayloadType> {
1167  public:
1170  this->setSingleIov(false);
1171  }
1172  };
1173 
1174  template <gainCalibPI::type myType, class PayloadType>
1176  : public SiPixelGainCalibrationValueComparisonBase<myType, PayloadType> {
1177  public:
1179  this->setTwoTags(true);
1180  }
1181  };
1182 
1183  /************************************************
1184  Diff and Ratio histograms of 2 IOVs
1185  *************************************************/
1186  template <gainCalibPI::type myType, cond::payloadInspector::IOVMultiplicity nIOVs, int ntags, class PayloadType>
1187  class SiPixelGainCalibDiffAndRatioBase : public cond::payloadInspector::PlotImage<PayloadType, nIOVs, ntags> {
1188  public:
1191  Form("SiPixelGainCalibration %s Diff and Ratio %i tag(s)", TypeName[myType], ntags)) {
1192  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
1193  isForHLT_ = false;
1194  } else {
1195  isForHLT_ = true;
1196  }
1197  }
1198 
1199  bool fill() override {
1200  gStyle->SetOptStat("emr");
1201  TGaxis::SetExponentOffset(-0.1, 0.01, "y"); // Y offset
1202  TH1F::SetDefaultSumw2(true);
1203 
1204  COUT << "ntags: " << ntags << " this->m_plotAnnotations.ntags: " << this->m_plotAnnotations.ntags << std::endl;
1205 
1206  // trick to deal with the multi-ioved tag and two tag case at the same time
1207  auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
1208  auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().name;
1209  std::string l_tagname = "";
1210  auto firstiov = theIOVs.front();
1211  std::tuple<cond::Time_t, cond::Hash> lastiov;
1212 
1213  // we don't support (yet) comparison with more than 2 tags
1214  assert(this->m_plotAnnotations.ntags < 3);
1215 
1216  if (this->m_plotAnnotations.ntags == 2) {
1217  auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
1218  l_tagname = cond::payloadInspector::PlotBase::getTag<1>().name;
1219  lastiov = tag2iovs.front();
1220  } else {
1221  lastiov = theIOVs.back();
1222  }
1223 
1224  std::shared_ptr<PayloadType> last_payload = this->fetchPayload(std::get<1>(lastiov));
1225  std::shared_ptr<PayloadType> first_payload = this->fetchPayload(std::get<1>(firstiov));
1226 
1227  std::string lastIOVsince = std::to_string(std::get<0>(lastiov));
1228  std::string firstIOVsince = std::to_string(std::get<0>(firstiov));
1229 
1230  TCanvas canvas("Canv", "Canv", 1300, 800);
1231  canvas.Divide(2, 1);
1232  canvas.cd();
1233 
1234  SiPixelPI::adjustCanvasMargins(canvas.cd(1), 0.05, 0.12, 0.12, 0.04);
1235  SiPixelPI::adjustCanvasMargins(canvas.cd(2), 0.05, 0.12, 0.12, 0.04);
1236  canvas.Modified();
1237 
1238  auto array = gainCalibPI::fillDiffAndRatio(first_payload, last_payload, myType);
1239 
1240  array[0]->SetTitle(Form("SiPixel Gain Calibration %s - %s;per %s %s ratio;# %ss",
1241  (isForHLT_ ? "ForHLT" : "Offline"),
1242  TypeName[myType],
1243  (isForHLT_ ? "Column" : "Pixel"),
1244  TypeName[myType],
1245  (isForHLT_ ? "column" : "pixel")));
1246 
1247  array[1]->SetTitle(Form("SiPixel Gain Calibration %s - %s;per %s %s difference;# %ss",
1248  (isForHLT_ ? "ForHLT" : "Offline"),
1249  TypeName[myType],
1250  (isForHLT_ ? "Column" : "Pixel"),
1251  TypeName[myType],
1252  (isForHLT_ ? "column" : "pixel")));
1253 
1254  canvas.cd(1)->SetLogy();
1255  array[0]->SetTitle("");
1256  array[0]->SetLineColor(kBlack);
1257  array[0]->SetFillColor(kRed);
1258  array[0]->SetBarWidth(0.90);
1259  array[0]->SetMaximum(array[0]->GetMaximum() * 10);
1260  array[0]->Draw("bar");
1262  array[0]->SetStats(true);
1263 
1264  canvas.cd(2)->SetLogy();
1265  array[1]->SetTitle("");
1266  array[1]->SetLineColor(kBlack);
1267  array[1]->SetFillColor(kBlue);
1268  array[1]->SetBarWidth(0.90);
1269  array[1]->SetMaximum(array[1]->GetMaximum() * 10);
1270  array[1]->Draw("bar");
1272  array[1]->SetStats(true);
1273 
1274  canvas.Update();
1275 
1276  canvas.cd(1);
1277  TLatex latex;
1278  latex.SetTextSize(0.024);
1279  latex.SetTextAlign(13); //align at top
1280  latex.DrawLatexNDC(
1281  .41,
1282  .94,
1283  fmt::sprintf("#scale[1.2]{SiPixelGainCalibration%s Ratio}", (isForHLT_ ? "ForHLT" : "Offline")).c_str());
1284  if (this->m_plotAnnotations.ntags == 2) {
1285  latex.DrawLatexNDC(
1286  .41, .91, ("#splitline{#font[12]{" + f_tagname + "}}{ / #font[12]{" + l_tagname + "}}").c_str());
1287  } else {
1288  latex.DrawLatexNDC(.41, .91, (firstIOVsince + " / " + lastIOVsince).c_str());
1289  }
1290 
1291  canvas.cd(2);
1292  TLatex latex2;
1293  latex2.SetTextSize(0.024);
1294  latex2.SetTextAlign(13); //align at top
1295  latex2.DrawLatexNDC(
1296  .41,
1297  .94,
1298  fmt::sprintf("#scale[1.2]{SiPixelGainCalibration%s Diff}", (isForHLT_ ? "ForHLT" : "Offline")).c_str());
1299  if (this->m_plotAnnotations.ntags == 2) {
1300  latex2.DrawLatexNDC(
1301  .41, .91, ("#splitline{#font[12]{" + f_tagname + "}}{ - #font[12]{" + l_tagname + "}}").c_str());
1302  } else {
1303  latex2.DrawLatexNDC(.41, .91, (firstIOVsince + " - " + lastIOVsince).c_str());
1304  }
1305 
1306  TPaveStats* st1 = (TPaveStats*)array[0]->FindObject("stats");
1307  st1->SetTextSize(0.027);
1308  st1->SetLineColor(kRed);
1309  st1->SetTextColor(kRed);
1310  SiPixelPI::adjustStats(st1, 0.13, 0.84, 0.40, 0.94);
1311 
1312  TPaveStats* st2 = (TPaveStats*)array[1]->FindObject("stats");
1313  st2->SetTextSize(0.027);
1314  st2->SetLineColor(kBlue);
1315  st2->SetTextColor(kBlue);
1316  SiPixelPI::adjustStats(st2, 0.13, 0.84, 0.40, 0.94);
1317 
1318  auto ltx = TLatex();
1319  ltx.SetTextFont(62);
1320  //ltx.SetTextColor(kBlue);
1321  ltx.SetTextSize(0.040);
1322  ltx.SetTextAlign(11);
1323  canvas.cd(1);
1324  ltx.DrawLatexNDC(
1325  gPad->GetLeftMargin(),
1326  1 - gPad->GetTopMargin() + 0.01,
1327  fmt::sprintf("SiPixel %s Ratio, IOV %s / %s", TypeName[myType], firstIOVsince, lastIOVsince).c_str());
1328 
1329  canvas.cd(2);
1330  ltx.DrawLatexNDC(
1331  gPad->GetLeftMargin(),
1332  1 - gPad->GetTopMargin() + 0.01,
1333  fmt::sprintf("SiPixel %s Diff, IOV %s - %s", TypeName[myType], firstIOVsince, lastIOVsince).c_str());
1334 
1336  canvas.SaveAs(fileName.c_str());
1337 #ifdef MMDEBUG
1338  canvas.SaveAs("out.root");
1339 #endif
1341  return true;
1342  }
1343 
1344  protected:
1345  bool isForHLT_;
1347  };
1348 
1349  // 2D MAPS
1350 
1351  /************************************************
1352  occupancy style map BPix
1353  *************************************************/
1354  template <gainCalibPI::type myType, class PayloadType>
1356  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
1357  public:
1360  Form("SiPixelGainCalibration %s Barrel Pixel Map", TypeName[myType])),
1362  edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {
1363  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
1364  isForHLT_ = false;
1365  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
1366  } else {
1367  isForHLT_ = true;
1368  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
1369  }
1370  };
1371 
1372  bool fill() override {
1373  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
1374  auto iov = tag.iovs.front();
1375 
1376  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
1377 
1378  Phase1PixelROCMaps theBPixGainsMap("");
1379  static constexpr int n_layers = 4;
1380 
1381  std::map<uint32_t, float> GainCalibMap_;
1382  gainCalibPI::fillThePerModuleMap(payload, GainCalibMap_, myType);
1383  if (GainCalibMap_.size() != SiPixelPI::phase1size) {
1384  edm::LogError(label_) << "SiPixelGainCalibration maps are not supported for non-Phase1 Pixel geometries !";
1385  TCanvas canvas("Canv", "Canv", 1200, 1000);
1386  SiPixelPI::displayNotSupported(canvas, GainCalibMap_.size());
1388  canvas.SaveAs(fileName.c_str());
1389  return false;
1390  }
1391 
1392  // hard-coded phase-I
1393  std::array<double, n_layers> minima = {{999., 999., 999., 999.}};
1394 
1395  for (const auto& element : GainCalibMap_) {
1396  int subid = DetId(element.first).subdetId();
1397  if (subid == PixelSubdetector::PixelBarrel) {
1398  auto layer = m_trackerTopo.pxbLayer(DetId(element.first));
1399 
1400  if (element.second < minima.at(layer - 1))
1401  minima.at(layer - 1) = element.second;
1402 
1403  theBPixGainsMap.fillWholeModule(element.first, element.second);
1404  }
1405  }
1406 
1407  gStyle->SetOptStat(0);
1408  //=========================
1409  TCanvas canvas("Summary", "Summary", 1200, 1200);
1410  theBPixGainsMap.drawBarrelMaps(canvas);
1411 
1412  for (unsigned int lay = 1; lay <= n_layers; lay++) {
1413  SiPixelPI::adjustCanvasMargins(canvas.cd(lay), -1, 0.08, 0.1, 0.13);
1414 
1415  auto h_bpix_Gains = theBPixGainsMap.getLayerMaps();
1416 
1417  COUT << " layer:" << lay << " max:" << h_bpix_Gains[lay - 1]->GetMaximum() << " min: " << minima.at(lay - 1)
1418  << std::endl;
1419 
1420  h_bpix_Gains[lay - 1]->GetZaxis()->SetRangeUser(minima.at(lay - 1) - 0.001,
1421  h_bpix_Gains[lay - 1]->GetMaximum() + 0.001);
1422  }
1423 
1424  auto unpacked = SiPixelPI::unpack(std::get<0>(iov));
1425 
1426  for (unsigned int lay = 1; lay <= n_layers; lay++) {
1427  canvas.cd(lay);
1428  auto ltx = TLatex();
1429  ltx.SetTextFont(62);
1430  ltx.SetTextColor(kBlue);
1431  ltx.SetTextSize(0.055);
1432  ltx.SetTextAlign(11);
1433  ltx.DrawLatexNDC(gPad->GetLeftMargin(),
1434  1 - gPad->GetTopMargin() + 0.01,
1435  unpacked.first == 0
1436  ? ("IOV:" + std::to_string(unpacked.second)).c_str()
1437  : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str());
1438  }
1439 
1441  canvas.SaveAs(fileName.c_str());
1442 
1443  return true;
1444  }
1445 
1446  private:
1448 
1449  protected:
1452  };
1453 
1454  /************************************************
1455  occupancy style map FPix
1456  *************************************************/
1457 
1458  template <gainCalibPI::type myType, class PayloadType>
1460  : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
1461  public:
1464  Form("SiPixelGainCalibration %s Forward Pixel Map", TypeName[myType])),
1466  edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {
1467  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
1468  isForHLT_ = false;
1469  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
1470  } else {
1471  isForHLT_ = true;
1472  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
1473  }
1474  }
1475 
1476  bool fill() override {
1477  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
1478  auto iov = tag.iovs.front();
1479  std::shared_ptr<PayloadType> payload = this->fetchPayload(std::get<1>(iov));
1480 
1481  Phase1PixelROCMaps theFPixGainsMap("");
1482  static constexpr int n_rings = 2;
1483 
1484  std::map<uint32_t, float> GainCalibMap_;
1485  gainCalibPI::fillThePerModuleMap(payload, GainCalibMap_, myType);
1486  if (GainCalibMap_.size() != SiPixelPI::phase1size) {
1487  edm::LogError(label_) << "SiPixelGainCalibration maps are not supported for non-Phase1 Pixel geometries !";
1488  TCanvas canvas("Canv", "Canv", 1200, 1000);
1489  SiPixelPI::displayNotSupported(canvas, GainCalibMap_.size());
1491  canvas.SaveAs(fileName.c_str());
1492  return false;
1493  }
1494 
1495  // hardcoded phase-I
1496  std::array<double, n_rings> minima = {{999., 999.}};
1497 
1498  for (const auto& element : GainCalibMap_) {
1499  int subid = DetId(element.first).subdetId();
1500  if (subid == PixelSubdetector::PixelEndcap) {
1501  auto ring = SiPixelPI::ring(DetId(element.first), m_trackerTopo, true);
1502 
1503  if (element.second < minima.at(ring - 1))
1504  minima.at(ring - 1) = element.second;
1505 
1506  theFPixGainsMap.fillWholeModule(element.first, element.second);
1507  }
1508  }
1509 
1510  gStyle->SetOptStat(0);
1511  //=========================
1512  TCanvas canvas("Summary", "Summary", 1200, 600);
1513  theFPixGainsMap.drawForwardMaps(canvas);
1514 
1515  for (unsigned int ring = 1; ring <= n_rings; ring++) {
1516  SiPixelPI::adjustCanvasMargins(canvas.cd(ring), -1, 0.08, 0.1, 0.13);
1517 
1518  auto h_fpix_Gains = theFPixGainsMap.getRingMaps();
1519 
1520  COUT << " ring:" << ring << " max:" << h_fpix_Gains[ring - 1]->GetMaximum() << " min: " << minima.at(ring - 1)
1521  << std::endl;
1522 
1523  h_fpix_Gains[ring - 1]->GetZaxis()->SetRangeUser(minima.at(ring - 1) - 0.001,
1524  h_fpix_Gains[ring - 1]->GetMaximum() + 0.001);
1525  }
1526 
1527  auto unpacked = SiPixelPI::unpack(std::get<0>(iov));
1528 
1529  for (unsigned int ring = 1; ring <= n_rings; ring++) {
1530  canvas.cd(ring);
1531  auto ltx = TLatex();
1532  ltx.SetTextFont(62);
1533  ltx.SetTextColor(kBlue);
1534  ltx.SetTextSize(0.05);
1535  ltx.SetTextAlign(11);
1536  ltx.DrawLatexNDC(gPad->GetLeftMargin(),
1537  1 - gPad->GetTopMargin() + 0.01,
1538  unpacked.first == 0
1539  ? ("IOV:" + std::to_string(unpacked.second)).c_str()
1540  : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str());
1541  }
1542 
1544  canvas.SaveAs(fileName.c_str());
1545  return true;
1546  }
1547 
1548  private:
1551  protected:
1552  bool isForHLT_;
1554  };
1555 
1556  /************************************************
1557  Summary Comparison per region of SiPixelGainCalibration between 2 IOVs
1558  *************************************************/
1559  template <gainCalibPI::type myType, class PayloadType, cond::payloadInspector::IOVMultiplicity nIOVs, int ntags>
1561  : public cond::payloadInspector::PlotImage<PayloadType, nIOVs, ntags> {
1562  public:
1565  Form("SiPixelGainCalibration %s Comparison by Region", TypeName[myType])) {
1566  if constexpr (std::is_same_v<PayloadType, SiPixelGainCalibrationOffline>) {
1567  isForHLT_ = false;
1568  label_ = "SiPixelGainCalibrationOffline_PayloadInspector";
1569  } else {
1570  isForHLT_ = true;
1571  label_ = "SiPixelGainCalibrationForHLT_PayloadInspector";
1572  }
1573  }
1574 
1575  bool fill() override {
1576  gStyle->SetPaintTextFormat(".3f");
1577 
1578  // trick to deal with the multi-ioved tag and two tag case at the same time
1579  auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
1580  auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().name;
1581  std::string l_tagname = "";
1582  auto firstiov = theIOVs.front();
1583  std::tuple<cond::Time_t, cond::Hash> lastiov;
1584 
1585  // we don't support (yet) comparison with more than 2 tags
1586  assert(this->m_plotAnnotations.ntags < 3);
1587 
1588  if (this->m_plotAnnotations.ntags == 2) {
1589  auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
1590  l_tagname = cond::payloadInspector::PlotBase::getTag<1>().name;
1591  lastiov = tag2iovs.front();
1592  } else {
1593  lastiov = theIOVs.back();
1594  }
1595 
1596  std::shared_ptr<PayloadType> last_payload = this->fetchPayload(std::get<1>(lastiov));
1597  std::shared_ptr<PayloadType> first_payload = this->fetchPayload(std::get<1>(firstiov));
1598 
1599  std::map<uint32_t, float> f_GainsMap_;
1600  gainCalibPI::fillThePerModuleMap(first_payload, f_GainsMap_, myType);
1601 
1602  std::map<uint32_t, float> l_GainsMap_;
1603  gainCalibPI::fillThePerModuleMap(last_payload, l_GainsMap_, myType);
1604 
1605  std::string lastIOVsince = std::to_string(std::get<0>(lastiov));
1606  std::string firstIOVsince = std::to_string(std::get<0>(firstiov));
1607 
1608  TCanvas canvas("Comparison", "Comparison", 1600, 800);
1609 
1610  SiPixelPI::PhaseInfo f_phaseInfo(f_GainsMap_.size());
1611  SiPixelPI::PhaseInfo l_phaseInfo(l_GainsMap_.size());
1612 
1613  std::map<SiPixelPI::regions, std::shared_ptr<TH1F>> FirstGains_spectraByRegion;
1614  std::map<SiPixelPI::regions, std::shared_ptr<TH1F>> LastGains_spectraByRegion;
1615  std::shared_ptr<TH1F> summaryFirst;
1616  std::shared_ptr<TH1F> summaryLast;
1617 
1618  float minimum(9999.);
1619  float maximum(-9999.);
1620 
1621  switch (myType) {
1622  case gainCalibPI::t_gain:
1623  maximum = std::max(last_payload->getGainHigh(), first_payload->getGainHigh());
1624  minimum = std::min(last_payload->getGainLow(), first_payload->getGainLow());
1625  break;
1627  maximum = std::max(last_payload->getPedHigh(), first_payload->getPedHigh());
1628  minimum = std::min(last_payload->getPedLow(), first_payload->getPedLow());
1629  break;
1630  default:
1631  edm::LogError(label_) << "Unrecognized type " << myType << std::endl;
1632  break;
1633  }
1634 
1635  // book the intermediate histograms
1636  for (int r = SiPixelPI::BPixL1o; r != SiPixelPI::NUM_OF_REGIONS; r++) {
1637  SiPixelPI::regions part = static_cast<SiPixelPI::regions>(r);
1639 
1640  FirstGains_spectraByRegion[part] =
1641  std::make_shared<TH1F>(Form("hfirstGains_%s", s_part.c_str()),
1642  Form(";%s #LT %s #GT;n. of modules", s_part.c_str(), TypeName[myType]),
1643  200,
1644  minimum,
1645  maximum);
1646 
1647  LastGains_spectraByRegion[part] =
1648  std::make_shared<TH1F>(Form("hlastGains_%s", s_part.c_str()),
1649  Form(";%s #LT %s #GT;n. of modules", s_part.c_str(), TypeName[myType]),
1650  200,
1651  minimum,
1652  maximum);
1653  }
1654 
1655  summaryFirst = std::make_shared<TH1F>("first Summary",
1656  Form("Summary of #LT per %s %s #GT;;average %s",
1657  (isForHLT_ ? "Column" : "Pixel"),
1658  TypeName[myType],
1659  TypeName[myType]),
1660  FirstGains_spectraByRegion.size(),
1661  0,
1662  FirstGains_spectraByRegion.size());
1663 
1664  summaryLast = std::make_shared<TH1F>("last Summary",
1665  Form("Summary of #LT per %s %s #GT;;average %s",
1666  (isForHLT_ ? "Column" : "Pixel"),
1667  TypeName[myType],
1668  TypeName[myType]),
1669  LastGains_spectraByRegion.size(),
1670  0,
1671  LastGains_spectraByRegion.size());
1672 
1673  // deal with first IOV
1674  const char* path_toTopologyXML = f_phaseInfo.pathToTopoXML();
1675 
1676  auto f_tTopo =
1678 
1679  // -------------------------------------------------------------------
1680  // loop on the first Gains Map
1681  // -------------------------------------------------------------------
1682  for (const auto& it : f_GainsMap_) {
1683  if (DetId(it.first).det() != DetId::Tracker) {
1684  edm::LogWarning(label_) << "Encountered invalid Tracker DetId:" << it.first << " - terminating ";
1685  return false;
1686  }
1687 
1688  SiPixelPI::topolInfo t_info_fromXML;
1689  t_info_fromXML.init();
1690  DetId detid(it.first);
1691  t_info_fromXML.fillGeometryInfo(detid, f_tTopo, f_phaseInfo.phase());
1692 
1693  SiPixelPI::regions thePart = t_info_fromXML.filterThePartition();
1694  FirstGains_spectraByRegion[thePart]->Fill(it.second);
1695  } // ends loop on the vector of error transforms
1696 
1697  // deal with last IOV
1698  path_toTopologyXML = l_phaseInfo.pathToTopoXML();
1699 
1700  auto l_tTopo =
1702 
1703  // -------------------------------------------------------------------
1704  // loop on the second Gains Map
1705  // -------------------------------------------------------------------
1706  for (const auto& it : l_GainsMap_) {
1707  if (DetId(it.first).det() != DetId::Tracker) {
1708  edm::LogWarning(label_) << "Encountered invalid Tracker DetId:" << it.first << " - terminating ";
1709  return false;
1710  }
1711 
1712  SiPixelPI::topolInfo t_info_fromXML;
1713  t_info_fromXML.init();
1714  DetId detid(it.first);
1715  t_info_fromXML.fillGeometryInfo(detid, l_tTopo, l_phaseInfo.phase());
1716 
1717  SiPixelPI::regions thePart = t_info_fromXML.filterThePartition();
1718  LastGains_spectraByRegion[thePart]->Fill(it.second);
1719  } // ends loop on the vector of error transforms
1720 
1721  // fill the summary plots
1722  int bin = 1;
1723  for (int r = SiPixelPI::BPixL1o; r != SiPixelPI::NUM_OF_REGIONS; r++) {
1724  SiPixelPI::regions part = static_cast<SiPixelPI::regions>(r);
1725 
1726  summaryFirst->GetXaxis()->SetBinLabel(bin, SiPixelPI::getStringFromRegionEnum(part).c_str());
1727  // avoid filling the histogram with numerical noise
1728  float f_mean =
1729  FirstGains_spectraByRegion[part]->GetMean() > 10.e-6 ? FirstGains_spectraByRegion[part]->GetMean() : 0.;
1730  summaryFirst->SetBinContent(bin, f_mean);
1731  //summaryFirst->SetBinError(bin,Gains_spectraByRegion[hash]->GetRMS());
1732 
1733  summaryLast->GetXaxis()->SetBinLabel(bin, SiPixelPI::getStringFromRegionEnum(part).c_str());
1734  // avoid filling the histogram with numerical noise
1735  float l_mean =
1736  LastGains_spectraByRegion[part]->GetMean() > 10.e-6 ? LastGains_spectraByRegion[part]->GetMean() : 0.;
1737  summaryLast->SetBinContent(bin, l_mean);
1738  //summaryLast->SetBinError(bin,Gains_spectraByRegion[hash]->GetRMS());
1739  bin++;
1740  }
1741 
1742  SiPixelPI::makeNicePlotStyle(summaryFirst.get()); //, kBlue);
1743  summaryFirst->SetMarkerColor(kRed);
1744  summaryFirst->GetXaxis()->LabelsOption("v");
1745  summaryFirst->GetXaxis()->SetLabelSize(0.05);
1746  summaryFirst->GetYaxis()->SetTitleOffset(0.9);
1747 
1748  SiPixelPI::makeNicePlotStyle(summaryLast.get()); //, kRed);
1749  summaryLast->SetMarkerColor(kBlue);
1750  summaryLast->GetYaxis()->SetTitleOffset(0.9);
1751  summaryLast->GetXaxis()->LabelsOption("v");
1752  summaryLast->GetXaxis()->SetLabelSize(0.05);
1753 
1754  canvas.cd()->SetGridy();
1755 
1756  SiPixelPI::adjustCanvasMargins(canvas.cd(), -1, 0.18, 0.11, 0.02);
1757  canvas.Modified();
1758 
1759  summaryFirst->SetFillColor(kRed);
1760  summaryLast->SetFillColor(kBlue);
1761 
1762  summaryFirst->SetBarWidth(0.45);
1763  summaryFirst->SetBarOffset(0.1);
1764 
1765  summaryLast->SetBarWidth(0.4);
1766  summaryLast->SetBarOffset(0.55);
1767 
1768  summaryLast->SetMarkerSize(1.2);
1769  summaryFirst->SetMarkerSize(1.2);
1770 
1771  float max = (summaryFirst->GetMaximum() > summaryLast->GetMaximum()) ? summaryFirst->GetMaximum()
1772  : summaryLast->GetMaximum();
1773 
1774  summaryFirst->GetYaxis()->SetRangeUser(0., std::max(0., max * 1.40));
1775 
1776  summaryFirst->Draw("b text0");
1777  summaryLast->Draw("b text0 same");
1778 
1779  TLegend legend = TLegend(0.52, 0.80, 0.98, 0.9);
1780  legend.SetHeader(Form("#LT %s #GT value comparison", TypeName[myType]),
1781  "C"); // option "C" allows to center the header
1782 
1783  legend.SetHeader("#mu_{H} value comparison", "C"); // option "C" allows to center the header
1784  std::string l_tagOrHash, f_tagOrHash;
1785  if (this->m_plotAnnotations.ntags == 2) {
1786  l_tagOrHash = l_tagname;
1787  f_tagOrHash = f_tagname;
1788  } else {
1789  l_tagOrHash = std::get<1>(lastiov);
1790  f_tagOrHash = std::get<1>(firstiov);
1791  }
1792 
1793  legend.AddEntry(
1794  summaryLast.get(),
1795  ("IOV: #scale[1.2]{" + std::to_string(std::get<0>(lastiov)) + "} | #color[4]{" + l_tagOrHash + "}").c_str(),
1796  "F");
1797  legend.AddEntry(
1798  summaryFirst.get(),
1799  ("IOV: #scale[1.2]{" + std::to_string(std::get<0>(firstiov)) + "} | #color[2]{" + f_tagOrHash + "}").c_str(),
1800  "F");
1801 
1802  legend.SetTextSize(0.025);
1803  legend.Draw("same");
1804 
1806  canvas.SaveAs(fileName.c_str());
1807  return true;
1808  }
1809 
1810  protected:
1811  bool isForHLT_;
1813  };
1814 } // namespace gainCalibHelper
1815 
1816 #endif
gainCalibHelper::gainCalibPI::t_pedestal
Definition: SiPixelGainCalibHelper.h:40
gainCalibHelper::SiPixelGainCalibDiffAndRatioBase::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1339
gainCalibHelper::SiPixelGainCalibrationBPIXMap::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1443
SiPixelPI::unpack
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
Definition: SiPixelPayloadInspectorHelper.h:114
PixelRegionContainers.h
Phase1PixelROCMaps
Definition: Phase1PixelROCMaps.h:80
change_name.diff
diff
Definition: change_name.py:13
PixelRegions::L1
Definition: PixelRegionContainers.h:32
svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
gainCalibHelper::SiPixelGainCalibrationValuesPerRegion::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:535
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase
Definition: SiPixelGainCalibHelper.h:1550
hgcalPlots.ncols
ncols
Definition: hgcalPlots.py:105
gainCalibHelper::SiPixelGainCalibrationValuesByPart::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1007
gainCalibHelper::SiPixelGainCalibrationCorrelations::SiPixelGainCalibrationCorrelations
SiPixelGainCalibrationCorrelations()
Definition: SiPixelGainCalibHelper.h:749
cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::m_imageFileName
std::string m_imageFileName
Definition: PayloadInspector.h:910
SiPixelPI::PhaseInfo::pathToTopoXML
const char * pathToTopoXML()
Definition: SiPixelPayloadInspectorHelper.h:81
mps_fire.i
i
Definition: mps_fire.py:428
cond::payloadInspector::IOVMultiplicity
IOVMultiplicity
Definition: PayloadInspector.h:295
PixelSubdetector.h
gainCalibHelper::SiPixelGainCalibrationFPIXMap::m_trackerTopo
TrackerTopology m_trackerTopo
Definition: SiPixelGainCalibHelper.h:1541
gainCalibHelper::SiPixelGainCalibrationFPIXMap::SiPixelGainCalibrationFPIXMap
SiPixelGainCalibrationFPIXMap()
Definition: SiPixelGainCalibHelper.h:1454
gainCalibHelper::gainCalibPI::t_gain
Definition: SiPixelGainCalibHelper.h:40
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
gainCalibHelper::SiPixelGainCalibrationValueComparisonTwoTags::SiPixelGainCalibrationValueComparisonTwoTags
SiPixelGainCalibrationValueComparisonTwoTags()
Definition: SiPixelGainCalibHelper.h:1172
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
HLT_FULL_cff.Class
Class
Definition: HLT_FULL_cff.py:8427
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
gainCalibHelper::SiPixelGainCalibrationBPIXMap::m_trackerTopo
TrackerTopology m_trackerTopo
Definition: SiPixelGainCalibHelper.h:1440
PixelRegions::PixelIDs
const std::vector< PixelId > PixelIDs
Definition: PixelRegionContainers.h:45
SiPixelPI::ring
int ring(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
Definition: SiPixelPayloadInspectorHelper.h:163
min
T min(T a, T b)
Definition: MathUtil.h:58
cond::payloadInspector::PlotAnnotations::ntags
int ntags
Definition: PayloadInspector.h:56
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::setSingleIov
void setSingleIov(bool flag)
Definition: PayloadInspector.h:425
gainCalibHelper::SiPixelGainCalibrationValueComparisonSingleTag::SiPixelGainCalibrationValueComparisonSingleTag
SiPixelGainCalibrationValueComparisonSingleTag()
Definition: SiPixelGainCalibHelper.h:1162
gainCalibHelper::SiPixelGainCalibrationValuesByPart::SiPixelGainCalibrationValuesByPart
SiPixelGainCalibrationValuesByPart()
Definition: SiPixelGainCalibHelper.h:868
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
TrackerTopology
Definition: TrackerTopology.h:16
PayloadInspector.h
PixelRegions::Rm1l
Definition: PixelRegionContainers.h:34
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
cuy.col
col
Definition: cuy.py:1010
gainCalibHelper::SiPixelGainCalibrationValueComparisonBase::SiPixelGainCalibrationValueComparisonBase
SiPixelGainCalibrationValueComparisonBase()
Definition: SiPixelGainCalibHelper.h:1015
SiPixelPI::getStringFromRegionEnum
std::string getStringFromRegionEnum(SiPixelPI::regions e)
Definition: SiPixelPayloadInspectorHelper.h:595
SiPixelPI::topolInfo::fillGeometryInfo
void fillGeometryInfo(const DetId &detId, const TrackerTopology &tTopo, const SiPixelPI::phase &ph)
Definition: SiPixelPayloadInspectorHelper.h:707
gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion
Definition: SiPixelGainCalibHelper.h:544
gainCalibHelper
Definition: SiPixelGainCalibHelper.h:34
reco::castor::maxDiff
float maxDiff(float one, float two, float three, float four)
Definition: CastorAlgoUtils.cc:19
cms::cuda::assert
assert(be >=bs)
cond::payloadInspector::PlotBase::inputParamValues
const std::map< std::string, std::string > & inputParamValues() const
Definition: PayloadInspector.cc:139
mps_check.array
array
Definition: mps_check.py:216
gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:562
gainCalibHelper::SiPixelGainCalibrationBPIXMap::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:1365
gainCalibHelper::SiPixelGainCalibrationFPIXMap::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1544
cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::PlotImage
PlotImage(const std::string &title)
Definition: PayloadInspector.h:897
gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:1566
SiPixelGainCalibrationForHLT.h
gainCalibHelper::gainCalibPI::fillDiffAndRatio
static std::array< std::shared_ptr< TH1F >, 2 > fillDiffAndRatio(const std::shared_ptr< PayloadType > &payload_A, const std::shared_ptr< PayloadType > &payload_B, const gainCalibPI::type &theType)
Definition: SiPixelGainCalibHelper.h:45
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
SiPixelPI::displayNotSupported
void displayNotSupported(TCanvas &canv, const unsigned int size)
Definition: SiPixelPayloadInspectorHelper.h:781
gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1803
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
gainCalibHelper::SiPixelGainCalibrationFPIXMap
Definition: SiPixelGainCalibHelper.h:1450
PayloadInspectorModule.h
SiPixelPI::checkAnswerOK
bool checkAnswerOK(std::string &answer, bool &result)
Definition: SiPixelPayloadInspectorHelper.h:808
FileInPath.h
gainCalibHelper::SiPixelGainCalibrationValuesPerRegion::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:534
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
gainCalibHelper::gainCalibPI::t_correlation
Definition: SiPixelGainCalibHelper.h:40
gainCalibHelper::SiPixelGainCalibrationCorrelations
Definition: SiPixelGainCalibHelper.h:744
gainCalibHelper::SiPixelGainCalibrationFPIXMap::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:1468
gainCalibHelper::SiPixelGainCalibrationFPIXMap::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1545
gainCalibHelper::SiPixelGainCalibDiffAndRatioBase::SiPixelGainCalibDiffAndRatioBase
SiPixelGainCalibDiffAndRatioBase()
Definition: SiPixelGainCalibHelper.h:1183
DetId
Definition: DetId.h:17
edm::FileInPath
Definition: FileInPath.h:64
gainCalibHelper::SiPixelGainCalibrationValueComparisonSingleTag
Definition: SiPixelGainCalibHelper.h:1159
part
part
Definition: HCALResponse.h:20
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
gainCalibHelper::SiPixelGainCalibDiffAndRatioBase::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1340
gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1802
gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:737
StandaloneTrackerTopology.h
gainCalibHelper::TypeName
constexpr char const * TypeName[2]
Definition: SiPixelGainCalibHelper.h:287
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
gainCalibHelper::SiPixelGainCalibrationValuesPerRegion::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:416
PixelRegions::attachedDets
static const std::vector< uint32_t > attachedDets(const PixelRegions::PixelId theId, const TrackerTopology *trackTopo, const SiPixelPI::phase &ph)
Definition: PixelRegionContainers.h:187
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::setTwoTags
void setTwoTags(bool flag)
Definition: PayloadInspector.h:430
cond::payloadInspector::PlotBase::ntags
unsigned int ntags() const
Definition: PayloadInspector.cc:48
PixelRegions::PixelRegionContainers
Definition: PixelRegionContainers.h:238
mps_fire.end
end
Definition: mps_fire.py:242
SiPixelPI::BPixL1o
Definition: SiPixelPayloadInspectorHelper.h:577
jets_cff.payload
payload
Definition: jets_cff.py:32
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::fill
virtual bool fill()
Definition: PayloadInspector.h:409
gainCalibHelper::SiPixelGainCalibrationCorrelations::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:860
gainCalibHelper::SiPixelGainCalibrationValues::SiPixelGainCalibrationValues
SiPixelGainCalibrationValues()
Definition: SiPixelGainCalibHelper.h:296
gainCalibHelper::SiPixelGainCalibDiffAndRatioBase::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:1193
SiPixelPI::topolInfo::filterThePartition
SiPixelPI::regions filterThePartition()
Definition: SiPixelPayloadInspectorHelper.h:729
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase::SiPixelGainCalibrationByRegionComparisonBase
SiPixelGainCalibrationByRegionComparisonBase()
Definition: SiPixelGainCalibHelper.h:1554
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
submit.answer
answer
Definition: submit.py:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
gainCalibHelper::SiPixelGainCalibrationValueComparisonTwoTags
Definition: SiPixelGainCalibHelper.h:1169
cond
Definition: plugin.cc:23
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
SiPixelGainCalibrationOffline.h
gainCalibHelper::gainCalibPI::fillThePerModuleMap
static void fillThePerModuleMap(const std::shared_ptr< PayloadType > &payload, AvgMap &map, gainCalibPI::type theType)
Definition: SiPixelGainCalibHelper.h:186
gainCalibHelper::SiPixelGainCalibrationValues::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:308
Time.h
DetId::Tracker
Definition: DetId.h:25
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
SiPixelPI::phase1size
static const unsigned int phase1size
Definition: SiPixelPayloadInspectorHelper.h:43
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
gainCalibHelper::SiPixelGainCalibrationCorrelations::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:859
cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:905
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
listHistos.legend
legend
Definition: listHistos.py:41
PixelRegions::IDlabels
const std::vector< std::string > IDlabels
Definition: PixelRegionContainers.h:62
gainCalibHelper::SiPixelGainCalibrationValues
Definition: SiPixelGainCalibHelper.h:292
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
SiPixelPI::PhaseInfo
Definition: SiPixelPayloadInspectorHelper.h:48
SiPixelPI::regions
regions
Definition: SiPixelPayloadInspectorHelper.h:576
gainCalibHelper::SiPixelGainCalibrationCorrelations::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:761
gainCalibHelper::SiPixelGainCalibrationValueComparisonBase::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1155
gainCalibHelper::gainCalibPI::fillTheHisto
static void fillTheHisto(const std::shared_ptr< PayloadType > &payload, std::shared_ptr< TH1F > h1, gainCalibPI::type theType, const std::vector< uint32_t > &wantedIds={})
Definition: SiPixelGainCalibHelper.h:129
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
Phase1PixelROCMaps.h
SiPixelPI::adjustStats
void adjustStats(TPaveStats *stats, float X1, float Y1, float X2, float Y2)
Definition: SiPixelPayloadInspectorHelper.h:522
gainCalibHelper::SiPixelGainCalibrationValuesByPart::fill
bool fill() override
Definition: SiPixelGainCalibHelper.h:880
gainCalibHelper::SiPixelGainCalibrationBPIXMap
Definition: SiPixelGainCalibHelper.h:1347
SiPixelPI::NUM_OF_REGIONS
Definition: SiPixelPayloadInspectorHelper.h:591
alignCSCRings.r
r
Definition: alignCSCRings.py:93
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
gainCalibHelper::SiPixelGainCalibDiffAndRatioBase
Definition: SiPixelGainCalibHelper.h:1180
gainCalibHelper::SiPixelGainCalibrationValues::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:392
COUT
#define COUT
Definition: PVValidationHelpers.h:13
gainCalibHelper::SiPixelGainCalibrationValuesPerRegion
Definition: SiPixelGainCalibHelper.h:398
gainCalibHelper::AvgMap
std::map< uint32_t, float > AvgMap
Definition: SiPixelGainCalibHelper.h:36
gainCalibHelper::SiPixelGainCalibrationValuesPerRegion::SiPixelGainCalibrationValuesPerRegion
SiPixelGainCalibrationValuesPerRegion()
Definition: SiPixelGainCalibHelper.h:402
SiPixelPI::topolInfo
Definition: SiPixelPayloadInspectorHelper.h:657
isFinite.h
gainCalibHelper::SiPixelGainCalibrationValueComparisonBase::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1156
Exception
Definition: hltDiff.cc:245
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
cond::payloadInspector::PlotImage
Definition: PayloadInspector.h:894
SiPixelPI::makeNicePlotStyle
void makeNicePlotStyle(TH1 *hist)
Definition: SiPixelPayloadInspectorHelper.h:548
gainCalibHelper::SiPixelGainCalibrationValues::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:393
SiPixelPI::getExtrema
std::pair< float, float > getExtrema(TH1 *h1, TH1 *h2)
Definition: SiPixelPayloadInspectorHelper.h:532
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
gainCalibHelper::SiPixelGainCalibrationValuesByPart::isForHLT_
bool isForHLT_
Definition: SiPixelGainCalibHelper.h:1006
ztail.d
d
Definition: ztail.py:151
SiPixelPayloadInspectorHelper.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
gainCalibHelper::SiPixelGainCalibrationValueComparisonBase
Definition: SiPixelGainCalibHelper.h:1012
gainCalibHelper::gainCalibPI::fillTheHistos
static void fillTheHistos(const std::shared_ptr< PayloadType > &payload, std::shared_ptr< TH1 > hBPix, std::shared_ptr< TH1 > hFPix, gainCalibPI::type theType)
Definition: SiPixelGainCalibHelper.h:232
cond::payloadInspector::PlotBase::addInputParam
void addInputParam(const std::string &paramName)
Definition: PayloadInspector.cc:35
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
cond::payloadInspector::SINGLE_IOV
Definition: PayloadInspector.h:295
SiPixelPI::topolInfo::init
void init()
Definition: SiPixelPayloadInspectorHelper.h:685
gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:738
gainCalibHelper::SiPixelGainCalibrationValuesByPart
Definition: SiPixelGainCalibHelper.h:864
cond::payloadInspector::PlotBase::m_plotAnnotations
PlotAnnotations m_plotAnnotations
Definition: PayloadInspector.h:282
StandaloneTrackerTopology::fromTrackerParametersXMLFile
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
Definition: StandaloneTrackerTopology.cc:168
gainCalibHelper::SiPixelGainCalibrationBPIXMap::SiPixelGainCalibrationBPIXMap
SiPixelGainCalibrationBPIXMap()
Definition: SiPixelGainCalibHelper.h:1351
PixelRegions::PixelRegionContainers::bookAll
void bookAll(std::string title_label, std::string x_label, std::string y_label, const int nbins, const float xmin, const float xmax)
Definition: PixelRegionContainers.h:263
SiPixelPI::adjustCanvasMargins
void adjustCanvasMargins(TVirtualPad *pad, float top, float bottom, float left, float right)
Definition: SiPixelPayloadInspectorHelper.h:508
gainCalibHelper::SiPixelGainCalibrationBPIXMap::label_
std::string label_
Definition: SiPixelGainCalibHelper.h:1444
gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion::SiPixelGainCalibrationValuesComparisonPerRegion
SiPixelGainCalibrationValuesComparisonPerRegion()
Definition: SiPixelGainCalibHelper.h:548