On the theory of nucleation in cylindrical magnetic nanoparticles