CMS 3D CMS Logo

List of all members | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
AlignmentProducerBase Class Referenceabstract

#include <AlignmentProducerBase.h>

Inheritance diagram for AlignmentProducerBase:
AlignmentProducer AlignmentProducerAsAnalyzer

Protected Member Functions

 AlignmentProducerBase (const edm::ParameterSet &, edm::ConsumesCollector)
 
void beginLuminosityBlockImpl (const edm::LuminosityBlock &, const edm::EventSetup &)
 begin lumi block More...
 
void beginRunImpl (const edm::Run &, const edm::EventSetup &)
 begin run More...
 
void endLuminosityBlockImpl (const edm::LuminosityBlock &, const edm::EventSetup &)
 end lumi block More...
 
void endRunImpl (const edm::Run &, const edm::EventSetup &)
 end run More...
 
bool finish ()
 
virtual bool getAliClusterValueMap (const edm::Event &, edm::Handle< AliClusterValueMap > &)=0
 
virtual bool getBeamSpot (const edm::Event &, edm::Handle< reco::BeamSpot > &)=0
 
virtual bool getTkFittedLasBeamCollection (const edm::Run &, edm::Handle< TkFittedLasBeamCollection > &)=0
 
virtual bool getTrajTrackAssociationCollection (const edm::Event &, edm::Handle< TrajTrackAssociationCollection > &)=0
 
virtual bool getTsosVectorCollection (const edm::Run &, edm::Handle< TsosVectorCollection > &)=0
 
void initAlignmentAlgorithm (const edm::EventSetup &, bool update=false)
 
int nEvent () const
 
bool processEvent (const edm::Event &, const edm::EventSetup &)
 Process event. More...
 
void startProcessing ()
 Start processing of events. More...
 
void terminateProcessing (const edm::EventSetup *=nullptr)
 Terminate processing of events. More...
 
virtual ~AlignmentProducerBase () noexcept(false)
 

Protected Attributes

const edm::InputTag beamSpotTag_
 BeamSpot. More...
 
const edm::InputTag clusterValueMapTag_
 ValueMap containing associtaion cluster-flag. More...
 
const bool doMuon_
 
const bool doTracker_
 
edm::ESHandle< CSCGeometrymuonCSCGeometry_
 
edm::ESHandle< DTGeometrymuonDTGeometry_
 
edm::ESHandle< GEMGeometrymuonGEMGeometry_
 
const edm::InputTag tjTkAssociationMapTag_
 Map with tracks/trajectories. More...
 
const edm::InputTag tkLasBeamTag_
 LAS beams in edm::Run (ignore if empty) More...
 
std::shared_ptr< TrackerGeometrytrackerGeometry_
 
const bool useExtras_
 

Private Member Functions

void addSurveyInfo (Alignable *)
 Adds survey info to an Alignable. More...
 
void applyAlignmentsToDB (const edm::EventSetup &)
 
void applyAlignmentsToGeometry ()
 
template<class G , class Rcd , class ErrRcd >
void applyDB (const G *, const edm::EventSetup &, const edm::ESGetToken< Alignments, Rcd > &, const edm::ESGetToken< AlignmentErrorsExtended, ErrRcd > &, const AlignTransform &) const
 
template<class G , class DeformationRcd >
void applyDB (const G *, const edm::EventSetup &, const edm::ESGetToken< AlignmentSurfaceDeformations, DeformationRcd > &) const
 Applies DB constants for SurfaceDeformations. More...
 
void applyMisalignment ()
 Applies misalignment scenario to . More...
 
void buildParameterStore ()
 Creates the , which manages all Alignables. More...
 
void createAlignables (const TrackerTopology *, bool update=false)
 
void createAlignmentAlgorithm (edm::ConsumesCollector &)
 Creates the choosen alignment algorithm. More...
 
void createCalibrations (edm::ConsumesCollector &)
 Creates the calibrations. More...
 
void createGeometries (const edm::EventSetup &, const TrackerTopology *)
 Creates ideal geometry from IdealGeometryRecord. More...
 
void createMonitors (edm::ConsumesCollector &)
 Creates the monitors. More...
 
void initBeamSpot (const edm::Event &)
 Initializes Beamspot of Alignables . More...
 
void readInSurveyRcds (const edm::EventSetup &)
 Reads in survey records. More...
 
bool setupChanged (const edm::EventSetup &)
 Checks if one of the EventSetup-Records has changed. More...
 
void simpleMisalignment (const align::Alignables &, const std::string &, float, float, bool)
 Applies misalignment scenario to . More...
 
void storeAlignmentsToDB ()
 Writes Alignments (i.e. Records) to database-file. More...
 
void writeDB (Alignments *, const std::string &, AlignmentErrorsExtended *, const std::string &, const AlignTransform *, cond::Time_t) const
 
void writeDB (const AlignmentSurfaceDeformations &, const std::string &, cond::Time_t) const
 
void writeForRunRange (cond::Time_t)
 

Private Attributes

std::unique_ptr< AlignableExtrasalignableExtras_
 
std::unique_ptr< AlignableMuonalignableMuon_
 
std::unique_ptr< AlignableTrackeralignableTracker_
 
std::unique_ptr< AlignmentAlgorithmBasealignmentAlgo_
 
std::unique_ptr< AlignmentParameterStorealignmentParameterStore_
 
const bool applyDbAlignment_
 
edm::Handle< reco::BeamSpotbeamSpot_
 
CalibrationsOwner calibrations_
 
const bool checkDbAlignmentValidity_
 
edm::ParameterSet config_
 
const edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcdcscAliErrToken_
 
const edm::ESGetToken< Alignments, CSCAlignmentRcdcscAliToken_
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomToken_
 
const edm::ESGetToken< SurveyErrors, CSCSurveyErrorExtendedRcdcscSurvErrorToken_
 
const edm::ESGetToken< Alignments, CSCSurveyRcdcscSurveyToken_
 
const bool doMisalignmentScenario_
 
const edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcddtAliErrToken_
 
const edm::ESGetToken< Alignments, DTAlignmentRcddtAliToken_
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken_
 
const edm::ESGetToken< SurveyErrors, DTSurveyErrorExtendedRcddtSurvErrorToken_
 
const edm::ESGetToken< Alignments, DTSurveyRcddtSurveyToken_
 
const bool enableAlignableUpdates_
 
cond::Time_t firstRun_ {cond::timeTypeSpecs[cond::runnumber].endValue}
 
const edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcdgemAliErrToken_
 
const edm::ESGetToken< Alignments, GEMAlignmentRcdgemAliToken_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomToken_
 
const edm::ESGetToken< GeometricDet, IdealGeometryRecordgeomDetToken_
 
std::unique_ptr< const AlignmentsglobalPositions_
 GlobalPositions that might be read from DB, nullptr otherwise. More...
 
const edm::ESGetToken< Alignments, GlobalPositionRcdgprToken_
 
bool isAlgoInitialized_ {false}
 
bool isDuringLoop_ {false}
 
AlignmentMonitors monitors_
 
int nevent_ {0}
 
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcdptitpToken_
 
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcdptpToken_
 
bool runAtPCL_ {false}
 
const bool saveApeToDB_
 
const bool saveDeformationsToDB_
 
const bool saveToDB_
 
const int stNFixAlignables_
 
const double stRandomRotation_
 
const double stRandomShift_
 
const SurveyErrorssurveyErrors_ {nullptr}
 
