double BCAL_tdiff_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0881795+(71.4457/(pow(x,1.08813)-4.3562)); break; case 2: return 0.00231687+(0.311095/(pow(x,0.206414)-1.88101)); break; case 3: return 0.180467+(88181.7/(pow(x,2.66603)+103980)); break; case 4: return 0.120454+(0.83067/(pow(x,0.402339)-3.57367)); break; case 5: return 0.3488+(289679/(pow(x,3.15861)+67848.5)); break; case 6: return 0.478434+(239183/(pow(x,3.1073)+26900.6)); break; case 7: return 100.0; break; case 8: return 100.0; break; case 9: return 100.0; break; case 10: return 100.0; break; return 100.0; } return 1000.0; }