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 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")},
54  dtGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
55  cscGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
56  gemGeomToken_(iC.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "idealForAlignmentProducerBase"))),
73  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::AlignmentProducerBase";
74 
75  const auto& algoConfig = config_.getParameterSet("algoConfig");
76  if (config_.existsAs<bool>("runAtPCL")) {
77  // configured in main config?
78  runAtPCL_ = config_.getParameter<bool>("runAtPCL");
79 
80  if (algoConfig.existsAs<bool>("runAtPCL") && (runAtPCL_ != algoConfig.getParameter<bool>("runAtPCL"))) {
81  throw cms::Exception("BadConfig") << "Inconsistent settings for 'runAtPCL' in configuration of the "
82  << "alignment producer and the alignment algorithm.";
83  }
84 
85  } else if (algoConfig.existsAs<bool>("runAtPCL")) {
86  // configured in algo config?
87  runAtPCL_ = algoConfig.getParameter<bool>("runAtPCL");
88 
89  } else {
90  // assume 'false' if it was not configured
91  runAtPCL_ = false;
92  }
93 
95  createMonitors(iC);
97 }
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 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 100 of file AlignmentProducerBase.cc.

100 {}

Member Function Documentation

◆ addSurveyInfo()

void AlignmentProducerBase::addSurveyInfo ( Alignable ali)
private

Adds survey info to an Alignable.

Definition at line 744 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().

744  {
745  const auto& comps = ali->components();
746 
747  for (const auto& comp : comps)
749 
751 
752  if (ali->id() != error.rawId() || ali->alignableObjectId() != error.structureType()) {
753  throw cms::Exception("DatabaseError") << "Error reading survey info from DB. Mismatched id!";
754  }
755 
756  const auto& pos = surveyValues_->m_align[surveyIndex_].translation();
757  const auto& rot = surveyValues_->m_align[surveyIndex_].rotation();
758 
759  AlignableSurface surf(
760  align::PositionType(pos.x(), pos.y(), pos.z()),
761  align::RotationType(rot.xx(), rot.xy(), rot.xz(), rot.yx(), rot.yy(), rot.yz(), rot.zx(), rot.zy(), rot.zz()));
762 
763  surf.setWidth(ali->surface().width());
764  surf.setLength(ali->surface().length());
765 
766  ali->setSurvey(new SurveyDet(surf, error.matrix()));
767 
768  ++surveyIndex_;
769 }
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 447 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().

