Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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