size_t surveyIndex_ {0}
 
const AlignmentssurveyValues_ {nullptr}
 
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcdtkAliErrToken_
 
const std::string tkAliRcdName_
 
const edm::ESGetToken< Alignments, TrackerAlignmentRcdtkAliToken_
 
const edm::ESGetToken< AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcdtkSurfDefToken_
 
const edm::ESGetToken< SurveyErrors, TrackerSurveyErrorExtendedRcdtkSurvErrorToken_
 
const edm::ESGetToken< Alignments, TrackerSurveyRcdtkSurveyToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdttopoToken_
 
const align::RunRanges uniqueRunRanges_
 
const bool useSurvey_
 
edm::ESWatcher< CSCAlignmentErrorExtendedRcdwatchCSCAlErrExtRcd_
 
edm::ESWatcher< CSCAlignmentRcdwatchCSCAlRcd_
 
edm::ESWatcher< CSCSurveyErrorExtendedRcdwatchCSCSurveyErrExtRcd_
 
edm::ESWatcher< CSCSurveyRcdwatchCSCSurveyRcd_
 
edm::ESWatcher< DTAlignmentErrorExtendedRcdwatchDTAlErrExtRcd_
 
edm::ESWatcher< DTAlignmentRcdwatchDTAlRcd_
 
edm::ESWatcher< DTSurveyErrorExtendedRcdwatchDTSurveyErrExtRcd_
 
edm::ESWatcher< DTSurveyRcdwatchDTSurveyRcd_
 
edm::ESWatcher< GlobalPositionRcdwatchGlobalPositionRcd_
 
edm::ESWatcher< IdealGeometryRecordwatchIdealGeometryRcd_
 
edm::ESWatcher< TrackerSurveyErrorExtendedRcdwatchTkSurveyErrExtRcd_
 
edm::ESWatcher< TrackerSurveyRcdwatchTkSurveyRcd_
 
edm::ESWatcher< TrackerAlignmentErrorExtendedRcdwatchTrackerAlErrorExtRcd_
 
edm::ESWatcher< TrackerAlignmentRcdwatchTrackerAlRcd_
 
edm::ESWatcher< TrackerSurfaceDeformationRcdwatchTrackerSurDeRcd_
 

Detailed Description

Definition at line 75 of file AlignmentProducerBase.h.

Constructor & Destructor Documentation

◆ AlignmentProducerBase()

AlignmentProducerBase::AlignmentProducerBase ( const edm::ParameterSet config,
edm::ConsumesCollector  iC 
)
protected

Definition at line 28 of file AlignmentProducerBase.cc.

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")},
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"))),
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 
96  createMonitors(iC);
98 }
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd > cscAliErrToken_
Time_t beginValue
Definition: Time.h:41
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
ParameterSet const & getParameterSet(std::string const &) const
const edm::ESGetToken< Alignments, DTSurveyRcd > dtSurveyToken_
Definition: config.py:1
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
const edm::ESGetToken< Alignments, CSCAlignmentRcd > cscAliToken_
const edm::ESGetToken< SurveyErrors, CSCSurveyErrorExtendedRcd > cscSurvErrorToken_
const std::string tkAliRcdName_
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > tkAliToken_
const edm::ESGetToken< Alignments, TrackerSurveyRcd > tkSurveyToken_
const edm::ESGetToken< Alignments, GEMAlignmentRcd > gemAliToken_
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_
const edm::InputTag beamSpotTag_
BeamSpot.
const edm::ESGetToken< Alignments, DTAlignmentRcd > dtAliToken_
Log< level::Info, false > LogInfo
const edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > gemAliErrToken_
void createCalibrations(edm::ConsumesCollector &)
Creates the calibrations.
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > tkAliErrToken_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
const align::RunRanges uniqueRunRanges_
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
const edm::ESGetToken< SurveyErrors, TrackerSurveyErrorExtendedRcd > tkSurvErrorToken_
const edm::ESGetToken< AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcd > tkSurfDefToken_
const edm::ESGetToken< Alignments, CSCSurveyRcd > cscSurveyToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
const edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > dtAliErrToken_
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.

◆ ~AlignmentProducerBase()

AlignmentProducerBase::~AlignmentProducerBase ( )
protectedvirtualnoexcept

Definition at line 101 of file AlignmentProducerBase.cc.

101 {}

Member Function Documentation

◆ addSurveyInfo()

void AlignmentProducerBase::addSurveyInfo ( Alignable ali)
private

Adds survey info to an Alignable.

Definition at line 745 of file AlignmentProducerBase.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), relativeConstraints::error, Exception, Alignable::id(), AlignableSurface::length(), Alignments::m_align, SurveyErrors::m_surveyErrors, makeMuonMisalignmentScenario::rot, AlignableSurface::setLength(), Alignable::setSurvey(), AlignableSurface::setWidth(), Alignable::surface(), surveyErrors_, surveyIndex_, surveyValues_, and AlignableSurface::width().

Referenced by readInSurveyRcds().

745  {
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 }
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
align::Scalar width() const
const Alignments * surveyValues_
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
void addSurveyInfo(Alignable *)
Adds survey info to an Alignable.
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
virtual const Alignables & components() const =0
Return vector of all direct components.
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:266
align::Scalar length() const
const SurveyErrors * surveyErrors_
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:22

◆ applyAlignmentsToDB()

void AlignmentProducerBase::applyAlignmentsToDB ( const edm::EventSetup setup)
private

Applies Alignments from Database (GlobalPositionRcd) to Geometry

Definition at line 448 of file AlignmentProducerBase.cc.

References applyDbAlignment_, cscAliErrToken_, cscAliToken_, align::DetectorGlobalPosition(), doMuon_, doTracker_, dtAliErrToken_, dtAliToken_, gemAliErrToken_, gemAliToken_, globalPositions_, gprToken_, DetId::Muon, muonCSCGeometry_, muonDTGeometry_, muonGEMGeometry_, singleTopDQM_cfi::setup, tkAliErrToken_, tkAliToken_, tkSurfDefToken_, DetId::Tracker, and trackerGeometry_.

Referenced by initAlignmentAlgorithm().

448  {
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 }
const edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd > cscAliErrToken_
const edm::ESGetToken< Alignments, CSCAlignmentRcd > cscAliToken_
std::shared_ptr< TrackerGeometry > trackerGeometry_
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > tkAliToken_
const edm::ESGetToken< Alignments, GEMAlignmentRcd > gemAliToken_
std::unique_ptr< const Alignments > globalPositions_
GlobalPositions that might be read from DB, nullptr otherwise.
const edm::ESGetToken< Alignments, DTAlignmentRcd > dtAliToken_
const edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > gemAliErrToken_
Definition: DetId.h:17
edm::ESHandle< DTGeometry > muonDTGeometry_
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > tkAliErrToken_
const edm::ESGetToken< AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcd > tkSurfDefToken_
edm::ESHandle< CSCGeometry > muonCSCGeometry_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
const edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > dtAliErrToken_
edm::ESHandle< GEMGeometry > muonGEMGeometry_

◆ applyAlignmentsToGeometry()

void AlignmentProducerBase::applyAlignmentsToGeometry ( )
private

Applies Alignments, AlignmentErrors and SurfaceDeformations to

Definition at line 654 of file AlignmentProducerBase.cc.