447  {
448  // Retrieve and apply alignments, if requested (requires z setup)
449  if (applyDbAlignment_) {
450  // we need GlobalPositionRcd - and have to keep track for later removal
451  // before writing again to DB...
452 
453  const Alignments* globalAlignments = &setup.getData(gprToken_);
454  globalPositions_ = std::make_unique<Alignments>(*globalAlignments);
455 
456  if (doTracker_) {
457  applyDB<TrackerGeometry, TrackerAlignmentRcd, TrackerAlignmentErrorExtendedRcd>(
458  trackerGeometry_.get(),
459  setup,
460  tkAliToken_,
463 
464  applyDB<TrackerGeometry, TrackerSurfaceDeformationRcd>(trackerGeometry_.get(), setup, tkSurfDefToken_);
465  }
466 
467  if (doMuon_) {
468  applyDB<DTGeometry, DTAlignmentRcd, DTAlignmentErrorExtendedRcd>(
469  &*muonDTGeometry_,
470  setup,
471  dtAliToken_,
474 
475  applyDB<CSCGeometry, CSCAlignmentRcd, CSCAlignmentErrorExtendedRcd>(
477  setup,
478  cscAliToken_,
481 
482  applyDB<GEMGeometry, GEMAlignmentRcd, GEMAlignmentErrorExtendedRcd>(
484  setup,
485  gemAliToken_,
488  }
489  }
490 }
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 653 of file AlignmentProducerBase.cc.

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

Referenced by initAlignmentAlgorithm(), and startProcessing().

653  {
654  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry"
655  << "Now physically apply alignments to geometry...";
656 
657  // Propagate changes to reconstruction geometry (from initialisation or iteration)
658  GeometryAligner aligner;
659 
660  if (doTracker_) {
661  if (!alignableTracker_) {
662  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
663  << "Trying to apply tracker alignment before creating it.";
664  }
665 
666  std::unique_ptr<Alignments> alignments{alignableTracker_->alignments()};
667  std::unique_ptr<AlignmentErrorsExtended> alignmentErrExt{alignableTracker_->alignmentErrors()};
668  std::unique_ptr<AlignmentSurfaceDeformations> aliDeforms{alignableTracker_->surfaceDeformations()};
669 
670  aligner.applyAlignments(trackerGeometry_.get(), alignments.get(), alignmentErrExt.get(), AlignTransform());
671  aligner.attachSurfaceDeformations(trackerGeometry_.get(), aliDeforms.get());
672  }
673 
674  if (doMuon_) {
675  if (!alignableMuon_) {
676  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::applyAlignmentsToGeometry\n"
677  << "Trying to apply muon alignment before creating it.";
678  }
679 
680  std::unique_ptr<Alignments> dtAlignments{alignableMuon_->dtAlignments()};
681  std::unique_ptr<Alignments> cscAlignments{alignableMuon_->cscAlignments()};
682  std::unique_ptr<Alignments> gemAlignments{alignableMuon_->gemAlignments()};
683 
684  std::unique_ptr<AlignmentErrorsExtended> dtAlignmentErrExt{alignableMuon_->dtAlignmentErrorsExtended()};
685  std::unique_ptr<AlignmentErrorsExtended> cscAlignmentErrExt{alignableMuon_->cscAlignmentErrorsExtended()};
686  std::unique_ptr<AlignmentErrorsExtended> gemAlignmentErrExt{alignableMuon_->gemAlignmentErrorsExtended()};
687 
688  aligner.applyAlignments(&*muonDTGeometry_, dtAlignments.get(), dtAlignmentErrExt.get(), AlignTransform());
689  aligner.applyAlignments(&*muonCSCGeometry_, cscAlignments.get(), cscAlignmentErrExt.get(), AlignTransform());
690  aligner.applyAlignments(&*muonGEMGeometry_, gemAlignments.get(), gemAlignmentErrExt.get(), AlignTransform());
691  }
692 }
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 317 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.

321  {
322  // 'G' is the geometry class for that DB should be applied,
323  // 'Rcd' is the record class for its Alignments
324  // 'ErrRcd' is the record class for its AlignmentErrorsExtended
325  // 'globalCoordinates' are global transformation for this geometry
326 
327  const Rcd& record = iSetup.get<Rcd>();
329  const edm::ValidityInterval& validity = record.validityInterval();
330  const edm::IOVSyncValue first = validity.first();
331  const edm::IOVSyncValue last = validity.last();
333  throw cms::Exception("DatabaseError")
334  << "@SUB=AlignmentProducerBase::applyDB"
335  << "\nTrying to apply " << record.key().name() << " with multiple IOVs in tag.\n"
336  << "Validity range is " << first.eventID().run() << " - " << last.eventID().run();
337  }
338  }
339 
340  const Alignments* alignments = &record.get(aliToken);
341  const AlignmentErrorsExtended* alignmentErrors = &iSetup.getData(errToken);
342 
343  GeometryAligner aligner;
344  aligner.applyAlignments<G>(geometry, alignments, alignmentErrors, globalCoordinates);
345 }
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 348 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.

351  {
352  // 'G' is the geometry class for that DB should be applied,
353  // 'DeformationRcd' is the record class for its surface deformations
354 
355  const DeformationRcd& record = iSetup.get<DeformationRcd>();
357  const edm::ValidityInterval& validity = record.validityInterval();
358  const edm::IOVSyncValue first = validity.first();
359  const edm::IOVSyncValue last = validity.last();
361  throw cms::Exception("DatabaseError")
362  << "@SUB=AlignmentProducerBase::applyDB"
363  << "\nTrying to apply " << record.key().name() << " with multiple IOVs in tag.\n"
364  << "Validity range is " << first.eventID().run() << " - " << last.eventID().run();
365  }
366  }
367  const AlignmentSurfaceDeformations* surfaceDeformations = &record.get(surfDefToken);
368 
369  GeometryAligner aligner;
370  aligner.attachSurfaceDeformations<G>(geometry, surfaceDeformations);
371 }
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 548 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().

