Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-12 09:07:55

0001 #ifndef TkDetLayers_Phase2EndcapLayer_h
0002 #define TkDetLayers_Phase2EndcapLayer_h
0003 
0004 #include "TrackingTools/DetLayers/interface/RingedForwardLayer.h"
0005 #include "Phase2EndcapRing.h"
0006 #include "TkDetUtil.h"
0007 #include <array>
0008 #include <atomic>
0009 
0010 /** A concrete implementation for Phase 2 Endcap/Forward layer 
0011  *  built out of Phase2EndcapRings
0012  *  this classs is used for both OT and Pixel detector
0013  */
0014 
0015 #pragma GCC visibility push(hidden)
0016 class Phase2EndcapLayer final : public RingedForwardLayer {
0017 public:
0018   Phase2EndcapLayer(std::vector<const Phase2EndcapRing*>& rings, const bool isOT) __attribute__((cold));
0019   ~Phase2EndcapLayer() override __attribute__((cold));
0020 
0021   // Default implementations would not properly manage memory
0022   Phase2EndcapLayer(const Phase2EndcapLayer&) = delete;
0023   Phase2EndcapLayer& operator=(const Phase2EndcapLayer&) = delete;
0024 
0025   // GeometricSearchDet interface
0026 
0027   const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComps; }
0028 
0029   const std::vector<const GeometricSearchDet*>& components() const override __attribute__((cold));
0030 
0031   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& tsos,
0032                               const Propagator& prop,
0033                               const MeasurementEstimator& est,
0034                               std::vector<DetGroup>& result) const override __attribute__((hot));
0035 
0036   // DetLayer interface
0037   SubDetector subDetector() const override {
0038     if (isOuterTracker)
0039       return GeomDetEnumerators::subDetGeom[GeomDetEnumerators::P2OTEC];
0040     else
0041       return GeomDetEnumerators::subDetGeom[GeomDetEnumerators::P2PXEC];
0042   }
0043 
0044 private:
0045   // private methods for the implementation of groupedCompatibleDets()
0046   BoundDisk* computeDisk(const std::vector<const Phase2EndcapRing*>& rings) const __attribute__((cold));
0047 
0048   bool overlapInR(const TrajectoryStateOnSurface& tsos,
0049                   int i,
0050                   double ymax,
0051                   std::vector<tkDetUtil::RingPar> ringParams) const __attribute__((hot));
0052 
0053   float computeWindowSize(const GeomDet* det,
0054                           const TrajectoryStateOnSurface& tsos,
0055                           const MeasurementEstimator& est) const __attribute__((hot));
0056 
0057   void fillRingPars(int i) __attribute__((cold));
0058 
0059 private:
0060   std::vector<GeomDet const*> theBasicComps;
0061   const bool isOuterTracker;
0062   mutable std::atomic<std::vector<const GeometricSearchDet*>*> theComponents;
0063   std::vector<const Phase2EndcapRing*> theComps;
0064   std::vector<tkDetUtil::RingPar> ringPars;
0065   int theRingSize;
0066 };
0067 
0068 #pragma GCC visibility pop
0069 #endif