CMS 3D CMS Logo

Public Member Functions | Public Attributes

magneticfield::ParametrizedMagneticFieldProducer Class Reference

#include <ParametrizedMagneticFieldProducer.h>

Inheritance diagram for magneticfield::ParametrizedMagneticFieldProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 ParametrizedMagneticFieldProducer (const edm::ParameterSet &)
std::auto_ptr< MagneticFieldproduce (const IdealMagneticFieldRecord &)
 ~ParametrizedMagneticFieldProducer ()

Public Attributes

edm::ParameterSet pset

Detailed Description

Definition at line 21 of file ParametrizedMagneticFieldProducer.h.


Constructor & Destructor Documentation

ParametrizedMagneticFieldProducer::ParametrizedMagneticFieldProducer ( const edm::ParameterSet iConfig)
ParametrizedMagneticFieldProducer::~ParametrizedMagneticFieldProducer ( )

Definition at line 32 of file ParametrizedMagneticFieldProducer.cc.

{
}

Member Function Documentation

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
}

Member Data Documentation