548  {
549  // Apply misalignment scenario to alignable tracker and muon if requested
550  // WARNING: this assumes scenarioConfig can be passed to both muon and tracker
551 
553  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
554  << "Applying misalignment scenario to " << (doTracker_ ? "tracker" : "")
555  << (doMuon_ ? (doTracker_ ? " and muon" : "muon") : ".");
556 
557  const auto& scenarioConfig = config_.getParameterSet("MisalignmentScenario");
558 
559  if (doTracker_) {
560  TrackerScenarioBuilder scenarioBuilder(alignableTracker_.get());
561  scenarioBuilder.applyScenario(scenarioConfig);
562  }
563  if (doMuon_) {
564  MuonScenarioBuilder muonScenarioBuilder(alignableMuon_.get());
565  muonScenarioBuilder.applyScenario(scenarioConfig);
566  }
567 
568  } else {
569  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::applyMisalignment"
570  << "NOT applying misalignment scenario!";
571  }
572 
573  // Apply simple misalignment
574  const auto& sParSel = config_.getParameter<std::string>("parameterSelectorSimple");
576 }
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 267 of file AlignmentProducerBase.cc.

References alignmentAlgo_, and singleTopDQM_cfi::setup.

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

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

◆ beginRunImpl()

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

begin run

Definition at line 224 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().

224  {
225  const bool changed{setupChanged(setup)};
226  if (changed) {
227  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::beginRunImpl"
228  << "EventSetup-Record changed.";
229 
230  // updatable alignables are currently not used at PCL, but event setup
231  // changes require a complete re-initialization
232  if (runAtPCL_) {
233  initAlignmentAlgorithm(setup, /* update = */ false);
234  } else if (enableAlignableUpdates_) {
235  initAlignmentAlgorithm(setup, /* update = */ true);
236  }
237  }
238 
239  alignmentAlgo_->beginRun(run, setup, changed && (runAtPCL_ || enableAlignableUpdates_));
240 
241  for (const auto& iCal : calibrations_)
242  iCal->beginRun(run, setup);
243 
244  //store the first run analyzed to be used for setting the IOV (for PCL)
245  if (firstRun_ > static_cast<cond::Time_t>(run.id().run())) {
246  firstRun_ = static_cast<cond::Time_t>(run.id().run());
247  }
248 }
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 520 of file AlignmentProducerBase.cc.

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

Referenced by initAlignmentAlgorithm().

520  {
521  // Create alignment parameter builder
522  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
523  << "Creating AlignmentParameterBuilder";
524 
525  const auto& alParamBuildCfg = config_.getParameter<edm::ParameterSet>("ParameterBuilder");
526  const auto& alParamStoreCfg = config_.getParameter<edm::ParameterSet>("ParameterStore");
527 
528  AlignmentParameterBuilder alignmentParameterBuilder{
529  alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get(), alParamBuildCfg};
530 
531  // Fix alignables if requested
532  if (stNFixAlignables_ > 0) {
533  alignmentParameterBuilder.fixAlignables(stNFixAlignables_);
534  }
535 
536  // Get list of alignables
537  const auto& alignables = alignmentParameterBuilder.alignables();
538  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
539  << "got " << alignables.size() << " alignables";
540 
541  // Create AlignmentParameterStore
542  alignmentParameterStore_ = std::make_unique<AlignmentParameterStore>(alignables, alParamStoreCfg);
543  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::buildParameterStore"
544  << "AlignmentParameterStore created!";
545 }
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 493 of file AlignmentProducerBase.cc.

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

Referenced by initAlignmentAlgorithm().

493  {
494  if (doTracker_) {
495  if (update) {
496  alignableTracker_->update(trackerGeometry_.get(), tTopo);
497  } else {
498  alignableTracker_ = std::make_unique<AlignableTracker>(trackerGeometry_.get(), tTopo);
499  }
500  }
501 
502  if (doMuon_) {
503  if (update) {
505  } else {
506  alignableMuon_ = std::make_unique<AlignableMuon>(&*muonDTGeometry_, &*muonCSCGeometry_, &*muonGEMGeometry_);
507  }
508  }
509 
510  if (useExtras_) {
511  if (update) {
512  // FIXME: Requires further code changes to track beam spot condition changes
513  } else {
514  alignableExtras_ = std::make_unique<AlignableExtras>();
515  }
516  }
517 }
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 279 of file AlignmentProducerBase.cc.

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

