using Eigen::Matrix everywhere -- using boost::math::constant::pi

... instead of custom defined PP variable
You're right. I'll change it.