References alignableMuon_, alignableTracker_, GeometryAligner::applyAlignments(), GeometryAligner::attachSurfaceDeformations(), doMuon_, doTracker_, Exception, muonCSCGeometry_, muonDTGeometry_, muonGEMGeometry_, and trackerGeometry_.

Referenced by initAlignmentAlgorithm(), and startProcessing().

654  {
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 }
void attachSurfaceDeformations(const C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
Class to update a given geometry with a set of alignments.
std::unique_ptr< AlignableMuon > alignableMuon_
std::shared_ptr< TrackerGeometry > trackerGeometry_
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
std::unique_ptr< AlignableTracker > alignableTracker_
Log< level::Info, false > LogInfo
edm::ESHandle< DTGeometry > muonDTGeometry_
edm::ESHandle< CSCGeometry > muonCSCGeometry_
edm::ESHandle< GEMGeometry > muonGEMGeometry_

◆ applyDB() [1/2]

template<class G , class Rcd , class ErrRcd >
void AlignmentProducerBase::applyDB ( const G *  geometry,
const edm::EventSetup iSetup,
const edm::ESGetToken< Alignments, Rcd > &  aliToken,
const edm::ESGetToken< AlignmentErrorsExtended, ErrRcd > &  errToken,
const AlignTransform globalCoordinates 
) const
private

Applies DB constants belonging to (Err)Rcd to Geometry, taking into account 'globalPosition' correction.

Definition at line 318 of file AlignmentProducerBase.h.

References GeometryAligner::applyAlignments(), edm::IOVSyncValue::beginOfTime(), checkDbAlignmentValidity_, edm::IOVSyncValue::endOfTime(), Exception, edm::ValidityInterval::first(), first, cmssw_cycle_finder::G, relativeConstraints::geometry, edm::EventSetup::get(), edm::EventSetup::getData(), edm::ValidityInterval::last(), dqmdumpme::last, and AlCaHarvesting_cff::record.

322  {
323  // 'G' is the geometry class for that DB should be applied,
324  // 'Rcd' is the record class for its Alignments
325  // 'ErrRcd' is the record class for its AlignmentErrorsExtended
326  // 'globalCoordinates' are global transformation for this geometry
327 
328  const Rcd& record = iSetup.get<Rcd>();
330  const edm::ValidityInterval& validity = record.validityInterval();
331  const edm::IOVSyncValue first = validity.first();
332  const edm::IOVSyncValue last = validity.last();
334  throw cms::Exception("DatabaseError")
335  << "@SUB=AlignmentProducerBase::applyDB"
336  << "\nTrying to apply " << record.key().name() << " with multiple IOVs in tag.\n"
337  << "Validity range is " << first.eventID().run() << " - " << last.eventID().run();
338  }
339  }
340 
341  const Alignments* alignments = &record.get(aliToken);
342  const AlignmentErrorsExtended* alignmentErrors = &iSetup.getData(errToken);
343 
344  GeometryAligner aligner;
345  aligner.applyAlignments<G>(geometry, alignments, alignmentErrors, globalCoordinates);
346 }
const IOVSyncValue & last() const
const IOVSyncValue & first() const
Class to update a given geometry with a set of alignments.
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
T get() const
Definition: EventSetup.h:82
bool getData(T &iHolder) const
Definition: EventSetup.h:122

◆ applyDB() [2/2]

template<class G , class DeformationRcd >
void AlignmentProducerBase::applyDB ( const G *  geometry,
const edm::EventSetup iSetup,
const edm::ESGetToken< AlignmentSurfaceDeformations, DeformationRcd > &  surfDefToken 
) const
private

Applies DB constants for SurfaceDeformations.

Definition at line 349 of file AlignmentProducerBase.h.

References GeometryAligner::attachSurfaceDeformations(), edm::IOVSyncValue::beginOfTime(), checkDbAlignmentValidity_, edm::IOVSyncValue::endOfTime(), Exception, edm::ValidityInterval::first(), first, cmssw_cycle_finder::G, relativeConstraints::geometry, edm::EventSetup::get(), edm::ValidityInterval::last(), dqmdumpme::last, and AlCaHarvesting_cff::record.

352  {
353  // 'G' is the geometry class for that DB should be applied,
354  // 'DeformationRcd' is the record class for its surface deformations
355 
356  const DeformationRcd& record = iSetup.get<DeformationRcd>();
358  const edm::ValidityInterval& validity = record.validityInterval();
359  const edm::IOVSyncValue first = validity.first();
360  const edm::IOVSyncValue last = validity.last();
362  throw cms::Exception("DatabaseError")
363  << "@SUB=AlignmentProducerBase::applyDB"
364  << "\nTrying to apply " << record.key().name() << " with multiple IOVs in tag.\n"
365  << "Validity range is " << first.eventID().run() << " - " << last.eventID().run();
366  }
367  }
368  const AlignmentSurfaceDeformations* surfaceDeformations = &record.get(surfDefToken);
369 
370  GeometryAligner aligner;
371  aligner.attachSurfaceDeformations<G>(geometry, surfaceDeformations);
372 }
void attachSurfaceDeformations(const C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
const IOVSyncValue & last() const
const IOVSyncValue & first() const
Class to update a given geometry with a set of alignments.
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
T get() const
Definition: EventSetup.h:82

◆ applyMisalignment()

void AlignmentProducerBase::applyMisalignment ( )
private

Applies misalignment scenario to .

Definition at line 549 of file AlignmentProducerBase.cc.

References alignableMuon_, alignableTracker_, alignmentParameterStore_, MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), config_, doMisalignmentScenario_, doMuon_, doTracker_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), simpleMisalignment(), stRandomRotation_, stRandomShift_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by initAlignmentAlgorithm().

