|
|
Go to the documentation of this file.
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.";
static void fillDescriptions(edm::ConfigurationDescriptions &)
Define the cfi file.
std::unique_ptr< GEMGeometry > produce(const MuonGeometryRecord &record)
Produce GEMGeometry.
T const * product() const
const std::string alignmentsLabel_
Log< level::Info, false > LogInfo
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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_
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
edm::ESGetToken< Alignments, GEMAlignmentRcd > alignmentsToken_
GEMGeometryESModule(const edm::ParameterSet &p)
Constructor.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, true > LogVerbatim
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
void build(GEMGeometry &theGeometry, const RecoIdealGeometry &rgeo)
edm::ESGetToken< AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd > alignmentErrorsToken_
Class to update a given geometry with a set of alignments.