Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:33

0001 #ifndef TkNavigation_StartingLayerFinder_H_
0002 #define TkNavigation_StartingLayerFinder_H_
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 
0008 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0009 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
0010 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0011 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0012 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0013 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0014 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0015 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
0016 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
0017 
0018 #include <vector>
0019 
0020 /** Finds the nearest navigable layer.
0021  *  Needed to start trajectory building in case the seed does not 
0022  *  have a DetLayer
0023  */
0024 
0025 class StartingLayerFinder {
0026 public:
0027   StartingLayerFinder(Propagator const& aPropagator, MeasurementTracker const& tracker)
0028       : thePropagator(aPropagator),
0029         theMeasurementTracker(tracker),
0030         theFirstNegPixelFwdLayer(0),
0031         theFirstPosPixelFwdLayer(0) {}
0032 
0033   std::vector<const DetLayer*> operator()(const FreeTrajectoryState& aFts, float dr, float dz) const;
0034 
0035 private:
0036   const BarrelDetLayer* firstPixelBarrelLayer() const;
0037   const std::vector<const ForwardDetLayer*> firstNegPixelFwdLayer() const;
0038   const std::vector<const ForwardDetLayer*> firstPosPixelFwdLayer() const;
0039 
0040   Propagator const& thePropagator;
0041   MeasurementTracker const& theMeasurementTracker;
0042   mutable bool thePixelLayersValid = false;
0043   mutable const BarrelDetLayer* theFirstPixelBarrelLayer = nullptr;
0044   mutable std::vector<const ForwardDetLayer*> theFirstNegPixelFwdLayer;
0045   mutable std::vector<const ForwardDetLayer*> theFirstPosPixelFwdLayer;
0046 
0047   void checkPixelLayers() const;
0048 };
0049 
0050 #endif