00001 #ifndef TkNavigation_SimpleNavigableLayer_H 00002 #define TkNavigation_SimpleNavigableLayer_H 00003 00004 #include "TrackingTools/DetLayers/interface/NavigableLayer.h" 00005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" 00006 #include "TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h" 00007 00008 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h" 00009 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h" 00010 #include "RecoTracker/TkNavigation/interface/TkLayerLess.h" 00011 00012 #include <vector> 00013 00014 class GtfPropagator; 00015 00019 class SimpleNavigableLayer : public NavigableLayer { 00020 public: 00021 00022 typedef std::vector<const DetLayer*> DLC; 00023 typedef std::vector<BarrelDetLayer*> BDLC; 00024 typedef std::vector<ForwardDetLayer*> FDLC; 00025 00026 SimpleNavigableLayer( const MagneticField* field,float eps,bool checkCrossingSide=true) : 00027 theSelfSearch(false), 00028 theEpsilon(eps),thePropagator(field),theCheckCrossingSide(checkCrossingSide) {} 00029 00030 virtual void setInwardLinks(const BDLC&, const FDLC&, TkLayerLess sorter = TkLayerLess(outsideIn)) = 0; 00031 00032 virtual void setAdditionalLink(DetLayer*, NavigationDirection direction=insideOut) = 0; 00033 00034 void setCheckCrossingSide(bool docheck) {theCheckCrossingSide = docheck;} 00035 00036 bool theSelfSearch; 00037 00038 protected: 00039 00040 typedef BDLC::iterator BDLI; 00041 typedef FDLC::iterator FDLI; 00042 typedef BDLC::const_iterator ConstBDLI; 00043 typedef FDLC::const_iterator ConstFDLI; 00044 typedef TrajectoryStateOnSurface TSOS; 00045 00046 float theEpsilon; 00047 00048 mutable AnalyticalPropagator thePropagator; 00049 00050 bool theCheckCrossingSide; 00051 00052 bool wellInside( const FreeTrajectoryState& fts, PropagationDirection dir, 00053 const BarrelDetLayer* bl, DLC& result) const; 00054 00055 bool wellInside( const FreeTrajectoryState& fts, PropagationDirection dir, 00056 const ForwardDetLayer* bl, DLC& result) const; 00057 00058 bool wellInside( const FreeTrajectoryState& fts, PropagationDirection dir, 00059 ConstBDLI begin, ConstBDLI end, DLC& result) const; 00060 00061 bool wellInside( const FreeTrajectoryState& fts, PropagationDirection dir, 00062 const DLC& layers, DLC& result) const; 00063 00064 bool wellInside( const FreeTrajectoryState& fts, PropagationDirection dir, 00065 ConstFDLI begin, ConstFDLI end, DLC& result) const; 00066 00067 Propagator& propagator( PropagationDirection dir) const; 00068 00069 void pushResult( DLC& result, const FDLC& tmp) const; 00070 void pushResult( DLC& result, const BDLC& tmp) const; 00071 00072 }; 00073 00074 #endif // SimpleNavigableLayer_H