double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return -0.19183+(0.134563/(pow(x,0.049405)-1.09288)); break; case 2: return 0.112949+(14.4715/(pow(x,0.76993)-0.667336)); break; case 3: return 0.308933+(28111.6/(pow(x,2.51011)-311.104)); break; case 4: return 0.495007+(107084/(pow(x,2.88938)-10883.1)); break; case 5: return 1.07397; break; case 6: return 1.77666; break; case 7: return 100.0; break; case 8: return 100.0; break; case 9: case 10: return 100.0; break; return 100.0; } return 1000.0; }