|
|
Go to the documentation of this file.
91 alignmentsLabel_(
p.getParameter<
std::
string>(
"alignmentsLabel")),
92 myLabel_(
p.getParameter<
std::
string>(
"appendToDataLabel")),
93 m_attribute(
p.getParameter<
std::
string>(
"attribute")),
95 fromDDD_(
p.getParameter<
bool>(
"fromDDD")),
96 fromDD4hep_(
p.getParameter<
bool>(
"fromDD4hep")) {
118 << (
applyAlignment_ ?
"looking for" :
"IGNORING") <<
" alignment labels '"
127 desc.add<
bool>(
"fromDDD",
true);
128 desc.add<
bool>(
"fromDD4hep",
false);
134 desc.add<
bool>(
"applyAlignment",
true);
135 descriptions.
add(
"DTGeometryESModule",
desc);
139 auto host = holder_.makeOrGet([]() {
return new HostType; });
143 }
else if (fromDD4hep_) {
145 [
this, &
host](
auto const& rec) { setupDD4hepGeometry(rec,
host); });
152 if (applyAlignment_) {
155 const auto& globalPosition =
record.get(globalPositionToken_);
156 const auto& alignments =
record.get(alignmentsToken_);
157 const auto& alignmentErrors =
record.get(alignmentErrorsToken_);
159 if (alignments.empty() && alignmentErrors.empty() && globalPosition.empty()) {
160 edm::LogVerbatim(
"Geometry") <<
"@SUB=DTGeometryRecord::produce Alignment(Error)s and global position (label '"
161 << alignmentsLabel_ <<
"') empty: Geometry producer (label '" << myLabel_
162 <<
"') assumes fake and does not apply.";
180 const auto& mdc =
record.get(mdcToken_);
190 const auto& mdc =
record.get(mdcToken_);
195 registry->filter(myReg, m_attribute, m_value);
208 const auto& rig =
record.get(rigToken_);
DTGeometryESModule(const edm::ParameterSet &p)
Constructor.
T const * product() const
dd4hep::SpecParRefs DDSpecParRefs
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< RecoIdealGeometry, DTRecoGeometryRcd > rigToken_
const edm::ESInputTag m_tag
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
const std::string myLabel_
dd4hep::SpecParRegistry DDSpecParRegistry
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Compact representation of the geometrical detector hierarchy.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ReusableObjectHolder< HostType > holder_
void build(DTGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
void setupDBGeometry(DTRecoGeometryRcd const &, std::shared_ptr< HostType > &)
edm::ESGetToken< cms::DDSpecParRegistry, DDSpecParRegistryRcd > m_registryToken
edm::ESGetToken< Alignments, GlobalPositionRcd > globalPositionToken_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
edm::ESGetToken< Alignments, DTAlignmentRcd > alignmentsToken_
const std::string alignmentsLabel_
edm::ESGetToken< cms::DDDetector, IdealGeometryRecord > m_cpvToken
const std::string m_attribute
void build(const std::shared_ptr< DTGeometry > &theGeometry, const RecoIdealGeometry &rig)
void build(DTGeometry &, const cms::DDDetector *, const MuonGeometryConstants &, const dd4hep::SpecParRefs &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, true > LogVerbatim
edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > alignmentErrorsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)
Creation of configuration file.
void setupDDDGeometry(MuonNumberingRecord const &, std::shared_ptr< HostType > &)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
std::shared_ptr< DTGeometry > produce(const MuonGeometryRecord &record)
Produce DTGeometry.
const std::string m_value
void setupDD4hepGeometry(MuonNumberingRecord const &, std::shared_ptr< HostType > &)
Class to update a given geometry with a set of alignments.
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_