In this work an automated optimization routine is used to modify modeling parameters for a chemically amplified photoresist, with the goal of minimizing the error observed between lithography simulation and experimental results. It is shown that a basic tuning procedure modifying, optimizing only CD measurement offset and acid generation efficiency, improves the fit significantly. Further improvements can be made by optimization of the diffusiondeprotection kinetic parameters, in combination with the two aforementioned values. It is shown further improvement is observed if the actual temperature profile experienced in the postexposure bake process is considered and the temperature dependence of both the diffusion and the deprotection processes are optimized. This parameter values that result in this improvement infer a temporal offset in the start, and finish, ofdeprotection and acid diffusion.