#include using namespace std; double BCAL_fADC2E(double fADC) { double p[4] ={0.0128058, 0.000563036, 0, 0 }; double x = fADC; return p[0]+x*(p[1]+x*(p[2]+x*(p[3]))); } double BCAL_E2fADC(double E) { double p[4] ={-14.9756, 1710.6, 0, 0 }; double x = E; return p[0]+x*(p[1]+x*(p[2]+x*(p[3]))); }