double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.114727+(3.23577e+06/(pow(x,3.62027)+823058)); break; case 2: return 0.105905+(1.97296e+06/(pow(x,3.42474)+1.28174e+06)); break; case 3: return 0.0941558+(1342.58/(pow(x,1.87892)-351.686)); break; case 4: return 0.166267+(3.72972e+06/(pow(x,3.61901)+1.38987e+06)); break; case 5: return 0.721871; break; case 6: return 100.0; break; case 7: return 100.0; break; case 8: case 9: case 10: return 100.0; } return 1000.0; }