Simulation of the head of an accelerator: Calculation optimization and statistical comparison methods. (November 2015)