#include <CylindricalState.h>
Public Types | |
typedef double | Scalar |
typedef RKSmallVector< Scalar, 5 > | Vector |
Public Member Functions | |
Scalar | charge () const |
CylindricalState (const LocalPoint &pos, const LocalVector &mom, Scalar ch) | |
CylindricalState () | |
CylindricalState (Scalar rho, const Vector &par, Scalar prSign) | |
const LocalVector | momentum () const |
const Vector & | parameters () const |
const LocalPoint | position () const |
double | prSign () const |
Scalar | rho () const |
Private Attributes | |
Vector | par_ |
Scalar | prSign_ |
sign of local p_r | |
Scalar | rho_ |
State for solving the equation of motion with radius (in cylindrical coordinates) as free variable. The dependent variables are phi - azimuthal angle z - z coordinate dphi/dr - derivative of phi versus r dz/dr - derivative of z versus r q/p - charge over momentum magnitude
The coordinate system is externally defined
Definition at line 21 of file CylindricalState.h.
typedef double CylindricalState::Scalar |
Definition at line 24 of file CylindricalState.h.
typedef RKSmallVector<Scalar,5> CylindricalState::Vector |
Definition at line 25 of file CylindricalState.h.
CylindricalState::CylindricalState | ( | ) | [inline] |
Definition at line 27 of file CylindricalState.h.
{}
CylindricalState::CylindricalState | ( | const LocalPoint & | pos, |
const LocalVector & | mom, | ||
Scalar | ch | ||
) | [inline] |
Definition at line 29 of file CylindricalState.h.
References DeDxDiscriminatorTools::charge(), gather_cfg::cout, PV3DBase< T, PVType, FrameType >::mag(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), position, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ rho_ = pos.perp(); Scalar cosphi = pos.x() / rho_; Scalar sinphi = pos.y() / rho_; Scalar p_rho = mom.x() * cosphi + mom.y() * sinphi; Scalar p_phi = -mom.x() * sinphi + mom.y() * cosphi; par_(0) = pos.phi(); par_(1) = pos.z(); par_(2) = p_phi / (p_rho * rho_); par_(3) = mom.z() / p_rho; par_(4) = ch / mom.mag(); prSign_ = p_rho > 0 ? 1.0 : -1.0; std::cout << "CylindricalState built from pos " << pos << " mom " << mom << " charge " << ch << std::endl; std::cout << "p_rho " << p_rho << " p_phi " << p_phi << " dphi_drho " << par_(2) << std::endl; std::cout << "Which results in " << position() << " mom " << momentum() << " charge " << charge() << std::endl; }
Scalar CylindricalState::charge | ( | void | ) | const [inline] |
Definition at line 74 of file CylindricalState.h.
{ return par_(4) > 0 ? 1 : -1;}
const LocalVector CylindricalState::momentum | ( | ) | const [inline] |
Definition at line 58 of file CylindricalState.h.
References abs, funct::cos(), P, query::result, funct::sin(), and mathSSE::sqrt().
{ Scalar cosphi = cos( par_(0)); Scalar sinphi = sin( par_(0)); Scalar Q = sqrt(1 + rho_*rho_ * par_(2)*par_(2) + par_(3)*par_(3)); Scalar P = std::abs(1./par_(4)); Scalar p_rho = prSign_*P/Q; Scalar p_phi = rho_*par_(2)*p_rho; Scalar p_z = par_(3)*p_rho; LocalVector result( p_rho*cosphi - p_phi*sinphi, p_rho*sinphi + p_phi*cosphi, p_z); return result; }
const Vector& CylindricalState::parameters | ( | void | ) | const [inline] |
Definition at line 72 of file CylindricalState.h.
{ return par_;}
const LocalPoint CylindricalState::position | ( | void | ) | const [inline] |
Definition at line 54 of file CylindricalState.h.
{ return LocalPoint( LocalPoint::Cylindrical( rho_, par_(0), par_(1))); }
double CylindricalState::prSign | ( | ) | const [inline] |
Definition at line 78 of file CylindricalState.h.
{return prSign_;}
Scalar CylindricalState::rho | ( | ) | const [inline] |
Definition at line 76 of file CylindricalState.h.
{return rho_;}
Vector CylindricalState::par_ [private] |
Definition at line 82 of file CylindricalState.h.
Scalar CylindricalState::prSign_ [private] |
sign of local p_r
Definition at line 84 of file CylindricalState.h.
Scalar CylindricalState::rho_ [private] |
Definition at line 83 of file CylindricalState.h.