279  {
280  auto algoConfig = config_.getParameter<edm::ParameterSet>("algoConfig");
281  algoConfig.addUntrackedParameter("RunRangeSelection", config_.getParameter<edm::VParameterSet>("RunRangeSelection"));
282  algoConfig.addUntrackedParameter<align::RunNumber>("firstIOV", runAtPCL_ ? 1 : uniqueRunRanges_.front().first);
283  algoConfig.addUntrackedParameter("enableAlignableUpdates", enableAlignableUpdates_);
284 
285  const auto& algoName = algoConfig.getParameter<std::string>("algoName");
287 }
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 300 of file AlignmentProducerBase.cc.

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

300  {
301  const auto& calibrations = config_.getParameter<edm::VParameterSet>("calibrations");
302  for (const auto& iCalib : calibrations) {
304  iCalib.getParameter<std::string>("calibrationName"), iCalib, iC));
305  }
306 }
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 430 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().

430  {
431  if (doTracker_) {
432  const GeometricDet* geometricDet = &iSetup.getData(geomDetToken_);
433  const PTrackerParameters* ptp = &iSetup.getData(ptpToken_);
435  TrackerGeomBuilderFromGeometricDet trackerBuilder;
436  trackerGeometry_ = std::shared_ptr<TrackerGeometry>(trackerBuilder.build(geometricDet, ptitp, *ptp, tTopo));
437  }
438 
439  if (doMuon_) {
443  }
444 }
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 290 of file AlignmentProducerBase.cc.

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

290  {
291  const auto& monitorConfig = config_.getParameter<edm::ParameterSet>("monitorConfig");
292  auto monitors = monitorConfig.getUntrackedParameter<std::vector<std::string> >("monitors");
293  for (const auto& miter : monitors) {
294  monitors_.emplace_back(
295  AlignmentMonitorPluginFactory::get()->create(miter, monitorConfig.getUntrackedParameterSet(miter), iC));
296  }
297 }
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 273 of file AlignmentProducerBase.cc.

References alignmentAlgo_, and singleTopDQM_cfi::setup.

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

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

◆ endRunImpl()

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

end run

Definition at line 251 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().

251  {
252  if (!tkLasBeamTag_.encode().empty()) {
256  getTsosVectorCollection(run, tsoses);
257 
258  alignmentAlgo_->endRun(EndRunInfo(run.id(), &(*lasBeams), &(*tsoses)), setup);
259  } else {
260  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::endRunImpl"
261  << "No Tk LAS beams to forward to algorithm.";
262  alignmentAlgo_->endRun(EndRunInfo(run.id(), nullptr, nullptr), setup);
263  }
264 }
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 772 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().

772  {
773  for (const auto& monitor : monitors_)
774  monitor->endOfJob();
775 
776  if (alignmentAlgo_->processesEvents() && nevent_ == 0) {
777  return false;
778  }
779 
781  if (alignmentAlgo_->storeAlignments())
783  } else {
784  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::finish"
785  << "No payload to be stored!";
786  }
787 
788  // takes care of storing output of calibrations, but needs to be called only
789  // after 'storeAlignmentsToDB()'
790  for (const auto& iCal : calibrations_)
791  iCal->endOfJob();
792 
793  return true;
794 }
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 361 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().

