43 auto cc = setWhatProduced(
this);
48 const float theMagField = iMagfield->
inTesla(center).
mag();
49 if (theMagField >= -0.1 && theMagField < 1.0)
52 if (theMagField >= 3.9 || theMagField < 3.65)
53 edm::LogWarning(
"UnexpectedMagneticFieldUsingDefaultPixelGenError") <<
"Magnetic field is " << theMagField;
58 magfieldToken_ = cc.consumes();
64 const float theMagField = iRecord.
get(magfieldToken_).inTesla(center).mag();
66 const auto& dbobject = iRecord.
get(genErrorToken_);
68 if (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1)
70 <<
"Magnetic field is " << theMagField <<
" GenError Magnetic field is " << dbobject.sVector()[22];
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
std::shared_ptr< const SiPixelGenErrorDBObject > produce(const SiPixelGenErrorDBObjectESProducerRcd &)
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorToken_
SiPixelGenErrorDBObjectESProducer(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Warning, false > LogWarning
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const