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_);
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void setupDD4hepGeometry(MuonNumberingRecord const &, std::shared_ptr< HostType > &)
void setupDDDGeometry(MuonNumberingRecord const &, std::shared_ptr< HostType > &)
std::shared_ptr< DTGeometry > produce(const MuonGeometryRecord &record)
Produce DTGeometry.
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
Class to update a given geometry with a set of alignments.
dd4hep::SpecParRefs DDSpecParRefs
edm::ReusableObjectHolder< HostType > holder_
void build(DTGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
Compact representation of the geometrical detector hierarchy.
edm::ESGetToken< cms::DDSpecParRegistry, DDSpecParRegistryRcd > m_registryToken
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
dd4hep::SpecParRegistry DDSpecParRegistry
const std::string m_attribute
const std::string myLabel_
edm::ESGetToken< cms::DDDetector, IdealGeometryRecord > m_cpvToken
const edm::ESInputTag m_tag
const std::string alignmentsLabel_
static void fillDescriptions(edm::ConfigurationDescriptions &)
Creation of configuration file.
void setupDBGeometry(DTRecoGeometryRcd const &, std::shared_ptr< HostType > &)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
edm::ESGetToken< Alignments, GlobalPositionRcd > globalPositionToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string m_value
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T const * product() const
edm::ESGetToken< Alignments, DTAlignmentRcd > alignmentsToken_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
void build(DTGeometry &, const cms::DDDetector *, const MuonGeometryConstants &, const dd4hep::SpecParRefs &)
DTGeometryESModule(const edm::ParameterSet &p)
Constructor.
void build(const std::shared_ptr< DTGeometry > &theGeometry, const RecoIdealGeometry &rig)
edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > alignmentErrorsToken_
edm::ESGetToken< RecoIdealGeometry, DTRecoGeometryRcd > rigToken_