361  {
362  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
363  << "Begin";
364 
365  auto isTrueUpdate = update && isAlgoInitialized_;
366 
367  // Retrieve tracker topology from geometry
368  const TrackerTopology* const tTopo = &setup.getData(ttopoToken_);
369 
370  // Create the geometries from the ideal geometries
371  createGeometries(setup, tTopo);
372 
374  createAlignables(tTopo, isTrueUpdate);
377 
378  // Initialize alignment algorithm and integrated calibration and pass the
379  // latter to algorithm
380  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
381  << "Initializing alignment algorithm.";
382  alignmentAlgo_->initialize(
384 
385  // Not all algorithms support calibrations - so do not pass empty vector
386  // and throw if non-empty and not supported:
387  if (!calibrations_.empty()) {
388  if (alignmentAlgo_->supportsCalibrations()) {
389  alignmentAlgo_->addCalibrations(calibrations_);
390  } else {
391  throw cms::Exception("BadConfig") << "@SUB=AlignmentProducerBase::createCalibrations\n"
392  << "Configured " << calibrations_.size() << " calibration(s) "
393  << "for algorithm not supporting it.";
394  }
395  }
396 
397  isAlgoInitialized_ = true;
398 
400 
401  if (!isTrueUpdate) { // only needed the first time
402  for (const auto& iCal : calibrations_) {
403  iCal->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignableExtras_.get());
404  }
405  for (const auto& monitor : monitors_) {
406  monitor->beginOfJob(alignableTracker_.get(), alignableMuon_.get(), alignmentParameterStore_.get());
407  }
408  }
409  startProcessing(); // needed if derived class is non-EDLooper-based
410  // has no effect, if called during loop
411 
412  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initAlignmentAlgorithm"
413  << "End";
414 }
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 417 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().

417  {
419 
420  if (nevent_ == 0 && alignableExtras_) {
421  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::initBeamSpot"
422  << "Initializing AlignableBeamSpot";
423 
424  alignableExtras_->initializeBeamSpot(
426  }
427 }
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 153 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().

153  {
154  if (setupChanged(setup)) {
155  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
156  << "EventSetup-Record changed.";
157 
158  // updatable alignables are currently not used at PCL, but event setup
159  // changes require a complete re-initialization
160  if (runAtPCL_) {
161  initAlignmentAlgorithm(setup, /* update = */ false);
162  } else if (enableAlignableUpdates_) {
163  initAlignmentAlgorithm(setup, /* update = */ true);
164  }
165  }
166 
167  initBeamSpot(event); // must happen every event and before incrementing 'nevent_'
168 
169  ++nevent_; // must happen before the check below;
170  // otherwise subsequent checks fail for "EmptySource"
171 
172  if (!alignmentAlgo_->processesEvents()) {
173  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
174  << "Skipping event. The current configuration of the alignment algorithm "
175  << "does not need to process any events.";
176  return false;
177  }
178 
179  // reading in survey records
181 
182  // Printout event number
183  for (int i = 10; i < 10000000; i *= 10) {
184  if (nevent_ < 10 * i && (nevent_ % i) == 0) {
185  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
186  << "Events processed: " << nevent_;
187  }
188  }
189 
190  // Retrieve trajectories and tracks from the event
191  // -> merely skip if collection is empty
192  edm::Handle<TrajTrackAssociationCollection> handleTrajTracksCollection;
193 
194  if (getTrajTrackAssociationCollection(event, handleTrajTracksCollection)) {
195  // Form pairs of trajectories and tracks
196  ConstTrajTrackPairs trajTracks;
197  for (auto iter = handleTrajTracksCollection->begin(); iter != handleTrajTracksCollection->end(); ++iter) {
198  trajTracks.push_back(ConstTrajTrackPair(&(*(*iter).key), &(*(*iter).val)));
199  }
200 
201  // Run the alignment algorithm with its input
202  const AliClusterValueMap* clusterValueMapPtr{nullptr};
203  if (!clusterValueMapTag_.encode().empty()) {
204  edm::Handle<AliClusterValueMap> clusterValueMap;
205  getAliClusterValueMap(event, clusterValueMap);
206  clusterValueMapPtr = &(*clusterValueMap);
207  }
208 
209  const AlignmentAlgorithmBase::EventInfo eventInfo{event.id(), trajTracks, *beamSpot_, clusterValueMapPtr};
211 
212  for (const auto& monitor : monitors_) {
213  monitor->duringLoop(event, setup, trajTracks); // forward eventInfo?
214  }
215  } else {
216  edm::LogError("Alignment") << "@SUB=AlignmentProducerBase::processEvent"
217  << "No track collection found: skipping event";
218  }
219 
220  return true;
221 }
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 695 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().

695  {
696  // Get Survey Rcds and add Survey Info
697  if (doTracker_ && useSurvey_) {
698  bool tkSurveyBool = watchTkSurveyRcd_.check(iSetup);
699  bool tkSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
700  edm::LogInfo("Alignment") << "watcher tksurveyrcd: " << tkSurveyBool;
701  edm::LogInfo("Alignment") << "watcher tksurveyerrrcd: " << tkSurveyErrBool;
702  if (tkSurveyBool || tkSurveyErrBool) {
703  edm::LogInfo("Alignment") << "ADDING THE SURVEY INFORMATION";
704  const Alignments* surveys = &iSetup.getData(tkSurveyToken_);
705  const SurveyErrors* surveyErrors = &iSetup.getData(tkSurvErrorToken_);
706 
707  surveyIndex_ = 0;
708  surveyValues_ = &*surveys;
709  surveyErrors_ = &*surveyErrors;
711  }
712  }
713 
714  if (doMuon_ && useSurvey_) {
715  bool DTSurveyBool = watchTkSurveyRcd_.check(iSetup);
716  bool DTSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
717  bool CSCSurveyBool = watchTkSurveyRcd_.check(iSetup);
718  bool CSCSurveyErrBool = watchTkSurveyErrExtRcd_.check(iSetup);
719 
720  if (DTSurveyBool || DTSurveyErrBool || CSCSurveyBool || CSCSurveyErrBool) {
721  const Alignments* dtSurveys = &iSetup.getData(dtSurveyToken_);
722  const SurveyErrors* dtSurveyErrors = &iSetup.getData(dtSurvErrorToken_);
723  const Alignments* cscSurveys = &iSetup.getData(cscSurveyToken_);
724  const SurveyErrors* cscSurveyErrors = &iSetup.getData(cscSurvErrorToken_);
725 
726  surveyIndex_ = 0;
727  surveyValues_ = &*dtSurveys;
728  surveyErrors_ = &*dtSurveyErrors;
729  const auto& barrels = alignableMuon_->DTBarrel();
730  for (const auto& barrel : barrels)
732 
733  surveyIndex_ = 0;
734  surveyValues_ = &*cscSurveys;
735  surveyErrors_ = &*cscSurveyErrors;
736  const auto& endcaps = alignableMuon_->CSCEndcaps();
737  for (const auto& endcap : endcaps)
739  }
740  }
741 }
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 309 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().

309  {
310  bool changed{false};
311 
313  changed = true;
314  }
315 
317  changed = true;
318  }
319 
320  if (doTracker_) {
322  changed = true;
323  }
324 
326  changed = true;
327  }
328 
330  changed = true;
331  }
332  }
333 
334  if (doMuon_) {
335  if (watchDTAlRcd_.check(setup)) {
336  changed = true;
337  }
338 
340  changed = true;
341  }
342 
343  if (watchCSCAlRcd_.check(setup)) {
344  changed = true;
345  }
346 
348  changed = true;
349  }
350  }
351 
352  /* TODO: ExtraAlignables: Which record(s) to check?
353  *
354  if (useExtras_) {}
355  */
356 
357  return changed;
358 }
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 579 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().

