double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return -0.292847+(0.182879/(pow(x,0.0480216)-1.04923)); break; case 2: return 0.0146539+(0.278261/(pow(x,0.140223)-1.43833)); break; case 3: return 0.651425+(25731.9/(pow(x,2.57045)+7422.94)); break; case 4: return 100.0; break; case 5: case 6: case 7: case 8: case 9: case 10: return 100.0; } return 1000.0; }