23 if (
version ==
"OAE_1103l_071212") {
27 }
else if (
version ==
"PolyFit2D") {
31 }
else if (
version ==
"PolyFit3D") {
33 throw cms::Exception(
"InvalidParameter") <<
"PolyFit3D is not supported anymore";
34 }
else if (
version ==
"Parabolic") {
43 return std::unique_ptr<MagneticField>(
nullptr);
49 if (parameters.size() != 1)
50 throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size() <<
")`for " <<
version;
53 }
else if (
version ==
"OAE_1103l_071212") {
55 if (parameters.size() != 1)
56 throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size() <<
")`for " <<
version;
59 }
else if (
version ==
"PolyFit2D") {
61 if (parameters.size() != 1)
62 throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size() <<
")`for " <<
version;
65 }
else if (
version ==
"PolyFit3D") {
67 throw cms::Exception(
"InvalidParameter") <<
"PolyFit3D is not supported anymore";
68 }
else if (
version ==
"Parabolic") {
69 if (parameters.size() != 4)
70 throw cms::Exception(
"InvalidParameter") <<
"Incorrect parameters (" << parameters.size() <<
")`for " <<
version;
76 return std::unique_ptr<MagneticField>(
nullptr);
ParametrizedMagneticFieldFactory()
Constructor.
static std::unique_ptr< MagneticField > get(std::string version, const edm::ParameterSet ¶meters)