CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackingTools/GeomPropagators/interface/PropagationDirectionFromPath.h

Go to the documentation of this file.
00001 #ifndef _CR_PropagationDirectionFromPath
00002 #define _CR_PropagationDirectionFromPath
00003 
00004 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00008 class PropagationDirectionFromPath {
00009 public:
00011   inline PropagationDirection operator()(const double& s) const
00012   {
00013     return s>=0 ? alongMomentum : oppositeToMomentum;
00014   }
00016   inline PropagationDirection 
00017   operator()(const double& s,
00018              const PropagationDirection propDir) const
00019   {
00020     if ( propDir!=anyDirection )  return propDir;
00021     return (*this)(s);
00022   }
00023 };
00024 #endif