22 std::auto_ptr<MagneticField>
25 if (
version==
"OAE_1103l_071212") {
29 }
else if (
version==
"PolyFit2D") {
33 }
else if (
version==
"PolyFit3D") {
35 throw cms::Exception(
"InvalidParameter")<<
"PolyFit3D is not supported anymore";
36 }
else if (
version==
"Parabolic"){
45 return std::auto_ptr<MagneticField>(0);
50 std::auto_ptr<MagneticField>
54 if (parameters.size()!=1)
throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size()<<
")`for " <<
version ;
57 }
else if (
version==
"OAE_1103l_071212") {
59 if (parameters.size()!=1)
throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size()<<
")`for " <<
version ;
62 }
else if (
version==
"PolyFit2D") {
64 if (parameters.size()!=1)
throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size()<<
")`for " <<
version ;
67 }
else if (
version==
"PolyFit3D") {
69 throw cms::Exception(
"InvalidParameter")<<
"PolyFit3D is not supported anymore";
70 }
else if (
version==
"Parabolic"){
71 if (parameters.size()!=4)
throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size()<<
")`for " <<
version ;
77 return std::auto_ptr<MagneticField>(0);
static std::auto_ptr< MagneticField > get(std::string version, const edm::ParameterSet ¶meters)
ParametrizedMagneticFieldFactory()
Constructor.