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  ptitpToken_(iC.esConsumes<edm::Transition::BeginRun>()),
55  dtGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
56  cscGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
57  gemGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
58  tkAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
59  dtAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
60  cscAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
61  gemAliToken_(iC.esConsumes<edm::Transition::BeginRun>()),
62  tkAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
63  dtAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
64  cscAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
65  gemAliErrToken_(iC.esConsumes<edm::Transition::BeginRun>()),
66  tkSurfDefToken_(iC.esConsumes<edm::Transition::BeginRun>()),
67  gprToken_(iC.esConsumes<edm::Transition::BeginRun>()),
68  tkSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
69  tkSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()),
70  dtSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
71  dtSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()),
72  cscSurveyToken_(iC.esConsumes<edm::Transition::BeginRun>()),
73  cscSurvErrorToken_(iC.esConsumes<edm::Transition::BeginRun>()) {
74  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::AlignmentProducerBase";
75 
76  const auto& algoConfig = config_.getParameterSet("algoConfig");
77  if (config_.existsAs<bool>("runAtPCL")) {
78  // configured in main config?
79  runAtPCL_ = config_.getParameter<bool>("runAtPCL");
80 
81  if (algoConfig.existsAs<bool>("runAtPCL") && (runAtPCL_ != algoConfig.getParameter<bool>("runAtPCL"))) {
82  throw cms::Exception("BadConfig") << "Inconsistent settings for 'runAtPCL' in configuration of the "
83  << "alignment producer and the alignment algorithm.";
84  }
85 
86  } else if (algoConfig.existsAs<bool>("runAtPCL")) {
87  // configured in algo config?
88  runAtPCL_ = algoConfig.getParameter<bool>("runAtPCL");
89 
90  } else {
91  // assume 'false' if it was not configured
92  runAtPCL_ = false;
93  }
94 
95  createAlignmentAlgorithm(iC);
96  createMonitors(iC);
97  createCalibrations(iC);
98 }
99 
100 //------------------------------------------------------------------------------
102 
103 //------------------------------------------------------------------------------
105  if (isDuringLoop_)
106  return;
107 
108  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::startProcessing"
109  << "Begin";
110 
111  if (!isAlgoInitialized_) {
112  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::startProcessing\n"
113  << "Trying to start event processing before initializing the alignment "
114  << "algorithm.";
115  }
116 
117  nevent_ = 0;
118 
119  alignmentAlgo_->startNewLoop();
120 
121  // FIXME: Should this be done in algorithm::startNewLoop()??
122  for (const auto& iCal : calibrations_)
123  iCal->startNewLoop();
124  for (const auto& monitor : monitors_)
125  monitor->startingNewLoop();
126 
128  isDuringLoop_ = true;
129 }
130 
131 //------------------------------------------------------------------------------
133  if (!isDuringLoop_)
134  return;
135 
136  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::terminateProcessing"
137  << "Terminating algorithm.";
138  if (setup) {
139  alignmentAlgo_->terminate(*setup);
140  } else {
141  alignmentAlgo_->terminate();
142  }
143 
144  // FIXME: Should this be done in algorithm::terminate()??
145  for (const auto& iCal : calibrations_)
146  iCal->endOfLoop();
147  for (const auto& monitor : monitors_)
148  monitor->endOfLoop();
149 
150  isDuringLoop_ = false;
151 }
152 
153 //------------------------------------------------------------------------------
155  if (setupChanged(setup)) {
156  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
157  << "EventSetup-Record changed.";
158 
159  // updatable alignables are currently not used at PCL, but event setup
160  // changes require a complete re-initialization
161  if (runAtPCL_) {
162  initAlignmentAlgorithm(setup, /* update = */ false);
163  } else if (enableAlignableUpdates_) {
164  initAlignmentAlgorithm(setup, /* update = */ true);
165  }
166  }
167 
168  initBeamSpot(event); // must happen every event and before incrementing 'nevent_'
169 
170  ++nevent_; // must happen before the check below;
171  // otherwise subsequent checks fail for "EmptySource"
172 
173  if (!alignmentAlgo_->processesEvents()) {
174  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
175  << "Skipping event. The current configuration of the alignment algorithm "
176  << "does not need to process any events.";
177  return false;
178  }
179 
180  // reading in survey records
182 
183  // Printout event number
184  for (int i = 10; i < 10000000; i *= 10) {
185  if (nevent_ < 10 * i && (nevent_ % i) == 0) {
186  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
187  << "Events processed: " << nevent_;
188  }
189  }
190 
191  // Retrieve trajectories and tracks from the event
192  // -> merely skip if collection is empty
193  edm::Handle<TrajTrackAssociationCollection> handleTrajTracksCollection;
194 
195  if (getTrajTrackAssociationCollection(event, handleTrajTracksCollection)) {
196  // Form pairs of trajectories and tracks
197  ConstTrajTrackPairs trajTracks;
198  for (auto iter = handleTrajTracksCollection->begin(); iter != handleTrajTracksCollection->end(); ++iter) {
199  trajTracks.push_back(ConstTrajTrackPair(&(*(*iter).key), &(*(*iter).val)));
200  }
201 
202  // Run the alignment algorithm with its input
203  const AliClusterValueMap* clusterValueMapPtr{nullptr};
204  if (!clusterValueMapTag_.encode().empty()) {
205  edm::Handle<AliClusterValueMap> clusterValueMap;
206  getAliClusterValueMap(event, clusterValueMap);
207  clusterValueMapPtr = &(*clusterValueMap);
208  }
209 
210  const AlignmentAlgorithmBase::EventInfo eventInfo{event.id(), trajTracks, *beamSpot_, clusterValueMapPtr};
212 
213  for (const auto& monitor : monitors_) {
214  monitor->duringLoop(event, setup, trajTracks); // forward eventInfo?
215  }
216  } else {
217  edm::LogError("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
218  << "No track collection found: skipping event";
219  }
220 
221  return true;
222 }
223 
224 //------------------------------------------------------------------------------
226  const bool changed{setupChanged(setup)};
227  if (changed) {
228  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::beginRunImpl"
229  << "EventSetup-Record changed.";
230 
231  // updatable alignables are currently not used at PCL, but event setup
232  // changes require a complete re-initialization
233  if (runAtPCL_) {
234  initAlignmentAlgorithm(setup, /* update = */ false);
235  } else if (enableAlignableUpdates_) {
236  initAlignmentAlgorithm(setup, /* update = */ true);
237  }
238  }
239 
240  alignmentAlgo_->beginRun(run, setup, changed && (runAtPCL_ || enableAlignableUpdates_));
241 
242  for (const auto& iCal : calibrations_)
243  iCal->beginRun(run, setup);
244 
245  //store the first run analyzed to be used for setting the IOV (for PCL)
246  if (firstRun_ > static_cast<cond::Time_t>(run.id().run())) {
247  firstRun_ = static_cast<cond::Time_t>(run.id().run());
248  }
249 }
250 
251 //------------------------------------------------------------------------------
253  if (!tkLasBeamTag_.encode().empty()) {
257  getTsosVectorCollection(run, tsoses);
258 
259  alignmentAlgo_->endRun(EndRunInfo(run.id(), &(*lasBeams), &(*tsoses)), setup);
260  } else {
261  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::endRunImpl"
262  << "No Tk LAS beams to forward to algorithm.";
263  alignmentAlgo_->endRun(EndRunInfo(run.id(), nullptr, nullptr), setup);
264  }
265 }
266 
267 //------------------------------------------------------------------------------
269  // Do not forward edm::LuminosityBlock
270  alignmentAlgo_->beginLuminosityBlock(setup);
271 }
272 
273 //------------------------------------------------------------------------------
275  // Do not forward edm::LuminosityBlock
276  alignmentAlgo_->endLuminosityBlock(setup);
277 }
278 
279 //------------------------------------------------------------------------------
281  auto algoConfig = config_.getParameter<edm::ParameterSet>("algoConfig");
282  algoConfig.addUntrackedParameter("RunRangeSelection", config_.getParameter<edm::VParameterSet>("RunRangeSelection"));
283  algoConfig.addUntrackedParameter<align::RunNumber>("firstIOV", runAtPCL_ ? 1 : uniqueRunRanges_.front().first);
284  algoConfig.addUntrackedParameter("enableAlignableUpdates", enableAlignableUpdates_);
285 
286  const auto& algoName = algoConfig.getParameter<std::string>("algoName");
288 }
289 
290 //------------------------------------------------------------------------------
292  const auto& monitorConfig = config_.getParameter<edm::ParameterSet>("monitorConfig");
293  auto monitors = monitorConfig.getUntrackedParameter<std::vector<std::string> >("monitors");
294  for (const auto& miter : monitors) {
295  monitors_.emplace_back(
296  AlignmentMonitorPluginFactory::get()->create(miter, monitorConfig.getUntrackedParameterSet(miter), iC));
297  }
298 }
299 
300 //------------------------------------------------------------------------------
302  const auto& calibrations = config_.getParameter<edm::VParameterSet>("calibrations");
303  for (const auto& iCalib : calibrations) {
305  iCalib.getParameter<std::string>("calibrationName"), iCalib, iC));
306  }
307 }
308 
309 //------------------------------------------------------------------------------
311  bool changed{false};
312 
314  changed = true;
315  }
316 
318  changed = true;
319  }
320 
321  if (doTracker_) {
323  changed = true;
324  }
325 
327  changed = true;
328  }
329 
331  changed = true;
332  }
333  }
334 
335  if (doMuon_) {
336  if (watchDTAlRcd_.check(setup)) {
337  changed = true;
338  }
339 
341  changed = true;
342  }
343 
344  if (watchCSCAlRcd_.check(setup)) {
345  changed = true;
346  }
347 
349  changed = true;
350  }
351  }
352 
353  /* TODO: ExtraAlignables: Which record(s) to check?
354  *
355  if (useExtras_) {}
356  */
357 
358  return changed;
359 }
360 
361 //------------------------------------------------------------------------------
363  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
364  << "Begin";
365 
366  auto isTrueUpdate = update && isAlgoInitialized_;
367 
368  // Retrieve tracker topology from geometry
369  const TrackerTopology* const tTopo = &setup.getData(ttopoToken_);
370 
371  // Create the geometries from the ideal geometries
372  createGeometries(setup, tTopo);
373 
375  createAlignables(tTopo, isTrueUpdate);
378 
379  // Initialize alignment algorithm and integrated calibration and pass the
380  // latter to algorithm
381  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
382  << "Initializing alignment algorithm.";
383  alignmentAlgo_->initialize(
385 
386  // Not all algorithms support calibrations - so do not pass empty vector
387  // and throw if non-empty and not supported:
388  if (!calibrations_.empty()) {
389  if (alignmentAlgo_->supportsCalibrations()) {
390  alignmentAlgo_->addCalibrations(calibrations_);
391  } else {
392  throw cms::Exception("BadConfig") << "@SUB=AlignmentProducerBase::createCalibrations\n"
393  << "Configured " << calibrations_.size() << " calibration(s) "
394  << "for algorithm not supporting it.";
395  }
396  }
397 
398  isAlgoInitialized_ = true;
399 
401 
402  if (!isTrueUpdate) { // only needed the first time
403  for (const auto& iCal : calibrations_) {
404  iCal->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get());
405  }
406  for (const auto& monitor : monitors_) {
407  monitor->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignmentParameterStore_.get());
408  }
409  }
410  startProcessing(); // needed if derived class is non-EDLooper-based
411  // has no effect, if called during loop
412 
413  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
414  << "End";
415 }
416 
417 //------------------------------------------------------------------------------
420 
421  if (nevent_ == 0 && alignableExtras_) {
422  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initBeamSpot"
423  << "Initializing AlignableBeamSpot";
424 
425  alignableExtras_->initializeBeamSpot(
427  }
428 }
429 
430 //------------------------------------------------------------------------------
432  if (doTracker_) {
433  const GeometricDet* geometricDet = &iSetup.getData(geomDetToken_);
434  const PTrackerParameters* ptp = &iSetup.getData(ptpToken_);
436  TrackerGeomBuilderFromGeometricDet trackerBuilder;
437  trackerGeometry_ = std::shared_ptr<TrackerGeometry>(trackerBuilder.build(geometricDet, ptitp, *ptp, tTopo));
438  }
439 
440  if (doMuon_) {
444  }
445 }
446 
447 //------------------------------------------------------------------------------
449  // Retrieve and apply alignments, if requested (requires z setup)
450  if (applyDbAlignment_) {
451  // we need GlobalPositionRcd - and have to keep track for later removal
452  // before writing again to DB...
453 
454  const Alignments* globalAlignments = &setup.getData(gprToken_);
455  globalPositions_ = std::make_unique<Alignments>(*globalAlignments);
456 
457  if (doTracker_) {
458  applyDB<TrackerGeometry, TrackerAlignmentRcd, TrackerAlignmentErrorExtendedRcd>(
459  trackerGeometry_.get(),
460  setup,
461  tkAliToken_,
464 
465  applyDB<TrackerGeometry, TrackerSurfaceDeformationRcd>(trackerGeometry_.get(), setup, tkSurfDefToken_);
466  }
467 
468  if (doMuon_) {
469  applyDB<DTGeometry, DTAlignmentRcd, DTAlignmentErrorExtendedRcd>(
470  &*muonDTGeometry_,
471  setup,
472  dtAliToken_,
475 
476  applyDB<CSCGeometry, CSCAlignmentRcd, CSCAlignmentErrorExtendedRcd>(
478  setup,
479  cscAliToken_,
482 
483  applyDB<GEMGeometry, GEMAlignmentRcd, GEMAlignmentErrorExtendedRcd>(
485  setup,
486  gemAliToken_,
489  }
490  }
491 }
492 
493 //------------------------------------------------------------------------------
495  if (doTracker_) {
496  if (update) {
497  alignableTracker_->update(trackerGeometry_.get(), tTopo);
498  } else {
499  alignableTracker_ = std::make_unique<AlignableTracker>(trackerGeometry_.get(), tTopo);
500  }
501  }
502 
503  if (doMuon_) {
504  if (update) {
506  } else {
507  alignableMuon_ = std::make_unique<AlignableMuon>(&*muonDTGeometry_, &*muonCSCGeometry_, &*muonGEMGeometry_);
508  }
509  }
510 
511  if (useExtras_) {
512  if (update) {
513  // FIXME: Requires further code changes to track beam spot condition changes
514  } else {
515  alignableExtras_ = std::make_unique<AlignableExtras>();
516  }
517  }
518 }
519 
520 //------------------------------------------------------------------------------
522  // Create alignment parameter builder
523  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
524  << "Creating AlignmentParameterBuilder";
525 
526  const auto& alParamBuildCfg = config_.getParameter<edm::ParameterSet>("ParameterBuilder");
527  const auto& alParamStoreCfg = config_.getParameter<edm::ParameterSet>("ParameterStore");
528 
529  AlignmentParameterBuilder alignmentParameterBuilder{
530  alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get(), alParamBuildCfg};
531 
532  // Fix alignables if requested
533  if (stNFixAlignables_ > 0) {
534  alignmentParameterBuilder.fixAlignables(stNFixAlignables_);
535  }
536 
537  // Get list of alignables
538  const auto& alignables = alignmentParameterBuilder.alignables();
539  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
540  << "got " << alignables.size() << " alignables";
541 
542  // Create AlignmentParameterStore
543  alignmentParameterStore_ = std::make_unique<AlignmentParameterStore>(alignables, alParamStoreCfg);
544  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
545  << "AlignmentParameterStore created!";
546 }
547 
548 //------------------------------------------------------------------------------
550  // Apply misalignment scenario to alignable tracker and muon if requested
551  // WARNING: this assumes scenarioConfig can be passed to both muon and tracker
552 
554  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
555  << "Applying misalignment scenario to " << (doTracker_ ? "tracker" : "")
556  << (doMuon_ ? (doTracker_ ? " and muon" : "muon") : ".");
557 
558  const auto& scenarioConfig = config_.getParameterSet("MisalignmentScenario");
559 
560  if (doTracker_) {
561  TrackerScenarioBuilder scenarioBuilder(alignableTracker_.get());
562  scenarioBuilder.applyScenario(scenarioConfig);
563  }
564  if (doMuon_) {
565  MuonScenarioBuilder muonScenarioBuilder(alignableMuon_.get());
566  muonScenarioBuilder.applyScenario(scenarioConfig);
567  }
568 
569  } else {
570  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
571  << "NOT applying misalignment scenario!";
572  }
573 
574  // Apply simple misalignment
575  const auto& sParSel = config_.getParameter<std::string>("parameterSelectorSimple");
577 }
578 
579 // ----------------------------------------------------------------------------
581  const align::Alignables& alivec, const std::string& selection, float shift, float rot, bool local) {
582  std::ostringstream output; // collecting output
583 
584  if (shift > 0. || rot > 0.) {
585  output << "Adding random flat shift of max size " << shift << " and adding random flat rotation of max size " << rot
586  << " to ";
587 
588  std::vector<bool> commSel(0);
589  if (selection != "-1") {
590  AlignmentParameterSelector aSelector(nullptr, nullptr); // no alignable needed here...
591  const std::vector<char> cSel(aSelector.convertParamSel(selection));
592  if (cSel.size() < RigidBodyAlignmentParameters::N_PARAM) {
593  throw cms::Exception("BadConfig")
594  << "[AlignmentProducerBase::simpleMisalignment_]\n"
595  << "Expect selection string '" << selection << "' to be at least of length "
596  << RigidBodyAlignmentParameters::N_PARAM << " or to be '-1'.\n"
597  << "(Most probably you have to adjust the parameter 'parameterSelectorSimple'.)";
598  }
599  for (const auto& cIter : cSel) {
600  commSel.push_back(cIter == '0' ? false : true);
601  }
602  output << "parameters defined by (" << selection << "), representing (x,y,z,alpha,beta,gamma),";
603  } else {
604  output << "the active parameters of each alignable,";
605  }
606  output << " in " << (local ? "local" : "global") << " frame.";
607 
608  for (const auto& ali : alivec) {
609  std::vector<bool> mysel(commSel.empty() ? ali->alignmentParameters()->selector() : commSel);
610 
611  if (std::abs(shift) > 0.00001) {
612  double s0 = 0., s1 = 0., s2 = 0.;
614  s0 = shift * double(random() % 1000 - 500) / 500.;
616  s1 = shift * double(random() % 1000 - 500) / 500.;
618  s2 = shift * double(random() % 1000 - 500) / 500.;
619 
620  if (local)
621  ali->move(ali->surface().toGlobal(align::LocalVector(s0, s1, s2)));
622  else
623  ali->move(align::GlobalVector(s0, s1, s2));
624 
625  //AlignmentPositionError ape(dx,dy,dz);
626  //ali->addAlignmentPositionError(ape);
627  }
628 
629  if (std::abs(rot) > 0.00001) {
632  r(1) = rot * double(random() % 1000 - 500) / 500.;
634  r(2) = rot * double(random() % 1000 - 500) / 500.;
636  r(3) = rot * double(random() % 1000 - 500) / 500.;
637 
638  const align::RotationType mrot = align::toMatrix(r);
639  if (local)
640  ali->rotateInLocalFrame(mrot);
641  else
642  ali->rotateInGlobalFrame(mrot);
643 
644  //ali->addAlignmentPositionErrorFromRotation(mrot);
645  }
646  } // end loop on alignables
647  } else {
648  output << "No simple misalignment added!";
649  }
650  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::simpleMisalignment" << output.str();
651 }
652 
653 //------------------------------------------------------------------------------
655  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry"
656  << "Now physically apply alignments to geometry...";
657 
658  // Propagate changes to reconstruction geometry (from initialisation or iteration)
659  GeometryAligner aligner;
660 
661  if (doTracker_) {
662  if (!alignableTracker_) {
663  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
664  << "Trying to apply tracker alignment before creating it.";
665  }
666 
667  std::unique_ptr<Alignments> alignments{alignableTracker_->alignments()};
668  std::unique_ptr<AlignmentErrorsExtended> alignmentErrExt{alignableTracker_->alignmentErrors()};
669  std::unique_ptr<AlignmentSurfaceDeformations> aliDeforms{alignableTracker_->surfaceDeformations()};
670 
671  aligner.applyAlignments(trackerGeometry_.get(), alignments.get(), alignmentErrExt.get(), AlignTransform());
672  aligner.attachSurfaceDeformations(trackerGeometry_.get(), aliDeforms.get());
673  }
674 
675  if (doMuon_) {
676  if (!alignableMuon_) {
677  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
678  << "Trying to apply muon alignment before creating it.";
679  }
680 
681  std::unique_ptr<Alignments> dtAlignments{alignableMuon_->dtAlignments()};
682  std::unique_ptr<Alignments> cscAlignments{alignableMuon_->cscAlignments()};
683  std::unique_ptr<Alignments> gemAlignments{alignableMuon_->gemAlignments()};
684 
685  std::unique_ptr<AlignmentErrorsExtended> dtAlignmentErrExt{alignableMuon_->dtAlignmentErrorsExtended()};
686  std::unique_ptr<AlignmentErrorsExtended> cscAlignmentErrExt{alignableMuon_->cscAlignmentErrorsExtended()};
687  std::unique_ptr<AlignmentErrorsExtended> gemAlignmentErrExt{alignableMuon_->gemAlignmentErrorsExtended()};
688 
689  aligner.applyAlignments(&*muonDTGeometry_, dtAlignments.get(), dtAlignmentErrExt.get(), AlignTransform());
690  aligner.applyAlignments(&*muonCSCGeometry_, cscAlignments.get(), cscAlignmentErrExt.get(), AlignTransform());
691  aligner.applyAlignments(&*muonGEMGeometry_, gemAlignments.get(), gemAlignmentErrExt.get(), AlignTransform());
692  }
693 }
694 
695 //------------------------------------------------------------------------------
697  // Get Survey Rcds and add Survey Info
698  if (doTracker_ && useSurvey_) {
699  bool tkSurveyBool = watchTkSurveyRcd_.check(iSetup);
700  bool tkSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
701  edm::LogInfo("Alignment") << "watcher tksurveyrcd: " << tkSurveyBool;
702  edm::LogInfo("Alignment") << "watcher tksurveyerrrcd: " << tkSurveyErrBool;
703  if (tkSurveyBool || tkSurveyErrBool) {
704  edm::LogInfo("Alignment") << "ADDING THE SURVEY INFORMATION";
705  const Alignments* surveys = &iSetup.getData(tkSurveyToken_);
706  const SurveyErrors* surveyErrors = &iSetup.getData(tkSurvErrorToken_);
707 
708  surveyIndex_ = 0;
709  surveyValues_ = &*surveys;
710  surveyErrors_ = &*surveyErrors;
712  }
713  }
714 
715  if (doMuon_ && useSurvey_) {
716  bool DTSurveyBool = watchTkSurveyRcd_.check(iSetup);
717  bool DTSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
718  bool CSCSurveyBool = watchTkSurveyRcd_.check(iSetup);
719  bool CSCSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
720 
721  if (DTSurveyBool || DTSurveyErrBool || CSCSurveyBool || CSCSurveyErrBool) {
722  const Alignments* dtSurveys = &iSetup.getData(dtSurveyToken_);
723  const SurveyErrors* dtSurveyErrors = &iSetup.getData(dtSurvErrorToken_);
724  const Alignments* cscSurveys = &iSetup.getData(cscSurveyToken_);
725  const SurveyErrors* cscSurveyErrors = &iSetup.getData(cscSurvErrorToken_);
726 
727  surveyIndex_ = 0;
728  surveyValues_ = &*dtSurveys;
729  surveyErrors_ = &*dtSurveyErrors;
730  const auto& barrels = alignableMuon_->DTBarrel();
731  for (const auto& barrel : barrels)
733 
734  surveyIndex_ = 0;
735  surveyValues_ = &*cscSurveys;
736  surveyErrors_ = &*cscSurveyErrors;
737  const auto& endcaps = alignableMuon_->CSCEndcaps();
738  for (const auto& endcap : endcaps)
740  }
741  }
742 }
743 
744 //------------------------------------------------------------------------------
746  const auto& comps = ali->components();
747 
748  for (const auto& comp : comps)
750 
752 
753  if (ali->id() != error.rawId() || ali->alignableObjectId() != error.structureType()) {
754  throw cms::Exception("DatabaseError") << "Error reading survey info from DB. Mismatched id!";
755  }
756 
757  const auto& pos = surveyValues_->m_align[surveyIndex_].translation();
758  const auto& rot = surveyValues_->m_align[surveyIndex_].rotation();
759 
760  AlignableSurface surf(
761  align::PositionType(pos.x(), pos.y(), pos.z()),
762  align::RotationType(rot.xx(), rot.xy(), rot.xz(), rot.yx(), rot.yy(), rot.yz(), rot.zx(), rot.zy(), rot.zz()));
763 
764  surf.setWidth(ali->surface().width());
765  surf.setLength(ali->surface().length());
766 
767  ali->setSurvey(new SurveyDet(surf, error.matrix()));
768 
769  ++surveyIndex_;
770 }
771 
772 //------------------------------------------------------------------------------
774  for (const auto& monitor : monitors_)
775  monitor->endOfJob();
776 
777  if (alignmentAlgo_->processesEvents() && nevent_ == 0) {
778  return false;
779  }
780 
782  if (alignmentAlgo_->storeAlignments())
784  } else {
785  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::finish"
786  << "No payload to be stored!";
787  }
788 
789  // takes care of storing output of calibrations, but needs to be called only
790  // after 'storeAlignmentsToDB()'
791  for (const auto& iCal : calibrations_)
792  iCal->endOfJob();
793 
794  return true;
795 }
796 
797 //------------------------------------------------------------------------------
799  const auto runRangeSelectionVPSet = config_.getParameterSetVector("RunRangeSelection");
800 
801  // handle PCL use case
802  const auto& uniqueRunRanges =
803  (runAtPCL_ ? align::makeUniqueRunRanges(runRangeSelectionVPSet, firstRun_) : uniqueRunRanges_);
804 
805  std::vector<AlgebraicVector> beamSpotParameters;
806 
807  for (const auto& iRunRange : uniqueRunRanges) {
808  alignmentAlgo_->setParametersForRunRange(iRunRange);
809 
810  // Save alignments to database
812  writeForRunRange(iRunRange.first);
813  }
814 
815  // Deal with extra alignables, e.g. beam spot
816  if (alignableExtras_) {
817  auto& alis = alignableExtras_->beamSpot();
818  if (!alis.empty()) {
819  auto beamSpotAliPars = dynamic_cast<BeamSpotAlignmentParameters*>(alis[0]->alignmentParameters());
820  if (!beamSpotAliPars) {
821  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB\n"
822  << "First alignable of alignableExtras_ does not have "
823  << "'BeamSpotAlignmentParameters', while it should have.";
824  }
825 
826  beamSpotParameters.push_back(beamSpotAliPars->parameters());
827  }
828  }
829  }
830 
831  if (alignableExtras_) {
832  std::ostringstream bsOutput;
833 
834  auto itPar = beamSpotParameters.cbegin();
835  for (auto iRunRange = uniqueRunRanges.cbegin(); iRunRange != uniqueRunRanges.cend(); ++iRunRange, ++itPar) {
836  bsOutput << "Run range: " << (*iRunRange).first << " - " << (*iRunRange).second << "\n";
837  bsOutput << " Displacement: x=" << (*itPar)[0] << ", y=" << (*itPar)[1] << "\n";
838  bsOutput << " Slope: dx/dz=" << (*itPar)[2] << ", dy/dz=" << (*itPar)[3] << "\n";
839  }
840 
841  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB"
842  << "Parameters for alignable beamspot:\n"
843  << bsOutput.str();
844  }
845 }
846 
847 //------------------------------------------------------------------------------
849  if (doTracker_ and alignableTracker_) { // first tracker
850  const AlignTransform* trackerGlobal{nullptr}; // will be 'removed' from constants
851  if (globalPositions_) { // i.e. applied before in applyDB
853  }
854 
855  auto alignments = alignableTracker_->alignments();
856  auto alignmentErrors = alignableTracker_->alignmentErrors();
857  this->writeDB(alignments, tkAliRcdName_, alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time);
858 
859  // Save surface deformations to database
860  if (saveDeformationsToDB_) {
861  const auto alignmentSurfaceDeformations = *(alignableTracker_->surfaceDeformations());
862  this->writeDB(alignmentSurfaceDeformations, "TrackerSurfaceDeformationRcd", time);
863  }
864  }
865 
866  if (doMuon_ and alignableMuon_) { // now muon
867  const AlignTransform* muonGlobal{nullptr}; // will be 'removed' from constants
868  if (globalPositions_) { // i.e. applied before in applyDB
870  }
871  // Get alignments+errors, first DT - ownership taken over by writeDB(..), so no delete
872  auto alignments = alignableMuon_->dtAlignments();
873  auto alignmentErrors = alignableMuon_->dtAlignmentErrorsExtended();
874  this->writeDB(alignments, "DTAlignmentRcd", alignmentErrors, "DTAlignmentErrorExtendedRcd", muonGlobal, time);
875 
876  // Get alignments+errors, now CSC - ownership taken over by writeDB(..), so no delete
877  alignments = alignableMuon_->cscAlignments();
878  alignmentErrors = alignableMuon_->cscAlignmentErrorsExtended();
879  this->writeDB(alignments, "CSCAlignmentRcd", alignmentErrors, "CSCAlignmentErrorExtendedRcd", muonGlobal, time);
880  }
881 }
882 
883 //------------------------------------------------------------------------------
885  const std::string& alignRcd,
886  AlignmentErrorsExtended* alignmentErrors,
887  const std::string& errRcd,
888  const AlignTransform* globalCoordinates,
889  cond::Time_t time) const {
890  Alignments* tempAlignments = alignments;
891  AlignmentErrorsExtended* tempAlignmentErrorsExtended = alignmentErrors;
892 
893  // Call service
895  if (!poolDb.isAvailable()) { // Die if not available
896  delete tempAlignments; // promised to take over ownership...
897  delete tempAlignmentErrorsExtended; // ditto
898  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
899  }
900 
901  if (globalCoordinates // happens only if (applyDbAlignment_ == true)
902  && globalCoordinates->transform() != AlignTransform::Transform::Identity) {
903  tempAlignments = new Alignments(); // temporary storage for
904  tempAlignmentErrorsExtended = new AlignmentErrorsExtended(); // final alignments and errors
905 
906  GeometryAligner aligner;
907  aligner.removeGlobalTransform(
908  alignments, alignmentErrors, *globalCoordinates, tempAlignments, tempAlignmentErrorsExtended);
909 
910  delete alignments; // have to delete original alignments
911  delete alignmentErrors; // same thing for the errors
912 
913  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::writeDB"
914  << "globalCoordinates removed from alignments (" << alignRcd << ") and errors ("
915  << alignRcd << ").";
916  }
917 
918  if (saveToDB_) {
919  edm::LogInfo("Alignment") << "Writing Alignments for run " << time << " to " << alignRcd << ".";
920  poolDb->writeOneIOV<Alignments>(*tempAlignments, time, alignRcd);
921  } else {
922  delete tempAlignments; // ...otherwise we have to delete, as promised!
923  }
924 
925  if (saveApeToDB_) {
926  edm::LogInfo("Alignment") << "Writing AlignmentErrorsExtended for run " << time << " to " << errRcd << ".";
927  poolDb->writeOneIOV<AlignmentErrorsExtended>(*tempAlignmentErrorsExtended, time, errRcd);
928  } else {
929  delete tempAlignmentErrorsExtended; // ...otherwise we have to delete, as promised!
930  }
931 }
932 
933 //------------------------------------------------------------------------------
934 void AlignmentProducerBase::writeDB(const AlignmentSurfaceDeformations& alignmentSurfaceDeformations,
935  const std::string& surfaceDeformationRcd,
936  cond::Time_t time) const {
937  // Call service
939  if (!poolDb.isAvailable()) { // Die if not available
940  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
941  }
942 
943  if (saveDeformationsToDB_) {
944  edm::LogInfo("Alignment") << "Writing AlignmentSurfaceDeformations for run " << time << " to "
945  << surfaceDeformationRcd << ".";
946  poolDb->writeOneIOV<AlignmentSurfaceDeformations>(alignmentSurfaceDeformations, time, surfaceDeformationRcd);
947  }
948 }
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.
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
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
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
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.
bool getData(T &iHolder) const
Definition: EventSetup.h:122
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:151
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_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
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
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_