Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TkDetLayers_Phase1PixelBlade_h
0002 #define TkDetLayers_Phase1PixelBlade_h
0003 
0004 #include "DataFormats/GeometrySurface/interface/BoundDiskSector.h"
0005 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
0006 
0007 #include "TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h"
0008 #include "SubLayerCrossings.h"
0009 
0010 #include <utility>
0011 
0012 /** A concrete implementation for Phase1PixelBlade
0013  */
0014 
0015 #pragma GCC visibility push(hidden)
0016 class Phase1PixelBlade final : public GeometricSearchDet {
0017 public:
0018   Phase1PixelBlade(std::vector<const GeomDet*>& frontDets, std::vector<const GeomDet*>& backDets) __attribute__((cold));
0019 
0020   ~Phase1PixelBlade() override __attribute__((cold));
0021 
0022   // GeometricSearchDet interface
0023   const BoundSurface& surface() const override { return *theDiskSector; }
0024 
0025   const std::vector<const GeomDet*>& basicComponents() const override { return theDets; }
0026 
0027   const std::vector<const GeometricSearchDet*>& components() const override __attribute__((cold));
0028 
0029   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
0030                                                        const Propagator&,
0031                                                        const MeasurementEstimator&) const override
0032       __attribute__((cold));
0033 
0034   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& tsos,
0035                               const Propagator& prop,
0036                               const MeasurementEstimator& est,
0037                               std::vector<DetGroup>& result) const override __attribute__((hot));
0038 
0039   //Extension of the interface
0040   virtual const BoundDiskSector& specificSurface() const { return *theDiskSector; }
0041 
0042 private:
0043   // private methods for the implementation of groupedCompatibleDets()
0044 
0045   SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface& tsos, PropagationDirection propDir) const
0046       __attribute__((hot));
0047 
0048   bool addClosest(const TrajectoryStateOnSurface& tsos,
0049                   const Propagator& prop,
0050                   const MeasurementEstimator& est,
0051                   const SubLayerCrossing& crossing,
0052                   std::vector<DetGroup>& result) const __attribute__((hot));
0053 
0054   float computeWindowSize(const GeomDet* det,
0055                           const TrajectoryStateOnSurface& tsos,
0056                           const MeasurementEstimator& est) const;
0057 
0058   void searchNeighbors(const TrajectoryStateOnSurface& tsos,
0059                        const Propagator& prop,
0060                        const MeasurementEstimator& est,
0061                        const SubLayerCrossing& crossing,
0062                        float window,
0063                        std::vector<DetGroup>& result,
0064                        bool checkClosest) const __attribute__((hot));
0065 
0066   bool overlap(const GlobalPoint& gpos, const GeomDet& det, float phiWin) const;
0067 
0068   // This 2 find methods should be substituted with the use
0069   // of a GeneralBinFinderInR
0070 
0071   int findBin(float R, int layer) const;
0072   int findBin2(GlobalPoint thispoint, int layer) const;
0073 
0074   GlobalPoint findPosition(int index, int diskSectorIndex) const;
0075 
0076   const std::vector<const GeomDet*>& subBlade(int ind) const { return (ind == 0 ? theFrontDets : theBackDets); }
0077 
0078   std::pair<float, float> computeRadiusRanges(const std::vector<const GeomDet*>&);
0079 
0080 private:
0081   std::vector<const GeomDet*> theDets;
0082   std::vector<const GeomDet*> theFrontDets;
0083   std::vector<const GeomDet*> theBackDets;
0084   std::pair<float, float> front_radius_range_;
0085   std::pair<float, float> back_radius_range_;
0086 
0087   ReferenceCountingPointer<BoundDiskSector> theDiskSector;
0088   ReferenceCountingPointer<BoundDiskSector> theFrontDiskSector;
0089   ReferenceCountingPointer<BoundDiskSector> theBackDiskSector;
0090 };
0091 
0092 #pragma GCC visibility pop
0093 #endif