#include <ParametrizedMagneticFieldProducer.h>
Public Member Functions | |
ParametrizedMagneticFieldProducer (const edm::ParameterSet &) | |
std::auto_ptr< MagneticField > | produce (const IdealMagneticFieldRecord &) |
~ParametrizedMagneticFieldProducer () | |
Public Attributes | |
edm::ParameterSet | pset |
Definition at line 21 of file ParametrizedMagneticFieldProducer.h.
ParametrizedMagneticFieldProducer::ParametrizedMagneticFieldProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 27 of file ParametrizedMagneticFieldProducer.cc.
References edm::ParameterSet::getUntrackedParameter(), pset, edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.
: pset(iConfig) { setWhatProduced(this, pset.getUntrackedParameter<std::string>("label","")); }
ParametrizedMagneticFieldProducer::~ParametrizedMagneticFieldProducer | ( | ) |
Definition at line 32 of file ParametrizedMagneticFieldProducer.cc.
{ }
std::auto_ptr< MagneticField > ParametrizedMagneticFieldProducer::produce | ( | const IdealMagneticFieldRecord & | iRecord | ) |
Definition at line 38 of file ParametrizedMagneticFieldProducer.cc.
References Exception, edm::ParameterSet::getParameter(), Parameters::parameters, pset, query::result, and BeamSplash_cfg::version.
{ string version = pset.getParameter<string>("version"); ParameterSet parameters = pset.getParameter<ParameterSet>("parameters"); if (version=="OAE_85l_030919") { // V. Karimaki's off-axis expansion fitted to v85l TOSCA computation std::auto_ptr<MagneticField> result(new OAE85lParametrizedMagneticField(parameters)); return result; } else if (version=="OAE_1103l_071212") { // V. Karimaki's off-axis expansion fitted to v1103l TOSCA computation std::auto_ptr<MagneticField> result( new OAEParametrizedMagneticField(parameters)); return result; } else if (version=="PolyFit2D") { // V. Maroussov polynomial fit to mapping data std::auto_ptr<MagneticField> result( new PolyFit2DParametrizedMagneticField(parameters)); return result; } else if (version=="PolyFit3D") { // V. Maroussov polynomial fit to mapping data std::auto_ptr<MagneticField> result( new PolyFit3DParametrizedMagneticField(parameters)); return result; } else { throw cms::Exception("InvalidParameter")<<"Invalid parametrization version " << version; } return std::auto_ptr<MagneticField>(0); //make compiler happy }
Definition at line 28 of file ParametrizedMagneticFieldProducer.h.
Referenced by ParametrizedMagneticFieldProducer(), and produce().