CMS 3D CMS Logo

MillePedeDQMModule.cc
Go to the documentation of this file.
1 
9 /*** header-file ***/
11 
12 /*** ROOT objects ***/
13 #include "TH1F.h"
14 
15 /*** Core framework functionality ***/
18 
19 /*** Alignment ***/
23 
24 /*** Necessary Framework infrastructure ***/
27 
29  : tTopoToken_(esConsumes<edm::Transition::BeginRun>()),
30  gDetToken_(esConsumes<edm::Transition::BeginRun>()),
31  ptpToken_(esConsumes<edm::Transition::BeginRun>()),
32  ptitpToken_(esConsumes<edm::Transition::BeginRun>()),
33  aliThrToken_(esConsumes<edm::Transition::BeginRun>()),
34  geomToken_(esConsumes<edm::Transition::BeginRun>()),
35  mpReaderConfig_(config.getParameter<edm::ParameterSet>("MillePedeFileReader")),
36  isHG_(mpReaderConfig_.getParameter<bool>("isHG")) {
37  consumes<AlignmentToken, edm::InProcess>(config.getParameter<edm::InputTag>("alignmentTokenSrc"));
38 }
39 
41 
42 //=============================================================================
43 //=== INTERFACE IMPLEMENTATION ===
44 //=============================================================================
45 
47  edm::LogInfo("MillePedeDQMModule") << "Booking histograms";
48 
49  booker.cd();
50  if (!isHG_) {
51  booker.setCurrentFolder("AlCaReco/SiPixelAli/");
52  h_xPos = booker.book1D("Xpos", "Alignment fit #DeltaX;;#mum", 36, 0., 36.);
53  h_xRot = booker.book1D("Xrot", "Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.);
54  h_yPos = booker.book1D("Ypos", "Alignment fit #DeltaY;;#mum", 36, 0., 36.);
55  h_yRot = booker.book1D("Yrot", "Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.);
56  h_zPos = booker.book1D("Zpos", "Alignment fit #DeltaZ;;#mum", 36, 0., 36.);
57  h_zRot = booker.book1D("Zrot", "Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.);
58  statusResults = booker.book2D("statusResults", "Status of SiPixelAli PCL workflow;;", 6, 0., 6., 1, 0., 1.);
59  } else {
60  booker.setCurrentFolder("AlCaReco/SiPixelAliHG/");
61 
62  layerVec = {{"Layer1", pixelTopologyMap_->getPXBLadders(1)},
63  {"Layer2", pixelTopologyMap_->getPXBLadders(2)},
64  {"Layer3", pixelTopologyMap_->getPXBLadders(3)},
65  {"Layer4", pixelTopologyMap_->getPXBLadders(4)},
66  {"Disk-3", pixelTopologyMap_->getPXFBlades(-3) * 2},
67  {"Disk-2", pixelTopologyMap_->getPXFBlades(-2) * 2},
68  {"Disk-1", pixelTopologyMap_->getPXFBlades(-1) * 2},
69  {"Disk1", pixelTopologyMap_->getPXFBlades(1) * 2},
70  {"Disk2", pixelTopologyMap_->getPXFBlades(2) * 2},
71  {"Disk3", pixelTopologyMap_->getPXFBlades(3) * 2}};
72 
73  for (const auto& layer : layerVec) {
74  h_xPos_HG[layer.first] = booker.book1D("Xpos_HG_" + layer.first,
75  "Alignment fit #DeltaX for " + layer.first + ";;#mum",
76  layer.second + 5,
77  0.,
78  layer.second + 5);
79  h_xRot_HG[layer.first] = booker.book1D("Xrot_HG_" + layer.first,
80  "Alignment fit #Delta#theta_{X} for " + layer.first + ";;#murad",
81  layer.second + 5,
82  0.,
83  layer.second + 5);
84  h_yPos_HG[layer.first] = booker.book1D("Ypos_HG_" + layer.first,
85  "Alignment fit #DeltaY for " + layer.first + ";;#mum",
86  layer.second + 5,
87  0.,
88  layer.second + 5);
89  h_yRot_HG[layer.first] = booker.book1D("Yrot_HG_" + layer.first,
90  "Alignment fit #Delta#theta_{Y} for " + layer.first + ";;#murad",
91  layer.second + 5,
92  0.,
93  layer.second + 5);
94  h_zPos_HG[layer.first] = booker.book1D("Zpos_HG_" + layer.first,
95  "Alignment fit #DeltaZ for " + layer.first + ";;#mum",
96  layer.second + 5,
97  0.,
98  layer.second + 5);
99  h_zRot_HG[layer.first] = booker.book1D("Zrot_HG_" + layer.first,
100  "Alignment fit #Delta#theta_{Z} for " + layer.first + ";;#murad",
101  layer.second + 5,
102  0.,
103  layer.second + 5);
104  }
105 
106  statusResults =
107  booker.book2D("statusResults", "Fraction threshold check for SiPixelAliHG PCL;;", 6, 0., 6., 10, 0., 10.);
108  }
109 
110  binariesAvalaible = booker.bookInt("BinariesFound");
111  exitCode = booker.bookString("PedeExitCode", "");
112  isVetoed = booker.bookString("IsVetoed", "");
113 
114  booker.cd();
115 }
116 
118  bookHistograms(booker);
119  if (mpReader_) {
120  mpReader_->read();
121  } else {
122  throw cms::Exception("LogicError") << "@SUB=MillePedeDQMModule::dqmEndJob\n"
123  << "Try to read MillePede results before initializing MillePedeFileReader";
124  }
125  if (!isHG_) {
128  } else {
131  }
132  binariesAvalaible->Fill(mpReader_->binariesAmount());
133  auto theResults = mpReader_->getResults();
134  std::string exitCodeStr = theResults.getExitMessage();
135 
136  std::string vetoStr{};
137  if (mpReader_->storeAlignments()) {
138  vetoStr = "DB Updated!"; /* easy peasy, fait accompli an alignment is there */
139  } else {
140  if (theResults.isHighGranularity()) { /* HG case */
141  if (theResults.getDBVetoed() && theResults.getDBUpdated()) {
142  vetoStr = "DB Update Vetoed"; /* this can happen in the HG PCL case */
143  } else {
144  vetoStr = "N/A";
145  }
146  } else { /* LG case */
147  if (theResults.exceedsCutoffs()) {
148  vetoStr = "DB Update Vetoed"; /* this can happen in the LG PCL case */
149  } else {
150  vetoStr = "N/A";
151  } // if the alignment exceeds the cutoffs
152  } // LG case
153  } // if the alignment was not stored
154 
155  exitCode->Fill(exitCodeStr);
156  isVetoed->Fill(vetoStr);
157 }
158 
159 //=============================================================================
160 //=== PRIVATE METHOD IMPLEMENTATION ===
161 //=============================================================================
162 
164  if (!setupChanged(setup))
165  return;
166 
167  const TrackerTopology* const tTopo = &setup.getData(tTopoToken_);
168  const GeometricDet* geometricDet = &setup.getData(gDetToken_);
169  const PTrackerParameters* ptp = &setup.getData(ptpToken_);
170  const PTrackerAdditionalParametersPerDet* ptitp = &setup.getData(ptitpToken_);
171  const TrackerGeometry* geom = &setup.getData(geomToken_);
172 
173  pixelTopologyMap_ = std::make_shared<PixelTopologyMap>(geom, tTopo);
174 
175  // take the thresholds from DB
176  const auto& thresholds_ = &setup.getData(aliThrToken_);
177 
178  auto myThresholds = std::make_shared<AlignPCLThresholdsHG>();
179  myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map());
180  myThresholds->setFloatMap(thresholds_->getFloatMap());
181 
183 
184  const auto trackerGeometry = builder.build(geometricDet, ptitp, *ptp, tTopo);
185  tracker_ = std::make_unique<AlignableTracker>(trackerGeometry, tTopo);
186 
187  const std::string labelerPlugin{"PedeLabeler"};
188  edm::ParameterSet labelerConfig{};
189  labelerConfig.addUntrackedParameter("plugin", labelerPlugin);
190  labelerConfig.addUntrackedParameter("RunRangeSelection", edm::VParameterSet{});
191 
192  std::shared_ptr<PedeLabelerBase> pedeLabeler{PedeLabelerPluginFactory::get()->create(
193  labelerPlugin, PedeLabelerBase::TopLevelAlignables(tracker_.get(), nullptr, nullptr), labelerConfig)};
194 
195  mpReader_ = std::make_unique<MillePedeFileReader>(
196  mpReaderConfig_, pedeLabeler, std::shared_ptr<const AlignPCLThresholdsHG>(myThresholds), pixelTopologyMap_);
197 }
198 
200  TH2F* histo_status = statusHisto->getTH2F();
201  auto theResults = mpReader_->getResults();
202  theResults.print();
203  histo_status->SetBinContent(1, 1, theResults.getDBUpdated());
204  histo_status->GetXaxis()->SetBinLabel(1, "DB updated");
205  histo_status->SetBinContent(2, 1, theResults.exceedsCutoffs());
206  histo_status->GetXaxis()->SetBinLabel(2, "significant movement");
207  histo_status->SetBinContent(3, 1, theResults.getDBVetoed());
208  histo_status->GetXaxis()->SetBinLabel(3, "DB update vetoed");
209  histo_status->SetBinContent(4, 1, !theResults.exceedsThresholds());
210  histo_status->GetXaxis()->SetBinLabel(4, "within max movement");
211  histo_status->SetBinContent(5, 1, !theResults.exceedsMaxError());
212  histo_status->GetXaxis()->SetBinLabel(5, "within max error");
213  histo_status->SetBinContent(6, 1, !theResults.belowSignificance());
214  histo_status->GetXaxis()->SetBinLabel(6, "above significance");
215 }
216 
218  TH2F* histo_status = statusHisto->getTH2F();
219  auto& theResults = mpReader_->getResultsHG();
220  histo_status->GetXaxis()->SetBinLabel(1, "#DeltaX");
221  histo_status->GetXaxis()->SetBinLabel(2, "#DeltaY");
222  histo_status->GetXaxis()->SetBinLabel(3, "#DeltaZ");
223  histo_status->GetXaxis()->SetBinLabel(4, "#Delta#theta_{X}");
224  histo_status->GetXaxis()->SetBinLabel(5, "#Delta#theta_{Y}");
225  histo_status->GetXaxis()->SetBinLabel(6, "#Delta#theta_{Z}");
226 
227  int i = 0;
228  for (const auto& result : theResults) {
229  histo_status->GetYaxis()->SetBinLabel(i + 1, result.first.data());
230  for (std::size_t j = 0; j < result.second.size(); ++j) {
231  histo_status->SetBinContent(j + 1, i + 1, result.second[j]);
232  }
233  i++;
234  }
235 }
236 
238  std::array<double, SIZE_INDEX> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
239  std::array<double, SIZE_INDEX> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
240 
241  std::array<double, SIZE_INDEX> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
242  std::array<double, SIZE_INDEX> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
243 
244  std::array<double, SIZE_INDEX> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
245  std::array<double, SIZE_INDEX> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
246 
247  auto myMap = mpReader_->getThresholdMap();
248 
249  std::vector<std::string> alignablesList;
250  for (auto it = myMap.begin(); it != myMap.end(); ++it) {
251  alignablesList.push_back(it->first);
252  }
253 
254  for (auto& alignable : alignablesList) {
255  int detIndex = getIndexFromString(alignable);
256 
257  Xcut_[detIndex] = myMap[alignable].getXcut();
258  sigXcut_[detIndex] = myMap[alignable].getSigXcut();
259  maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut();
260  maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut();
261 
262  Ycut_[detIndex] = myMap[alignable].getYcut();
263  sigYcut_[detIndex] = myMap[alignable].getSigYcut();
264  maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut();
265  maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut();
266 
267  Zcut_[detIndex] = myMap[alignable].getZcut();
268  sigZcut_[detIndex] = myMap[alignable].getSigZcut();
269  maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut();
270  maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut();
271 
272  tXcut_[detIndex] = myMap[alignable].getThetaXcut();
273  sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut();
274  maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut();
275  maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut();
276 
277  tYcut_[detIndex] = myMap[alignable].getThetaYcut();
278  sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut();
279  maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut();
280  maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut();
281 
282  tZcut_[detIndex] = myMap[alignable].getThetaZcut();
283  sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut();
284  maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut();
285  maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut();
286  }
287 
288  fillExpertHisto(h_xPos, Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_, mpReader_->getXobs(), mpReader_->getXobsErr());
290  h_xRot, tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_, mpReader_->getTXobs(), mpReader_->getTXobsErr());
291 
292  fillExpertHisto(h_yPos, Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_, mpReader_->getYobs(), mpReader_->getYobsErr());
294  h_yRot, tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_, mpReader_->getTYobs(), mpReader_->getTYobsErr());
295 
296  fillExpertHisto(h_zPos, Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_, mpReader_->getZobs(), mpReader_->getZobsErr());
298  h_zRot, tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_, mpReader_->getTZobs(), mpReader_->getTZobsErr());
299 }
300 
302  const std::array<double, SIZE_INDEX>& cut,
303  const std::array<double, SIZE_INDEX>& sigCut,
304  const std::array<double, SIZE_INDEX>& maxMoveCut,
305  const std::array<double, SIZE_INDEX>& maxErrorCut,
306  const std::array<double, SIZE_LG_STRUCTS>& obs,
307  const std::array<double, SIZE_LG_STRUCTS>& obsErr) {
308  TH1F* histo_0 = histo->getTH1F();
309 
310  double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end());
311 
312  histo_0->SetMinimum(-(max_));
313  histo_0->SetMaximum(max_);
314 
315  // Schematics of the bin contents
316  //
317  // XX XX XX XX XX XX OO OO OO OO II II II II
318  // |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|
319  // | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17| ...
320  //
321  // |-----------------| |-----------| |-----------|
322  // |observed movement| |thresholds1| |thresholds2|
323 
324  for (size_t i = 0; i < obs.size(); ++i) {
325  // fist obs.size() bins for observed movements
326  histo_0->SetBinContent(i + 1, obs[i]);
327  histo_0->SetBinError(i + 1, obsErr[i]);
328 
329  // then at bin 8,8+5,8+10,... for cutoffs
330  // 5 bins is the space allocated for the 4 other thresholds + 1 empty separation bin
331  histo_0->SetBinContent(8 + i * 5, cut[i]);
332 
333  // then at bin 9,9+5,9+10,... for significances
334  histo_0->SetBinContent(9 + i * 5, sigCut[i]);
335 
336  // then at bin 10,10+5,10+10,... for maximum movements
337  histo_0->SetBinContent(10 + i * 5, maxMoveCut[i]);
338 
339  // then at bin 11,11+5,11+10,... for maximum errors
340  histo_0->SetBinContent(11 + i * 5, maxErrorCut[i]);
341  }
342 }
343 
345  std::array<double, SIZE_INDEX> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
346  std::array<double, SIZE_INDEX> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
347 
348  std::array<double, SIZE_INDEX> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
349  std::array<double, SIZE_INDEX> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
350 
351  std::array<double, SIZE_INDEX> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
352  std::array<double, SIZE_INDEX> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
353 
354  auto myMap = mpReader_->getThresholdMap();
355 
356  std::vector<std::string> alignablesList;
357  for (auto it = myMap.begin(); it != myMap.end(); ++it) {
358  alignablesList.push_back(it->first);
359  }
360 
361  for (auto& alignable : alignablesList) {
362  int detIndex = getIndexFromString(alignable);
363 
364  Xcut_[detIndex] = myMap[alignable].getXcut();
365  sigXcut_[detIndex] = myMap[alignable].getSigXcut();
366  maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut();
367  maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut();
368 
369  Ycut_[detIndex] = myMap[alignable].getYcut();
370  sigYcut_[detIndex] = myMap[alignable].getSigYcut();
371  maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut();
372  maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut();
373 
374  Zcut_[detIndex] = myMap[alignable].getZcut();
375  sigZcut_[detIndex] = myMap[alignable].getSigZcut();
376  maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut();
377  maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut();
378 
379  tXcut_[detIndex] = myMap[alignable].getThetaXcut();
380  sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut();
381  maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut();
382  maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut();
383 
384  tYcut_[detIndex] = myMap[alignable].getThetaYcut();
385  sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut();
386  maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut();
387  maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut();
388 
389  tZcut_[detIndex] = myMap[alignable].getThetaZcut();
390  sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut();
391  maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut();
392  maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut();
393  }
394 
396  h_xPos_HG, Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_, mpReader_->getXobs_HG(), mpReader_->getXobsErr_HG());
398  tXcut_,
399  sigtXcut_,
400  maxMovetXcut_,
401  maxErrortXcut_,
402  mpReader_->getTXobs_HG(),
403  mpReader_->getTXobsErr_HG());
404 
406  h_yPos_HG, Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_, mpReader_->getYobs_HG(), mpReader_->getYobsErr_HG());
408  tYcut_,
409  sigtYcut_,
410  maxMovetYcut_,
411  maxErrortYcut_,
412  mpReader_->getTYobs_HG(),
413  mpReader_->getTYobsErr_HG());
414 
416  h_zPos_HG, Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_, mpReader_->getZobs_HG(), mpReader_->getZobsErr_HG());
418  tZcut_,
419  sigtZcut_,
420  maxMovetZcut_,
421  maxErrortZcut_,
422  mpReader_->getTZobs_HG(),
423  mpReader_->getTZobsErr_HG());
424 }
425 
426 void MillePedeDQMModule ::fillExpertHisto_HG(std::map<std::string, MonitorElement*>& histo_map,
427  const std::array<double, SIZE_INDEX>& cut,
428  const std::array<double, SIZE_INDEX>& sigCut,
429  const std::array<double, SIZE_INDEX>& maxMoveCut,
430  const std::array<double, SIZE_INDEX>& maxErrorCut,
431  const std::array<double, SIZE_HG_STRUCTS>& obs,
432  const std::array<double, SIZE_HG_STRUCTS>& obsErr) {
433  int currentStart = 0;
434  int bin = 0;
435  double max_ = 0;
436 
437  for (const auto& layer : layerVec) {
438  TH1F* histo_0 = histo_map[layer.first]->getTH1F();
439 
440  max_ = -1;
441  for (int i = currentStart; i < (currentStart + layer.second); ++i) {
442  // first obs.size() bins for observed movements
443  bin = i - currentStart + 1;
444 
445  // fill observed values
446  histo_0->SetBinContent(bin, obs[i]);
447  histo_0->SetBinError(bin, obsErr[i]);
448 
449  if (std::abs(obs[i]) > max_) {
450  max_ = std::abs(obs[i]);
451  }
452  }
453 
454  // five extra bins at the end, one empty, one with threshold, one with sigCut, one with maxMoveCut, one with MaxErrorCut
455  histo_0->SetBinContent(bin + 1, 0);
456  histo_0->SetBinError(bin + 1, 0);
457 
458  int detIndex;
459  if (layer.first.find("Disk") != std::string::npos) {
460  // 7 is the detId for panels, see getIndexFromString
461  detIndex = 7;
462  histo_0->GetXaxis()->SetTitle("Panel");
463  } else {
464  // 6 is the detId for ladders, see getIndexFromString
465  detIndex = 6;
466  histo_0->GetXaxis()->SetTitle("Ladder");
467  }
468 
469  histo_0->SetBinContent(bin + 2, cut[detIndex]);
470  histo_0->SetBinError(bin + 2, 0);
471  histo_0->SetBinContent(bin + 3, sigCut[detIndex]);
472  histo_0->SetBinError(bin + 3, 0);
473  histo_0->SetBinContent(bin + 4, maxMoveCut[detIndex]);
474  histo_0->SetBinError(bin + 4, 0);
475  histo_0->SetBinContent(bin + 5, maxErrorCut[detIndex]);
476  histo_0->SetBinError(bin + 5, 0);
477 
478  // always scale so the cutoff is visible
479  max_ = std::max(cut[detIndex] * 1.2, max_);
480 
481  histo_0->SetMinimum(-(max_)*1.2);
482  histo_0->SetMaximum(max_ * 1.2);
483 
484  currentStart += layer.second;
485  }
486 }
487 
489  bool changed{false};
490 
492  changed = true;
494  changed = true;
496  changed = true;
497 
498  return changed;
499 }
500 
502  if (alignableId == "TPBHalfBarrelXminus") {
503  return 3;
504  } else if (alignableId == "TPBHalfBarrelXplus") {
505  return 2;
506  } else if (alignableId == "TPEHalfCylinderXminusZminus") {
507  return 1;
508  } else if (alignableId == "TPEHalfCylinderXplusZminus") {
509  return 0;
510  } else if (alignableId == "TPEHalfCylinderXminusZplus") {
511  return 5;
512  } else if (alignableId == "TPEHalfCylinderXplusZplus") {
513  return 4;
514  } else if (alignableId.rfind("TPBLadder", 0) == 0) {
515  return 6;
516  } else if (alignableId.rfind("TPEPanel", 0) == 0) {
517  return 7;
518  } else {
519  throw cms::Exception("LogicError") << "@SUB=MillePedeDQMModule::getIndexFromString\n"
520  << "Retrieving conversion for not supported Alignable partition" << alignableId;
521  }
522 }
void fillExpertHisto(MonitorElement *histo, const std::array< double, SIZE_INDEX > &cut, const std::array< double, SIZE_INDEX > &sigCut, const std::array< double, SIZE_INDEX > &maxMoveCut, const std::array< double, SIZE_INDEX > &maxErrorCut, const std::array< double, SIZE_LG_STRUCTS > &obs, const std::array< double, SIZE_LG_STRUCTS > &obsErr)
const edm::ParameterSet mpReaderConfig_
void fillStatusHisto(MonitorElement *statusHisto)
std::map< std::string, MonitorElement * > h_xRot_HG
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
std::vector< std::pair< std::string, int > > layerVec
std::map< std::string, MonitorElement * > h_yPos_HG
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
bool setupChanged(const edm::EventSetup &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * h_zPos
DQM Plotter for PCL-Alignment.
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > gDetToken_
Definition: config.py:1
std::map< std::string, MonitorElement * > h_zRot_HG
MonitorElement * binariesAvalaible
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
constexpr std::array< uint8_t, layerIndexSize > layer
void Fill(long long x)
virtual TH2F * getTH2F() const
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
MonitorElement * isVetoed
MillePedeDQMModule(const edm::ParameterSet &)
std::map< std::string, MonitorElement * > h_yRot_HG
void bookHistograms(DQMStore::IBooker &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Transition
Definition: Transition.h:12
std::map< std::string, MonitorElement * > h_xPos_HG
MonitorElement * h_xPos
void beginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * h_yPos
Log< level::Info, false > LogInfo
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::shared_ptr< PixelTopologyMap > pixelTopologyMap_
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:192
const edm::ESGetToken< AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd > aliThrToken_
MonitorElement * statusResults
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
edm::ESWatcher< TrackerTopologyRcd > watchTrackerTopologyRcd_
int currentStart
Definition: mps_splice.py:66
edm::ESWatcher< PTrackerParametersRcd > watchPTrackerParametersRcd_
MonitorElement * h_xRot
HLT enums.
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
std::unique_ptr< AlignableTracker > tracker_
std::unique_ptr< MillePedeFileReader > mpReader_
int getIndexFromString(const std::string &alignableId)
#define get
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * h_zRot
MonitorElement * exitCode
std::map< std::string, MonitorElement * > h_zPos_HG
~MillePedeDQMModule() override
void fillStatusHistoHG(MonitorElement *statusHisto)
MonitorElement * h_yRot
Definition: Run.h:45
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void fillExpertHisto_HG(std::map< std::string, MonitorElement *> &histo_map, const std::array< double, SIZE_INDEX > &cut, const std::array< double, SIZE_INDEX > &sigCut, const std::array< double, SIZE_INDEX > &maxMoveCut, const std::array< double, SIZE_INDEX > &maxErrorCut, const std::array< double, SIZE_HG_STRUCTS > &obs, const std::array< double, SIZE_HG_STRUCTS > &obsErr)