FACT++  1.0
uint16_t ConnectionBias::ConvertVoltToDac ( uint16_t  ch,
double  volt 
)
inline

Definition at line 977 of file biasctrl.cc.

978  {
979  if (fCalibrationSlope[ch]<=0)
980  return 0;
981 
982  const double current = (volt-fCalibrationOffset[ch])/fCalibrationSlope[ch];
983  return current<0 ? 0 : nearbyint(current*4096000); // Current [A] to dac [ /= 1mA/4096]
984  }
vector< float > fCalibrationOffset
Definition: biasctrl.cc:93
vector< float > fCalibrationSlope
Definition: biasctrl.cc:94