  Within the HMC algorithm, we discuss how, by using the shadow Hamiltonian and
the Poisson brackets, one can achieve a simple factorization in the dependence
of the Hamiltonian violations upon either the algorithmic parameters or the
parameters specifying the integrator. We consider the simplest case of a second
order (nested) Omelyan integrator and one level of Hasenbusch splitting of the
determinant for the simulations of a QCD-like theory (with gauge group SU(2)).
Given the specific choice of the integrator, the Poisson brackets reduce to the
variances of the molecular dynamics forces. We show how the factorization can
be used to optimize in a very economical and simple way both the algorithmic
and the integrator parameters with good accuracy.