580  {
581  std::ostringstream output; // collecting output
582 
583  if (shift > 0. || rot > 0.) {
584  output << "Adding random flat shift of max size " << shift << " and adding random flat rotation of max size " << rot
585  << " to ";
586 
587  std::vector<bool> commSel(0);
588  if (selection != "-1") {
589  AlignmentParameterSelector aSelector(nullptr, nullptr); // no alignable needed here...
590  const std::vector<char> cSel(aSelector.convertParamSel(selection));
591  if (cSel.size() < RigidBodyAlignmentParameters::N_PARAM) {
592  throw cms::Exception("BadConfig")
593  << "[AlignmentProducerBase::simpleMisalignment_]\n"
594  << "Expect selection string '" << selection << "' to be at least of length "
595  << RigidBodyAlignmentParameters::N_PARAM << " or to be '-1'.\n"
596  << "(Most probably you have to adjust the parameter 'parameterSelectorSimple'.)";
597  }
598  for (const auto& cIter : cSel) {
599  commSel.push_back(cIter == '0' ? false : true);
600  }
601  output << "parameters defined by (" << selection << "), representing (x,y,z,alpha,beta,gamma),";
602  } else {
603  output << "the active parameters of each alignable,";
604  }
605  output << " in " << (local ? "local" : "global") << " frame.";
606 
607  for (const auto& ali : alivec) {
608  std::vector<bool> mysel(commSel.empty() ? ali->alignmentParameters()->selector() : commSel);
609 
610  if (std::abs(shift) > 0.00001) {
611  double s0 = 0., s1 = 0., s2 = 0.;
613  s0 = shift * double(random() % 1000 - 500) / 500.;
615  s1 = shift * double(random() % 1000 - 500) / 500.;
617  s2 = shift * double(random() % 1000 - 500) / 500.;
618 
619  if (local)
620  ali->move(ali->surface().toGlobal(align::LocalVector(s0, s1, s2)));
621  else
622  ali->move(align::GlobalVector(s0, s1, s2));
623 
624  //AlignmentPositionError ape(dx,dy,dz);
625  //ali->addAlignmentPositionError(ape);
626  }
627 
628  if (std::abs(rot) > 0.00001) {
631  r(1) = rot * double(random() % 1000 - 500) / 500.;
633  r(2) = rot * double(random() % 1000 - 500) / 500.;
635  r(3) = rot * double(random() % 1000 - 500) / 500.;
636 
637  const align::RotationType mrot = align::toMatrix(r);
638  if (local)
639  ali->rotateInLocalFrame(mrot);
640  else
641  ali->rotateInGlobalFrame(mrot);
642 
643  //ali->addAlignmentPositionErrorFromRotation(mrot);
644  }
645  } // end loop on alignables
646  } else {
647  output << "No simple misalignment added!";
648  }
649  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::simpleMisalignment" << output.str();
650 }
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 103 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().

