31 int closerNominaCurrent(
float current)
const;
42 AutoParametrizedMagneticFieldProducer::AutoParametrizedMagneticFieldProducer(
const edm::ParameterSet& iConfig)
44 currentOverride_{iConfig.getParameter<
int>(
"valueOverride")},
45 nominalCurrents_{{-1, 0, 9558, 14416, 16819, 18268, 19262}}
48 auto cc = setWhatProduced(
this, iConfig.getUntrackedParameter<
std::string>(
"label",
""));
49 if (currentOverride_ < 0) {
50 runInfoToken_ = cc.consumes();
60 message =
" (from RunInfo DB)";
62 message =
" (from valueOverride card)";
66 edm::LogInfo(
"MagneticField") <<
"Current: " << current << message <<
"; using map for: " << cnc;
74 }
else if (
version ==
"Parabolic") {
81 double scale = double(cnc) / double(18268);
T getParameter(std::string const &) const
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &)
~AutoParametrizedMagneticFieldProducer() override
const std::array< int, 7 > nominalCurrents_
int closerNominaCurrent(float current) const
static std::unique_ptr< MagneticField > get(std::string version, const edm::ParameterSet ¶meters)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, false > LogInfo
const std::string version_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
const int currentOverride_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const