1 #ifndef MagneticFieldHelpers_h 2 #define MagneticFieldHelpers_h 13 int zeroFieldThreshold = 1000;
16 if(current < zeroFieldThreshold)
return 0;
20 if(2*current < nominalCurrents[i]+nominalCurrents[i+1] )
21 return nominalFields[
i];
23 return nominalFields[
i];
42 #endif // MagneticFieldHelpers_h
int closerNominalField(float current)
Return the closer nominal field value (kGauss) to a given magnet current (A)
std::array< float, 7 > nominalFields
std::array< int, 7 > nominalCurrents