CMS 3D CMS Logo

AlignmentProducerBase.cc
Go to the documentation of this file.
2 
14 
16 
20 
24 
26 
27 //------------------------------------------------------------------------------
29  : doTracker_{config.getUntrackedParameter<bool>("doTracker")},
30  doMuon_{config.getUntrackedParameter<bool>("doMuon")},
31  useExtras_{config.getUntrackedParameter<bool>("useExtras")},
32  tjTkAssociationMapTag_{config.getParameter<edm::InputTag>("tjTkAssociationMapTag")},
33  beamSpotTag_{config.getParameter<edm::InputTag>("beamSpotTag")},
34  tkLasBeamTag_{config.getParameter<edm::InputTag>("tkLasBeamTag")},
35  clusterValueMapTag_{config.getParameter<edm::InputTag>("hitPrescaleMapTag")},
36  uniqueRunRanges_{align::makeUniqueRunRanges(config.getParameter<edm::VParameterSet>("RunRangeSelection"),
38  config_{config},
39  stNFixAlignables_{config.getParameter<int>("nFixAlignables")},
40  stRandomShift_{config.getParameter<double>("randomShift")},
41  stRandomRotation_{config.getParameter<double>("randomRotation")},
42  applyDbAlignment_{config.getUntrackedParameter<bool>("applyDbAlignment")},
43  checkDbAlignmentValidity_{config.getUntrackedParameter<bool>("checkDbAlignmentValidity")},
44  doMisalignmentScenario_{config.getParameter<bool>("doMisalignmentScenario")},
45  saveToDB_{config.getParameter<bool>("saveToDB")},
46  saveApeToDB_{config.getParameter<bool>("saveApeToDB")},
47  saveDeformationsToDB_{config.getParameter<bool>("saveDeformationsToDB")},
48  useSurvey_{config.getParameter<bool>("useSurvey")},
49  enableAlignableUpdates_{config.getParameter<bool>("enableAlignableUpdates")},
50  tkAliRcdName_{config.getParameter<std::string>("trackerAlignmentRcdName")},
51  ttopoToken_(iC.esConsumes<edm::Transition::BeginRun>()),
52  geomDetToken_(iC.esConsumes<edm::Transition::BeginRun>()),
53  ptpToken_(iC.esConsumes<edm::Transition::BeginRun>()),
54  dtGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
55  cscGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
56  gemGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
57  tkAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
58  dtAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
59  cscAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
60  gemAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
61  tkAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
62  dtAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
63  cscAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
64  gemAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
65  tkSurfDefToken_(iC.esConsumes<edm::Transition::BeginRun>()),
66  gprToken_(iC.esConsumes<edm::Transition::BeginRun>()),
67  tkSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
68  tkSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()),
69  dtSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
70  dtSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()),
71  cscSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
72  cscSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()) {
73  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::AlignmentProducerBase";
74 
75  const auto& algoConfig = config_.getParameterSet("algoConfig");
76  if (config_.existsAs<bool>("runAtPCL")) {
77  // configured in main config?
78  runAtPCL_ = config_.getParameter<bool>("runAtPCL");
79 
80  if (algoConfig.existsAs<bool>("runAtPCL") && (runAtPCL_ != algoConfig.getParameter<bool>("runAtPCL"))) {
81  throw cms::Exception("BadConfig") << "Inconsistent settings for 'runAtPCL' in configuration of the "
82  << "alignment producer and the alignment algorithm.";
83  }
84 
85  } else if (algoConfig.existsAs<bool>("runAtPCL")) {
86  // configured in algo config?
87  runAtPCL_ = algoConfig.getParameter<bool>("runAtPCL");
88 
89  } else {
90  // assume 'false' if it was not configured
91  runAtPCL_ = false;
92  }
93 
94  createAlignmentAlgorithm(iC);
95  createMonitors(iC);
96  createCalibrations(iC);
97 }
98 
99 //------------------------------------------------------------------------------
101 
102 //------------------------------------------------------------------------------
104  if (isDuringLoop_)
105  return;
106 
107  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::startProcessing"
108  << "Begin";
109 
110  if (!isAlgoInitialized_) {
111  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::startProcessing\n"
112  << "Trying to start event processing before initializing the alignment "
113  << "algorithm.";
114  }
115 
116  nevent_ = 0;
117 
118  alignmentAlgo_->startNewLoop();
119 
120  // FIXME: Should this be done in algorithm::startNewLoop()??
121  for (const auto& iCal : calibrations_)
122  iCal->startNewLoop();
123  for (const auto& monitor : monitors_)
124  monitor->startingNewLoop();
125 
127  isDuringLoop_ = true;
128 }
129 
130 //------------------------------------------------------------------------------
132  if (!isDuringLoop_)
133  return;
134 
135  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::terminateProcessing"
136  << "Terminating algorithm.";
137  if (setup) {
138  alignmentAlgo_->terminate(*setup);
139  } else {
140  alignmentAlgo_->terminate();
141  }
142 
143  // FIXME: Should this be done in algorithm::terminate()??
144  for (const auto& iCal : calibrations_)
145  iCal->endOfLoop();
146  for (const auto& monitor : monitors_)
147  monitor->endOfLoop();
148 
149  isDuringLoop_ = false;
150 }
151 
152 //------------------------------------------------------------------------------
154  if (setupChanged(setup)) {
155  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
156  << "EventSetup-Record changed.";
157 
158  // updatable alignables are currently not used at PCL, but event setup
159  // changes require a complete re-initialization
160  if (runAtPCL_) {
161  initAlignmentAlgorithm(setup, /* update = */ false);
162  } else if (enableAlignableUpdates_) {
163  initAlignmentAlgorithm(setup, /* update = */ true);
164  }
165  }
166 
167  initBeamSpot(event); // must happen every event and before incrementing 'nevent_'
168 
169  ++nevent_; // must happen before the check below;
170  // otherwise subsequent checks fail for "EmptySource"
171 
172  if (!alignmentAlgo_->processesEvents()) {
173  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
174  << "Skipping event. The current configuration of the alignment algorithm "
175  << "does not need to process any events.";
176  return false;
177  }
178 
179  // reading in survey records
181 
182  // Printout event number
183  for (int i = 10; i < 10000000; i *= 10) {
184  if (nevent_ < 10 * i && (nevent_ % i) == 0) {
185  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
186  << "Events processed: " << nevent_;
187  }
188  }
189 
190  // Retrieve trajectories and tracks from the event
191  // -> merely skip if collection is empty
192  edm::Handle<TrajTrackAssociationCollection> handleTrajTracksCollection;
193 
194  if (getTrajTrackAssociationCollection(event, handleTrajTracksCollection)) {
195  // Form pairs of trajectories and tracks
196  ConstTrajTrackPairs trajTracks;
197  for (auto iter = handleTrajTracksCollection->begin(); iter != handleTrajTracksCollection->end(); ++iter) {
198  trajTracks.push_back(ConstTrajTrackPair(&(*(*iter).key), &(*(*iter).val)));
199  }
200 
201  // Run the alignment algorithm with its input
202  const AliClusterValueMap* clusterValueMapPtr{nullptr};
203  if (!clusterValueMapTag_.encode().empty()) {
204  edm::Handle<AliClusterValueMap> clusterValueMap;
205  getAliClusterValueMap(event, clusterValueMap);
206  clusterValueMapPtr = &(*clusterValueMap);
207  }
208 
209  const AlignmentAlgorithmBase::EventInfo eventInfo{event.id(), trajTracks, *beamSpot_, clusterValueMapPtr};
211 
212  for (const auto& monitor : monitors_) {
213  monitor->duringLoop(event, setup, trajTracks); // forward eventInfo?
214  }
215  } else {
216  edm::LogError("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
217  << "No track collection found: skipping event";
218  }
219 
220  return true;
221 }
222 
223 //------------------------------------------------------------------------------
225  const bool changed{setupChanged(setup)};
226  if (changed) {
227  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::beginRunImpl"
228  << "EventSetup-Record changed.";
229 
230  // updatable alignables are currently not used at PCL, but event setup
231  // changes require a complete re-initialization
232  if (runAtPCL_) {
233  initAlignmentAlgorithm(setup, /* update = */ false);
234  } else if (enableAlignableUpdates_) {
235  initAlignmentAlgorithm(setup, /* update = */ true);
236  }
237  }
238 
239  alignmentAlgo_->beginRun(run, setup, changed && (runAtPCL_ || enableAlignableUpdates_));
240 
241  for (const auto& iCal : calibrations_)
242  iCal->beginRun(run, setup);
243 
244  //store the first run analyzed to be used for setting the IOV (for PCL)
245  if (firstRun_ > static_cast<cond::Time_t>(run.id().run())) {
246  firstRun_ = static_cast<cond::Time_t>(run.id().run());
247  }
248 }
249 
250 //------------------------------------------------------------------------------
252  if (!tkLasBeamTag_.encode().empty()) {
256  getTsosVectorCollection(run, tsoses);
257 
258  alignmentAlgo_->endRun(EndRunInfo(run.id(), &(*lasBeams), &(*tsoses)), setup);
259  } else {
260  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::endRunImpl"
261  << "No Tk LAS beams to forward to algorithm.";
262  alignmentAlgo_->endRun(EndRunInfo(run.id(), nullptr, nullptr), setup);
263  }
264 }
265 
266 //------------------------------------------------------------------------------
268  // Do not forward edm::LuminosityBlock
269  alignmentAlgo_->beginLuminosityBlock(setup);
270 }
271 
272 //------------------------------------------------------------------------------
274  // Do not forward edm::LuminosityBlock
275  alignmentAlgo_->endLuminosityBlock(setup);
276 }
277 
278 //------------------------------------------------------------------------------
280  auto algoConfig = config_.getParameter<edm::ParameterSet>("algoConfig");
281  algoConfig.addUntrackedParameter("RunRangeSelection", config_.getParameter<edm::VParameterSet>("RunRangeSelection"));
282  algoConfig.addUntrackedParameter<align::RunNumber>("firstIOV", runAtPCL_ ? 1 : uniqueRunRanges_.front().first);
283  algoConfig.addUntrackedParameter("enableAlignableUpdates", enableAlignableUpdates_);
284 
285  const auto& algoName = algoConfig.getParameter<std::string>("algoName");
287 }
288 
289 //------------------------------------------------------------------------------
291  const auto& monitorConfig = config_.getParameter<edm::ParameterSet>("monitorConfig");
292  auto monitors = monitorConfig.getUntrackedParameter<std::vector<std::string> >("monitors");
293  for (const auto& miter : monitors) {
294  monitors_.emplace_back(
295  AlignmentMonitorPluginFactory::get()->create(miter, monitorConfig.getUntrackedParameterSet(miter), iC));
296  }
297 }
298 
299 //------------------------------------------------------------------------------
301  const auto& calibrations = config_.getParameter<edm::VParameterSet>("calibrations");
302  for (const auto& iCalib : calibrations) {
304  iCalib.getParameter<std::string>("calibrationName"), iCalib, iC));
305  }
306 }
307 
308 //------------------------------------------------------------------------------
310  bool changed{false};
311 
313  changed = true;
314  }
315 
317  changed = true;
318  }
319 
320  if (doTracker_) {
322  changed = true;
323  }
324 
326  changed = true;
327  }
328 
330  changed = true;
331  }
332  }
333 
334  if (doMuon_) {
335  if (watchDTAlRcd_.check(setup)) {
336  changed = true;
337  }
338 
340  changed = true;
341  }
342 
343  if (watchCSCAlRcd_.check(setup)) {
344  changed = true;
345  }
346 
348  changed = true;
349  }
350  }
351 
352  /* TODO: ExtraAlignables: Which record(s) to check?
353  *
354  if (useExtras_) {}
355  */
356 
357  return changed;
358 }
359 
360 //------------------------------------------------------------------------------
362  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
363  << "Begin";
364 
365  auto isTrueUpdate = update && isAlgoInitialized_;
366 
367  // Retrieve tracker topology from geometry
368  const TrackerTopology* const tTopo = &setup.getData(ttopoToken_);
369 
370  // Create the geometries from the ideal geometries
371  createGeometries(setup, tTopo);
372 
374  createAlignables(tTopo, isTrueUpdate);
377 
378  // Initialize alignment algorithm and integrated calibration and pass the
379  // latter to algorithm
380  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
381  << "Initializing alignment algorithm.";
382  alignmentAlgo_->initialize(
384 
385  // Not all algorithms support calibrations - so do not pass empty vector
386  // and throw if non-empty and not supported:
387  if (!calibrations_.empty()) {
388  if (alignmentAlgo_->supportsCalibrations()) {
389  alignmentAlgo_->addCalibrations(calibrations_);
390  } else {
391  throw cms::Exception("BadConfig") << "@SUB=AlignmentProducerBase::createCalibrations\n"
392  << "Configured " << calibrations_.size() << " calibration(s) "
393  << "for algorithm not supporting it.";
394  }
395  }
396 
397  isAlgoInitialized_ = true;
398 
400 
401  if (!isTrueUpdate) { // only needed the first time
402  for (const auto& iCal : calibrations_) {
403  iCal->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get());
404  }
405  for (const auto& monitor : monitors_) {
406  monitor->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignmentParameterStore_.get());
407  }
408  }
409  startProcessing(); // needed if derived class is non-EDLooper-based
410  // has no effect, if called during loop
411 
412  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
413  << "End";
414 }
415 
416 //------------------------------------------------------------------------------
419 
420  if (nevent_ == 0 && alignableExtras_) {
421  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initBeamSpot"
422  << "Initializing AlignableBeamSpot";
423 
424  alignableExtras_->initializeBeamSpot(
426  }
427 }
428 
429 //------------------------------------------------------------------------------
431  if (doTracker_) {
432  const GeometricDet* geometricDet = &iSetup.getData(geomDetToken_);
433  const PTrackerParameters* ptp = &iSetup.getData(ptpToken_);
434  TrackerGeomBuilderFromGeometricDet trackerBuilder;
435  trackerGeometry_ = std::shared_ptr<TrackerGeometry>(trackerBuilder.build(geometricDet, *ptp, tTopo));
436  }
437 
438  if (doMuon_) {
442  }
443 }
444 
445 //------------------------------------------------------------------------------
447  // Retrieve and apply alignments, if requested (requires z setup)
448  if (applyDbAlignment_) {
449  // we need GlobalPositionRcd - and have to keep track for later removal
450  // before writing again to DB...
451 
452  const Alignments* globalAlignments = &setup.getData(gprToken_);
453  globalPositions_ = std::make_unique<Alignments>(*globalAlignments);
454 
455  if (doTracker_) {
456  applyDB<TrackerGeometry, TrackerAlignmentRcd, TrackerAlignmentErrorExtendedRcd>(
457  trackerGeometry_.get(),
458  setup,
459  tkAliToken_,
462 
463  applyDB<TrackerGeometry, TrackerSurfaceDeformationRcd>(trackerGeometry_.get(), setup, tkSurfDefToken_);
464  }
465 
466  if (doMuon_) {
467  applyDB<DTGeometry, DTAlignmentRcd, DTAlignmentErrorExtendedRcd>(
468  &*muonDTGeometry_,
469  setup,
470  dtAliToken_,
473 
474  applyDB<CSCGeometry, CSCAlignmentRcd, CSCAlignmentErrorExtendedRcd>(
476  setup,
477  cscAliToken_,
480 
481  applyDB<GEMGeometry, GEMAlignmentRcd, GEMAlignmentErrorExtendedRcd>(
483  setup,
484  gemAliToken_,
487  }
488  }
489 }
490 
491 //------------------------------------------------------------------------------
493  if (doTracker_) {
494  if (update) {
495  alignableTracker_->update(trackerGeometry_.get(), tTopo);
496  } else {
497  alignableTracker_ = std::make_unique<AlignableTracker>(trackerGeometry_.get(), tTopo);
498  }
499  }
500 
501  if (doMuon_) {
502  if (update) {
504  } else {
505  alignableMuon_ = std::make_unique<AlignableMuon>(&*muonDTGeometry_, &*muonCSCGeometry_, &*muonGEMGeometry_);
506  }
507  }
508 
509  if (useExtras_) {
510  if (update) {
511  // FIXME: Requires further code changes to track beam spot condition changes
512  } else {
513  alignableExtras_ = std::make_unique<AlignableExtras>();
514  }
515  }
516 }
517 
518 //------------------------------------------------------------------------------
520  // Create alignment parameter builder
521  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
522  << "Creating AlignmentParameterBuilder";
523 
524  const auto& alParamBuildCfg = config_.getParameter<edm::ParameterSet>("ParameterBuilder");
525  const auto& alParamStoreCfg = config_.getParameter<edm::ParameterSet>("ParameterStore");
526 
527  AlignmentParameterBuilder alignmentParameterBuilder{
528  alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get(), alParamBuildCfg};
529 
530  // Fix alignables if requested
531  if (stNFixAlignables_ > 0) {
532  alignmentParameterBuilder.fixAlignables(stNFixAlignables_);
533  }
534 
535  // Get list of alignables
536  const auto& alignables = alignmentParameterBuilder.alignables();
537  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
538  << "got " << alignables.size() << " alignables";
539 
540  // Create AlignmentParameterStore
541  alignmentParameterStore_ = std::make_unique<AlignmentParameterStore>(alignables, alParamStoreCfg);
542  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
543  << "AlignmentParameterStore created!";
544 }
545 
546 //------------------------------------------------------------------------------
548  // Apply misalignment scenario to alignable tracker and muon if requested
549  // WARNING: this assumes scenarioConfig can be passed to both muon and tracker
550 
552  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
553  << "Applying misalignment scenario to " << (doTracker_ ? "tracker" : "")
554  << (doMuon_ ? (doTracker_ ? " and muon" : "muon") : ".");
555 
556  const auto& scenarioConfig = config_.getParameterSet("MisalignmentScenario");
557 
558  if (doTracker_) {
559  TrackerScenarioBuilder scenarioBuilder(alignableTracker_.get());
560  scenarioBuilder.applyScenario(scenarioConfig);
561  }
562  if (doMuon_) {
563  MuonScenarioBuilder muonScenarioBuilder(alignableMuon_.get());
564  muonScenarioBuilder.applyScenario(scenarioConfig);
565  }
566 
567  } else {
568  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
569  << "NOT applying misalignment scenario!";
570  }
571 
572  // Apply simple misalignment
573  const auto& sParSel = config_.getParameter<std::string>("parameterSelectorSimple");
575 }
576 
577 // ----------------------------------------------------------------------------
579  const align::Alignables& alivec, const std::string& selection, float shift, float rot, bool local) {
580  std::ostringstream output; // collecting output
581 
582  if (shift > 0. || rot > 0.) {
583  output << "Adding random flat shift of max size " << shift << " and adding random flat rotation of max size " << rot
584  << " to ";
585 
586  std::vector<bool> commSel(0);
587  if (selection != "-1") {
588  AlignmentParameterSelector aSelector(nullptr, nullptr); // no alignable needed here...
589  const std::vector<char> cSel(aSelector.convertParamSel(selection));
590  if (cSel.size() < RigidBodyAlignmentParameters::N_PARAM) {
591  throw cms::Exception("BadConfig")
592  << "[AlignmentProducerBase::simpleMisalignment_]\n"
593  << "Expect selection string '" << selection << "' to be at least of length "
594  << RigidBodyAlignmentParameters::N_PARAM << " or to be '-1'.\n"
595  << "(Most probably you have to adjust the parameter 'parameterSelectorSimple'.)";
596  }
597  for (const auto& cIter : cSel) {
598  commSel.push_back(cIter == '0' ? false : true);
599  }
600  output << "parameters defined by (" << selection << "), representing (x,y,z,alpha,beta,gamma),";
601  } else {
602  output << "the active parameters of each alignable,";
603  }
604  output << " in " << (local ? "local" : "global") << " frame.";
605 
606  for (const auto& ali : alivec) {
607  std::vector<bool> mysel(commSel.empty() ? ali->alignmentParameters()->selector() : commSel);
608 
609  if (std::abs(shift) > 0.00001) {
610  double s0 = 0., s1 = 0., s2 = 0.;
612  s0 = shift * double(random() % 1000 - 500) / 500.;
614  s1 = shift * double(random() % 1000 - 500) / 500.;
616  s2 = shift * double(random() % 1000 - 500) / 500.;
617 
618  if (local)
619  ali->move(ali->surface().toGlobal(align::LocalVector(s0, s1, s2)));
620  else
621  ali->move(align::GlobalVector(s0, s1, s2));
622 
623  //AlignmentPositionError ape(dx,dy,dz);
624  //ali->addAlignmentPositionError(ape);
625  }
626 
627  if (std::abs(rot) > 0.00001) {
630  r(1) = rot * double(random() % 1000 - 500) / 500.;
632  r(2) = rot * double(random() % 1000 - 500) / 500.;
634  r(3) = rot * double(random() % 1000 - 500) / 500.;
635 
636  const align::RotationType mrot = align::toMatrix(r);
637  if (local)
638  ali->rotateInLocalFrame(mrot);
639  else
640  ali->rotateInGlobalFrame(mrot);
641 
642  //ali->addAlignmentPositionErrorFromRotation(mrot);
643  }
644  } // end loop on alignables
645  } else {
646  output << "No simple misalignment added!";
647  }
648  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::simpleMisalignment" << output.str();
649 }
650 
651 //------------------------------------------------------------------------------
653  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry"
654  << "Now physically apply alignments to geometry...";
655 
656  // Propagate changes to reconstruction geometry (from initialisation or iteration)
657  GeometryAligner aligner;
658 
659  if (doTracker_) {
660  if (!alignableTracker_) {
661  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
662  << "Trying to apply tracker alignment before creating it.";
663  }
664 
665  std::unique_ptr<Alignments> alignments{alignableTracker_->alignments()};
666  std::unique_ptr<AlignmentErrorsExtended> alignmentErrExt{alignableTracker_->alignmentErrors()};
667  std::unique_ptr<AlignmentSurfaceDeformations> aliDeforms{alignableTracker_->surfaceDeformations()};
668 
669  aligner.applyAlignments(trackerGeometry_.get(), alignments.get(), alignmentErrExt.get(), AlignTransform());
670  aligner.attachSurfaceDeformations(trackerGeometry_.get(), aliDeforms.get());
671  }
672 
673  if (doMuon_) {
674  if (!alignableMuon_) {
675  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
676  << "Trying to apply muon alignment before creating it.";
677  }
678 
679  std::unique_ptr<Alignments> dtAlignments{alignableMuon_->dtAlignments()};
680  std::unique_ptr<Alignments> cscAlignments{alignableMuon_->cscAlignments()};
681  std::unique_ptr<Alignments> gemAlignments{alignableMuon_->gemAlignments()};
682 
683  std::unique_ptr<AlignmentErrorsExtended> dtAlignmentErrExt{alignableMuon_->dtAlignmentErrorsExtended()};
684  std::unique_ptr<AlignmentErrorsExtended> cscAlignmentErrExt{alignableMuon_->cscAlignmentErrorsExtended()};
685  std::unique_ptr<AlignmentErrorsExtended> gemAlignmentErrExt{alignableMuon_->gemAlignmentErrorsExtended()};
686 
687  aligner.applyAlignments(&*muonDTGeometry_, dtAlignments.get(), dtAlignmentErrExt.get(), AlignTransform());
688  aligner.applyAlignments(&*muonCSCGeometry_, cscAlignments.get(), cscAlignmentErrExt.get(), AlignTransform());
689  aligner.applyAlignments(&*muonGEMGeometry_, gemAlignments.get(), gemAlignmentErrExt.get(), AlignTransform());
690  }
691 }
692 
693 //------------------------------------------------------------------------------
695  // Get Survey Rcds and add Survey Info
696  if (doTracker_ && useSurvey_) {
697  bool tkSurveyBool = watchTkSurveyRcd_.check(iSetup);
698  bool tkSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
699  edm::LogInfo("Alignment") << "watcher tksurveyrcd: " << tkSurveyBool;
700  edm::LogInfo("Alignment") << "watcher tksurveyerrrcd: " << tkSurveyErrBool;
701  if (tkSurveyBool || tkSurveyErrBool) {
702  edm::LogInfo("Alignment") << "ADDING THE SURVEY INFORMATION";
703  const Alignments* surveys = &iSetup.getData(tkSurveyToken_);
704  const SurveyErrors* surveyErrors = &iSetup.getData(tkSurvErrorToken_);
705 
706  surveyIndex_ = 0;
707  surveyValues_ = &*surveys;
708  surveyErrors_ = &*surveyErrors;
710  }
711  }
712 
713  if (doMuon_ && useSurvey_) {
714  bool DTSurveyBool = watchTkSurveyRcd_.check(iSetup);
715  bool DTSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
716  bool CSCSurveyBool = watchTkSurveyRcd_.check(iSetup);
717  bool CSCSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
718 
719  if (DTSurveyBool || DTSurveyErrBool || CSCSurveyBool || CSCSurveyErrBool) {
720  const Alignments* dtSurveys = &iSetup.getData(dtSurveyToken_);
721  const SurveyErrors* dtSurveyErrors = &iSetup.getData(dtSurvErrorToken_);
722  const Alignments* cscSurveys = &iSetup.getData(cscSurveyToken_);
723  const SurveyErrors* cscSurveyErrors = &iSetup.getData(cscSurvErrorToken_);
724 
725  surveyIndex_ = 0;
726  surveyValues_ = &*dtSurveys;
727  surveyErrors_ = &*dtSurveyErrors;
728  const auto& barrels = alignableMuon_->DTBarrel();
729  for (const auto& barrel : barrels)
731 
732  surveyIndex_ = 0;
733  surveyValues_ = &*cscSurveys;
734  surveyErrors_ = &*cscSurveyErrors;
735  const auto& endcaps = alignableMuon_->CSCEndcaps();
736  for (const auto& endcap : endcaps)
738  }
739  }
740 }
741 
742 //------------------------------------------------------------------------------
744  const auto& comps = ali->components();
745 
746  for (const auto& comp : comps)
748 
750 
751  if (ali->id() != error.rawId() || ali->alignableObjectId() != error.structureType()) {
752  throw cms::Exception("DatabaseError") << "Error reading survey info from DB. Mismatched id!";
753  }
754 
755  const auto& pos = surveyValues_->m_align[surveyIndex_].translation();
756  const auto& rot = surveyValues_->m_align[surveyIndex_].rotation();
757 
758  AlignableSurface surf(
759  align::PositionType(pos.x(), pos.y(), pos.z()),
760  align::RotationType(rot.xx(), rot.xy(), rot.xz(), rot.yx(), rot.yy(), rot.yz(), rot.zx(), rot.zy(), rot.zz()));
761 
762  surf.setWidth(ali->surface().width());
763  surf.setLength(ali->surface().length());
764 
765  ali->setSurvey(new SurveyDet(surf, error.matrix()));
766 
767  ++surveyIndex_;
768 }
769 
770 //------------------------------------------------------------------------------
772  for (const auto& monitor : monitors_)
773  monitor->endOfJob();
774 
775  if (alignmentAlgo_->processesEvents() && nevent_ == 0) {
776  return false;
777  }
778 
780  if (alignmentAlgo_->storeAlignments())
782  } else {
783  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::finish"
784  << "No payload to be stored!";
785  }
786 
787  // takes care of storing output of calibrations, but needs to be called only
788  // after 'storeAlignmentsToDB()'
789  for (const auto& iCal : calibrations_)
790  iCal->endOfJob();
791 
792  return true;
793 }
794 
795 //------------------------------------------------------------------------------
797  const auto runRangeSelectionVPSet = config_.getParameterSetVector("RunRangeSelection");
798 
799  // handle PCL use case
800  const auto& uniqueRunRanges =
801  (runAtPCL_ ? align::makeUniqueRunRanges(runRangeSelectionVPSet, firstRun_) : uniqueRunRanges_);
802 
803  std::vector<AlgebraicVector> beamSpotParameters;
804 
805  for (const auto& iRunRange : uniqueRunRanges) {
806  alignmentAlgo_->setParametersForRunRange(iRunRange);
807 
808  // Save alignments to database
810  writeForRunRange(iRunRange.first);
811  }
812 
813  // Deal with extra alignables, e.g. beam spot
814  if (alignableExtras_) {
815  auto& alis = alignableExtras_->beamSpot();
816  if (!alis.empty()) {
817  auto beamSpotAliPars = dynamic_cast<BeamSpotAlignmentParameters*>(alis[0]->alignmentParameters());
818  if (!beamSpotAliPars) {
819  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB\n"
820  << "First alignable of alignableExtras_ does not have "
821  << "'BeamSpotAlignmentParameters', while it should have.";
822  }
823 
824  beamSpotParameters.push_back(beamSpotAliPars->parameters());
825  }
826  }
827  }
828 
829  if (alignableExtras_) {
830  std::ostringstream bsOutput;
831 
832  auto itPar = beamSpotParameters.cbegin();
833  for (auto iRunRange = uniqueRunRanges.cbegin(); iRunRange != uniqueRunRanges.cend(); ++iRunRange, ++itPar) {
834  bsOutput << "Run range: " << (*iRunRange).first << " - " << (*iRunRange).second << "\n";
835  bsOutput << " Displacement: x=" << (*itPar)[0] << ", y=" << (*itPar)[1] << "\n";
836  bsOutput << " Slope: dx/dz=" << (*itPar)[2] << ", dy/dz=" << (*itPar)[3] << "\n";
837  }
838 
839  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB"
840  << "Parameters for alignable beamspot:\n"
841  << bsOutput.str();
842  }
843 }
844 
845 //------------------------------------------------------------------------------
847  if (doTracker_ and alignableTracker_) { // first tracker
848  const AlignTransform* trackerGlobal{nullptr}; // will be 'removed' from constants
849  if (globalPositions_) { // i.e. applied before in applyDB
851  }
852 
853  auto alignments = alignableTracker_->alignments();
854  auto alignmentErrors = alignableTracker_->alignmentErrors();
855  this->writeDB(alignments, tkAliRcdName_, alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time);
856 
857  // Save surface deformations to database
858  if (saveDeformationsToDB_) {
859  const auto alignmentSurfaceDeformations = *(alignableTracker_->surfaceDeformations());
860  this->writeDB(alignmentSurfaceDeformations, "TrackerSurfaceDeformationRcd", time);
861  }
862  }
863 
864  if (doMuon_ and alignableMuon_) { // now muon
865  const AlignTransform* muonGlobal{nullptr}; // will be 'removed' from constants
866  if (globalPositions_) { // i.e. applied before in applyDB
868  }
869  // Get alignments+errors, first DT - ownership taken over by writeDB(..), so no delete
870  auto alignments = alignableMuon_->dtAlignments();
871  auto alignmentErrors = alignableMuon_->dtAlignmentErrorsExtended();
872  this->writeDB(alignments, "DTAlignmentRcd", alignmentErrors, "DTAlignmentErrorExtendedRcd", muonGlobal, time);
873 
874  // Get alignments+errors, now CSC - ownership taken over by writeDB(..), so no delete
875  alignments = alignableMuon_->cscAlignments();
876  alignmentErrors = alignableMuon_->cscAlignmentErrorsExtended();
877  this->writeDB(alignments, "CSCAlignmentRcd", alignmentErrors, "CSCAlignmentErrorExtendedRcd", muonGlobal, time);
878  }
879 }
880 
881 //------------------------------------------------------------------------------
883  const std::string& alignRcd,
884  AlignmentErrorsExtended* alignmentErrors,
885  const std::string& errRcd,
886  const AlignTransform* globalCoordinates,
887  cond::Time_t time) const {
888  Alignments* tempAlignments = alignments;
889  AlignmentErrorsExtended* tempAlignmentErrorsExtended = alignmentErrors;
890 
891  // Call service
893  if (!poolDb.isAvailable()) { // Die if not available
894  delete tempAlignments; // promised to take over ownership...
895  delete tempAlignmentErrorsExtended; // ditto
896  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
897  }
898 
899  if (globalCoordinates // happens only if (applyDbAlignment_ == true)
900  && globalCoordinates->transform() != AlignTransform::Transform::Identity) {
901  tempAlignments = new Alignments(); // temporary storage for
902  tempAlignmentErrorsExtended = new AlignmentErrorsExtended(); // final alignments and errors
903 
904  GeometryAligner aligner;
905  aligner.removeGlobalTransform(
906  alignments, alignmentErrors, *globalCoordinates, tempAlignments, tempAlignmentErrorsExtended);
907 
908  delete alignments; // have to delete original alignments
909  delete alignmentErrors; // same thing for the errors
910 
911  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::writeDB"
912  << "globalCoordinates removed from alignments (" << alignRcd << ") and errors ("
913  << alignRcd << ").";
914  }
915 
916  if (saveToDB_) {
917  edm::LogInfo("Alignment") << "Writing Alignments for run " << time << " to " << alignRcd << ".";
918  poolDb->writeOneIOV<Alignments>(*tempAlignments, time, alignRcd);
919  } else {
920  delete tempAlignments; // ...otherwise we have to delete, as promised!
921  }
922 
923  if (saveApeToDB_) {
924  edm::LogInfo("Alignment") << "Writing AlignmentErrorsExtended for run " << time << " to " << errRcd << ".";
925  poolDb->writeOneIOV<AlignmentErrorsExtended>(*tempAlignmentErrorsExtended, time, errRcd);
926  } else {
927  delete tempAlignmentErrorsExtended; // ...otherwise we have to delete, as promised!
928  }
929 }
930 
931 //------------------------------------------------------------------------------
932 void AlignmentProducerBase::writeDB(const AlignmentSurfaceDeformations& alignmentSurfaceDeformations,
933  const std::string& surfaceDeformationRcd,
934  cond::Time_t time) const {
935  // Call service
937  if (!poolDb.isAvailable()) { // Die if not available
938  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
939  }
940 
941  if (saveDeformationsToDB_) {
942  edm::LogInfo("Alignment") << "Writing AlignmentSurfaceDeformations for run " << time << " to "
943  << surfaceDeformationRcd << ".";
944  poolDb->writeOneIOV<AlignmentSurfaceDeformations>(alignmentSurfaceDeformations, time, surfaceDeformationRcd);
945  }
946 }
void attachSurfaceDeformations(const C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
AlignmentProducerBase(const edm::ParameterSet &, edm::ConsumesCollector)
void terminateProcessing(const edm::EventSetup *=nullptr)
Terminate processing of events.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void readInSurveyRcds(const edm::EventSetup &)
Reads in survey records.
void applyAlignmentsToDB(const edm::EventSetup &)
void createGeometries(const edm::EventSetup &, const TrackerTopology *)
Creates ideal geometry from IdealGeometryRecord.
std::vector< ConstTrajTrackPair > ConstTrajTrackPairs
Builds a scenario from configuration and applies it to the alignable Muon.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
Alignment producer base class.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
const edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd > cscAliErrToken_
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::ESWatcher< DTAlignmentErrorExtendedRcd > watchDTAlErrExtRcd_
edm::ESWatcher< DTAlignmentRcd > watchDTAlRcd_
Time_t beginValue
Definition: Time.h:41
Class to update a given geometry with a set of alignments.
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
void initAlignmentAlgorithm(const edm::EventSetup &, bool update=false)
std::string encode() const
Definition: InputTag.cc:159
void writeDB(Alignments *, const std::string &, AlignmentErrorsExtended *, const std::string &, const AlignTransform *, cond::Time_t) const
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
std::vector< char > convertParamSel(const std::string &selString) const
Converting std::string into std::vector<char>
selection
main part
Definition: corrVsCorr.py:100
ParameterSet const & getParameterSet(std::string const &) const
virtual ~AlignmentProducerBase() noexcept(false)
void buildParameterStore()
Creates the , which manages all Alignables.
align::Scalar width() const
virtual bool getAliClusterValueMap(const edm::Event &, edm::Handle< AliClusterValueMap > &)=0
std::unique_ptr< AlignableMuon > alignableMuon_
const edm::ESGetToken< Alignments, DTSurveyRcd > dtSurveyToken_
double dydz() const
dydz slope
Definition: BeamSpot.h:80
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
const Alignments * surveyValues_
void setWidth(align::Scalar width)
Definition: config.py:1
Log< level::Error, false > LogError
std::unique_ptr< AlignmentParameterStore > alignmentParameterStore_
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
virtual bool getTkFittedLasBeamCollection(const edm::Run &, edm::Handle< TkFittedLasBeamCollection > &)=0
const edm::ESGetToken< Alignments, CSCAlignmentRcd > cscAliToken_
define event information passed to algorithms
std::shared_ptr< TrackerGeometry > trackerGeometry_
const edm::ESGetToken< SurveyErrors, CSCSurveyErrorExtendedRcd > cscSurvErrorToken_
Transform transform() const
const std::string tkAliRcdName_
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
const_iterator end() const
last iterator over the map (read only)
void setLength(align::Scalar length)
edm::ESWatcher< GlobalPositionRcd > watchGlobalPositionRcd_
virtual bool getTsosVectorCollection(const edm::Run &, edm::Handle< TsosVectorCollection > &)=0
double x0() const
x coordinate
Definition: BeamSpot.h:61
void writeForRunRange(cond::Time_t)
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > tkAliToken_
unsigned long long Time_t
Definition: Time.h:14
const edm::ESGetToken< Alignments, TrackerSurveyRcd > tkSurveyToken_
const edm::ESGetToken< Alignments, GEMAlignmentRcd > gemAliToken_
std::unique_ptr< AlignableExtras > alignableExtras_
void createMonitors(edm::ConsumesCollector &)
Creates the monitors.
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
RunRanges makeUniqueRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
Definition: Utilities.cc:241
void createAlignmentAlgorithm(edm::ConsumesCollector &)
Creates the choosen alignment algorithm.
const edm::ESGetToken< SurveyErrors, DTSurveyErrorExtendedRcd > dtSurvErrorToken_
void removeGlobalTransform(const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates, Alignments *newAlignments, AlignmentErrorsExtended *newAlignmentErrorsExtended)
edm::ESWatcher< TrackerSurveyErrorExtendedRcd > watchTkSurveyErrExtRcd_
void endRunImpl(const edm::Run &, const edm::EventSetup &)
end run
void addSurveyInfo(Alignable *)
Adds survey info to an Alignable.
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
std::unique_ptr< AlignableTracker > alignableTracker_
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
void createAlignables(const TrackerTopology *, bool update=false)
std::unique_ptr< const Alignments > globalPositions_
GlobalPositions that might be read from DB, nullptr otherwise.
AlignmentAlgorithmBase::EndRunInfo EndRunInfo
double y0() const
y coordinate
Definition: BeamSpot.h:63
const edm::ESGetToken< Alignments, DTAlignmentRcd > dtAliToken_
virtual const Alignables & components() const =0
Return vector of all direct components.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
void startProcessing()
Start processing of events.
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd_
virtual bool getBeamSpot(const edm::Event &, edm::Handle< reco::BeamSpot > &)=0
edm::ESWatcher< CSCAlignmentErrorExtendedRcd > watchCSCAlErrExtRcd_
Log< level::Info, false > LogInfo
const edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > gemAliErrToken_
Definition: DetId.h:17
edm::ESHandle< DTGeometry > muonDTGeometry_
edm::ESWatcher< TrackerSurfaceDeformationRcd > watchTrackerSurDeRcd_
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
AlgebraicVector EulerAngles
Definition: Definitions.h:34
void createCalibrations(edm::ConsumesCollector &)
Creates the calibrations.
edm::Handle< reco::BeamSpot > beamSpot_
void applyMisalignment()
Applies misalignment scenario to .
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > tkAliErrToken_
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:266
double dxdz() const
dxdz slope
Definition: BeamSpot.h:78
align::Scalar length() const
const align::RunRanges uniqueRunRanges_
void storeAlignmentsToDB()
Writes Alignments (i.e. Records) to database-file.
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
virtual bool getTrajTrackAssociationCollection(const edm::Event &, edm::Handle< TrajTrackAssociationCollection > &)=0
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
edm::ESWatcher< TrackerAlignmentRcd > watchTrackerAlRcd_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
double z0() const
z coordinate
Definition: BeamSpot.h:65
void applyScenario(const edm::ParameterSet &scenario) override
Apply misalignment scenario to the tracker.
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
const_iterator begin() const
first iterator over the map (read only)
edm::ESWatcher< TrackerAlignmentErrorExtendedRcd > watchTrackerAlErrorExtRcd_
bool setupChanged(const edm::EventSetup &)
Checks if one of the EventSetup-Records has changed.
#define update(a, b)
VParameterSet const & getParameterSetVector(std::string const &name) const
edm::ESWatcher< TrackerSurveyRcd > watchTkSurveyRcd_
const edm::ESGetToken< SurveyErrors, TrackerSurveyErrorExtendedRcd > tkSurvErrorToken_
const edm::ESGetToken< AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcd > tkSurfDefToken_
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
const edm::ESGetToken< Alignments, CSCSurveyRcd > cscSurveyToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
static unsigned int const shift
edm::ESHandle< CSCGeometry > muonCSCGeometry_
edm::ESWatcher< CSCAlignmentRcd > watchCSCAlRcd_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
const SurveyErrors * surveyErrors_
void initBeamSpot(const edm::Event &)
Initializes Beamspot of Alignables .
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
bool isAvailable() const
Definition: Service.h:40
Definition: output.py:1
void applyScenario(const edm::ParameterSet &scenario) override
Apply misalignment scenario to the Muon.
eventInfo
add run, event number and lumi section
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
CalibrationsOwner calibrations_
#define get
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:22
const edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > dtAliErrToken_
edm::ESHandle< GEMGeometry > muonGEMGeometry_
Builds a scenario from configuration and applies it to the alignable tracker.
void beginRunImpl(const edm::Run &, const edm::EventSetup &)
begin run
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
void simpleMisalignment(const align::Alignables &, const std::string &, float, float, bool)
Applies misalignment scenario to .
Definition: event.py:1
Definition: Run.h:45
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_