CMS 3D CMS Logo

MuonGeometrySanityCheck.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: MuonGeometrySanityCheck
4 // Class: MuonGeometrySanityCheck
5 //
13 //
14 // Original Author: Jim Pivarski
15 // Created: Sat Jul 3 13:33:13 CDT 2010
16 // $Id: MuonGeometrySanityCheck.cc,v 1.3 2011/10/12 22:13:00 khotilov Exp $
17 //
18 //
19 
20 // system include files
29 
42 
43 //
44 // class decleration
45 //
46 
48 public:
50 
55 };
56 
58 public:
60  const std::map<std::string, const MuonGeometrySanityCheckCustomFrame *> &frames);
61 
63 
65 
66  std::string detName() const;
67 
68  int type;
70  int frame;
78 
79 private:
80  bool numeric(std::string s);
81  int number(std::string s);
82 };
83 
85 public:
86  explicit MuonGeometrySanityCheck(const edm::ParameterSet &iConfig);
87  ~MuonGeometrySanityCheck() override;
88 
89 private:
90  void analyze(const edm::Event &, const edm::EventSetup &iConfig) override;
91 
93  double tolerance;
95  std::map<std::string, const MuonGeometrySanityCheckCustomFrame *> m_frames;
96  std::vector<MuonGeometrySanityCheckPoint> m_points;
97 };
98 
99 //
100 // constants, enums and typedefs
101 //
102 
103 //
104 // static data member definitions
105 //
106 
107 //
108 // constructors and destructor
109 //
110 
112  printout = iConfig.getParameter<std::string>("printout");
113  if (printout != std::string("all") && printout != std::string("bad")) {
114  throw cms::Exception("BadConfig") << "Printout must be \"all\" or \"bad\"." << std::endl;
115  }
116 
117  tolerance = iConfig.getParameter<double>("tolerance");
118  if (tolerance <= 0) {
119  throw cms::Exception("BadConfig") << "Tolerance must be positive." << std::endl;
120  }
121 
122  prefix = iConfig.getParameter<std::string>("prefix");
123 
124  std::vector<edm::ParameterSet> frames = iConfig.getParameter<std::vector<edm::ParameterSet> >("frames");
125  for (std::vector<edm::ParameterSet>::const_iterator frame = frames.begin(); frame != frames.end(); ++frame) {
126  std::string name = frame->getParameter<std::string>("name");
127  if (m_frames.find(name) != m_frames.end()) {
128  throw cms::Exception("BadConfig") << "Custom frame \"" << name << "\" has been defined twice." << std::endl;
129  }
131  }
132 
133  std::vector<edm::ParameterSet> points = iConfig.getParameter<std::vector<edm::ParameterSet> >("points");
134  for (std::vector<edm::ParameterSet>::const_iterator point = points.begin(); point != points.end(); ++point) {
136  }
137 }
138 
140  for (std::map<std::string, const MuonGeometrySanityCheckCustomFrame *>::iterator iter = m_frames.begin();
141  iter != m_frames.end();
142  ++iter) {
143  delete iter->second;
144  }
145 }
146 
148  std::string name) {
149  std::vector<double> numbers = iConfig.getParameter<std::vector<double> >("matrix");
150  if (numbers.size() != 9) {
151  throw cms::Exception("BadConfig") << "Custom frame \"" << name << "\" has a matrix which is not 3x3." << std::endl;
152  }
153 
154  matrix = AlgebraicMatrix(3, 3);
155  matrix[0][0] = numbers[0];
156  matrix[0][1] = numbers[1];
157  matrix[0][2] = numbers[2];
158  matrix[1][0] = numbers[3];
159  matrix[1][1] = numbers[4];
160  matrix[1][2] = numbers[5];
161  matrix[2][0] = numbers[6];
162  matrix[2][1] = numbers[7];
163  matrix[2][2] = numbers[8];
164 
165  int ierr;
167  matrixInverse.invert(ierr);
168  if (ierr != 0) {
169  throw cms::Exception("BadConfig") << "Could not invert matrix for custom frame \"" << name << "\"." << std::endl;
170  }
171 }
172 
175  input[0] = point.x();
176  input[1] = point.x();
177  input[2] = point.x();
179  return GlobalPoint(output[0], output[1], output[3]);
180 }
181 
184  input[0] = point.x();
185  input[1] = point.x();
186  input[2] = point.x();
188  return GlobalPoint(output[0], output[1], output[3]);
189 }
190 
192  return (s == std::string("0") || s == std::string("1") || s == std::string("2") || s == std::string("3") ||
193  s == std::string("4") || s == std::string("5") || s == std::string("6") || s == std::string("7") ||
194  s == std::string("8") || s == std::string("9"));
195 }
196 
198  if (s == std::string("0"))
199  return 0;
200  else if (s == std::string("1"))
201  return 1;
202  else if (s == std::string("2"))
203  return 2;
204  else if (s == std::string("3"))
205  return 3;
206  else if (s == std::string("4"))
207  return 4;
208  else if (s == std::string("5"))
209  return 5;
210  else if (s == std::string("6"))
211  return 6;
212  else if (s == std::string("7"))
213  return 7;
214  else if (s == std::string("8"))
215  return 8;
216  else if (s == std::string("9"))
217  return 9;
218  else
219  assert(false);
220 }
221 
223  const edm::ParameterSet &iConfig, const std::map<std::string, const MuonGeometrySanityCheckCustomFrame *> &frames) {
224  std::string detName = iConfig.getParameter<std::string>("detector");
225 
226  bool parsing_error = false;
227 
228  bool barrel = (detName.substr(0, 2) == std::string("MB"));
229  bool endcap = (detName.substr(0, 2) == std::string("ME"));
230  if (!barrel && !endcap)
231  parsing_error = true;
232 
233  if (!parsing_error && barrel) {
234  int index = 2;
235 
236  bool plus = true;
237  if (detName.substr(index, 1) == std::string("+")) {
238  plus = true;
239  index++;
240  } else if (detName.substr(index, 1) == std::string("-")) {
241  plus = false;
242  index++;
243  }
244 
245  int wheel = 0;
246  bool wheel_digit = false;
247  while (!parsing_error && numeric(detName.substr(index, 1))) {
248  wheel *= 10;
249  wheel += number(detName.substr(index, 1));
250  wheel_digit = true;
251  index++;
252  }
253  if (!plus)
254  wheel *= -1;
255  if (!wheel_digit)
256  parsing_error = true;
257 
258  if (detName.substr(index, 1) != std::string("/"))
259  parsing_error = true;
260  index++;
261 
262  int station = 0;
263  bool station_digit = false;
264  while (!parsing_error && numeric(detName.substr(index, 1))) {
265  station *= 10;
266  station += number(detName.substr(index, 1));
267  station_digit = true;
268  index++;
269  }
270  if (!station_digit)
271  parsing_error = true;
272 
273  if (detName.substr(index, 1) != std::string("/"))
274  parsing_error = true;
275  index++;
276 
277  int sector = 0;
278  bool sector_digit = false;
279  while (!parsing_error && numeric(detName.substr(index, 1))) {
280  sector *= 10;
281  sector += number(detName.substr(index, 1));
282  sector_digit = true;
283  index++;
284  }
285  if (!sector_digit)
286  parsing_error = true;
287 
288  // these are optional
289  int superlayer = 0;
290  bool superlayer_digit = false;
291  int layer = 0;
292  if (detName.substr(index, 1) == std::string("/")) {
293  index++;
294  while (!parsing_error && numeric(detName.substr(index, 1))) {
295  superlayer *= 10;
296  superlayer += number(detName.substr(index, 1));
297  superlayer_digit = true;
298  index++;
299  }
300  if (!superlayer_digit)
301  parsing_error = true;
302 
303  if (detName.substr(index, 1) == std::string("/")) {
304  index++;
305  while (!parsing_error && numeric(detName.substr(index, 1))) {
306  layer *= 10;
307  layer += number(detName.substr(index, 1));
308  index++;
309  }
310  }
311  }
312 
313  if (!parsing_error) {
314  bool no_such_chamber = false;
315 
316  if (wheel < -2 || wheel > 2)
317  no_such_chamber = true;
318  if (station < 1 || station > 4)
319  no_such_chamber = true;
320  if (station == 4 && (sector < 1 || sector > 14))
321  no_such_chamber = true;
322  if (station < 4 && (sector < 1 || sector > 12))
323  no_such_chamber = true;
324 
325  if (no_such_chamber) {
326  throw cms::Exception("BadConfig") << "Chamber doesn't exist: MB" << (plus ? "+" : "-") << wheel << "/"
327  << station << "/" << sector << std::endl;
328  }
329 
330  if (superlayer == 0) {
331  detector = DTChamberId(wheel, station, sector);
332  type = kDTChamber;
333  } else {
334  bool no_such_superlayer = false;
335  if (superlayer < 1 || superlayer > 3)
336  no_such_superlayer = true;
337  if (station == 4 && superlayer == 2)
338  no_such_superlayer = true;
339 
340  if (no_such_superlayer) {
341  throw cms::Exception("BadConfig") << "Superlayer doesn't exist: MB" << (plus ? "+" : "-") << wheel << "/"
342  << station << "/" << sector << "/" << superlayer << std::endl;
343  }
344 
345  if (layer == 0) {
346  detector = DTSuperLayerId(wheel, station, sector, superlayer);
348  } else {
349  bool no_such_layer = false;
350  if (layer < 1 || layer > 4)
351  no_such_layer = true;
352 
353  if (no_such_layer) {
354  throw cms::Exception("BadConfig")
355  << "Layer doesn't exist: MB" << (plus ? "+" : "-") << wheel << "/" << station << "/" << sector << "/"
356  << superlayer << "/" << layer << std::endl;
357  }
358 
359  detector = DTLayerId(wheel, station, sector, superlayer, layer);
360  type = kDTLayer;
361  }
362  }
363  }
364  } else if (!parsing_error && endcap) {
365  int index = 2;
366 
367  bool plus = true;
368  if (detName.substr(index, 1) == std::string("+")) {
369  plus = true;
370  index++;
371  } else if (detName.substr(index, 1) == std::string("-")) {
372  plus = false;
373  index++;
374  } else
375  parsing_error = true;
376 
377  int station = 0;
378  bool station_digit = false;
379  while (!parsing_error && numeric(detName.substr(index, 1))) {
380  station *= 10;
381  station += number(detName.substr(index, 1));
382  station_digit = true;
383  index++;
384  }
385  if (!plus)
386  station *= -1;
387  if (!station_digit)
388  parsing_error = true;
389 
390  if (detName.substr(index, 1) != std::string("/"))
391  parsing_error = true;
392  index++;
393 
394  int ring = 0;
395  bool ring_digit = false;
396  while (!parsing_error && numeric(detName.substr(index, 1))) {
397  ring *= 10;
398  ring += number(detName.substr(index, 1));
399  ring_digit = true;
400  index++;
401  }
402  if (!ring_digit)
403  parsing_error = true;
404 
405  if (detName.substr(index, 1) != std::string("/"))
406  parsing_error = true;
407  index++;
408 
409  int chamber = 0;
410  bool chamber_digit = false;
411  while (!parsing_error && numeric(detName.substr(index, 1))) {
412  chamber *= 10;
413  chamber += number(detName.substr(index, 1));
414  chamber_digit = true;
415  index++;
416  }
417  if (!chamber_digit)
418  parsing_error = true;
419 
420  // this is optional
421  int layer = 0;
422  bool layer_digit = false;
423  if (detName.substr(index, 1) == std::string("/")) {
424  index++;
425  while (!parsing_error && numeric(detName.substr(index, 1))) {
426  layer *= 10;
427  layer += number(detName.substr(index, 1));
428  layer_digit = true;
429  index++;
430  }
431  if (!layer_digit)
432  parsing_error = true;
433  }
434 
435  if (!parsing_error) {
436  bool no_such_chamber = false;
437 
438  int endcap = (station > 0 ? 1 : 2);
439  station = abs(station);
440  if (station < 1 || station > 4)
441  no_such_chamber = true;
442  if (station == 1 && (ring < 1 || ring > 4))
443  no_such_chamber = true;
444  if (station > 1 && (ring < 1 || ring > 2))
445  no_such_chamber = true;
446  if (station == 1 && (chamber < 1 || chamber > 36))
447  no_such_chamber = true;
448  if (station > 1 && ring == 1 && (chamber < 1 || chamber > 18))
449  no_such_chamber = true;
450  if (station > 1 && ring == 2 && (chamber < 1 || chamber > 36))
451  no_such_chamber = true;
452 
453  if (no_such_chamber) {
454  throw cms::Exception("BadConfig") << "Chamber doesn't exist: ME" << (endcap == 1 ? "+" : "-") << station << "/"
455  << ring << "/" << chamber << std::endl;
456  }
457 
458  if (layer == 0) {
460  type = kCSCChamber;
461  } else {
462  bool no_such_layer = false;
463  if (layer < 1 || layer > 6)
464  no_such_layer = true;
465 
466  if (no_such_layer) {
467  throw cms::Exception("BadConfig") << "Layer doesn't exist: ME" << (endcap == 1 ? "+" : "-") << station << "/"
468  << ring << "/" << chamber << "/" << layer << std::endl;
469  }
470 
472  type = kCSCLayer;
473  }
474  }
475  }
476 
477  if (parsing_error) {
478  throw cms::Exception("BadConfig") << "Detector name is malformed: " << detName << std::endl;
479  }
480 
481  std::string frameName = iConfig.getParameter<std::string>("frame");
482  const std::map<std::string, const MuonGeometrySanityCheckCustomFrame *>::const_iterator frameIter =
483  frames.find(frameName);
484  if (frameName == std::string("global")) {
485  frame = kGlobal;
486  customFrame = nullptr;
487  } else if (frameName == std::string("local")) {
488  frame = kLocal;
489  customFrame = nullptr;
490  } else if (frameName == std::string("chamber")) {
491  frame = kChamber;
492  customFrame = nullptr;
493  } else if (frameIter != frames.end()) {
494  frame = kCustom;
495  customFrame = frameIter->second;
496  } else {
497  throw cms::Exception("BadConfig") << "Frame \"" << frameName << "\" has not been defined." << std::endl;
498  }
499 
500  std::vector<double> point = iConfig.getParameter<std::vector<double> >("displacement");
501  if (point.size() != 3) {
502  throw cms::Exception("BadConfig") << "Displacement relative to detector " << detName
503  << " doesn't have exactly three components." << std::endl;
504  }
505 
506  displacement = GlobalPoint(point[0], point[1], point[2]);
507 
508  const edm::Entry *entry = iConfig.retrieveUnknown("expectation");
509  if (entry != nullptr) {
510  has_expectation = true;
511 
512  point = iConfig.getParameter<std::vector<double> >("expectation");
513  if (point.size() != 3) {
514  throw cms::Exception("BadConfig") << "Expectation for detector " << detName << ", displacement " << displacement
515  << " doesn't have exactly three components." << std::endl;
516  }
517 
518  expectation = GlobalPoint(point[0], point[1], point[2]);
519  } else {
520  has_expectation = false;
521  }
522 
523  entry = iConfig.retrieveUnknown("name");
524  if (entry != nullptr) {
525  name = iConfig.getParameter<std::string>("name");
526  } else {
527  name = std::string("anonymous");
528  }
529 
530  entry = iConfig.retrieveUnknown("outputFrame");
531  if (entry != nullptr) {
532  frameName = iConfig.getParameter<std::string>("outputFrame");
533  const std::map<std::string, const MuonGeometrySanityCheckCustomFrame *>::const_iterator frameIter =
534  frames.find(frameName);
535  if (frameName == std::string("global")) {
537  outputCustomFrame = nullptr;
538  } else if (frameName == std::string("local")) {
540  outputCustomFrame = nullptr;
541  } else if (frameName == std::string("chamber")) {
543  outputCustomFrame = nullptr;
544  } else if (frameIter != frames.end()) {
546  outputCustomFrame = frameIter->second;
547  } else {
548  throw cms::Exception("BadConfig") << "Frame \"" << frameName << "\" has not been defined." << std::endl;
549  }
550  } else {
552  outputCustomFrame = nullptr;
553  }
554 }
555 
557  std::stringstream output;
558  if (type == kDTChamber) {
560  output << "MB" << (id.wheel() > 0 ? "+" : "") << id.wheel() << "/" << id.station() << "/" << id.sector();
561  } else if (type == kDTSuperLayer) {
563  output << "MB" << (id.wheel() > 0 ? "+" : "") << id.wheel() << "/" << id.station() << "/" << id.sector() << "/"
564  << id.superlayer();
565  } else if (type == kDTLayer) {
567  output << "MB" << (id.wheel() > 0 ? "+" : "") << id.wheel() << "/" << id.station() << "/" << id.sector() << "/"
568  << id.superlayer() << "/" << id.layer();
569  } else if (type == kCSCChamber) {
571  output << "ME" << (id.endcap() == 1 ? "+" : "-") << id.station() << "/" << id.ring() << "/" << id.chamber();
572  } else if (type == kCSCLayer) {
574  output << "ME" << (id.endcap() == 1 ? "+" : "-") << id.station() << "/" << id.ring() << "/" << id.chamber() << "/"
575  << id.layer();
576  } else
577  assert(false);
578  return output.str();
579 }
580 
581 // ------------ method called to for each event ------------
583  edm::ESHandle<DTGeometry> dtGeometry;
584  iSetup.get<MuonGeometryRecord>().get(dtGeometry);
585 
586  edm::ESHandle<CSCGeometry> cscGeometry;
587  iSetup.get<MuonGeometryRecord>().get(cscGeometry);
588 
589  int num_transformed = 0;
590  int num_tested = 0;
591  int num_bad = 0;
592  for (std::vector<MuonGeometrySanityCheckPoint>::const_iterator point = m_points.begin(); point != m_points.end();
593  ++point) {
594  num_transformed++;
595 
596  bool dt = (point->detector.subdetId() == MuonSubdetId::DT);
597 
598  // convert the displacement vector into the chosen coordinate system and add it to the chamber's position
599  GlobalPoint chamberPos;
600  if (dt)
601  chamberPos = dtGeometry->idToDet(point->detector)->surface().toGlobal(LocalPoint(0., 0., 0.));
602  else
603  chamberPos = cscGeometry->idToDet(point->detector)->surface().toGlobal(LocalPoint(0., 0., 0.));
604 
607  result = GlobalPoint(chamberPos.x() + point->displacement.x(),
608  chamberPos.y() + point->displacement.y(),
609  chamberPos.z() + point->displacement.z());
610  }
611 
612  else if (point->frame == MuonGeometrySanityCheckPoint::kLocal) {
613  if (dt)
614  result = dtGeometry->idToDet(point->detector)
615  ->surface()
616  .toGlobal(LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
617  else
618  result = cscGeometry->idToDet(point->detector)
619  ->surface()
620  .toGlobal(LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
621  }
622 
623  else if (point->frame == MuonGeometrySanityCheckPoint::kChamber) {
624  if (point->detector.subdetId() == MuonSubdetId::DT) {
625  DTChamberId id(point->detector);
626  if (dt)
627  result = dtGeometry->idToDet(id)->surface().toGlobal(
628  LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
629  else
630  result = cscGeometry->idToDet(id)->surface().toGlobal(
631  LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
632  } else if (point->detector.subdetId() == MuonSubdetId::CSC) {
633  CSCDetId cscid(point->detector);
634  CSCDetId id(cscid.endcap(), cscid.station(), cscid.ring(), cscid.chamber());
635  if (dt)
636  result = dtGeometry->idToDet(id)->surface().toGlobal(
637  LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
638  else
639  result = cscGeometry->idToDet(id)->surface().toGlobal(
640  LocalPoint(point->displacement.x(), point->displacement.y(), point->displacement.z()));
641  } else {
642  assert(false);
643  }
644  }
645 
646  else if (point->frame == MuonGeometrySanityCheckPoint::kCustom) {
647  GlobalPoint transformed = point->customFrame->transform(point->displacement);
649  chamberPos.x() + transformed.x(), chamberPos.y() + transformed.y(), chamberPos.z() + transformed.z());
650  }
651 
652  else {
653  assert(false);
654  }
655 
656  // convert the result into the chosen output coordinate system
657  if (point->outputFrame == MuonGeometrySanityCheckPoint::kGlobal) {
658  }
659 
660  else if (point->outputFrame == MuonGeometrySanityCheckPoint::kLocal) {
661  LocalPoint transformed;
662  if (dt)
663  transformed = dtGeometry->idToDet(point->detector)->surface().toLocal(result);
664  else
665  transformed = cscGeometry->idToDet(point->detector)->surface().toLocal(result);
666  result = GlobalPoint(transformed.x(), transformed.y(), transformed.z());
667  }
668 
669  else if (point->outputFrame == MuonGeometrySanityCheckPoint::kChamber) {
670  if (point->detector.subdetId() == MuonSubdetId::DT) {
671  DTChamberId id(point->detector);
672  LocalPoint transformed;
673  if (dt)
674  transformed = dtGeometry->idToDet(id)->surface().toLocal(result);
675  else
676  transformed = cscGeometry->idToDet(id)->surface().toLocal(result);
677  result = GlobalPoint(transformed.x(), transformed.y(), transformed.z());
678  } else if (point->detector.subdetId() == MuonSubdetId::CSC) {
679  CSCDetId cscid(point->detector);
680  CSCDetId id(cscid.endcap(), cscid.station(), cscid.ring(), cscid.chamber());
681  LocalPoint transformed;
682  if (dt)
683  transformed = dtGeometry->idToDet(id)->surface().toLocal(result);
684  else
685  transformed = cscGeometry->idToDet(id)->surface().toLocal(result);
686  result = GlobalPoint(transformed.x(), transformed.y(), transformed.z());
687  } else {
688  assert(false);
689  }
690  }
691 
692  else if (point->outputFrame == MuonGeometrySanityCheckPoint::kCustom) {
693  result = point->outputCustomFrame->transformInverse(result);
694  }
695 
696  std::stringstream output;
697  output << prefix << " " << point->name << " " << point->detName() << " " << result.x() << " " << result.y() << " "
698  << result.z();
699 
700  bool bad = false;
701  if (point->has_expectation) {
702  num_tested++;
703  double residx = result.x() - point->expectation.x();
704  double residy = result.y() - point->expectation.y();
705  double residz = result.z() - point->expectation.z();
706 
707  if (fabs(residx) > tolerance || fabs(residy) > tolerance || fabs(residz) > tolerance) {
708  num_bad++;
709  bad = true;
710  output << " BAD " << residx << " " << residy << " " << residz << std::endl;
711  } else {
712  output << " GOOD " << residx << " " << residy << " " << residz << std::endl;
713  }
714  } else {
715  output << " UNTESTED 0 0 0" << std::endl;
716  }
717 
718  if (printout == std::string("all") || (printout == std::string("bad") && bad)) {
719  std::cout << output.str();
720  }
721  }
722 
723  std::cout << std::endl
724  << "SUMMARY transformed: " << num_transformed << " tested: " << num_tested << " bad: " << num_bad
725  << " good: " << (num_tested - num_bad) << std::endl;
726 }
727 
728 //define this as a plug-in
MuonGeometrySanityCheckPoint::has_expectation
bool has_expectation
Definition: MuonGeometrySanityCheck.cc:73
DTSuperLayerId
Definition: DTSuperLayerId.h:12
MuonGeometrySanityCheck::printout
std::string printout
Definition: MuonGeometrySanityCheck.cc:92
MuonGeometrySanityCheckPoint
Definition: MuonGeometrySanityCheck.cc:57
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
MuonGeometrySanityCheckPoint::kDTLayer
Definition: MuonGeometrySanityCheck.cc:62
input
static const std::string input
Definition: EdmProvDump.cc:48
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
MessageLogger.h
ESHandle.h
AlgebraicObjects.h
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21518
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
DTLayerId.h
MuonGeometrySanityCheck::m_points
std::vector< MuonGeometrySanityCheckPoint > m_points
Definition: MuonGeometrySanityCheck.cc:96
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
mps_splice.entry
entry
Definition: mps_splice.py:68
CSCGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:91
gather_cfg.cout
cout
Definition: gather_cfg.py:144
cms::cuda::assert
assert(be >=bs)
EDAnalyzer.h
MuonGeometrySanityCheck::~MuonGeometrySanityCheck
~MuonGeometrySanityCheck() override
Definition: MuonGeometrySanityCheck.cc:139
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
MuonGeometrySanityCheckPoint::detector
DetId detector
Definition: MuonGeometrySanityCheck.cc:69
MuonGeometrySanityCheckPoint::kDTChamber
Definition: MuonGeometrySanityCheck.cc:62
CSCDetId.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MuonGeometrySanityCheckPoint::kCSCLayer
Definition: MuonGeometrySanityCheck.cc:62
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
dt
float dt
Definition: AMPTWrapper.h:136
DetId
Definition: DetId.h:17
MuonGeometrySanityCheck::m_frames
std::map< std::string, const MuonGeometrySanityCheckCustomFrame * > m_frames
Definition: MuonGeometrySanityCheck.cc:95
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MuonGeometrySanityCheckCustomFrame::matrix
AlgebraicMatrix matrix
Definition: MuonGeometrySanityCheck.cc:53
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
MuonGeometrySanityCheckCustomFrame
Definition: MuonGeometrySanityCheck.cc:47
reco::HaloData::plus
Definition: HaloData.h:14
MuonGeometrySanityCheck::tolerance
double tolerance
Definition: MuonGeometrySanityCheck.cc:93
MuonGeometrySanityCheckPoint::customFrame
const MuonGeometrySanityCheckCustomFrame * customFrame
Definition: MuonGeometrySanityCheck.cc:71
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ESHandle< DTGeometry >
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
MuonGeometrySanityCheckPoint::outputFrame
int outputFrame
Definition: MuonGeometrySanityCheck.cc:76
Point3DBase< float, GlobalTag >
MuonGeometrySanityCheck::prefix
std::string prefix
Definition: MuonGeometrySanityCheck.cc:94
DTChamberId.h
MuonGeometrySanityCheckPoint::kChamber
Definition: MuonGeometrySanityCheck.cc:64
DTLayerId
Definition: DTLayerId.h:12
MuonGeometrySanityCheckCustomFrame::transform
GlobalPoint transform(GlobalPoint point) const
Definition: MuonGeometrySanityCheck.cc:173
MuonGeometrySanityCheckPoint::kCSCChamber
Definition: MuonGeometrySanityCheck.cc:62
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTGeometry.h
MuonGeometrySanityCheckPoint::kCustom
Definition: MuonGeometrySanityCheck.cc:64
edm::ParameterSet
Definition: ParameterSet.h:47
MuonGeometrySanityCheckPoint::name
std::string name
Definition: MuonGeometrySanityCheck.cc:75
MuonGeometrySanityCheckPoint::numeric
bool numeric(std::string s)
Definition: MuonGeometrySanityCheck.cc:191
Event.h
relativeConstraints.frameName
frameName
Definition: relativeConstraints.py:41
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
CSCDetId
Definition: CSCDetId.h:26
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
iEvent
int iEvent
Definition: GenABIO.cc:224
MuonGeometrySanityCheck
Definition: MuonGeometrySanityCheck.cc:84
edm::ParameterSet::retrieveUnknown
Entry const * retrieveUnknown(char const *) const
Definition: ParameterSet.cc:335
MuonGeometrySanityCheckCustomFrame::MuonGeometrySanityCheckCustomFrame
MuonGeometrySanityCheckCustomFrame(const edm::ParameterSet &iConfig, std::string name)
Definition: MuonGeometrySanityCheck.cc:147
MuonGeometrySanityCheckPoint::displacement
GlobalPoint displacement
Definition: MuonGeometrySanityCheck.cc:72
MuonGeometrySanityCheckPoint::expectation
GlobalPoint expectation
Definition: MuonGeometrySanityCheck.cc:74
MuonGeometrySanityCheckPoint::outputCustomFrame
const MuonGeometrySanityCheckCustomFrame * outputCustomFrame
Definition: MuonGeometrySanityCheck.cc:77
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
MuonGeometrySanityCheckCustomFrame::matrixInverse
AlgebraicMatrix matrixInverse
Definition: MuonGeometrySanityCheck.cc:54
MuonGeometrySanityCheckPoint::number
int number(std::string s)
Definition: MuonGeometrySanityCheck.cc:197
MuonSubdetId.h
MuonGeometrySanityCheckPoint::kDTSuperLayer
Definition: MuonGeometrySanityCheck.cc:62
MuonGeometrySanityCheckPoint::kGlobal
Definition: MuonGeometrySanityCheck.cc:64
MuonGeometrySanityCheckPoint::frame
int frame
Definition: MuonGeometrySanityCheck.cc:70
GeomDet.h
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
MuonGeometrySanityCheckPoint::type
int type
Definition: MuonGeometrySanityCheck.cc:68
DetId.h
Frameworkfwd.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
Exception
Definition: hltDiff.cc:246
MuonGeometrySanityCheckPoint::kLocal
Definition: MuonGeometrySanityCheck.cc:64
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
MuonGeometrySanityCheckPoint::detName
std::string detName() const
Definition: MuonGeometrySanityCheck.cc:556
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MuonGeometrySanityCheckCustomFrame::transformInverse
GlobalPoint transformInverse(GlobalPoint point) const
Definition: MuonGeometrySanityCheck.cc:182
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MuonGeometrySanityCheck::analyze
void analyze(const edm::Event &, const edm::EventSetup &iConfig) override
Definition: MuonGeometrySanityCheck.cc:582
DTChamberId
Definition: DTChamberId.h:14
ParameterSet.h
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
DTSuperLayerId.h
MuonGeometryRecord.h
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::Event
Definition: Event.h:73
DTGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
MuonGeometrySanityCheck::MuonGeometrySanityCheck
MuonGeometrySanityCheck(const edm::ParameterSet &iConfig)
Definition: MuonGeometrySanityCheck.cc:111
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
GlobalPoint.h
edm::Entry
Definition: Entry.h:40
MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint
MuonGeometrySanityCheckPoint(const edm::ParameterSet &iConfig, const std::map< std::string, const MuonGeometrySanityCheckCustomFrame * > &frames)
Definition: MuonGeometrySanityCheck.cc:222
CSCGeometry.h