67 : fromDDD_{
p.getParameter<
bool>(
"fromDDD")},
68 fromDD4hep_{
p.getParameter<
bool>(
"fromDD4hep")},
69 applyAlignment_(
p.getParameter<
bool>(
"applyAlignment")),
70 alignmentsLabel_(
p.getParameter<
std::string>(
"alignmentsLabel")) {
71 auto cc = setWhatProduced(
this);
73 cpvToken_ =
cc.consumes();
74 mdcToken_ =
cc.consumes();
75 }
else if (fromDD4hep_) {
76 dd4hepcpvToken_ =
cc.consumes();
77 mdcToken_ =
cc.consumes();
79 riggemToken_ =
cc.consumes();
81 if (applyAlignment_) {
86 edm::LogVerbatim(
"GEMGeometry") <<
"GEMGeometryESModule::initailized with flags " << fromDDD_ <<
":" << fromDD4hep_;
91 desc.add<
bool>(
"fromDDD",
true);
92 desc.add<
bool>(
"fromDD4hep",
false);
93 desc.add<
bool>(
"applyAlignment",
false);
95 descriptions.
add(
"gemGeometry",
desc);
102 edm::LogVerbatim(
"GEMGeometry") <<
"GEMGeometryESModule::produce :: GEMGeometryBuilder builder ddd";
108 edm::LogVerbatim(
"GEMGeometry") <<
"GEMGeometryESModule::produce :: GEMGeometryBuilder builder dd4hep";
114 edm::LogVerbatim(
"GEMGeometry") <<
"GEMGeometryESModule::produce :: GEMGeometryBuilder builder db";
126 if (
alignments.empty() && alignmentErrors.empty() && globalPosition.empty()) {
127 edm::LogInfo(
"Config") <<
"@SUB=GEMGeometryRecord::produce" 129 <<
"') empty: it is assumed fake and will not apply.";
Log< level::Info, true > LogVerbatim
edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > alignmentErrorsToken_
Class to update a given geometry with a set of alignments.
uint32_t cc[maxCellsPerHit]
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
std::unique_ptr< GEMGeometry > produce(const MuonGeometryRecord &record)
Produce GEMGeometry.
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
edm::ESGetToken< Alignments, GlobalPositionRcd > globalPositionToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
Log< level::Info, false > LogInfo
static void fillDescriptions(edm::ConfigurationDescriptions &)
Define the cfi file.
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
GEMGeometryESModule(const edm::ParameterSet &p)
Constructor.
edm::ESGetToken< RecoIdealGeometry, GEMRecoGeometryRcd > riggemToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T const * product() const
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
edm::ESGetToken< Alignments, GEMAlignmentRcd > alignmentsToken_
const std::string alignmentsLabel_
void build(GEMGeometry &theGeometry, const RecoIdealGeometry &rgeo)