49 const float theMagField = iMagfield->
inTesla(center).
mag();
50 if (theMagField >= -0.1 && theMagField < 1.0)
52 else if (theMagField >= 1.0 && theMagField < 2.5)
54 else if (theMagField >= 2.5 && theMagField < 3.25)
56 else if (theMagField >= 3.25 && theMagField < 3.65)
57 return get(
"",
"35T");
58 else if (theMagField >= 3.9 && theMagField < 4.1)
61 if (theMagField >= 4.1 || theMagField < -0.1)
63 <<
"Magnetic field is " << theMagField;
69 .setConsumes(magfieldToken_);
75 const float theMagField = iRecord.
get(magfieldToken_).inTesla(center).mag();
77 const auto& dbobject = iRecord.
get(templateToken_);
79 if (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1)
81 <<
"Magnetic field is " << theMagField <<
" Template Magnetic field is " << dbobject.sVector()[22];