103  {
104  if (isDuringLoop_)
105  return;
106 
107  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::startProcessing"
108  << "Begin";
109 
110  if (!isAlgoInitialized_) {
111  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::startProcessing\n"
112  << "Trying to start event processing before initializing the alignment "
113  << "algorithm.";
114  }
115 
116  nevent_ = 0;
117 
118  alignmentAlgo_->startNewLoop();
119 
120  // FIXME: Should this be done in algorithm::startNewLoop()??
121  for (const auto& iCal : calibrations_)
122  iCal->startNewLoop();
123  for (const auto& monitor : monitors_)
124  monitor->startingNewLoop();
125 
127  isDuringLoop_ = true;
128 }
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 797 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().

797  {
798  const auto runRangeSelectionVPSet = config_.getParameterSetVector("RunRangeSelection");
799 
800  // handle PCL use case
801  const auto& uniqueRunRanges =
802  (runAtPCL_ ? align::makeUniqueRunRanges(runRangeSelectionVPSet, firstRun_) : uniqueRunRanges_);
803 
804  std::vector<AlgebraicVector> beamSpotParameters;
805 
806  for (const auto& iRunRange : uniqueRunRanges) {
807  alignmentAlgo_->setParametersForRunRange(iRunRange);
808 
809  // Save alignments to database
811  writeForRunRange(iRunRange.first);
812  }
813 
814  // Deal with extra alignables, e.g. beam spot
815  if (alignableExtras_) {
816  auto& alis = alignableExtras_->beamSpot();
817  if (!alis.empty()) {
818  auto beamSpotAliPars = dynamic_cast<BeamSpotAlignmentParameters*>(alis[0]->alignmentParameters());
819  if (!beamSpotAliPars) {
820  throw cms::Exception("LogicError") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB\n"
821  << "First alignable of alignableExtras_ does not have "
822  << "'BeamSpotAlignmentParameters', while it should have.";
823  }
824 
825  beamSpotParameters.push_back(beamSpotAliPars->parameters());
826  }
827  }
828  }
829 
830  if (alignableExtras_) {
831  std::ostringstream bsOutput;
832 
833  auto itPar = beamSpotParameters.cbegin();
834  for (auto iRunRange = uniqueRunRanges.cbegin(); iRunRange != uniqueRunRanges.cend(); ++iRunRange, ++itPar) {
835  bsOutput << "Run range: " << (*iRunRange).first << " - " << (*iRunRange).second << "\n";
836  bsOutput << " Displacement: x=" << (*itPar)[0] << ", y=" << (*itPar)[1] << "\n";
837  bsOutput << " Slope: dx/dz=" << (*itPar)[2] << ", dy/dz=" << (*itPar)[3] << "\n";
838  }
839 
840  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::storeAlignmentsToDB"
841  << "Parameters for alignable beamspot:\n"
842  << bsOutput.str();
843  }
844 }
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 131 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().

