#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 20 of file CylindricalState.h.
typedef double CylindricalState::Scalar |
Definition at line 23 of file CylindricalState.h.
typedef RKSmallVector<Scalar,5> CylindricalState::Vector |
Definition at line 24 of file CylindricalState.h.
CylindricalState::CylindricalState | ( | ) | [inline] |
Definition at line 26 of file CylindricalState.h.
{}
CylindricalState::CylindricalState | ( | const LocalPoint & | pos, |
const LocalVector & | mom, | ||
Scalar | ch | ||
) | [inline] |
Definition at line 28 of file CylindricalState.h.
References charge(), gather_cfg::cout, PV3DBase< T, PVType, FrameType >::mag(), momentum(), par_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), position(), prSign_, rho_, 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 73 of file CylindricalState.h.
References par_.
Referenced by CylindricalState().
{ return par_(4) > 0 ? 1 : -1;}
const LocalVector CylindricalState::momentum | ( | ) | const [inline] |
Definition at line 57 of file CylindricalState.h.
References abs, funct::cos(), P, par_, prSign_, query::result, rho_, funct::sin(), and mathSSE::sqrt().
Referenced by CylindricalState(), and RKCylindricalDistance< T, N >::operator()().
{ 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 71 of file CylindricalState.h.
References par_.
Referenced by RKPropagatorInR::propagate().
{ return par_;}
const LocalPoint CylindricalState::position | ( | void | ) | const [inline] |
Definition at line 53 of file CylindricalState.h.
Referenced by CylindricalState(), and RKCylindricalDistance< T, N >::operator()().
{ return LocalPoint( LocalPoint::Cylindrical( rho_, par_(0), par_(1))); }
double CylindricalState::prSign | ( | ) | const [inline] |
Scalar CylindricalState::rho | ( | ) | const [inline] |
Vector CylindricalState::par_ [private] |
Definition at line 81 of file CylindricalState.h.
Referenced by charge(), CylindricalState(), momentum(), parameters(), and position().
Scalar CylindricalState::prSign_ [private] |
sign of local p_r
Definition at line 83 of file CylindricalState.h.
Referenced by CylindricalState(), momentum(), and prSign().
Scalar CylindricalState::rho_ [private] |
Definition at line 82 of file CylindricalState.h.
Referenced by CylindricalState(), momentum(), position(), and rho().