Go to the documentation of this file.
74 : useDDD_{
p.getParameter<
bool>(
"useDDD")},
75 useDD4hep_{
p.getUntrackedParameter<
bool>(
"useDD4hep",
false)},
76 applyAlignment_(
p.getParameter<
bool>(
"applyAlignment")),
77 alignmentsLabel_(
p.getParameter<
std::string>(
"alignmentsLabel")) {
78 auto cc = setWhatProduced(
this);
79 if (useDDD_ || useDD4hep_) {
80 cc.setConsumes(cpvToken_).setConsumes(mdcToken_);
82 cc.setConsumes(riggemToken_);
84 if (applyAlignment_) {
87 .setConsumes(alignmentErrorsToken_,
edm::ESInputTag{
"", alignmentsLabel_});
94 auto gemGeometry = std::make_unique<GEMGeometry>();
100 builder.
build(*gemGeometry, cpv.product(), mdc);
109 builder.
build(*gemGeometry, riggem);
118 if (alignments.empty() && alignmentErrors.empty() && globalPosition.empty()) {
119 edm::LogInfo(
"Config") <<
"@SUB=GEMGeometryRecord::produce"
121 <<
"') empty: it is assumed fake and will not apply.";
std::unique_ptr< GEMGeometry > produce(const MuonGeometryRecord &record)
Produce GEMGeometry.
T const * product() const
const std::string alignmentsLabel_
~GEMGeometryESModule() override
Destructor.
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
edm::ESGetToken< Alignments, GlobalPositionRcd > globalPositionToken_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< RecoIdealGeometry, GEMRecoGeometryRcd > riggemToken_
edm::ESGetToken< Alignments, GEMAlignmentRcd > alignmentsToken_
GEMGeometryESModule(const edm::ParameterSet &p)
Constructor.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
void build(GEMGeometry &theGeometry, const RecoIdealGeometry &rgeo)
edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > alignmentErrorsToken_
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
Class to update a given geometry with a set of alignments.