28 namespace magneticfield{
37 int closerNominaCurrent(
float current);
44 using namespace magneticfield;
46 AutoParametrizedMagneticFieldProducer::AutoParametrizedMagneticFieldProducer(
const edm::ParameterSet& iConfig) :
pset(iConfig) {
52 std::auto_ptr<MagneticField>
63 current = rInfo->m_avg_current;
64 message =
" (from RunInfo DB)";
66 message =
" (from valueOverride card)";
70 edm::LogInfo(
"MagneticField|AutoParametrizedMagneticField") <<
"Current: " << current << message <<
"; using map for: " << cnc;
76 parameters.push_back(0);
79 else if (version==
"Parabolic"){
80 parameters.push_back(3.8114);
81 parameters.push_back(-3.94991
e-06);
82 parameters.push_back(7.53701
e-06);
83 parameters.push_back(2.43878
e-11);
85 double scale=double(cnc)/double(18268);
92 throw cms::Exception(
"InvalidParameter") <<
"version " << version <<
" is not supported";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static std::auto_ptr< MagneticField > get(std::string version, const edm::ParameterSet ¶meters)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
const DepRecordT & getRecord() const
int closerNominaCurrent(float current)
std::auto_ptr< MagneticField > produce(const IdealMagneticFieldRecord &)
std::vector< int > nominalCurrents
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
~AutoParametrizedMagneticFieldProducer()