CMS 3D CMS Logo

CylindricalState Class Reference

State for solving the equation of motion with radius (in cylindrical coordinates) as free variable. More...

#include <TrackPropagation/RungeKutta/interface/CylindricalState.h>

List of all members.

Public Types

typedef double Scalar
typedef RKSmallVector< Scalar, 5 > Vector

Public Member Functions

Scalar charge () const
 CylindricalState (Scalar rho, const Vector &par, Scalar prSign)
 CylindricalState (const LocalPoint &pos, const LocalVector &mom, Scalar ch)
 CylindricalState ()
const LocalVector momentum () const
const Vectorparameters () const
const LocalPoint position () const
double prSign () const
Scalar rho () const

Private Attributes

Vector par_
Scalar prSign_
 sign of local p_r
Scalar rho_


Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

CylindricalState::CylindricalState (  )  [inline]

Definition at line 26 of file CylindricalState.h.

00026 {}

CylindricalState::CylindricalState ( const LocalPoint pos,
const LocalVector mom,
Scalar  ch 
) [inline]

Definition at line 28 of file CylindricalState.h.

References charge(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), 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().

00028                                                                               {
00029       rho_ = pos.perp();
00030       Scalar cosphi = pos.x() / rho_;
00031       Scalar sinphi = pos.y() / rho_;
00032       Scalar p_rho   =  mom.x() * cosphi + mom.y() * sinphi;
00033       Scalar p_phi   = -mom.x() * sinphi + mom.y() * cosphi;
00034 
00035       par_(0) = pos.phi();
00036       par_(1) = pos.z();
00037       par_(2) = p_phi / (p_rho * rho_);
00038       par_(3) = mom.z() / p_rho;
00039       par_(4) = ch / mom.mag();
00040 
00041       prSign_ = p_rho > 0 ? 1.0 : -1.0;
00042 
00043       std::cout << "CylindricalState built from pos " << pos << " mom " << mom << " charge " << ch << std::endl;
00044       std::cout << "p_rho " << p_rho << " p_phi " << p_phi << " dphi_drho " << par_(2) << std::endl;
00045       std::cout << "Which results in                " << position() << " mom " << momentum() 
00046            << " charge " << charge() << std::endl;
00047   }

CylindricalState::CylindricalState ( Scalar  rho,
const Vector par,
Scalar  prSign 
) [inline]

Definition at line 49 of file CylindricalState.h.

00049                                                                   :
00050       par_(par), rho_(rho), prSign_(prSign) {}


Member Function Documentation

Scalar CylindricalState::charge ( void   )  const [inline]

Definition at line 73 of file CylindricalState.h.

References par_.

Referenced by CylindricalState().

00073 { return par_(4) > 0 ? 1 : -1;}

const LocalVector CylindricalState::momentum (  )  const [inline]

Definition at line 57 of file CylindricalState.h.

References funct::abs(), funct::cos(), P, par_, prSign_, HLT_VtxMuL3::result, rho_, funct::sin(), and funct::sqrt().

Referenced by CylindricalState(), and RKCylindricalDistance< T, N >::operator()().

00057                                      {
00058       Scalar cosphi = cos( par_(0));
00059       Scalar sinphi = sin( par_(0));
00060       Scalar Q = sqrt(1 + rho_*rho_ * par_(2)*par_(2) + par_(3)*par_(3));
00061       Scalar P = std::abs(1./par_(4));
00062       Scalar p_rho = prSign_*P/Q;
00063       Scalar p_phi = rho_*par_(2)*p_rho;
00064       Scalar p_z   = par_(3)*p_rho;
00065       LocalVector result( p_rho*cosphi - p_phi*sinphi,
00066                           p_rho*sinphi + p_phi*cosphi,
00067                           p_z);
00068       return result;
00069   }

const Vector& CylindricalState::parameters ( void   )  const [inline]

Definition at line 71 of file CylindricalState.h.

References par_.

00071 { return par_;}

const LocalPoint CylindricalState::position ( void   )  const [inline]

Definition at line 53 of file CylindricalState.h.

References par_, and rho_.

Referenced by CylindricalState(), and RKCylindricalDistance< T, N >::operator()().

00053                                     { 
00054       return LocalPoint( LocalPoint::Cylindrical( rho_, par_(0), par_(1)));
00055   }

double CylindricalState::prSign (  )  const [inline]

Definition at line 77 of file CylindricalState.h.

References prSign_.

00077 {return prSign_;}

Scalar CylindricalState::rho (  )  const [inline]

Definition at line 75 of file CylindricalState.h.

References rho_.

00075 {return rho_;}


Member Data Documentation

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().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:17:37 2009 for CMSSW by  doxygen 1.5.4