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< 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 73 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")},
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 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 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 743 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().

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

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

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

Referenced by initAlignmentAlgorithm(), and startProcessing().

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

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

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

◆ 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 346 of file AlignmentProducerBase.h.

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

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

◆ applyMisalignment()

void AlignmentProducerBase::applyMisalignment ( )
private

Applies misalignment scenario to .

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

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

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

Referenced by initAlignmentAlgorithm().

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

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

Referenced by initAlignmentAlgorithm().

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

Referenced by initAlignmentAlgorithm().

430  {
431  if (doTracker_) {
432  const GeometricDet* geometricDet = &iSetup.getData(geomDetToken_);
433  const PTrackerParameters* ptp = &iSetup.getData(ptpToken_);
434  TrackerGeomBuilderFromGeometricDet trackerBuilder;
435  trackerGeometry_ = std::shared_ptr<TrackerGeometry>(trackerBuilder.build(geometricDet, *ptp, tTopo));
436  }
437 
438  if (doMuon_) {
442  }
443 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
std::shared_ptr< TrackerGeometry > trackerGeometry_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESHandle< DTGeometry > muonDTGeometry_
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 771 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().

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

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

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

◆ 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 796 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().

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

887  {
888  Alignments* tempAlignments = alignments;
889  AlignmentErrorsExtended* tempAlignmentErrorsExtended = alignmentErrors;
890 
891  // Call service
893  if (!poolDb.isAvailable()) { // Die if not available
894  delete tempAlignments; // promised to take over ownership...
895  delete tempAlignmentErrorsExtended; // ditto
896  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
897  }
898 
899  if (globalCoordinates // happens only if (applyDbAlignment_ == true)
900  && globalCoordinates->transform() != AlignTransform::Transform::Identity) {
901  tempAlignments = new Alignments(); // temporary storage for
902  tempAlignmentErrorsExtended = new AlignmentErrorsExtended(); // final alignments and errors
903 
904  GeometryAligner aligner;
905  aligner.removeGlobalTransform(
906  alignments, alignmentErrors, *globalCoordinates, tempAlignments, tempAlignmentErrorsExtended);
907 
908  delete alignments; // have to delete original alignments
909  delete alignmentErrors; // same thing for the errors
910 
911  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::writeDB"
912  << "globalCoordinates removed from alignments (" << alignRcd << ") and errors ("
913  << alignRcd << ").";
914  }
915 
916  if (saveToDB_) {
917  edm::LogInfo("Alignment") << "Writing Alignments for run " << time << " to " << alignRcd << ".";
918  poolDb->writeOneIOV<Alignments>(*tempAlignments, time, alignRcd);
919  } else {
920  delete tempAlignments; // ...otherwise we have to delete, as promised!
921  }
922 
923  if (saveApeToDB_) {
924  edm::LogInfo("Alignment") << "Writing AlignmentErrorsExtended for run " << time << " to " << errRcd << ".";
925  poolDb->writeOneIOV<AlignmentErrorsExtended>(*tempAlignmentErrorsExtended, time, errRcd);
926  } else {
927  delete tempAlignmentErrorsExtended; // ...otherwise we have to delete, as promised!
928  }
929 }
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 932 of file AlignmentProducerBase.cc.

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

934  {
935  // Call service
937  if (!poolDb.isAvailable()) { // Die if not available
938  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
939  }
940 
941  if (saveDeformationsToDB_) {
942  edm::LogInfo("Alignment") << "Writing AlignmentSurfaceDeformations for run " << time << " to "
943  << surfaceDeformationRcd << ".";
944  poolDb->writeOneIOV<AlignmentSurfaceDeformations>(alignmentSurfaceDeformations, time, surfaceDeformationRcd);
945  }
946 }
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 846 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().

846  {
847  if (doTracker_ and alignableTracker_) { // first tracker
848  const AlignTransform* trackerGlobal{nullptr}; // will be 'removed' from constants
849  if (globalPositions_) { // i.e. applied before in applyDB
851  }
852 
853  auto alignments = alignableTracker_->alignments();
854  auto alignmentErrors = alignableTracker_->alignmentErrors();
855  this->writeDB(alignments, tkAliRcdName_, alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time);
856 
857  // Save surface deformations to database
858  if (saveDeformationsToDB_) {
859  const auto alignmentSurfaceDeformations = *(alignableTracker_->surfaceDeformations());
860  this->writeDB(alignmentSurfaceDeformations, "TrackerSurfaceDeformationRcd", time);
861  }
862  }
863 
864  if (doMuon_ and alignableMuon_) { // now muon
865  const AlignTransform* muonGlobal{nullptr}; // will be 'removed' from constants
866  if (globalPositions_) { // i.e. applied before in applyDB
868  }
869  // Get alignments+errors, first DT - ownership taken over by writeDB(..), so no delete
870  auto alignments = alignableMuon_->dtAlignments();
871  auto alignmentErrors = alignableMuon_->dtAlignmentErrorsExtended();
872  this->writeDB(alignments, "DTAlignmentRcd", alignmentErrors, "DTAlignmentErrorExtendedRcd", muonGlobal, time);
873 
874  // Get alignments+errors, now CSC - ownership taken over by writeDB(..), so no delete
875  alignments = alignableMuon_->cscAlignments();
876  alignmentErrors = alignableMuon_->cscAlignmentErrorsExtended();
877  this->writeDB(alignments, "CSCAlignmentRcd", alignmentErrors, "CSCAlignmentErrorExtendedRcd", muonGlobal, time);
878  }
879 }
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 246 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ beamSpot_

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

Definition at line 232 of file AlignmentProducerBase.h.

Referenced by initBeamSpot(), and processEvent().

◆ beamSpotTag_

const edm::InputTag AlignmentProducerBase::beamSpotTag_
protected

BeamSpot.

Definition at line 128 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer().

◆ calibrations_

CalibrationsOwner AlignmentProducerBase::calibrations_
private

◆ checkDbAlignmentValidity_

const bool AlignmentProducerBase::checkDbAlignmentValidity_
private

Definition at line 246 of file AlignmentProducerBase.h.

Referenced by applyDB().

◆ clusterValueMapTag_

const edm::InputTag AlignmentProducerBase::clusterValueMapTag_
protected

ValueMap containing associtaion cluster-flag.

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

Referenced by applyAlignmentsToDB().

◆ cscAliToken_

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

Definition at line 263 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ cscGeomToken_

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

Definition at line 258 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ cscSurvErrorToken_

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

Definition at line 277 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ cscSurveyToken_

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

Definition at line 276 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ doMisalignmentScenario_

const bool AlignmentProducerBase::doMisalignmentScenario_
private

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

Referenced by applyAlignmentsToDB().

◆ dtAliToken_

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

Definition at line 262 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ dtGeomToken_

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

Definition at line 257 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ dtSurvErrorToken_

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

Definition at line 275 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ dtSurveyToken_

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

Definition at line 274 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ enableAlignableUpdates_

const bool AlignmentProducerBase::enableAlignableUpdates_
private

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

Referenced by beginRunImpl(), and storeAlignmentsToDB().

◆ gemAliErrToken_

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

Definition at line 268 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemAliToken_

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

Definition at line 264 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ gemGeomToken_

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

Definition at line 259 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ geomDetToken_

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

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

Referenced by applyAlignmentsToDB(), and writeForRunRange().

◆ gprToken_

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

Definition at line 271 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ isAlgoInitialized_

bool AlignmentProducerBase::isAlgoInitialized_ {false}
private

Definition at line 307 of file AlignmentProducerBase.h.

Referenced by initAlignmentAlgorithm(), and startProcessing().

◆ isDuringLoop_

bool AlignmentProducerBase::isDuringLoop_ {false}
private

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

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

◆ ptpToken_

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

Definition at line 256 of file AlignmentProducerBase.h.

Referenced by createGeometries().

◆ runAtPCL_

bool AlignmentProducerBase::runAtPCL_ {false}
private

◆ saveApeToDB_

const bool AlignmentProducerBase::saveApeToDB_
private

Definition at line 248 of file AlignmentProducerBase.h.

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

◆ saveDeformationsToDB_

const bool AlignmentProducerBase::saveDeformationsToDB_
private

Definition at line 248 of file AlignmentProducerBase.h.

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

◆ saveToDB_

const bool AlignmentProducerBase::saveToDB_
private

Definition at line 248 of file AlignmentProducerBase.h.

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

◆ stNFixAlignables_

const int AlignmentProducerBase::stNFixAlignables_
private

Definition at line 244 of file AlignmentProducerBase.h.

Referenced by buildParameterStore().

◆ stRandomRotation_

const double AlignmentProducerBase::stRandomRotation_
private

Definition at line 245 of file AlignmentProducerBase.h.

Referenced by applyMisalignment().

◆ stRandomShift_

const double AlignmentProducerBase::stRandomShift_
private

Definition at line 245 of file AlignmentProducerBase.h.

Referenced by applyMisalignment().

◆ surveyErrors_

const SurveyErrors* AlignmentProducerBase::surveyErrors_ {nullptr}
private

Definition at line 304 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyIndex_

size_t AlignmentProducerBase::surveyIndex_ {0}
private

Definition at line 302 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ surveyValues_

const Alignments* AlignmentProducerBase::surveyValues_ {nullptr}
private

Definition at line 303 of file AlignmentProducerBase.h.

Referenced by addSurveyInfo(), and readInSurveyRcds().

◆ tjTkAssociationMapTag_

const edm::InputTag AlignmentProducerBase::tjTkAssociationMapTag_
protected

Map with tracks/trajectories.

Definition at line 125 of file AlignmentProducerBase.h.

Referenced by AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer().

◆ tkAliErrToken_

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

Definition at line 265 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkAliRcdName_

const std::string AlignmentProducerBase::tkAliRcdName_
private

Definition at line 251 of file AlignmentProducerBase.h.

Referenced by writeForRunRange().

◆ tkAliToken_

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

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

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

◆ tkSurfDefToken_

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

Definition at line 269 of file AlignmentProducerBase.h.

Referenced by applyAlignmentsToDB().

◆ tkSurvErrorToken_

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

Definition at line 273 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ tkSurveyToken_

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

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

Referenced by initAlignmentAlgorithm().

◆ uniqueRunRanges_

const align::RunRanges AlignmentProducerBase::uniqueRunRanges_
private

Definition at line 236 of file AlignmentProducerBase.h.

Referenced by createAlignmentAlgorithm(), and storeAlignmentsToDB().

◆ useExtras_

const bool AlignmentProducerBase::useExtras_
protected

Definition at line 122 of file AlignmentProducerBase.h.

Referenced by createAlignables().

◆ useSurvey_

const bool AlignmentProducerBase::useSurvey_
private

Definition at line 249 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchCSCAlErrExtRcd_

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

Definition at line 291 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCAlRcd_

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

Definition at line 290 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchCSCSurveyErrExtRcd_

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

Definition at line 298 of file AlignmentProducerBase.h.

◆ watchCSCSurveyRcd_

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

Definition at line 297 of file AlignmentProducerBase.h.

◆ watchDTAlErrExtRcd_

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

Definition at line 289 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTAlRcd_

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

Definition at line 288 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchDTSurveyErrExtRcd_

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

Definition at line 296 of file AlignmentProducerBase.h.

◆ watchDTSurveyRcd_

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

Definition at line 295 of file AlignmentProducerBase.h.

◆ watchGlobalPositionRcd_

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

Definition at line 282 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchIdealGeometryRcd_

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

Definition at line 281 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTkSurveyErrExtRcd_

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

Definition at line 294 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTkSurveyRcd_

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

Definition at line 293 of file AlignmentProducerBase.h.

Referenced by readInSurveyRcds().

◆ watchTrackerAlErrorExtRcd_

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

Definition at line 285 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerAlRcd_

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

Definition at line 284 of file AlignmentProducerBase.h.

Referenced by setupChanged().

◆ watchTrackerSurDeRcd_

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

Definition at line 286 of file AlignmentProducerBase.h.

Referenced by setupChanged().