Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TkDetLayers_PixelForwardLayer_h
0002 #define TkDetLayers_PixelForwardLayer_h
0003 
0004 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0005 #include "PixelBlade.h"
0006 #include "Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h"
0007 
0008 /** A concrete implementation for PixelForward layer 
0009  *  built out of ForwardPixelBlade
0010  */
0011 
0012 #pragma GCC visibility push(hidden)
0013 class PixelForwardLayer final : public ForwardDetLayer {
0014 public:
0015   PixelForwardLayer(std::vector<const PixelBlade*>& blades);
0016   ~PixelForwardLayer() override;
0017 
0018   // GeometricSearchDet interface
0019 
0020   const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComps; }
0021 
0022   const std::vector<const GeometricSearchDet*>& components() const override __attribute__((cold)) { return theComps; }
0023 
0024   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& tsos,
0025                               const Propagator& prop,
0026                               const MeasurementEstimator& est,
0027                               std::vector<DetGroup>& result) const override __attribute__((hot));
0028 
0029   // DetLayer interface
0030   SubDetector subDetector() const override { return GeomDetEnumerators::subDetGeom[GeomDetEnumerators::PixelEndcap]; }
0031 
0032 private:
0033   // methods for groupedCompatibleDets implementation
0034   static int computeHelicity(const GeometricSearchDet* firstBlade, const GeometricSearchDet* secondBlade);
0035 
0036   struct SubTurbineCrossings {
0037     SubTurbineCrossings() : isValid(false), closestIndex(0), nextIndex(0), nextDistance(0.0f) {}
0038     SubTurbineCrossings(int ci, int ni, float nd) : isValid(true), closestIndex(ci), nextIndex(ni), nextDistance(nd) {}
0039 
0040     bool isValid;
0041     int closestIndex;
0042     int nextIndex;
0043     float nextDistance;
0044   };
0045 
0046   void searchNeighbors(const TrajectoryStateOnSurface& tsos,
0047                        const Propagator& prop,
0048                        const MeasurementEstimator& est,
0049                        const SubTurbineCrossings& crossings,
0050                        float window,
0051                        std::vector<DetGroup>& result) const __attribute__((hot));
0052 
0053   SubTurbineCrossings computeCrossings(const TrajectoryStateOnSurface& startingState,
0054                                        PropagationDirection propDir) const __attribute__((hot));
0055 
0056   static float computeWindowSize(const GeomDet* det,
0057                                  const TrajectoryStateOnSurface& tsos,
0058                                  const MeasurementEstimator& est);
0059 
0060 private:
0061   typedef PeriodicBinFinderInPhi<float> BinFinderType;
0062   BinFinderType theBinFinder;
0063 
0064   std::vector<const GeometricSearchDet*> theComps;
0065   std::vector<const GeomDet*> theBasicComps;
0066 };
0067 
0068 #pragma GCC visibility pop
0069 #endif