double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0187734+(2.76582/(pow(x,0.499703)-4.74858)); break; case 2: return 0.0695365+(0.128973/(pow(x,0.12336)-1.50341)); break; case 3: return 0.311245+(992.719/(pow(x,1.70212)+191.74)); 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; }