Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:52

0001 #ifndef TkNavigation_SimpleNavigableLayer_H
0002 #define TkNavigation_SimpleNavigableLayer_H
0003 #include "FWCore/Utilities/interface/Visibility.h"
0004 
0005 #include "TrackingTools/DetLayers/interface/NavigableLayer.h"
0006 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0007 #include "TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h"
0008 
0009 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
0010 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0011 #include "TrackingTools/DetLayers/interface/TkLayerLess.h"
0012 
0013 #include <vector>
0014 
0015 class GtfPropagator;
0016 
0017 /** A partial implementation of the NavigableLayer
0018  */
0019 
0020 class dso_hidden SimpleNavigableLayer : public NavigableLayer {
0021 public:
0022   typedef std::vector<const DetLayer*> DLC;
0023   typedef std::vector<const BarrelDetLayer*> BDLC;
0024   typedef std::vector<const ForwardDetLayer*> FDLC;
0025 
0026   SimpleNavigableLayer(const MagneticField* field, float eps, bool checkCrossingSide = true)
0027       : theField(field), theEpsilon(eps), theCheckCrossingSide(checkCrossingSide), theSelfSearch(false) {}
0028 
0029   virtual void setInwardLinks(const BDLC&, const FDLC&, TkLayerLess sorter = TkLayerLess(outsideIn)) = 0;
0030 
0031   virtual void setAdditionalLink(const DetLayer*, NavigationDirection direction = insideOut) = 0;
0032 
0033   void setCheckCrossingSide(bool docheck) { theCheckCrossingSide = docheck; }
0034 
0035   using NavigableLayer::compatibleLayers;
0036   std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0037                                                 PropagationDirection timeDirection,
0038                                                 int& counter) const final;
0039 
0040 protected:
0041   const MagneticField* theField;
0042   float theEpsilon;
0043   bool theCheckCrossingSide;
0044 
0045 public:
0046   bool theSelfSearch;
0047 
0048 protected:
0049   typedef BDLC::iterator BDLI;
0050   typedef FDLC::iterator FDLI;
0051   typedef BDLC::const_iterator ConstBDLI;
0052   typedef FDLC::const_iterator ConstFDLI;
0053   typedef TrajectoryStateOnSurface TSOS;
0054 
0055   bool wellInside(const FreeTrajectoryState& fts,
0056                   PropagationDirection dir,
0057                   const BarrelDetLayer* bl,
0058                   DLC& result) const dso_internal;
0059 
0060   bool wellInside(const FreeTrajectoryState& fts,
0061                   PropagationDirection dir,
0062                   const ForwardDetLayer* bl,
0063                   DLC& result) const dso_internal;
0064 
0065   bool wellInside(const FreeTrajectoryState& fts,
0066                   PropagationDirection dir,
0067                   ConstBDLI begin,
0068                   ConstBDLI end,
0069                   DLC& result) const dso_internal;
0070 
0071   bool wellInside(const FreeTrajectoryState& fts,
0072                   PropagationDirection dir,
0073                   const DLC& layers,
0074                   DLC& result) const dso_internal;
0075 
0076   bool wellInside(const FreeTrajectoryState& fts,
0077                   PropagationDirection dir,
0078                   ConstFDLI begin,
0079                   ConstFDLI end,
0080                   DLC& result) const dso_internal;
0081 
0082   AnalyticalPropagator propagator(PropagationDirection dir) const {
0083     AnalyticalPropagator aPropagator(theField);
0084     aPropagator.setPropagationDirection(dir);
0085     return aPropagator;
0086   }
0087 
0088   TSOS crossingState(const FreeTrajectoryState& fts, PropagationDirection dir) const dso_internal;
0089 };
0090 
0091 #endif  // SimpleNavigableLayer_H