131  {
132  if (!isDuringLoop_)
133  return;
134 
135  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::terminateProcessing"
136  << "Terminating algorithm.";
137  if (setup) {
138  alignmentAlgo_->terminate(*setup);
139  } else {
140  alignmentAlgo_->terminate();
141  }
142 
143  // FIXME: Should this be done in algorithm::terminate()??
144  for (const auto& iCal : calibrations_)
145  iCal->endOfLoop();
146  for (const auto& monitor : monitors_)
147  monitor->endOfLoop();
148 
149  isDuringLoop_ = false;
150 }
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 847 of file AlignmentProducerBase.cc.

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

Referenced by storeAlignmentsToDB().

847  {
848  if (doTracker_ and alignableTracker_) { // first tracker
849  const AlignTransform* trackerGlobal{nullptr}; // will be 'removed' from constants
850  if (globalPositions_) { // i.e. applied before in applyDB
852  }
853 
854  auto alignments = alignableTracker_->alignments();
855  auto alignmentErrors = alignableTracker_->alignmentErrors();
856  this->writeDB(
857  alignments, "TrackerAlignmentRcd", 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_
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 269 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ cscAliToken_

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

Definition at line 265 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ cscGeomToken_

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

Definition at line 260 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ cscSurvErrorToken_

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

Definition at line 279 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ cscSurveyToken_

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

Definition at line 278 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 268 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ dtAliToken_

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

Definition at line 264 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ dtGeomToken_

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

Definition at line 259 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ dtSurvErrorToken_

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

Definition at line 277 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ dtSurveyToken_

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

Definition at line 276 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 313 of file AlignmentProducerBase.h.

Referenced by beginRunImpl(), and storeAlignmentsToDB().

◆ gemAliErrToken_

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

Definition at line 270 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemAliToken_

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

Definition at line 266 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemGeomToken_

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

Definition at line 261 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ geomDetToken_

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

Definition at line 256 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 273 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ isAlgoInitialized_

bool AlignmentProducerBase::isAlgoInitialized_ {false}
private

Definition at line 309 of file AlignmentProducerBase.h.

Referenced by initAlignmentAlgorithm(), and startProcessing().

◆ isDuringLoop_

bool AlignmentProducerBase::isDuringLoop_ {false}
private

Definition at line 310 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 258 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ ptpToken_

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

Definition at line 257 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 306 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyIndex_

size_t AlignmentProducerBase::surveyIndex_ {0}
private

Definition at line 304 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyValues_

const Alignments* AlignmentProducerBase::surveyValues_ {nullptr}
private

Definition at line 305 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 267 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkAliToken_

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

Definition at line 263 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 271 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkSurvErrorToken_

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

Definition at line 275 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ tkSurveyToken_

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

Definition at line 274 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 255 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 293 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCAlRcd_

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

Definition at line 292 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCSurveyErrExtRcd_

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

Definition at line 300 of file AlignmentProducerBase.h.

◆ watchCSCSurveyRcd_

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

Definition at line 299 of file AlignmentProducerBase.h.

◆ watchDTAlErrExtRcd_

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

Definition at line 291 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTAlRcd_

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

Definition at line 290 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTSurveyErrExtRcd_

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

Definition at line 298 of file AlignmentProducerBase.h.

◆ watchDTSurveyRcd_

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

Definition at line 297 of file AlignmentProducerBase.h.

◆ watchGlobalPositionRcd_

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

Definition at line 284 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchIdealGeometryRcd_

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

Definition at line 283 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTkSurveyErrExtRcd_

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

Definition at line 296 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTkSurveyRcd_

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

Definition at line 295 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTrackerAlErrorExtRcd_

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

Definition at line 287 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerAlRcd_

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

Definition at line 286 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerSurDeRcd_

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

Definition at line 288 of file AlignmentProducerBase.h.

Referenced by setupChanged().