Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TkDetLayers_CompositeTECPetal_h
0002 #define TkDetLayers_CompositeTECPetal_h
0003 
0004 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
0005 
0006 #include "TECWedge.h"
0007 
0008 #include "DataFormats/GeometrySurface/interface/BoundDiskSector.h"
0009 
0010 #include "SubLayerCrossings.h"
0011 
0012 #include "FWCore/Utilities/interface/Visibility.h"
0013 
0014 /** A concrete implementation for TEC petals
0015  */
0016 
0017 #pragma GCC visibility push(hidden)
0018 class CompositeTECPetal final : public GeometricSearchDet {
0019 public:
0020   struct WedgePar {
0021     float theR, thetaMin, thetaMax;
0022   };
0023 
0024   CompositeTECPetal(std::vector<const TECWedge*>& innerWedges, std::vector<const TECWedge*>& outerWedges)
0025       __attribute__((cold));
0026 
0027   ~CompositeTECPetal() override __attribute__((cold));
0028 
0029   // GeometricSearchDet interface
0030   const BoundSurface& surface() const final { return *theDiskSector; }
0031   //Extension of the interface
0032   virtual const BoundDiskSector& specificSurface() const final { return *theDiskSector; }
0033 
0034   // GeometricSearchDet interface
0035   const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComps; }
0036 
0037   const std::vector<const GeometricSearchDet*>& components() const override __attribute__((cold)) { return theComps; }
0038 
0039   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
0040                                                        const Propagator&,
0041                                                        const MeasurementEstimator&) const override
0042       __attribute__((cold));
0043 
0044   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& startingState,
0045                               const Propagator& prop,
0046                               const MeasurementEstimator& est,
0047                               std::vector<DetGroup>& result) const override __attribute__((hot));
0048 
0049 private:
0050   ReferenceCountingPointer<BoundDiskSector> theDiskSector;
0051 
0052   // private methods for the implementation of groupedCompatibleDets()
0053   SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface& tsos, PropagationDirection propDir) const
0054       __attribute__((hot)) dso_internal;
0055 
0056   bool addClosest(const TrajectoryStateOnSurface& tsos,
0057                   const Propagator& prop,
0058                   const MeasurementEstimator& est,
0059                   const SubLayerCrossing& crossing,
0060                   std::vector<DetGroup>& result) const __attribute__((hot)) dso_internal;
0061 
0062   void searchNeighbors(const TrajectoryStateOnSurface& tsos,
0063                        const Propagator& prop,
0064                        const MeasurementEstimator& est,
0065                        const SubLayerCrossing& crossing,
0066                        float window,
0067                        std::vector<DetGroup>& result,
0068                        bool checkClosest) const __attribute__((hot)) dso_internal;
0069 
0070   static float computeWindowSize(const GeomDet* det,
0071                                  const TrajectoryStateOnSurface& tsos,
0072                                  const MeasurementEstimator& est) __attribute__((hot)) dso_internal;
0073 
0074   int findBin(float R, int layer) const dso_internal;
0075 
0076   WedgePar const& findPar(int index, int diskSectorType) const dso_internal {
0077     return (diskSectorType == 0) ? theFrontPars[index] : theBackPars[index];
0078   }
0079 
0080   const std::vector<const TECWedge*>& subLayer(int ind) const dso_internal {
0081     return (ind == 0 ? theFrontComps : theBackComps);
0082   }
0083 
0084 private:
0085   std::vector<const GeomDet*> theBasicComps;
0086   std::vector<const GeometricSearchDet*> theComps;
0087 
0088   std::vector<const TECWedge*> theFrontComps;
0089   std::vector<const TECWedge*> theBackComps;
0090 
0091   std::vector<float> theFrontBoundaries;
0092   std::vector<float> theBackBoundaries;
0093   std::vector<WedgePar> theFrontPars;
0094   std::vector<WedgePar> theBackPars;
0095 
0096   ReferenceCountingPointer<BoundDiskSector> theFrontSector;
0097   ReferenceCountingPointer<BoundDiskSector> theBackSector;
0098 };
0099 
0100 #pragma GCC visibility pop
0101 #endif