48 const float theMagField = iMagfield->
inTesla(center).
mag();
49 if (theMagField >= -0.1 && theMagField < 1.0)
51 else if (theMagField >= 1.0 && theMagField < 2.5)
53 else if (theMagField >= 2.5 && theMagField < 3.25)
55 else if (theMagField >= 3.25 && theMagField < 3.65)
56 return get(
"",
"35T");
57 else if (theMagField >= 3.9 && theMagField < 4.1)
60 if (theMagField >= 4.1 || theMagField < -0.1)
62 <<
"Magnetic field is " << theMagField;
68 .setConsumes(magfieldToken_);
74 const float theMagField = iRecord.
get(magfieldToken_).inTesla(center).mag();
76 const auto& dbobject = iRecord.
get(genErrorToken_);
78 if (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1)
80 <<
"Magnetic field is " << theMagField <<
" GenError Magnetic field is " << dbobject.sVector()[22];
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::shared_ptr< const SiPixelGenErrorDBObject > produce(const SiPixelGenErrorDBObjectESProducerRcd &)
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorToken_
SiPixelGenErrorDBObjectESProducer(const edm::ParameterSet &iConfig)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)