549  {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Builds a scenario from configuration and applies it to the alignable Muon.
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< AlignableMuon > alignableMuon_
std::unique_ptr< AlignmentParameterStore > alignmentParameterStore_
std::unique_ptr< AlignableTracker > alignableTracker_
Log< level::Info, false > LogInfo
void applyScenario(const edm::ParameterSet &scenario) override
Apply misalignment scenario to the tracker.
void applyScenario(const edm::ParameterSet &scenario) override
Apply misalignment scenario to the Muon.
Builds a scenario from configuration and applies it to the alignable tracker.
void simpleMisalignment(const align::Alignables &, const std::string &, float, float, bool)
Applies misalignment scenario to .

◆ beginLuminosityBlockImpl()

void AlignmentProducerBase::beginLuminosityBlockImpl ( const edm::LuminosityBlock ,
const edm::EventSetup setup 
)
protected

begin lumi block

Definition at line 268 of file AlignmentProducerBase.cc.

References alignmentAlgo_, and singleTopDQM_cfi::setup.

Referenced by AlignmentProducer::beginLuminosityBlock(), and AlignmentProducerAsAnalyzer::beginLuminosityBlock().

268  {
269  // Do not forward edm::LuminosityBlock
270  alignmentAlgo_->beginLuminosityBlock(setup);
271 }
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ beginRunImpl()

void AlignmentProducerBase::beginRunImpl ( const edm::Run run,
const edm::EventSetup setup 
)
protected

begin run

Definition at line 225 of file AlignmentProducerBase.cc.

References alignmentAlgo_, calibrations_, enableAlignableUpdates_, firstRun_, initAlignmentAlgorithm(), writedatasetfile::run, runAtPCL_, singleTopDQM_cfi::setup, and setupChanged().

Referenced by AlignmentProducer::beginRun(), and AlignmentProducerAsAnalyzer::beginRun().

225  {
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 }
void initAlignmentAlgorithm(const edm::EventSetup &, bool update=false)
unsigned long long Time_t
Definition: Time.h:14
Log< level::Info, false > LogInfo
bool setupChanged(const edm::EventSetup &)
Checks if one of the EventSetup-Records has changed.
CalibrationsOwner calibrations_
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ buildParameterStore()

void AlignmentProducerBase::buildParameterStore ( )
private

Creates the , which manages all Alignables.

Definition at line 521 of file AlignmentProducerBase.cc.

References alignableExtras_, alignableMuon_, alignableTracker_, alignmentParameterStore_, config_, edm::ParameterSet::getParameter(), and stNFixAlignables_.

Referenced by initAlignmentAlgorithm().

521  {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< AlignableMuon > alignableMuon_
std::unique_ptr< AlignmentParameterStore > alignmentParameterStore_
std::unique_ptr< AlignableExtras > alignableExtras_
std::unique_ptr< AlignableTracker > alignableTracker_
Log< level::Info, false > LogInfo

◆ createAlignables()

void AlignmentProducerBase::createAlignables ( const TrackerTopology tTopo,
bool  update = false 
)
private

Creates Alignables from the previously loaded Geometry

Definition at line 494 of file AlignmentProducerBase.cc.

References alignableExtras_, alignableMuon_, alignableTracker_, doMuon_, doTracker_, muonCSCGeometry_, muonDTGeometry_, muonGEMGeometry_, trackerGeometry_, update, and useExtras_.

Referenced by initAlignmentAlgorithm().

494  {
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 }
std::unique_ptr< AlignableMuon > alignableMuon_
std::shared_ptr< TrackerGeometry > trackerGeometry_
std::unique_ptr< AlignableExtras > alignableExtras_
std::unique_ptr< AlignableTracker > alignableTracker_
edm::ESHandle< DTGeometry > muonDTGeometry_
#define update(a, b)
edm::ESHandle< CSCGeometry > muonCSCGeometry_
edm::ESHandle< GEMGeometry > muonGEMGeometry_

◆ createAlignmentAlgorithm()

void AlignmentProducerBase::createAlignmentAlgorithm ( edm::ConsumesCollector iC)
private

Creates the choosen alignment algorithm.

Definition at line 280 of file AlignmentProducerBase.cc.

References ALCARECOPromptCalibProdSiPixelAli0T_cff::algoConfig, MillePedeAlignmentAlgorithm_cfi::algoName, alignmentAlgo_, config_, enableAlignableUpdates_, get, edm::ParameterSet::getParameter(), runAtPCL_, AlCaHLTBitMon_QueryRunRegistry::string, and uniqueRunRanges_.

280  {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
const align::RunRanges uniqueRunRanges_
#define get
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ createCalibrations()

void AlignmentProducerBase::createCalibrations ( edm::ConsumesCollector iC)
private

Creates the calibrations.

Definition at line 301 of file AlignmentProducerBase.cc.

References AlignmentProducer_cff::calibrations, calibrations_, config_, beamerCreator::create(), get, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

301  {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
CalibrationsOwner calibrations_
#define get

◆ createGeometries()

void AlignmentProducerBase::createGeometries ( const edm::EventSetup iSetup,
const TrackerTopology tTopo 
)
private

Creates ideal geometry from IdealGeometryRecord.

Definition at line 431 of file AlignmentProducerBase.cc.

References TrackerGeomBuilderFromGeometricDet::build(), cscGeomToken_, doMuon_, doTracker_, dtGeomToken_, gemGeomToken_, geomDetToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), muonCSCGeometry_, muonDTGeometry_, muonGEMGeometry_, ptitpToken_, ptpToken_, and trackerGeometry_.

Referenced by initAlignmentAlgorithm().

431  {
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 }
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
std::shared_ptr< TrackerGeometry > trackerGeometry_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::ESHandle< DTGeometry > muonDTGeometry_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
edm::ESHandle< CSCGeometry > muonCSCGeometry_
edm::ESHandle< GEMGeometry > muonGEMGeometry_

◆ createMonitors()

void AlignmentProducerBase::createMonitors ( edm::ConsumesCollector iC)
private

Creates the monitors.

Definition at line 291 of file AlignmentProducerBase.cc.

References config_, beamerCreator::create(), get, edm::ParameterSet::getParameter(), AlignmentProducer_cff::monitorConfig, gather_cfg::monitors, and monitors_.

291  {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
def create(alignables, pedeDump, additionalData, outputFile, config)
#define get

◆ endLuminosityBlockImpl()

void AlignmentProducerBase::endLuminosityBlockImpl ( const edm::LuminosityBlock ,
const edm::EventSetup setup 
)
protected

end lumi block

Definition at line 274 of file AlignmentProducerBase.cc.

References alignmentAlgo_, and singleTopDQM_cfi::setup.

Referenced by AlignmentProducer::endLuminosityBlock(), and AlignmentProducerAsAnalyzer::endLuminosityBlock().

274  {
275  // Do not forward edm::LuminosityBlock
276  alignmentAlgo_->endLuminosityBlock(setup);
277 }
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ endRunImpl()

void AlignmentProducerBase::endRunImpl ( const edm::Run run,
const edm::EventSetup setup 
)
protected

end run

Definition at line 252 of file AlignmentProducerBase.cc.

References alignmentAlgo_, edm::InputTag::encode(), getTkFittedLasBeamCollection(), getTsosVectorCollection(), writedatasetfile::run, singleTopDQM_cfi::setup, and tkLasBeamTag_.

Referenced by AlignmentProducer::endRun(), and AlignmentProducerAsAnalyzer::endRun().

252  {
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 }
std::string encode() const
Definition: InputTag.cc:159
virtual bool getTkFittedLasBeamCollection(const edm::Run &, edm::Handle< TkFittedLasBeamCollection > &)=0
virtual bool getTsosVectorCollection(const edm::Run &, edm::Handle< TsosVectorCollection > &)=0
AlignmentAlgorithmBase::EndRunInfo EndRunInfo
Log< level::Info, false > LogInfo
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ finish()

bool AlignmentProducerBase::finish ( )
protected

Steers activities after end of job, terminates the AlignmentAlgorithm

Definition at line 773 of file AlignmentProducerBase.cc.

References alignmentAlgo_, calibrations_, beam_dqm_sourceclient-live_cfg::monitor, monitors_, nevent_, saveApeToDB_, saveDeformationsToDB_, saveToDB_, and storeAlignmentsToDB().

Referenced by progressbar.ProgressBar::__next__(), AlignmentProducer::endOfJob(), and AlignmentProducerAsAnalyzer::endProcessBlockProduce().

773  {
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 }
Log< level::Info, false > LogInfo
void storeAlignmentsToDB()
Writes Alignments (i.e. Records) to database-file.
CalibrationsOwner calibrations_
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ getAliClusterValueMap()

virtual bool AlignmentProducerBase::getAliClusterValueMap ( const edm::Event ,
edm::Handle< AliClusterValueMap > &   
)
protectedpure virtual

Implemented in AlignmentProducerAsAnalyzer, and AlignmentProducer.

Referenced by processEvent().

◆ getBeamSpot()

virtual bool AlignmentProducerBase::getBeamSpot ( const edm::Event ,
edm::Handle< reco::BeamSpot > &   
)
protectedpure virtual

Implemented in AlignmentProducerAsAnalyzer, and AlignmentProducer.

Referenced by initBeamSpot().

◆ getTkFittedLasBeamCollection()

virtual bool AlignmentProducerBase::getTkFittedLasBeamCollection ( const edm::Run ,
edm::Handle< TkFittedLasBeamCollection > &   
)
protectedpure virtual

Implemented in AlignmentProducerAsAnalyzer, and AlignmentProducer.

Referenced by endRunImpl().

◆ getTrajTrackAssociationCollection()

virtual bool AlignmentProducerBase::getTrajTrackAssociationCollection ( const edm::Event ,
edm::Handle< TrajTrackAssociationCollection > &   
)
protectedpure virtual

Implemented in AlignmentProducerAsAnalyzer, and AlignmentProducer.

Referenced by processEvent().

◆ getTsosVectorCollection()

virtual bool AlignmentProducerBase::getTsosVectorCollection ( const edm::Run ,
edm::Handle< TsosVectorCollection > &   
)
protectedpure virtual

Implemented in AlignmentProducerAsAnalyzer, and AlignmentProducer.

Referenced by endRunImpl().

◆ initAlignmentAlgorithm()

void AlignmentProducerBase::initAlignmentAlgorithm ( const edm::EventSetup setup,
bool  update = false 
)
protected

Creates Geometry and Alignables of the Tracker and initializes the AlignmentAlgorithm

Definition at line 362 of file AlignmentProducerBase.cc.

References alignableExtras_, alignableMuon_, alignableTracker_, alignmentAlgo_, alignmentParameterStore_, applyAlignmentsToDB(), applyAlignmentsToGeometry(), applyMisalignment(), buildParameterStore(), calibrations_, createAlignables(), createGeometries(), Exception, isAlgoInitialized_, beam_dqm_sourceclient-live_cfg::monitor, monitors_, singleTopDQM_cfi::setup, startProcessing(), ttopoToken_, and update.

Referenced by AlignmentProducer::beginOfJob(), beginRunImpl(), and processEvent().

362  {
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 }
void applyAlignmentsToDB(const edm::EventSetup &)
void createGeometries(const edm::EventSetup &, const TrackerTopology *)
Creates ideal geometry from IdealGeometryRecord.
void buildParameterStore()
Creates the , which manages all Alignables.
std::unique_ptr< AlignableMuon > alignableMuon_
std::unique_ptr< AlignmentParameterStore > alignmentParameterStore_
std::unique_ptr< AlignableExtras > alignableExtras_
std::unique_ptr< AlignableTracker > alignableTracker_
void createAlignables(const TrackerTopology *, bool update=false)
void startProcessing()
Start processing of events.
Log< level::Info, false > LogInfo
void applyMisalignment()
Applies misalignment scenario to .
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
#define update(a, b)
CalibrationsOwner calibrations_
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ initBeamSpot()

void AlignmentProducerBase::initBeamSpot ( const edm::Event event)
private

Initializes Beamspot of Alignables .

Definition at line 418 of file AlignmentProducerBase.cc.

References alignableExtras_, beamSpot_, reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), getBeamSpot(), nevent_, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by processEvent().

418  {
420 
421  if (nevent_ == 0 && alignableExtras_) {
422  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initBeamSpot"
423  << "Initializing AlignableBeamSpot";
424 
425  alignableExtras_->initializeBeamSpot(
427  }
428 }
double dydz() const
dydz slope
Definition: BeamSpot.h:80
double x0() const
x coordinate
Definition: BeamSpot.h:61
std::unique_ptr< AlignableExtras > alignableExtras_
double y0() const
y coordinate
Definition: BeamSpot.h:63
virtual bool getBeamSpot(const edm::Event &, edm::Handle< reco::BeamSpot > &)=0
Log< level::Info, false > LogInfo
edm::Handle< reco::BeamSpot > beamSpot_
double dxdz() const
dxdz slope
Definition: BeamSpot.h:78
double z0() const
z coordinate
Definition: BeamSpot.h:65
Definition: event.py:1

◆ nEvent()

int AlignmentProducerBase::nEvent ( ) const
inlineprotected

Definition at line 104 of file AlignmentProducerBase.h.

References nevent_.

Referenced by AlignmentProducer::endOfLoop().

◆ processEvent()

bool AlignmentProducerBase::processEvent ( const edm::Event event,
const edm::EventSetup setup 
)
protected

Process event.

Definition at line 154 of file AlignmentProducerBase.cc.

References alignmentAlgo_, beamSpot_, edm::AssociationMap< Tag >::begin(), clusterValueMapTag_, enableAlignableUpdates_, edm::InputTag::encode(), edm::AssociationMap< Tag >::end(), dumpTauVariables_cfi::eventInfo, getAliClusterValueMap(), getTrajTrackAssociationCollection(), mps_fire::i, initAlignmentAlgorithm(), initBeamSpot(), beam_dqm_sourceclient-live_cfg::monitor, monitors_, nevent_, readInSurveyRcds(), runAtPCL_, singleTopDQM_cfi::setup, and setupChanged().

Referenced by AlignmentProducerAsAnalyzer::accumulate(), and AlignmentProducer::duringLoop().

154  {
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 }
void readInSurveyRcds(const edm::EventSetup &)
Reads in survey records.
std::vector< ConstTrajTrackPair > ConstTrajTrackPairs
void initAlignmentAlgorithm(const edm::EventSetup &, bool update=false)
std::string encode() const
Definition: InputTag.cc:159
virtual bool getAliClusterValueMap(const edm::Event &, edm::Handle< AliClusterValueMap > &)=0
Log< level::Error, false > LogError
define event information passed to algorithms
const_iterator end() const
last iterator over the map (read only)
Log< level::Info, false > LogInfo
edm::Handle< reco::BeamSpot > beamSpot_
virtual bool getTrajTrackAssociationCollection(const edm::Event &, edm::Handle< TrajTrackAssociationCollection > &)=0
const_iterator begin() const
first iterator over the map (read only)
bool setupChanged(const edm::EventSetup &)
Checks if one of the EventSetup-Records has changed.
void initBeamSpot(const edm::Event &)
Initializes Beamspot of Alignables .
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
eventInfo
add run, event number and lumi section
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
Definition: event.py:1
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ readInSurveyRcds()

void AlignmentProducerBase::readInSurveyRcds ( const edm::EventSetup iSetup)
private

Reads in survey records.

Definition at line 696 of file AlignmentProducerBase.cc.

References addSurveyInfo(), alignableMuon_, alignableTracker_, Reference_intrackfit_cff::barrel, edm::ESWatcher< T >::check(), cscSurvErrorToken_, cscSurveyToken_, doMuon_, doTracker_, dtSurvErrorToken_, dtSurveyToken_, makeMuonMisalignmentScenario::endcap, edm::EventSetup::getData(), surveyErrors_, surveyIndex_, surveyValues_, tkSurvErrorToken_, tkSurveyToken_, useSurvey_, watchTkSurveyErrExtRcd_, and watchTkSurveyRcd_.

Referenced by processEvent().

696  {
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 }
std::unique_ptr< AlignableMuon > alignableMuon_
const edm::ESGetToken< Alignments, DTSurveyRcd > dtSurveyToken_
const Alignments * surveyValues_
const edm::ESGetToken< SurveyErrors, CSCSurveyErrorExtendedRcd > cscSurvErrorToken_
const edm::ESGetToken< Alignments, TrackerSurveyRcd > tkSurveyToken_
const edm::ESGetToken< SurveyErrors, DTSurveyErrorExtendedRcd > dtSurvErrorToken_
edm::ESWatcher< TrackerSurveyErrorExtendedRcd > watchTkSurveyErrExtRcd_
void addSurveyInfo(Alignable *)
Adds survey info to an Alignable.
std::unique_ptr< AlignableTracker > alignableTracker_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Info, false > LogInfo
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
edm::ESWatcher< TrackerSurveyRcd > watchTkSurveyRcd_
const edm::ESGetToken< SurveyErrors, TrackerSurveyErrorExtendedRcd > tkSurvErrorToken_
const edm::ESGetToken< Alignments, CSCSurveyRcd > cscSurveyToken_
const SurveyErrors * surveyErrors_

◆ setupChanged()

bool AlignmentProducerBase::setupChanged ( const edm::EventSetup setup)
private

Checks if one of the EventSetup-Records has changed.

Definition at line 310 of file AlignmentProducerBase.cc.

References edm::ESWatcher< T >::check(), doMuon_, doTracker_, singleTopDQM_cfi::setup, watchCSCAlErrExtRcd_, watchCSCAlRcd_, watchDTAlErrExtRcd_, watchDTAlRcd_, watchGlobalPositionRcd_, watchIdealGeometryRcd_, watchTrackerAlErrorExtRcd_, watchTrackerAlRcd_, and watchTrackerSurDeRcd_.

Referenced by beginRunImpl(), and processEvent().

310  {
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 }
edm::ESWatcher< DTAlignmentErrorExtendedRcd > watchDTAlErrExtRcd_
edm::ESWatcher< DTAlignmentRcd > watchDTAlRcd_
edm::ESWatcher< GlobalPositionRcd > watchGlobalPositionRcd_
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd_
edm::ESWatcher< CSCAlignmentErrorExtendedRcd > watchCSCAlErrExtRcd_
edm::ESWatcher< TrackerSurfaceDeformationRcd > watchTrackerSurDeRcd_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
edm::ESWatcher< TrackerAlignmentRcd > watchTrackerAlRcd_
edm::ESWatcher< TrackerAlignmentErrorExtendedRcd > watchTrackerAlErrorExtRcd_
edm::ESWatcher< CSCAlignmentRcd > watchCSCAlRcd_

◆ simpleMisalignment()

void AlignmentProducerBase::simpleMisalignment ( const align::Alignables alivec,
const std::string &  selection,
float  shift,
float  rot,
bool  local 
)
private

Applies misalignment scenario to .

Definition at line 580 of file AlignmentProducerBase.cc.

References funct::abs(), AlignmentParameterSelector::convertParamSel(), RigidBodyAlignmentParameters::dalpha, RigidBodyAlignmentParameters::dbeta, RigidBodyAlignmentParameters::dgamma, RigidBodyAlignmentParameters::dx, RigidBodyAlignmentParameters::dy, RigidBodyAlignmentParameters::dz, Exception, DTRecHitClients_cfi::local, RigidBodyAlignmentParameters::N_PARAM, convertSQLitetoXML_cfg::output, alignCSCRings::r, makeMuonMisalignmentScenario::rot, corrVsCorr::selection, edm::shift, and align::toMatrix().

Referenced by applyMisalignment().

581  {
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 }
selection
main part
Definition: corrVsCorr.py:100
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Log< level::Info, false > LogInfo
AlgebraicVector EulerAngles
Definition: Definitions.h:34
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
static unsigned int const shift

◆ startProcessing()

void AlignmentProducerBase::startProcessing ( )
protected

Start processing of events.

Definition at line 104 of file AlignmentProducerBase.cc.

References alignmentAlgo_, applyAlignmentsToGeometry(), calibrations_, Exception, isAlgoInitialized_, isDuringLoop_, beam_dqm_sourceclient-live_cfg::monitor, monitors_, and nevent_.

Referenced by initAlignmentAlgorithm(), and AlignmentProducer::startingNewLoop().

104  {
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 }
Log< level::Info, false > LogInfo
CalibrationsOwner calibrations_
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ storeAlignmentsToDB()

void AlignmentProducerBase::storeAlignmentsToDB ( )
private

Writes Alignments (i.e. Records) to database-file.

Definition at line 798 of file AlignmentProducerBase.cc.

References alignableExtras_, alignmentAlgo_, config_, Exception, firstRun_, edm::ParameterSet::getParameterSetVector(), align::makeUniqueRunRanges(), runAtPCL_, saveApeToDB_, saveDeformationsToDB_, saveToDB_, uniqueRunRanges_, and writeForRunRange().

Referenced by finish().

798  {
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 }
void writeForRunRange(cond::Time_t)
std::unique_ptr< AlignableExtras > alignableExtras_
RunRanges makeUniqueRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
Definition: Utilities.cc:241
Log< level::Info, false > LogInfo
const align::RunRanges uniqueRunRanges_
VParameterSet const & getParameterSetVector(std::string const &name) const
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ terminateProcessing()

void AlignmentProducerBase::terminateProcessing ( const edm::EventSetup setup = nullptr)
protected

Terminate processing of events.

Definition at line 132 of file AlignmentProducerBase.cc.

References alignmentAlgo_, calibrations_, isDuringLoop_, beam_dqm_sourceclient-live_cfg::monitor, monitors_, and singleTopDQM_cfi::setup.

Referenced by AlignmentProducer::endOfLoop(), and AlignmentProducerAsAnalyzer::endProcessBlockProduce().

132  {
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 }
Log< level::Info, false > LogInfo
CalibrationsOwner calibrations_
std::unique_ptr< AlignmentAlgorithmBase > alignmentAlgo_

◆ writeDB() [1/2]

void AlignmentProducerBase::writeDB ( Alignments alignments,
const std::string &  alignRcd,
AlignmentErrorsExtended alignmentErrors,
const std::string &  errRcd,
const AlignTransform globalCoordinates,
cond::Time_t  time 
) const
private

Writes Alignments and/or AlignmentErrors to DB for record names (removes *globalCoordinates before writing if non-null...). Takes over ownership of Alignments and AlignmentErrors.

Definition at line 884 of file AlignmentProducerBase.cc.

References Exception, edm::Service< T >::isAvailable(), GeometryAligner::removeGlobalTransform(), saveApeToDB_, saveToDB_, protons_cff::time, AlignTransform::transform(), and cond::service::PoolDBOutputService::writeOneIOV().

Referenced by writeForRunRange().

889  {
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 }
Class to update a given geometry with a set of alignments.
Transform transform() const
void removeGlobalTransform(const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates, Alignments *newAlignments, AlignmentErrorsExtended *newAlignmentErrorsExtended)
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
Log< level::Info, false > LogInfo
bool isAvailable() const
Definition: Service.h:40

◆ writeDB() [2/2]

void AlignmentProducerBase::writeDB ( const AlignmentSurfaceDeformations alignmentSurfaceDeformations,
const std::string &  surfaceDeformationRcd,
cond::Time_t  time 
) const
private

Writes SurfaceDeformations (bows & kinks) to DB for given record name Takes over ownership of AlignmentSurfaceDeformations.

Definition at line 934 of file AlignmentProducerBase.cc.

References Exception, edm::Service< T >::isAvailable(), saveDeformationsToDB_, protons_cff::time, and cond::service::PoolDBOutputService::writeOneIOV().

936  {
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 }
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
Log< level::Info, false > LogInfo
bool isAvailable() const
Definition: Service.h:40

◆ writeForRunRange()

void AlignmentProducerBase::writeForRunRange ( cond::Time_t  time)
private

Writes Alignments and AlignmentErrors for all sub detectors and the given run number

Definition at line 848 of file AlignmentProducerBase.cc.

References alignableMuon_, alignableTracker_, align::DetectorGlobalPosition(), doMuon_, doTracker_, globalPositions_, DetId::Muon, saveDeformationsToDB_, protons_cff::time, tkAliRcdName_, DetId::Tracker, and writeDB().

Referenced by storeAlignmentsToDB().

848  {
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 }
void writeDB(Alignments *, const std::string &, AlignmentErrorsExtended *, const std::string &, const AlignTransform *, cond::Time_t) const
std::unique_ptr< AlignableMuon > alignableMuon_
const std::string tkAliRcdName_
std::unique_ptr< AlignableTracker > alignableTracker_
std::unique_ptr< const Alignments > globalPositions_
GlobalPositions that might be read from DB, nullptr otherwise.
Definition: DetId.h:17
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)

Member Data Documentation

◆ alignableExtras_

std::unique_ptr<AlignableExtras> AlignmentProducerBase::alignableExtras_
private

◆ alignableMuon_

std::unique_ptr<AlignableMuon> AlignmentProducerBase::alignableMuon_
private

◆ alignableTracker_

std::unique_ptr<AlignableTracker> AlignmentProducerBase::alignableTracker_
private

◆ alignmentAlgo_

std::unique_ptr<AlignmentAlgorithmBase> AlignmentProducerBase::alignmentAlgo_
private

◆ alignmentParameterStore_

std::unique_ptr<AlignmentParameterStore> AlignmentProducerBase::alignmentParameterStore_
private

◆ applyDbAlignment_

const bool AlignmentProducerBase::applyDbAlignment_
private

Definition at line 248 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ beamSpot_

edm::Handle<reco::BeamSpot> AlignmentProducerBase::beamSpot_
private

Definition at line 234 of file AlignmentProducerBase.h.

Referenced by initBeamSpot(), and processEvent().

◆ beamSpotTag_

const edm::InputTag AlignmentProducerBase::beamSpotTag_
protected

BeamSpot.

Definition at line 130 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer().

◆ calibrations_

CalibrationsOwner AlignmentProducerBase::calibrations_
private

◆ checkDbAlignmentValidity_

const bool AlignmentProducerBase::checkDbAlignmentValidity_
private

Definition at line 248 of file AlignmentProducerBase.h.

Referenced by applyDB().

◆ clusterValueMapTag_

const edm::InputTag AlignmentProducerBase::clusterValueMapTag_
protected

ValueMap containing associtaion cluster-flag.

Definition at line 136 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer(), and processEvent().

◆ config_

edm::ParameterSet AlignmentProducerBase::config_
private

◆ cscAliErrToken_

const edm::ESGetToken<AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd> AlignmentProducerBase::cscAliErrToken_
private

Definition at line 270 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ cscAliToken_

const edm::ESGetToken<Alignments, CSCAlignmentRcd> AlignmentProducerBase::cscAliToken_
private

Definition at line 266 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ cscGeomToken_

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> AlignmentProducerBase::cscGeomToken_
private

Definition at line 261 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ cscSurvErrorToken_

const edm::ESGetToken<SurveyErrors, CSCSurveyErrorExtendedRcd> AlignmentProducerBase::cscSurvErrorToken_
private

Definition at line 280 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ cscSurveyToken_

const edm::ESGetToken<Alignments, CSCSurveyRcd> AlignmentProducerBase::cscSurveyToken_
private

Definition at line 279 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ doMisalignmentScenario_

const bool AlignmentProducerBase::doMisalignmentScenario_
private

Definition at line 249 of file AlignmentProducerBase.h.

Referenced by applyMisalignment().

◆ doMuon_

const bool AlignmentProducerBase::doMuon_
protected

◆ doTracker_

const bool AlignmentProducerBase::doTracker_
protected

◆ dtAliErrToken_

const edm::ESGetToken<AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd> AlignmentProducerBase::dtAliErrToken_
private

Definition at line 269 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ dtAliToken_

const edm::ESGetToken<Alignments, DTAlignmentRcd> AlignmentProducerBase::dtAliToken_
private

Definition at line 265 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ dtGeomToken_

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> AlignmentProducerBase::dtGeomToken_
private

Definition at line 260 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ dtSurvErrorToken_

const edm::ESGetToken<SurveyErrors, DTSurveyErrorExtendedRcd> AlignmentProducerBase::dtSurvErrorToken_
private

Definition at line 278 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ dtSurveyToken_

const edm::ESGetToken<Alignments, DTSurveyRcd> AlignmentProducerBase::dtSurveyToken_
private

Definition at line 277 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ enableAlignableUpdates_

const bool AlignmentProducerBase::enableAlignableUpdates_
private

Definition at line 252 of file AlignmentProducerBase.h.

Referenced by beginRunImpl(), createAlignmentAlgorithm(), and processEvent().

◆ firstRun_

cond::Time_t AlignmentProducerBase::firstRun_ {cond::timeTypeSpecs[cond::runnumber].endValue}
private

Definition at line 314 of file AlignmentProducerBase.h.

Referenced by beginRunImpl(), and storeAlignmentsToDB().

◆ gemAliErrToken_

const edm::ESGetToken<AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd> AlignmentProducerBase::gemAliErrToken_
private

Definition at line 271 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemAliToken_

const edm::ESGetToken<Alignments, GEMAlignmentRcd> AlignmentProducerBase::gemAliToken_
private

Definition at line 267 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemGeomToken_

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> AlignmentProducerBase::gemGeomToken_
private

Definition at line 262 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ geomDetToken_

const edm::ESGetToken<GeometricDet, IdealGeometryRecord> AlignmentProducerBase::geomDetToken_
private

Definition at line 257 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ globalPositions_

std::unique_ptr<const Alignments> AlignmentProducerBase::globalPositions_
private

GlobalPositions that might be read from DB, nullptr otherwise.

Definition at line 236 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB(), and writeForRunRange().

◆ gprToken_

const edm::ESGetToken<Alignments, GlobalPositionRcd> AlignmentProducerBase::gprToken_
private

Definition at line 274 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ isAlgoInitialized_

bool AlignmentProducerBase::isAlgoInitialized_ {false}
private

Definition at line 310 of file AlignmentProducerBase.h.

Referenced by initAlignmentAlgorithm(), and startProcessing().

◆ isDuringLoop_

bool AlignmentProducerBase::isDuringLoop_ {false}
private

Definition at line 311 of file AlignmentProducerBase.h.

Referenced by startProcessing(), and terminateProcessing().

◆ monitors_

AlignmentMonitors AlignmentProducerBase::monitors_
private

◆ muonCSCGeometry_

edm::ESHandle<CSCGeometry> AlignmentProducerBase::muonCSCGeometry_
protected

◆ muonDTGeometry_

edm::ESHandle<DTGeometry> AlignmentProducerBase::muonDTGeometry_
protected

◆ muonGEMGeometry_

edm::ESHandle<GEMGeometry> AlignmentProducerBase::muonGEMGeometry_
protected

◆ nevent_

int AlignmentProducerBase::nevent_ {0}
private

Definition at line 239 of file AlignmentProducerBase.h.

Referenced by finish(), initBeamSpot(), nEvent(), processEvent(), and startProcessing().

◆ ptitpToken_

Definition at line 259 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ ptpToken_

const edm::ESGetToken<PTrackerParameters, PTrackerParametersRcd> AlignmentProducerBase::ptpToken_
private

Definition at line 258 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ runAtPCL_

bool AlignmentProducerBase::runAtPCL_ {false}
private

◆ saveApeToDB_

const bool AlignmentProducerBase::saveApeToDB_
private

Definition at line 250 of file AlignmentProducerBase.h.

Referenced by finish(), storeAlignmentsToDB(), and writeDB().

◆ saveDeformationsToDB_

const bool AlignmentProducerBase::saveDeformationsToDB_
private

Definition at line 250 of file AlignmentProducerBase.h.

Referenced by finish(), storeAlignmentsToDB(), writeDB(), and writeForRunRange().

◆ saveToDB_

const bool AlignmentProducerBase::saveToDB_
private

Definition at line 250 of file AlignmentProducerBase.h.

Referenced by finish(), storeAlignmentsToDB(), and writeDB().

◆ stNFixAlignables_

const int AlignmentProducerBase::stNFixAlignables_
private

Definition at line 246 of file AlignmentProducerBase.h.

Referenced by buildParameterStore().

◆ stRandomRotation_

const double AlignmentProducerBase::stRandomRotation_
private

Definition at line 247 of file AlignmentProducerBase.h.

Referenced by applyMisalignment().

◆ stRandomShift_

const double AlignmentProducerBase::stRandomShift_
private

Definition at line 247 of file AlignmentProducerBase.h.

Referenced by applyMisalignment().

◆ surveyErrors_

const SurveyErrors* AlignmentProducerBase::surveyErrors_ {nullptr}
private

Definition at line 307 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyIndex_

size_t AlignmentProducerBase::surveyIndex_ {0}
private

Definition at line 305 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyValues_

const Alignments* AlignmentProducerBase::surveyValues_ {nullptr}
private

Definition at line 306 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ tjTkAssociationMapTag_

const edm::InputTag AlignmentProducerBase::tjTkAssociationMapTag_
protected

Map with tracks/trajectories.

Definition at line 127 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer().

◆ tkAliErrToken_

const edm::ESGetToken<AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd> AlignmentProducerBase::tkAliErrToken_
private

Definition at line 268 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkAliRcdName_

const std::string AlignmentProducerBase::tkAliRcdName_
private

Definition at line 253 of file AlignmentProducerBase.h.

Referenced by writeForRunRange().

◆ tkAliToken_

const edm::ESGetToken<Alignments, TrackerAlignmentRcd> AlignmentProducerBase::tkAliToken_
private

Definition at line 264 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkLasBeamTag_

const edm::InputTag AlignmentProducerBase::tkLasBeamTag_
protected

LAS beams in edm::Run (ignore if empty)

Definition at line 133 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer(), and endRunImpl().

◆ tkSurfDefToken_

const edm::ESGetToken<AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcd> AlignmentProducerBase::tkSurfDefToken_
private

Definition at line 272 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkSurvErrorToken_

const edm::ESGetToken<SurveyErrors, TrackerSurveyErrorExtendedRcd> AlignmentProducerBase::tkSurvErrorToken_
private

Definition at line 276 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ tkSurveyToken_

const edm::ESGetToken<Alignments, TrackerSurveyRcd> AlignmentProducerBase::tkSurveyToken_
private

Definition at line 275 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ trackerGeometry_

std::shared_ptr<TrackerGeometry> AlignmentProducerBase::trackerGeometry_
protected

◆ ttopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> AlignmentProducerBase::ttopoToken_
private

Definition at line 256 of file AlignmentProducerBase.h.

Referenced by initAlignmentAlgorithm().

◆ uniqueRunRanges_

const align::RunRanges AlignmentProducerBase::uniqueRunRanges_
private

Definition at line 238 of file AlignmentProducerBase.h.

Referenced by createAlignmentAlgorithm(), and storeAlignmentsToDB().

◆ useExtras_

const bool AlignmentProducerBase::useExtras_
protected

Definition at line 124 of file AlignmentProducerBase.h.

Referenced by createAlignables().

◆ useSurvey_

const bool AlignmentProducerBase::useSurvey_
private

Definition at line 251 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchCSCAlErrExtRcd_

edm::ESWatcher<CSCAlignmentErrorExtendedRcd> AlignmentProducerBase::watchCSCAlErrExtRcd_
private

Definition at line 294 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCAlRcd_

edm::ESWatcher<CSCAlignmentRcd> AlignmentProducerBase::watchCSCAlRcd_
private

Definition at line 293 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCSurveyErrExtRcd_

edm::ESWatcher<CSCSurveyErrorExtendedRcd> AlignmentProducerBase::watchCSCSurveyErrExtRcd_
private

Definition at line 301 of file AlignmentProducerBase.h.

◆ watchCSCSurveyRcd_

edm::ESWatcher<CSCSurveyRcd> AlignmentProducerBase::watchCSCSurveyRcd_
private

Definition at line 300 of file AlignmentProducerBase.h.

◆ watchDTAlErrExtRcd_

edm::ESWatcher<DTAlignmentErrorExtendedRcd> AlignmentProducerBase::watchDTAlErrExtRcd_
private

Definition at line 292 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTAlRcd_

edm::ESWatcher<DTAlignmentRcd> AlignmentProducerBase::watchDTAlRcd_
private

Definition at line 291 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTSurveyErrExtRcd_

edm::ESWatcher<DTSurveyErrorExtendedRcd> AlignmentProducerBase::watchDTSurveyErrExtRcd_
private

Definition at line 299 of file AlignmentProducerBase.h.

◆ watchDTSurveyRcd_

edm::ESWatcher<DTSurveyRcd> AlignmentProducerBase::watchDTSurveyRcd_
private

Definition at line 298 of file AlignmentProducerBase.h.

◆ watchGlobalPositionRcd_

edm::ESWatcher<GlobalPositionRcd> AlignmentProducerBase::watchGlobalPositionRcd_
private

Definition at line 285 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchIdealGeometryRcd_

edm::ESWatcher<IdealGeometryRecord> AlignmentProducerBase::watchIdealGeometryRcd_
private

Definition at line 284 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTkSurveyErrExtRcd_

edm::ESWatcher<TrackerSurveyErrorExtendedRcd> AlignmentProducerBase::watchTkSurveyErrExtRcd_
private

Definition at line 297 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTkSurveyRcd_

edm::ESWatcher<TrackerSurveyRcd> AlignmentProducerBase::watchTkSurveyRcd_
private

Definition at line 296 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTrackerAlErrorExtRcd_

edm::ESWatcher<TrackerAlignmentErrorExtendedRcd> AlignmentProducerBase::watchTrackerAlErrorExtRcd_
private

Definition at line 288 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerAlRcd_

edm::ESWatcher<TrackerAlignmentRcd> AlignmentProducerBase::watchTrackerAlRcd_
private

Definition at line 287 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerSurDeRcd_

edm::ESWatcher<TrackerSurfaceDeformationRcd> AlignmentProducerBase::watchTrackerSurDeRcd_
private

Definition at line 289 of file AlignmentProducerBase.h.

Referenced by setupChanged().