CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/TrackPropagation/RungeKutta/src/RKCylindricalDistance.h

Go to the documentation of this file.
00001 #ifndef RKCylindricalDistance_H
00002 #define RKCylindricalDistance_H
00003 
00004 #include "FWCore/Utilities/interface/Visibility.h"
00005 #include "RKDistance.h"
00006 #include "RKSmallVector.h"
00007 #include "CylindricalState.h"
00008 
00009 template <typename T, int N>
00010 class dso_internal RKCylindricalDistance : public RKDistance<T,N> {
00011 public:
00012  
00013   typedef T                                   Scalar;
00014   typedef RKSmallVector<T,N>                  Vector;
00015 
00016   virtual ~RKCylindricalDistance() {}
00017 
00018   virtual Scalar operator()( const Vector& a, const Vector& b, const Scalar& rho) const {
00019       CylindricalState astate(rho,a,1.);
00020       CylindricalState bstate(rho,b,1.);
00021       return (astate.position()-bstate.position()).mag() +
00022           (astate.momentum()-bstate.momentum()).mag() / bstate.momentum().mag();
00023   }
00024  
00025 };
00026 
00027 #endif