double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0337553+(0.0389425/(pow(x,0.0261594)-1.06806)); break; case 2: return 0.438757+(1159.61/(pow(x,1.80631)-349.698)); break; case 3: return 0.721866+(5255.78/(pow(x,2.1613)-667.037)); break; case 4: return 100.0; break; case 5: return 100.0; break; case 6: case 7: case 8: case 9: case 10: return 100.0; } return 1000.0; }