1 #ifndef CylindricalState_H
2 #define CylindricalState_H
34 Scalar p_rho = mom.
x() * cosphi + mom.
y() * sinphi;
35 Scalar p_phi = -mom.
x() * sinphi + mom.
y() * cosphi;
39 par_(2) = p_phi / (p_rho * rho_);
40 par_(3) = mom.
z() / p_rho;
41 par_(4) = ch / mom.
mag();
43 prSign_ = p_rho > 0 ? 1.0 : -1.0;
45 std::cout <<
"CylindricalState built from pos " <<
pos <<
" mom " << mom <<
" charge " << ch << std::endl;
46 std::cout <<
"p_rho " << p_rho <<
" p_phi " << p_phi <<
" dphi_drho " << par_(2) << std::endl;
58 Scalar Q =
sqrt(1 + rho_ * rho_ * par_(2) * par_(2) + par_(3) * par_(3));
61 Scalar p_phi = rho_ * par_(2) * p_rho;
62 Scalar p_z = par_(3) * p_rho;
63 LocalVector result(p_rho * cosphi - p_phi * sinphi, p_rho * sinphi + p_phi * cosphi, p_z);
73 double prSign()
const {
return prSign_; }