double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0420896+(0.334871/(pow(x,0.172408)-1.68388)); break; case 2: return 0.0956571+(0.161849/(pow(x,0.137689)-1.61827)); break; case 3: return 0.433442+(637.338/(pow(x,1.69552)-248.665)); 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; }