Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TkDetLayers_TOBRod_h
0002 #define TkDetLayers_TOBRod_h
0003 
0004 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
0005 #include "TrackingTools/DetLayers/interface/DetRod.h"
0006 #include "TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h"
0007 #include "SubLayerCrossings.h"
0008 
0009 /** A concrete implementation for TOB Rod 
0010  *  
0011  */
0012 
0013 #pragma GCC visibility push(hidden)
0014 class TOBRod final : public DetRod {
0015 public:
0016   typedef PeriodicBinFinderInZ<float> BinFinderType;
0017 
0018   TOBRod(std::vector<const GeomDet*>& innerDets, std::vector<const GeomDet*>& outerDets) __attribute__((cold));
0019   ~TOBRod() override __attribute__((cold));
0020 
0021   // GeometricSearchDet interface
0022 
0023   const std::vector<const GeomDet*>& basicComponents() const override { return theDets; }
0024 
0025   const std::vector<const GeometricSearchDet*>& components() const override __attribute__((cold));
0026 
0027   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
0028                                                        const Propagator&,
0029                                                        const MeasurementEstimator&) const override
0030       __attribute__((cold));
0031 
0032   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& tsos,
0033                               const Propagator& prop,
0034                               const MeasurementEstimator& est,
0035                               std::vector<DetGroup>& result) const override __attribute__((hot));
0036 
0037 private:
0038   // private methods for the implementation of groupedCompatibleDets()
0039 
0040   SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface& tsos, PropagationDirection propDir) const
0041       __attribute__((hot));
0042 
0043   bool addClosest(const TrajectoryStateOnSurface& tsos,
0044                   const Propagator& prop,
0045                   const MeasurementEstimator& est,
0046                   const SubLayerCrossing& crossing,
0047                   std::vector<DetGroup>& result) const __attribute__((hot));
0048 
0049   float computeWindowSize(const GeomDet* det,
0050                           const TrajectoryStateOnSurface& tsos,
0051                           const MeasurementEstimator& est) const __attribute__((hot));
0052 
0053   void searchNeighbors(const TrajectoryStateOnSurface& tsos,
0054                        const Propagator& prop,
0055                        const MeasurementEstimator& est,
0056                        const SubLayerCrossing& crossing,
0057                        float window,
0058                        std::vector<DetGroup>& result,
0059                        bool checkClosest) const __attribute__((hot));
0060 
0061   const std::vector<const GeomDet*>& subRod(int ind) const { return (ind == 0 ? theInnerDets : theOuterDets); }
0062 
0063 private:
0064   std::vector<const GeomDet*> theDets;
0065   std::vector<const GeomDet*> theInnerDets;
0066   std::vector<const GeomDet*> theOuterDets;
0067 
0068   ReferenceCountingPointer<Plane> theInnerPlane;
0069   ReferenceCountingPointer<Plane> theOuterPlane;
0070 
0071   BinFinderType theInnerBinFinder;
0072   BinFinderType theOuterBinFinder;
0073 };
0074 
0075 #pragma GCC visibility pop
0076 #endif