double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0672518+(3.27103e+06/(pow(x,3.4566)+4.52313e+06)); break; case 2: return 0.0767097+(49421.3/(pow(x,2.48557)+53174.8)); break; case 3: return 0.114449+(6.22317e+06/(pow(x,3.36655)+7.8247e+06)); 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; }