Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:31

0001 #ifndef DetLayers_NavigableLayer_h
0002 #define DetLayers_NavigableLayer_h
0003 
0004 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0005 #include "TrackingTools/DetLayers/interface/NavigationDirection.h"
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 
0008 #include <vector>
0009 
0010 class DetLayer;
0011 class FreeTrajectoryState;
0012 class NavigationSchool;
0013 
0014 /** The navigation component of the DetLayer.
0015  *  If navigation is not setup the DetLayer has a zero pointer to
0016  *  a NavigableLayer; when navigation is setup each DetLayer is
0017  *  given an instance of NavigableLayer that implements the 
0018  *  navigation algorithm. Navigation requests to the DetLayer are
0019  *  forwarded to the navigable layer.
0020  */
0021 
0022 class NavigableLayer {
0023 public:
0024   virtual ~NavigableLayer() {}
0025 
0026   virtual std::vector<const DetLayer*> nextLayers(NavigationDirection direction) const = 0;
0027 
0028   virtual std::vector<const DetLayer*> nextLayers(const FreeTrajectoryState& fts,
0029                                                   PropagationDirection timeDirection) const = 0;
0030 
0031   virtual std::vector<const DetLayer*> compatibleLayers(NavigationDirection direction) const = 0;
0032 
0033   virtual std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0034                                                         PropagationDirection timeDirection) const {
0035     int counter = 0;
0036     return compatibleLayers(fts, timeDirection, counter);
0037   };
0038 
0039   virtual std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0040                                                         PropagationDirection timeDirection,
0041                                                         int& counter) const {
0042     edm::LogWarning("DetLayers") << "compatibleLayers(fts,dir,counter) not implemented. returning empty vector";
0043     return std::vector<const DetLayer*>();
0044   }
0045 
0046   virtual DetLayer const* detLayer() const = 0;
0047   virtual void setDetLayer(DetLayer const* dl) = 0;
0048 
0049   void setSchool(NavigationSchool const* sh) { school = sh; }
0050 
0051 protected:
0052   NavigationSchool const* school = nullptr;
0053 };
0054 
0055 #endif