|
|
Go to the documentation of this file.
95 : fromDDD_(
p.getParameter<
bool>(
"fromDDD")),
96 fromDD4hep_(
p.getParameter<
bool>(
"fromDD4hep")),
97 alignmentsLabel_(
p.getParameter<
std::
string>(
"alignmentsLabel")),
98 myLabel_(
p.getParameter<
std::
string>(
"appendToDataLabel")) {
128 debugV_ =
p.getUntrackedParameter<
bool>(
"debugV",
false);
151 << (
applyAlignment_ ?
"looking for" :
"IGNORING") <<
" alignment labels '"
163 desc.add<
bool>(
"fromDDD",
true);
164 desc.add<
bool>(
"fromDD4hep",
false);
167 desc.add<
bool>(
"useRealWireGeometry",
true);
168 desc.add<
bool>(
"useOnlyWiresInME1a",
false);
169 desc.add<
bool>(
"useGangedStripsInME1a",
true);
170 desc.add<
bool>(
"useCentreTIOffsets",
false);
171 desc.add<
bool>(
"applyAlignment",
true);
172 desc.addUntracked<
bool>(
"debugV",
false);
173 descriptions.
add(
"CSCGeometryESModule",
desc);
177 auto host = holder_.makeOrGet([
this]() {
179 debugV_, useGangedStripsInME1a_, useOnlyWiresInME1a_, useRealWireGeometry_, useCentreTIOffsets_);
186 if (applyAlignment_) {
189 const auto& globalPosition =
record.get(globalPositionToken_);
190 const auto& alignments =
record.get(alignmentsToken_);
191 const auto& alignmentErrors =
record.get(alignmentErrorsToken_);
193 if (alignments.empty() && alignmentErrors.empty() && globalPosition.empty()) {
194 edm::LogVerbatim(
"Config") <<
"@SUB=CSCGeometryRecord::produce Alignment(Error)s and global position (label '"
195 << alignmentsLabel_ <<
"') empty: Geometry producer (label "
196 <<
"'" << myLabel_ <<
"') assumes fake and does not apply.";
208 edm::LogVerbatim(
"CSCGeoemtryESModule") <<
"(0) CSCGeometryESModule - DDD ";
212 const auto& mdc = rec.get(mdcToken_);
216 }
else if (fromDD4hep_) {
217 edm::LogVerbatim(
"CSCGeoemtryESModule") <<
"(0) CSCGeometryESModule - DD4HEP ";
221 const auto& mdc = rec.get(mdcToken_);
226 bool recreateGeometry =
false;
229 [&recreateGeometry](
auto const& rec) { recreateGeometry =
true; });
232 [&recreateGeometry](
auto const& rec) { recreateGeometry =
true; });
233 edm::LogVerbatim(
"CSCGeoemtryESModule") <<
"(0) CSCGeometryESModule - DB recreateGeometry=false ";
234 if (recreateGeometry) {
235 edm::LogVerbatim(
"CSCGeoemtryESModule") <<
"(0) CSCGeometryESModule - DB recreateGeometry=true ";
237 const auto& rig =
record.get(rigToken_);
238 const auto& rdp =
record.get(rdpToken_);
static void fillDescriptions(edm::ConfigurationDescriptions &)
Creation of configuration file.
T const * product() const
bool useRealWireGeometry_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< Alignments, GlobalPositionRcd > globalPositionToken_
CSCGeometryESModule(const edm::ParameterSet &p)
Constructor.
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd > alignmentErrorsToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void build(CSCGeometry &theGeometry, const RecoIdealGeometry &rig, const CSCRecoDigiParameters &cscpars)
Build the geometry.
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
void build(CSCGeometry &geom, const DDCompactView *fv, const MuonGeometryConstants &muonConstants)
bool useGangedStripsInME1a_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< Alignments, CSCAlignmentRcd > alignmentsToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, true > LogVerbatim
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokendd4hep_
std::shared_ptr< CSCGeometry > produce(const MuonGeometryRecord &record)
Produce CSCGeometry.
edm::ESGetToken< RecoIdealGeometry, CSCRecoGeometryRcd > rigToken_
edm::ESGetToken< CSCRecoDigiParameters, CSCRecoDigiParametersRcd > rdpToken_
const std::string myLabel_
edm::ReusableObjectHolder< HostType > holder_
Class to update a given geometry with a set of alignments.
const std::string alignmentsLabel_
void initCSCGeometry_(const MuonGeometryRecord &, std::shared_ptr< HostType > &host)