1 #ifndef CylindricalState_H 2 #define CylindricalState_H 33 Scalar cosphi = pos.
x() / rho_;
34 Scalar sinphi = pos.
y() / rho_;
35 Scalar p_rho = mom.
x() * cosphi + mom.
y() * sinphi;
36 Scalar p_phi = -mom.
x() * sinphi + mom.
y() * cosphi;
40 par_(2) = p_phi / (p_rho * rho_);
41 par_(3) = mom.
z() / p_rho;
42 par_(4) = ch / mom.
mag();
44 prSign_ = p_rho > 0 ? 1.0 : -1.0;
46 std::cout <<
"CylindricalState built from pos " << pos <<
" mom " << mom <<
" charge " << ch << std::endl;
47 std::cout <<
"p_rho " << p_rho <<
" p_phi " << p_phi <<
" dphi_drho " << par_(2) << std::endl;
49 <<
" charge " <<
charge() << std::endl;
53 par_(par), rho_(rho), prSign_(prSign) {}
61 Scalar cosphi =
cos( par_(0));
62 Scalar sinphi =
sin( par_(0));
63 Scalar
Q =
sqrt(1 + rho_*rho_ * par_(2)*par_(2) + par_(3)*par_(3));
65 Scalar p_rho = prSign_*P/
Q;
66 Scalar p_phi = rho_*par_(2)*p_rho;
67 Scalar p_z = par_(3)*p_rho;
69 p_rho*sinphi + p_phi*cosphi,
76 Scalar
charge()
const {
return par_(4) > 0 ? 1 : -1;}
78 Scalar
rho()
const {
return rho_;}
80 double prSign()
const {
return prSign_;}
Point3DBase< Scalar, LocalTag > LocalPoint
const LocalPoint position() const
const Vector & parameters() const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
ROOT::Math::SVector< T, N > RKSmallVector
CylindricalState(Scalar rho, const Vector &par, Scalar prSign)
Scalar prSign_
sign of local p_r
RKSmallVector< Scalar, 5 > Vector
CylindricalState(const LocalPoint &pos, const LocalVector &mom, Scalar ch)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::pair< OmniClusterRef, TrackingParticleRef > P
static int position[264][3]
const LocalVector momentum() const