1 #ifndef CylindricalState_H 2 #define CylindricalState_H 31 Scalar cosphi = pos.
x() / rho_;
32 Scalar sinphi = pos.
y() / rho_;
33 Scalar p_rho = mom.
x() * cosphi + mom.
y() * sinphi;
34 Scalar p_phi = -mom.
x() * sinphi + mom.
y() * cosphi;
38 par_(2) = p_phi / (p_rho * rho_);
39 par_(3) = mom.
z() / p_rho;
40 par_(4) = ch / mom.
mag();
42 prSign_ = p_rho > 0 ? 1.0 : -1.0;
44 std::cout <<
"CylindricalState built from pos " << pos <<
" mom " << mom <<
" charge " << ch << std::endl;
45 std::cout <<
"p_rho " << p_rho <<
" p_phi " << p_phi <<
" dphi_drho " << par_(2) << std::endl;
47 <<
" charge " <<
charge() << std::endl;
51 par_(par), rho_(rho), prSign_(prSign) {}
59 Scalar cosphi =
cos( par_(0));
60 Scalar sinphi =
sin( par_(0));
61 Scalar
Q =
sqrt(1 + rho_*rho_ * par_(2)*par_(2) + par_(3)*par_(3));
63 Scalar p_rho = prSign_*P/
Q;
64 Scalar p_phi = rho_*par_(2)*p_rho;
65 Scalar p_z = par_(3)*p_rho;
67 p_rho*sinphi + p_phi*cosphi,
74 Scalar
charge()
const {
return par_(4) > 0 ? 1 : -1;}
76 Scalar
rho()
const {
return rho_;}
78 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