CMS 3D CMS Logo

AlignmentProducerBase.cc
Go to the documentation of this file.
2 
14 
16 
21 
25 
32 
33 
34 //------------------------------------------------------------------------------
36  doTracker_{config.getUntrackedParameter<bool>("doTracker")},
37  doMuon_{config.getUntrackedParameter<bool>("doMuon")},
38  useExtras_{config.getUntrackedParameter<bool>("useExtras")},
39  tjTkAssociationMapTag_{config.getParameter<edm::InputTag>("tjTkAssociationMapTag")},
40  beamSpotTag_{config.getParameter<edm::InputTag>("beamSpotTag")},
41  tkLasBeamTag_{config.getParameter<edm::InputTag>("tkLasBeamTag")},
42  clusterValueMapTag_{config.getParameter<edm::InputTag>("hitPrescaleMapTag")},
44  {align::makeUniqueRunRanges(config.getParameter<edm::VParameterSet>("RunRangeSelection"),
46  config_{config},
47  stNFixAlignables_{config.getParameter<int>("nFixAlignables")},
48  stRandomShift_{config.getParameter<double>("randomShift")},
49  stRandomRotation_{config.getParameter<double>("randomRotation")},
50  applyDbAlignment_{config.getUntrackedParameter<bool>("applyDbAlignment")},
51  checkDbAlignmentValidity_{config.getUntrackedParameter<bool>("checkDbAlignmentValidity")},
52  doMisalignmentScenario_{config.getParameter<bool>("doMisalignmentScenario")},
53  saveToDB_{config.getParameter<bool>("saveToDB")},
54  saveApeToDB_{config.getParameter<bool>("saveApeToDB")},
55  saveDeformationsToDB_{config.getParameter<bool>("saveDeformationsToDB")},
56  useSurvey_{config.getParameter<bool>("useSurvey")},
57  enableAlignableUpdates_{config.getParameter<bool>("enableAlignableUpdates")}
58 {
59  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::AlignmentProducerBase";
60 
61  const auto& algoConfig = config_.getParameterSet("algoConfig");
62  if (hasParameter<bool>(config_, "runAtPCL")) {
63  // configured in main config?
64  runAtPCL_ = config_.getParameter<bool>("runAtPCL");
65 
66  if (hasParameter<bool>(algoConfig, "runAtPCL") &&
67  (runAtPCL_ != algoConfig.getParameter<bool>("runAtPCL"))) {
68  throw cms::Exception("BadConfig")
69  << "Inconsistent settings for 'runAtPCL' in configuration of the "
70  << "alignment producer and the alignment algorithm.";
71  }
72 
73  } else if (hasParameter<bool>(algoConfig, "runAtPCL")) {
74  // configured in algo config?
75  runAtPCL_ = algoConfig.getParameter<bool>("runAtPCL");
76 
77  } else {
78  // assume 'false' if it was not configured
79  runAtPCL_ = false;
80  }
81 
85 }
86 
87 
88 
89 //------------------------------------------------------------------------------
91 {
92  for (auto& iCal: calibrations_) delete iCal;
93 
95  delete alignableExtras_;
96  delete alignableTracker_;
97  delete alignableMuon_;
98 }
99 
100 
101 //------------------------------------------------------------------------------
102 void
104 {
105  if (isDuringLoop_) return;
106  if (!isAlgoInitialized_) {
107  throw cms::Exception("LogicError")
108  << "@SUB=AlignmentProducerBase::startProcessing\n"
109  << "Trying to start event processing before initializing the alignment "
110  << "algorithm.";
111  }
112 
113  nevent_ = 0;
114 
115  alignmentAlgo_->startNewLoop();
116 
117  // FIXME: Should this be done in algorithm::startNewLoop()??
118  for (const auto& iCal: calibrations_) iCal->startNewLoop();
119  for (const auto& monitor: monitors_) monitor->startingNewLoop();
120 
122  isDuringLoop_ = true;
123 }
124 
125 
126 //------------------------------------------------------------------------------
127 void
129 {
130  if (!isDuringLoop_) return;
131 
132  edm::LogInfo("Alignment")
133  << "@SUB=AlignmentProducerBase::terminateProcessing"
134  << "Terminating algorithm.";
135  if (setup) {
136  alignmentAlgo_->terminate(*setup);
137  } else {
138  alignmentAlgo_->terminate();
139  }
140 
141  // FIXME: Should this be done in algorithm::terminate()??
142  for (const auto& iCal:calibrations_) iCal->endOfLoop();
143  for (const auto& monitor: monitors_) monitor->endOfLoop();
144 
145  isDuringLoop_ = false;
146 }
147 
148 
149 //------------------------------------------------------------------------------
150 bool
152  const edm::EventSetup& setup)
153 {
154  if (setupChanged(setup)) {
155  edm::LogInfo("Alignment")
156  << "@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")
175  << "@SUB=AlignmentProducerBase::processEvent"
176  << "Skipping event. The current configuration of the alignment algorithm "
177  << "does not need to process any events.";
178  return false;
179  }
180 
181  // reading in survey records
182  readInSurveyRcds(setup);
183 
184  // Printout event number
185  for ( int i=10; i<10000000; i*=10 ) {
186  if ( nevent_<10*i && (nevent_%i)==0 ) {
187  edm::LogInfo("Alignment")
188  << "@SUB=AlignmentProducerBase::processEvent"
189  << "Events processed: " << nevent_;
190  }
191  }
192 
193  // Retrieve trajectories and tracks from the event
194  // -> merely skip if collection is empty
195  edm::Handle<TrajTrackAssociationCollection> handleTrajTracksCollection;
196 
197  if (getTrajTrackAssociationCollection(event, handleTrajTracksCollection)) {
198 
199  // Form pairs of trajectories and tracks
200  ConstTrajTrackPairs trajTracks;
201  for (auto iter = handleTrajTracksCollection->begin();
202  iter != handleTrajTracksCollection->end();
203  ++iter) {
204  trajTracks.push_back(ConstTrajTrackPair(&(*(*iter).key), &(*(*iter).val)));
205  }
206 
207  // Run the alignment algorithm with its input
208  const AliClusterValueMap* clusterValueMapPtr{nullptr};
209  if (clusterValueMapTag_.encode().size()) {
210  edm::Handle<AliClusterValueMap> clusterValueMap;
211  getAliClusterValueMap(event, clusterValueMap);
212  clusterValueMapPtr = &(*clusterValueMap);
213  }
214 
215 
217  trajTracks,
218  *beamSpot_,
219  clusterValueMapPtr};
220  alignmentAlgo_->run(setup, eventInfo);
221 
222 
223  for (const auto& monitor: monitors_) {
224  monitor->duringLoop(event, setup, trajTracks); // forward eventInfo?
225  }
226  } else {
227  edm::LogError("Alignment")
228  << "@SUB=AlignmentProducerBase::processEvent"
229  << "No track collection found: skipping event";
230  }
231 
232  return true;
233 }
234 
235 
236 //------------------------------------------------------------------------------
237 void
239 {
240  const bool changed{setupChanged(setup)};
241  if (changed) {
242  edm::LogInfo("Alignment")
243  << "@SUB=AlignmentProducerBase::beginRunImpl"
244  << "EventSetup-Record changed.";
245 
246  // updatable alignables are currently not used at PCL, but event setup
247  // changes require a complete re-initialization
248  if (runAtPCL_) {
249  initAlignmentAlgorithm(setup, /* update = */ false);
250  } else if (enableAlignableUpdates_) {
251  initAlignmentAlgorithm(setup, /* update = */ true);
252  }
253  }
254 
255  alignmentAlgo_->beginRun(run, setup,
256  changed && (runAtPCL_ || enableAlignableUpdates_));
257 
258  //store the first run analyzed to be used for setting the IOV (for PCL)
259  if (firstRun_ > static_cast<cond::Time_t>(run.id().run())) {
260  firstRun_ = static_cast<cond::Time_t>(run.id().run());
261  }
262 }
263 
264 
265 //------------------------------------------------------------------------------
266 void
268 {
269  if (tkLasBeamTag_.encode().size()) {
272  getTkFittedLasBeamCollection(run, lasBeams);
273  getTsosVectorCollection(run, tsoses);
274 
275  alignmentAlgo_->endRun(EndRunInfo(run.id(), &(*lasBeams), &(*tsoses)), setup);
276  } else {
277  edm::LogInfo("Alignment")
278  << "@SUB=AlignmentProducerBase::endRunImpl"
279  << "No Tk LAS beams to forward to algorithm.";
280  alignmentAlgo_->endRun(EndRunInfo(run.id(), 0, 0), setup);
281  }
282 
283 }
284 
285 
286 //------------------------------------------------------------------------------
287 void
289  const edm::EventSetup& setup)
290 {
291  // Do not forward edm::LuminosityBlock
292  alignmentAlgo_->beginLuminosityBlock(setup);
293 }
294 
295 
296 //------------------------------------------------------------------------------
297 void
299  const edm::EventSetup& setup)
300 {
301  // Do not forward edm::LuminosityBlock
302  alignmentAlgo_->endLuminosityBlock(setup);
303 }
304 
305 
306 
307 //------------------------------------------------------------------------------
308 void
310 {
311  auto algoConfig = config_.getParameter<edm::ParameterSet>("algoConfig");
312  algoConfig.addUntrackedParameter("RunRangeSelection",
313  config_.getParameter<edm::VParameterSet>("RunRangeSelection"));
314  algoConfig.addUntrackedParameter<align::RunNumber>("firstIOV",
315  runAtPCL_ ?
316  1 :
317  uniqueRunRanges_.front().first);
318  algoConfig.addUntrackedParameter("enableAlignableUpdates",
320 
321  const auto& algoName = algoConfig.getParameter<std::string>("algoName");
322  alignmentAlgo_ = std::unique_ptr<AlignmentAlgorithmBase>
324 
325  if (!alignmentAlgo_) {
326  throw cms::Exception("BadConfig")
327  << "Couldn't find the called alignment algorithm: " << algoName;
328  }
329 }
330 
331 
332 //------------------------------------------------------------------------------
333 void
335 {
336  const auto& monitorConfig = config_.getParameter<edm::ParameterSet>("monitorConfig");
337  auto monitors = monitorConfig.getUntrackedParameter<std::vector<std::string> >("monitors");
338  for (const auto& miter: monitors) {
339  std::unique_ptr<AlignmentMonitorBase> newMonitor
341  ->create(miter, monitorConfig.getUntrackedParameterSet(miter))};
342 
343  if (!newMonitor) {
344  throw cms::Exception("BadConfig") << "Couldn't find monitor named " << miter;
345  }
346  monitors_.emplace_back(std::move(newMonitor));
347  }
348 }
349 
350 
351 //------------------------------------------------------------------------------
352 void
354 {
355  const auto& calibrations = config_.getParameter<edm::VParameterSet>("calibrations");
356  for (const auto& iCalib: calibrations) {
358  ->create(iCalib.getParameter<std::string>("calibrationName"),
359  iCalib));
360  }
361 
362  // Not all algorithms support calibrations - so do not pass empty vector
363  // and throw if non-empty and not supported:
364  if (!calibrations_.empty()) {
365  if (alignmentAlgo_->supportsCalibrations()) {
366  alignmentAlgo_->addCalibrations(calibrations_);
367 
368  } else {
369  throw cms::Exception("BadConfig")
370  << "@SUB=AlignmentProducerBase::createCalibrations\n"
371  << "Configured " << calibrations_.size() << " calibration(s) "
372  << "for algorithm not supporting it.";
373  }
374  }
375 }
376 
377 
378 //------------------------------------------------------------------------------
379 bool
381 {
382  bool changed{false};
383 
384  if (watchIdealGeometryRcd_.check(setup)) {
385  changed = true;
386  }
387 
388  if (watchGlobalPositionRcd_.check(setup)) {
389  changed = true;
390  }
391 
392  if (doTracker_) {
393  if (watchTrackerAlRcd_.check(setup)) {
394  changed = true;
395  }
396 
397  if (watchTrackerAlErrorExtRcd_.check(setup)) {
398  changed = true;
399  }
400 
401  if (watchTrackerSurDeRcd_.check(setup)) {
402  changed = true;
403  }
404  }
405 
406  if (doMuon_) {
407  if (watchDTAlRcd_.check(setup)) {
408  changed = true;
409  }
410 
411  if (watchDTAlErrExtRcd_.check(setup)) {
412  changed = true;
413  }
414 
415  if (watchCSCAlRcd_.check(setup)) {
416  changed = true;
417  }
418 
419  if (watchCSCAlErrExtRcd_.check(setup)) {
420  changed = true;
421  }
422  }
423 
424  /* TODO: ExtraAlignables: Which record(s) to check?
425  *
426  if (useExtras_) {}
427  */
428 
429  return changed;
430 }
431 
432 
433 //------------------------------------------------------------------------------
434 void
436  bool update)
437 {
438  auto isTrueUpdate = update && isAlgoInitialized_;
439 
440  // Retrieve tracker topology from geometry
441  edm::ESHandle<TrackerTopology> tTopoHandle;
442  setup.get<TrackerTopologyRcd>().get(tTopoHandle);
443  const TrackerTopology* const tTopo = tTopoHandle.product();
444 
445  // Create the geometries from the ideal geometries
446  createGeometries(setup, tTopo);
447 
448  applyAlignmentsToDB(setup);
449  createAlignables(tTopo, isTrueUpdate);
452 
453  // Initialize alignment algorithm and integrated calibration and pass the
454  // latter to algorithm
455  edm::LogInfo("Alignment")
456  << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
457  << "Initializing alignment algorithm.";
458  alignmentAlgo_->initialize(setup,
463  isAlgoInitialized_ = true;
464 
466 
467  if (!isTrueUpdate) { // only needed the first time
468  for (const auto& iCal: calibrations_) {
470  }
471  for (const auto& monitor: monitors_) {
473  }
474  }
475  startProcessing(); // needed if derived class is non-EDLooper-based
476  // has no effect, if called during loop
477 }
478 
479 
480 //------------------------------------------------------------------------------
481 void
483 {
484  getBeamSpot(event, beamSpot_);
485 
486  if (nevent_== 0 && alignableExtras_) {
487  edm::LogInfo("Alignment")
488  << "@SUB=AlignmentProducerBase::initBeamSpot"
489  << "Initializing AlignableBeamSpot";
490 
492  beamSpot_->y0(),
493  beamSpot_->z0(),
494  beamSpot_->dxdz(),
495  beamSpot_->dydz());
496  }
497 }
498 
499 
500 //------------------------------------------------------------------------------
501 void
503  const TrackerTopology* tTopo)
504 {
505  if (doTracker_) {
506  edm::ESHandle<GeometricDet> geometricDet;
507  iSetup.get<IdealGeometryRecord>().get(geometricDet);
508 
510  iSetup.get<PTrackerParametersRcd>().get(ptp);
511 
512  TrackerGeomBuilderFromGeometricDet trackerBuilder;
513 
514  trackerGeometry_ = std::shared_ptr<TrackerGeometry>
515  (trackerBuilder.build(&(*geometricDet), *ptp, tTopo));
516  }
517 
518  if (doMuon_) {
520  iSetup.get<IdealGeometryRecord>().get(cpv);
522  iSetup.get<MuonNumberingRecord>().get(mdc);
523  DTGeometryBuilderFromDDD DTGeometryBuilder;
525  muonDTGeometry_ = std::make_shared<DTGeometry>();
526  DTGeometryBuilder.build(muonDTGeometry_, &(*cpv), *mdc);
527  muonCSCGeometry_ = std::make_shared<CSCGeometry>();
528  CSCGeometryBuilder.build(muonCSCGeometry_, &(*cpv), *mdc );
529  }
530 }
531 
532 
533 //------------------------------------------------------------------------------
534 void
536 {
537  // Retrieve and apply alignments, if requested (requires z setup)
538  if (applyDbAlignment_) {
539  // we need GlobalPositionRcd - and have to keep track for later removal
540  // before writing again to DB...
541 
542  edm::ESHandle<Alignments> globalAlignments;
543  setup.get<GlobalPositionRcd>().get(globalAlignments);
544  globalPositions_ = std::make_unique<Alignments>(*globalAlignments);
545 
546  if (doTracker_) {
550  (trackerGeometry_.get(), setup,
552  );
553 
554  applyDB<TrackerGeometry,
556  }
557 
558  if (doMuon_) {
562  (muonDTGeometry_.get(), setup,
564  );
565 
569  (muonCSCGeometry_.get(), setup,
571  );
572  }
573  }
574 }
575 
576 
577 //------------------------------------------------------------------------------
578 void
580 {
581  if (doTracker_) {
582  if (update) {
584  } else {
586  }
587  }
588 
589  if (doMuon_) {
590  if (update) {
592  } else {
594  }
595  }
596 
597  if (useExtras_) {
598  if (update) {
599  // FIXME: Requires further code changes to track beam spot condition changes
600  } else {
602  }
603  }
604 }
605 
606 
607 //------------------------------------------------------------------------------
608 void
610 {
611  // Create alignment parameter builder
612  edm::LogInfo("Alignment")
613  << "@SUB=AlignmentProducerBase::buildParameterStore"
614  << "Creating AlignmentParameterBuilder";
615 
616  const auto& alParamBuildCfg =
617  config_.getParameter<edm::ParameterSet>("ParameterBuilder");
618  const auto& alParamStoreCfg =
619  config_.getParameter<edm::ParameterSet>("ParameterStore");
620 
621  AlignmentParameterBuilder alignmentParameterBuilder{alignableTracker_,
624  alParamBuildCfg};
625 
626  // Fix alignables if requested
627  if (stNFixAlignables_ > 0) {
628  alignmentParameterBuilder.fixAlignables(stNFixAlignables_);
629  }
630 
631  // Get list of alignables
632  const auto& alignables = alignmentParameterBuilder.alignables();
633  edm::LogInfo("Alignment")
634  << "@SUB=AlignmentProducerBase::buildParameterStore"
635  << "got " << alignables.size() << " alignables";
636 
637  // Create AlignmentParameterStore
639  new AlignmentParameterStore(alignables, alParamStoreCfg);
640  edm::LogInfo("Alignment")
641  << "@SUB=AlignmentProducerBase::buildParameterStore"
642  << "AlignmentParameterStore created!";
643 }
644 
645 
646 //------------------------------------------------------------------------------
647 void
649 {
650  // Apply misalignment scenario to alignable tracker and muon if requested
651  // WARNING: this assumes scenarioConfig can be passed to both muon and tracker
652 
654  edm::LogInfo("Alignment")
655  << "@SUB=AlignmentProducerBase::applyMisalignment"
656  << "Applying misalignment scenario to "
657  << (doTracker_ ? "tracker" : "")
658  << (doMuon_ ? (doTracker_ ? " and muon" : "muon") : ".");
659 
660  const auto& scenarioConfig = config_.getParameterSet("MisalignmentScenario");
661 
662  if (doTracker_) {
663  TrackerScenarioBuilder scenarioBuilder(alignableTracker_);
664  scenarioBuilder.applyScenario(scenarioConfig);
665  }
666  if (doMuon_) {
667  MuonScenarioBuilder muonScenarioBuilder(alignableMuon_);
668  muonScenarioBuilder.applyScenario(scenarioConfig);
669  }
670 
671  } else {
672  edm::LogInfo("Alignment")
673  << "@SUB=AlignmentProducerBase::applyMisalignment"
674  << "NOT applying misalignment scenario!";
675  }
676 
677  // Apply simple misalignment
678  const auto& sParSel =
679  config_.getParameter<std::string>("parameterSelectorSimple");
682 }
683 
684 
685 // ----------------------------------------------------------------------------
686 void
688  const std::string &selection,
689  float shift, float rot, bool local)
690 {
691 
692  std::ostringstream output; // collecting output
693 
694  if (shift > 0. || rot > 0.) {
695  output << "Adding random flat shift of max size " << shift
696  << " and adding random flat rotation of max size " << rot <<" to ";
697 
698  std::vector<bool> commSel(0);
699  if (selection != "-1") {
700  AlignmentParameterSelector aSelector(0,0); // no alignable needed here...
701  const std::vector<char> cSel(aSelector.convertParamSel(selection));
702  if (cSel.size() < RigidBodyAlignmentParameters::N_PARAM) {
703  throw cms::Exception("BadConfig")
704  << "[AlignmentProducerBase::simpleMisalignment_]\n"
705  << "Expect selection string '" << selection << "' to be at least of length "
706  << RigidBodyAlignmentParameters::N_PARAM << " or to be '-1'.\n"
707  << "(Most probably you have to adjust the parameter 'parameterSelectorSimple'.)";
708  }
709  for (const auto& cIter: cSel) {
710  commSel.push_back(cIter == '0' ? false : true);
711  }
712  output << "parameters defined by (" << selection
713  << "), representing (x,y,z,alpha,beta,gamma),";
714  } else {
715  output << "the active parameters of each alignable,";
716  }
717  output << " in " << (local ? "local" : "global") << " frame.";
718 
719  for (const auto& ali: alivec) {
720  std::vector<bool> mysel(commSel.empty() ? ali->alignmentParameters()->selector() : commSel);
721 
722  if (std::abs(shift)>0.00001) {
723  double s0 = 0., s1 = 0., s2 = 0.;
724  if (mysel[RigidBodyAlignmentParameters::dx]) s0 = shift * double(random()%1000-500)/500.;
725  if (mysel[RigidBodyAlignmentParameters::dy]) s1 = shift * double(random()%1000-500)/500.;
726  if (mysel[RigidBodyAlignmentParameters::dz]) s2 = shift * double(random()%1000-500)/500.;
727 
728  if (local) ali->move(ali->surface().toGlobal(align::LocalVector(s0,s1,s2)));
729  else ali->move(align::GlobalVector(s0,s1,s2));
730 
731  //AlignmentPositionError ape(dx,dy,dz);
732  //ali->addAlignmentPositionError(ape);
733  }
734 
735  if (std::abs(rot)>0.00001) {
737  if (mysel[RigidBodyAlignmentParameters::dalpha]) r(1)=rot*double(random()%1000-500)/500.;
738  if (mysel[RigidBodyAlignmentParameters::dbeta]) r(2)=rot*double(random()%1000-500)/500.;
739  if (mysel[RigidBodyAlignmentParameters::dgamma]) r(3)=rot*double(random()%1000-500)/500.;
740 
741  const align::RotationType mrot = align::toMatrix(r);
742  if (local) ali->rotateInLocalFrame(mrot);
743  else ali->rotateInGlobalFrame(mrot);
744 
745  //ali->addAlignmentPositionErrorFromRotation(mrot);
746  }
747  } // end loop on alignables
748  } else {
749  output << "No simple misalignment added!";
750  }
751  edm::LogInfo("Alignment")
752  << "@SUB=AlignmentProducerBase::simpleMisalignment" << output.str();
753 }
754 
755 
756 //------------------------------------------------------------------------------
757 void
759 {
760  edm::LogInfo("Alignment")
761  << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry"
762  << "Now physically apply alignments to geometry...";
763 
764  // Propagate changes to reconstruction geometry (from initialisation or iteration)
765  GeometryAligner aligner;
766 
767  if (doTracker_) {
768  if (!alignableTracker_) {
769  throw cms::Exception("LogicError")
770  << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
771  << "Trying to apply tracker alignment before creating it.";
772  }
773 
774  std::unique_ptr<Alignments> alignments{alignableTracker_->alignments()};
775  std::unique_ptr<AlignmentErrorsExtended>
776  alignmentErrExt{alignableTracker_->alignmentErrors()};
777  std::unique_ptr<AlignmentSurfaceDeformations>
778  aliDeforms{alignableTracker_->surfaceDeformations()};
779 
780  aligner.applyAlignments(trackerGeometry_.get(), alignments.get(),
781  alignmentErrExt.get(), AlignTransform());
782  aligner.attachSurfaceDeformations(trackerGeometry_.get(), aliDeforms.get());
783  }
784 
785  if (doMuon_) {
786  if (!alignableMuon_) {
787  throw cms::Exception("LogicError")
788  << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
789  << "Trying to apply muon alignment before creating it.";
790  }
791 
792  std::unique_ptr<Alignments> dtAlignments{alignableMuon_->dtAlignments()};
793  std::unique_ptr<Alignments> cscAlignments{alignableMuon_->cscAlignments()};
794 
795  std::unique_ptr<AlignmentErrorsExtended>
796  dtAlignmentErrExt{alignableMuon_->dtAlignmentErrorsExtended()};
797  std::unique_ptr<AlignmentErrorsExtended>
798  cscAlignmentErrExt{alignableMuon_->cscAlignmentErrorsExtended()};
799 
800  aligner.applyAlignments(muonDTGeometry_.get(), dtAlignments.get(),
801  dtAlignmentErrExt.get(), AlignTransform());
802  aligner.applyAlignments(muonCSCGeometry_.get(), cscAlignments.get(),
803  cscAlignmentErrExt.get(), AlignTransform());
804  }
805 }
806 
807 
808 //------------------------------------------------------------------------------
809 void
811 {
812 
813  // Get Survey Rcds and add Survey Info
814  if ( doTracker_ && useSurvey_ ){
815  bool tkSurveyBool = watchTkSurveyRcd_.check(iSetup);
816  bool tkSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
817  edm::LogInfo("Alignment") << "watcher tksurveyrcd: " << tkSurveyBool;
818  edm::LogInfo("Alignment") << "watcher tksurveyerrrcd: " << tkSurveyErrBool;
819  if ( tkSurveyBool || tkSurveyErrBool){
820 
821  edm::LogInfo("Alignment") << "ADDING THE SURVEY INFORMATION";
823  edm::ESHandle<SurveyErrors> surveyErrors;
824 
825  iSetup.get<TrackerSurveyRcd>().get(surveys);
826  iSetup.get<TrackerSurveyErrorExtendedRcd>().get(surveyErrors);
827 
828  surveyIndex_ = 0;
829  surveyValues_ = &*surveys;
830  surveyErrors_ = &*surveyErrors;
832  }
833  }
834 
835  if ( doMuon_ && useSurvey_) {
836  bool DTSurveyBool = watchTkSurveyRcd_.check(iSetup);
837  bool DTSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
838  bool CSCSurveyBool = watchTkSurveyRcd_.check(iSetup);
839  bool CSCSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
840 
841  if ( DTSurveyBool || DTSurveyErrBool || CSCSurveyBool || CSCSurveyErrBool ){
842  edm::ESHandle<Alignments> dtSurveys;
843  edm::ESHandle<SurveyErrors> dtSurveyErrors;
844  edm::ESHandle<Alignments> cscSurveys;
845  edm::ESHandle<SurveyErrors> cscSurveyErrors;
846 
847  iSetup.get<DTSurveyRcd>().get(dtSurveys);
848  iSetup.get<DTSurveyErrorExtendedRcd>().get(dtSurveyErrors);
849  iSetup.get<CSCSurveyRcd>().get(cscSurveys);
850  iSetup.get<CSCSurveyErrorExtendedRcd>().get(cscSurveyErrors);
851 
852  surveyIndex_ = 0;
853  surveyValues_ = &*dtSurveys;
854  surveyErrors_ = &*dtSurveyErrors;
855  const auto& barrels = alignableMuon_->DTBarrel();
856  for (const auto& barrel: barrels) addSurveyInfo(barrel);
857 
858  surveyIndex_ = 0;
859  surveyValues_ = &*cscSurveys;
860  surveyErrors_ = &*cscSurveyErrors;
861  const auto& endcaps = alignableMuon_->CSCEndcaps();
862  for (const auto& endcap: endcaps) addSurveyInfo(endcap);
863 
864  }
865  }
866 
867 }
868 
869 
870 //------------------------------------------------------------------------------
871 void
873 {
874  const auto& comps = ali->components();
875 
876  for (const auto& comp: comps) addSurveyInfo(comp);
877 
879 
880  if ( ali->id() != error.rawId() ||
881  ali->alignableObjectId() != error.structureType() )
882  {
883  throw cms::Exception("DatabaseError")
884  << "Error reading survey info from DB. Mismatched id!";
885  }
886 
887  const auto& pos = surveyValues_->m_align[surveyIndex_].translation();
888  const auto& rot = surveyValues_->m_align[surveyIndex_].rotation();
889 
890  AlignableSurface surf(align::PositionType(pos.x(), pos.y(), pos.z()),
891  align::RotationType(rot.xx(), rot.xy(), rot.xz(),
892  rot.yx(), rot.yy(), rot.yz(),
893  rot.zx(), rot.zy(), rot.zz()));
894 
895  surf.setWidth(ali->surface().width());
896  surf.setLength(ali->surface().length());
897 
898  ali->setSurvey(new SurveyDet(surf, error.matrix()));
899 
900  ++surveyIndex_;
901 }
902 
903 
904 //------------------------------------------------------------------------------
905 bool
907 {
908 
909  for (const auto& monitor: monitors_) monitor->endOfJob();
910 
911  if (alignmentAlgo_->processesEvents() && nevent_ == 0) {
912  return false;
913  }
914 
915  for (const auto& iCal:calibrations_) iCal->endOfJob();
916 
918  if (alignmentAlgo_->storeAlignments()) storeAlignmentsToDB();
919  } else {
920  edm::LogInfo("Alignment")
921  << "@SUB=AlignmentProducerBase::finish"
922  << "No payload to be stored!";
923  }
924 
925  return true;
926 }
927 
928 
929 //------------------------------------------------------------------------------
930 void
932 {
933  const auto runRangeSelectionVPSet =
934  config_.getParameterSetVector("RunRangeSelection");
935 
936  // handle PCL use case
937  const auto& uniqueRunRanges =
938  (runAtPCL_ ?
939  align::makeUniqueRunRanges(runRangeSelectionVPSet, firstRun_) :
941 
942  std::vector<AlgebraicVector> beamSpotParameters;
943 
944  for (const auto& iRunRange: uniqueRunRanges) {
945 
946  alignmentAlgo_->setParametersForRunRange(iRunRange);
947 
948  // Save alignments to database
950  writeForRunRange(iRunRange.first);
951  }
952 
953  // Deal with extra alignables, e.g. beam spot
954  if (alignableExtras_) {
955  auto& alis = alignableExtras_->beamSpot();
956  if (!alis.empty()) {
957  auto beamSpotAliPars =
958  dynamic_cast<BeamSpotAlignmentParameters*>(alis[0]->alignmentParameters());
959  if (!beamSpotAliPars) {
960  throw cms::Exception("LogicError")
961  << "@SUB=AlignmentProducerBase::storeAlignmentsToDB\n"
962  << "First alignable of alignableExtras_ does not have "
963  << "'BeamSpotAlignmentParameters', while it should have.";
964  }
965 
966  beamSpotParameters.push_back(beamSpotAliPars->parameters());
967  }
968  }
969  }
970 
971  if (alignableExtras_) {
972  std::ostringstream bsOutput;
973 
974  auto itPar = beamSpotParameters.cbegin();
975  for (auto iRunRange = uniqueRunRanges.cbegin();
976  iRunRange != uniqueRunRanges.cend();
977  ++iRunRange, ++itPar) {
978  bsOutput << "Run range: " << (*iRunRange).first << " - " << (*iRunRange).second << "\n";
979  bsOutput << " Displacement: x=" << (*itPar)[0] << ", y=" << (*itPar)[1] << "\n";
980  bsOutput << " Slope: dx/dz=" << (*itPar)[2] << ", dy/dz=" << (*itPar)[3] << "\n";
981  }
982 
983  edm::LogInfo("Alignment")
984  << "@SUB=AlignmentProducerBase::storeAlignmentsToDB"
985  << "Parameters for alignable beamspot:\n" << bsOutput.str();
986  }
987 }
988 
989 
990 //------------------------------------------------------------------------------
991 void
993 {
994  if (doTracker_) { // first tracker
995  const AlignTransform* trackerGlobal{nullptr}; // will be 'removed' from constants
996  if (globalPositions_) { // i.e. applied before in applyDB
999  }
1000 
1001  auto alignments = alignableTracker_->alignments();
1002  auto alignmentErrors = alignableTracker_->alignmentErrors();
1003  this->writeDB(alignments, "TrackerAlignmentRcd",
1004  alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal,
1005  time);
1006 
1007  // Save surface deformations to database
1008  if (saveDeformationsToDB_) {
1009  auto alignmentSurfaceDeformations = alignableTracker_->surfaceDeformations();
1010  this->writeDB(alignmentSurfaceDeformations, "TrackerSurfaceDeformationRcd", time);
1011  }
1012  }
1013 
1014  if (doMuon_) { // now muon
1015  const AlignTransform* muonGlobal{nullptr}; // will be 'removed' from constants
1016  if (globalPositions_) { // i.e. applied before in applyDB
1018  DetId(DetId::Muon));
1019  }
1020  // Get alignments+errors, first DT - ownership taken over by writeDB(..), so no delete
1021  auto alignments = alignableMuon_->dtAlignments();
1022  auto alignmentErrors = alignableMuon_->dtAlignmentErrorsExtended();
1023  this->writeDB(alignments, "DTAlignmentRcd",
1024  alignmentErrors, "DTAlignmentErrorExtendedRcd", muonGlobal,
1025  time);
1026 
1027  // Get alignments+errors, now CSC - ownership taken over by writeDB(..), so no delete
1028  alignments = alignableMuon_->cscAlignments();
1029  alignmentErrors = alignableMuon_->cscAlignmentErrorsExtended();
1030  this->writeDB(alignments, "CSCAlignmentRcd",
1031  alignmentErrors, "CSCAlignmentErrorExtendedRcd", muonGlobal,
1032  time);
1033  }
1034 }
1035 
1036 
1037 //------------------------------------------------------------------------------
1039  const std::string& alignRcd,
1040  AlignmentErrorsExtended* alignmentErrors,
1041  const std::string& errRcd,
1042  const AlignTransform* globalCoordinates,
1043  cond::Time_t time) const
1044 {
1045  Alignments* tempAlignments = alignments;
1046  AlignmentErrorsExtended* tempAlignmentErrorsExtended = alignmentErrors;
1047 
1048  // Call service
1050  if (!poolDb.isAvailable()) { // Die if not available
1051  delete tempAlignments; // promised to take over ownership...
1052  delete tempAlignmentErrorsExtended; // dito
1053  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
1054  }
1055 
1056  if (globalCoordinates // happens only if (applyDbAlignment_ == true)
1057  && globalCoordinates->transform() != AlignTransform::Transform::Identity) {
1058 
1059  tempAlignments = new Alignments(); // temporary storage for
1060  tempAlignmentErrorsExtended = new AlignmentErrorsExtended(); // final alignments and errors
1061 
1062  GeometryAligner aligner;
1063  aligner.removeGlobalTransform(alignments, alignmentErrors,
1064  *globalCoordinates,
1065  tempAlignments, tempAlignmentErrorsExtended);
1066 
1067  delete alignments; // have to delete original alignments
1068  delete alignmentErrors; // same thing for the errors
1069 
1070  edm::LogInfo("Alignment")
1071  << "@SUB=AlignmentProducerBase::writeDB"
1072  << "globalCoordinates removed from alignments (" << alignRcd
1073  << ") and errors (" << alignRcd << ").";
1074  }
1075 
1076  if (saveToDB_) {
1077  edm::LogInfo("Alignment") << "Writing Alignments for run " << time
1078  << " to " << alignRcd << ".";
1079  poolDb->writeOne<Alignments>(tempAlignments, time, alignRcd);
1080  } else { // poolDb->writeOne(..) takes over 'alignments' ownership,...
1081  delete tempAlignments; // ...otherwise we have to delete, as promised!
1082  }
1083 
1084  if (saveApeToDB_) {
1085  edm::LogInfo("Alignment") << "Writing AlignmentErrorsExtended for run " << time
1086  << " to " << errRcd << ".";
1087  poolDb->writeOne<AlignmentErrorsExtended>(tempAlignmentErrorsExtended, time, errRcd);
1088  } else { // poolDb->writeOne(..) takes over 'alignmentErrors' ownership,...
1089  delete tempAlignmentErrorsExtended; // ...otherwise we have to delete, as promised!
1090  }
1091 }
1092 
1093 
1094 //------------------------------------------------------------------------------
1096  const std::string& surfaceDeformationRcd,
1097  cond::Time_t time) const
1098 {
1099  // Call service
1101  if (!poolDb.isAvailable()) { // Die if not available
1102  delete alignmentSurfaceDeformations; // promised to take over ownership...
1103  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
1104  }
1105 
1106  if (saveDeformationsToDB_) {
1107  edm::LogInfo("Alignment") << "Writing AlignmentSurfaceDeformations for run " << time
1108  << " to " << surfaceDeformationRcd << ".";
1109  poolDb->writeOne<AlignmentSurfaceDeformations>(alignmentSurfaceDeformations, time,
1110  surfaceDeformationRcd);
1111  } else { // poolDb->writeOne(..) takes over 'surfaceDeformation' ownership,...
1112  delete alignmentSurfaceDeformations; // ...otherwise we have to delete, as promised!
1113  }
1114 }
1115 
1116 
1117 //------------------------------------------------------------------------------
1118 template<typename T>
1119 bool
1121  const std::string& name)
1122 {
1123  try {
1124  config.getParameter<T>(name);
1125  } catch (const edm::Exception& e) {
1127  if (e.message().find("MissingParameter") != std::string::npos) {
1128  return false;
1129  } else {
1130  throw;
1131  }
1132  } else {
1133  throw;
1134  }
1135  }
1136 
1137  return true;
1138 }
Code categoryCode() const
Definition: EDMException.h:93
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:22
align::Scalar width() const
T getParameter(std::string const &) const
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:189
double z0() const
z coordinate
Definition: BeamSpot.h:68
T getUntrackedParameter(std::string const &, T const &) const
VParameterSet const & getParameterSetVector(std::string const &name) const
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
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.
void writeDB(Alignments *, const std::string &, AlignmentErrorsExtended *, const std::string &, const AlignTransform *, cond::Time_t) const
RunID const & id() const
Definition: RunBase.h:39
std::shared_ptr< CSCGeometry > muonCSCGeometry_
Builds a scenario from configuration and applies it to the alignable Muon.
Alignment producer base class.
RunNumber_t run() const
Definition: RunID.h:39
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::ESWatcher< DTAlignmentErrorExtendedRcd > watchDTAlErrExtRcd_
void update(const DTGeometry *, const CSCGeometry *)
const_iterator end() const
last iterator over the map (read only)
edm::ESWatcher< DTAlignmentRcd > watchDTAlRcd_
AlignmentErrorsExtended * alignmentErrors() const
Return alignment errors, sorted by DetId.
Time_t beginValue
Definition: Time.h:45
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)
void terminateProcessing(const edm::EventSetup *=0)
Terminate processing of events.
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
ErrorMatrix matrix() const
Definition: SurveyError.h:76
AlignableExtras * alignableExtras_
AlignmentProducerBase(const edm::ParameterSet &)
void update(const TrackerGeometry *, const TrackerTopology *)
align::Alignables DTBarrel()
selection
main part
Definition: corrVsCorr.py:98
void buildParameterStore()
Creates the , which manages all Alignables.
#define noexcept
virtual bool getAliClusterValueMap(const edm::Event &, edm::Handle< AliClusterValueMap > &)=0
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
std::string message() const
Definition: Exception.cc:187
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
virtual ~AlignmentProducerBase()(false)
const Alignments * surveyValues_
void setWidth(align::Scalar width)
Definition: config.py:1
TRandom random
Definition: MVATrainer.cc:138
uint8_t structureType() const
Definition: SurveyError.h:66
AlignmentParameterStore * alignmentParameterStore_
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::string encode() const
Definition: InputTag.cc:166
virtual bool getTkFittedLasBeamCollection(const edm::Run &, edm::Handle< TkFittedLasBeamCollection > &)=0
define event information passed to algorithms
std::shared_ptr< TrackerGeometry > trackerGeometry_
void setLength(align::Scalar length)
edm::ESWatcher< GlobalPositionRcd > watchGlobalPositionRcd_
virtual bool getTsosVectorCollection(const edm::Run &, edm::Handle< TsosVectorCollection > &)=0
double dydz() const
dydz slope
Definition: BeamSpot.h:84
void writeForRunRange(cond::Time_t)
std::vector< ConstTrajTrackPair > ConstTrajTrackPairs
Alignments * dtAlignments()
Get DT alignments sorted by DetId.
unsigned long long Time_t
Definition: Time.h:16
align::Alignables CSCEndcaps()
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
virtual Alignables components() const =0
Return vector of all direct components.
RunRanges makeUniqueRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
Definition: Utilities.cc:263
void attachSurfaceDeformations(C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
const edm::InputTag beamSpotTag_
BeamSpot.
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.
bool isAvailable() const
Definition: Service.h:46
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
align::ID rawId() const
Definition: SurveyError.h:71
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
void createAlignables(const TrackerTopology *, bool update=false)
AlignmentSurfaceDeformations * surfaceDeformations() const
Return surface deformations, sorted by DetId.
Definition: Alignable.cc:264
std::unique_ptr< const Alignments > globalPositions_
GlobalPositions that might be read from DB, nullptr otherwise.
AlignmentAlgorithmBase::EndRunInfo EndRunInfo
void applyScenario(const edm::ParameterSet &scenario)
Apply misalignment scenario to the tracker.
void initializeBeamSpot(double x, double y, double z, double dxdz, double dydz)
Initialize the alignable beam spot with the given parameters.
bool hasParameter(const edm::ParameterSet &, const std::string &name)
void startProcessing()
Start processing of events.
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd_
AlignmentErrorsExtended * cscAlignmentErrorsExtended()
Get CSC alignment errors sorted by DetId.
double dxdz() const
dxdz slope
Definition: BeamSpot.h:82
virtual bool getBeamSpot(const edm::Event &, edm::Handle< reco::BeamSpot > &)=0
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
edm::ESWatcher< CSCAlignmentErrorExtendedRcd > watchCSCAlErrExtRcd_
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
Definition: DetId.h:18
edm::ESWatcher< TrackerSurfaceDeformationRcd > watchTrackerSurDeRcd_
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
AlgebraicVector EulerAngles
Definition: Definitions.h:36
align::Scalar length() const
Transform transform() const
AlignableTracker * alignableTracker_
edm::Handle< reco::BeamSpot > beamSpot_
ParameterSet const & getParameterSet(std::string const &) const
void applyMisalignment()
Applies misalignment scenario to .
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:356
const T & get() const
Definition: EventSetup.h:56
void build(std::shared_ptr< CSCGeometry > geom, const DDCompactView *fv, const MuonDDDConstants &muonConstants)
Build the geometry.
const align::RunRanges uniqueRunRanges_
Alignments * cscAlignments()
Get CSC alignments sorted by DetId.
void storeAlignmentsToDB()
Writes Alignments (i.e. Records) to database-file.
AlignmentErrorsExtended * dtAlignmentErrorsExtended()
Get DT alignment errors sorted by DetId.
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
std::shared_ptr< DTGeometry > muonDTGeometry_
edm::ESWatcher< TrackerAlignmentRcd > watchTrackerAlRcd_
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
edm::ESWatcher< TrackerAlignmentErrorExtendedRcd > watchTrackerAlErrorExtRcd_
bool setupChanged(const edm::EventSetup &)
Checks if one of the EventSetup-Records has changed.
#define update(a, b)
edm::ESWatcher< TrackerSurveyRcd > watchTkSurveyRcd_
void build(std::shared_ptr< DTGeometry > theGeometry, const DDCompactView *cview, const MuonDDDConstants &muonConstants)
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:42
void createCalibrations()
Creates the calibrations.
std::vector< char > convertParamSel(const std::string &selString) const
Converting std::string into std::vector<char>
double y0() const
y coordinate
Definition: BeamSpot.h:66
static unsigned int const shift
void createAlignmentAlgorithm()
Creates the choosen alignment algorithm.
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 .
const_iterator begin() const
first iterator over the map (read only)
eventInfo
add run, event number and lumi section
Alignments * alignments() const
Return alignments, sorted by DetId.
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:23
long double T
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.
T const * product() const
Definition: ESHandle.h:86
void simpleMisalignment(const align::Alignables &, const std::string &, float, float, bool)
Applies misalignment scenario to .
Alignables & beamSpot()
Return beam spot alignable as a vector with one element.
void applyScenario(const edm::ParameterSet &scenario)
Apply misalignment scenario to the Muon.
def move(src, dest)
Definition: eostools.py:510
T get(const Candidate &c)
Definition: component.h:55
const align::Alignables & alignables(void) const
get all alignables
void applyDB(G *, const edm::EventSetup &, const AlignTransform &) const
Definition: event.py:1
Definition: Run.h:42
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_
double x0() const
x coordinate
Definition: BeamSpot.h:64
void createMonitors()
Creates the monitors.