44 auto cc = setWhatProduced(
this);
49 const float theMagField = iMagfield->inTesla(center).mag();
50 if (theMagField >= -0.1 && theMagField < 1.0)
53 if (theMagField >= 3.9 || theMagField < 3.65)
54 edm::LogWarning(
"UnexpectedMagneticFieldUsingDefaultPixelTemplate") <<
"Magnetic field is " << theMagField;
59 magfieldToken_ = cc.consumes();
65 const float theMagField = iRecord.
get(magfieldToken_).inTesla(center).mag();
67 const auto& dbobject = iRecord.
get(templateToken_);
69 if (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1)
71 <<
"Magnetic field is " << theMagField <<
" Template Magnetic field is " << dbobject.sVector()[22];
edm::ESGetToken< SiPixelTemplateDBObject, SiPixelTemplateDBObjectRcd > templateToken_
SiPixelTemplateDBObjectESProducer(const edm::ParameterSet &iConfig)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::shared_ptr< const SiPixelTemplateDBObject > produce(const SiPixelTemplateDBObjectESProducerRcd &)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Warning, false > LogWarning