double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0378689+(0.045363/(pow(x,0.0275414)-1.07083)); break; case 2: return 0.677065+(13003.2/(pow(x,2.51208)-3601.17)); break; case 3: return 100.0; break; case 4: case 5: case 6: case 7: case 8: case 9: case 10: return 100.0; } return 1000.0; }