Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TkDetLayers_Phase2EndcapLayerDoubleDisk_h
0002 #define TkDetLayers_Phase2EndcapLayerDoubleDisk_h
0003 
0004 #include "TrackingTools/DetLayers/interface/RingedForwardLayer.h"
0005 #include "Phase2EndcapSubDisk.h"
0006 #include <array>
0007 #include <atomic>
0008 
0009 /** A concrete implementation for Phase 2 Endcap/Forward layer 
0010  *  built out of Phase2EndcapRings
0011  */
0012 
0013 #pragma GCC visibility push(hidden)
0014 class Phase2EndcapLayerDoubleDisk final : public RingedForwardLayer {
0015 public:
0016   Phase2EndcapLayerDoubleDisk(std::vector<const Phase2EndcapSubDisk*>& subDisks);
0017   ~Phase2EndcapLayerDoubleDisk() override;
0018 
0019   // Default implementations would not properly manage memory
0020   Phase2EndcapLayerDoubleDisk(const Phase2EndcapLayerDoubleDisk&) = delete;
0021   Phase2EndcapLayerDoubleDisk& operator=(const Phase2EndcapLayerDoubleDisk&) = delete;
0022 
0023   // GeometricSearchDet interface
0024 
0025   const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComps; }
0026 
0027   const std::vector<const GeometricSearchDet*>& components() const override;
0028 
0029   void groupedCompatibleDetsV(const TrajectoryStateOnSurface& tsos,
0030                               const Propagator& prop,
0031                               const MeasurementEstimator& est,
0032                               std::vector<DetGroup>& result) const override;
0033 
0034   // DetLayer interface
0035   SubDetector subDetector() const override { return GeomDetEnumerators::subDetGeom[GeomDetEnumerators::P2PXEC]; }
0036 
0037 private:
0038   // private methods for the implementation of groupedCompatibleDets()
0039   BoundDisk* computeDisk(const std::vector<const Phase2EndcapSubDisk*>& subDisks) const;
0040 
0041   std::array<int, 2> subDiskIndicesByCrossingProximity(const TrajectoryStateOnSurface& startingState,
0042                                                        const Propagator& prop) const;
0043 
0044   std::array<int, 2> findTwoClosest(std::vector<GlobalPoint>) const;
0045 
0046   void fillSubDiskPars(int i);
0047 
0048 private:
0049   std::vector<GeomDet const*> theBasicComps;
0050   mutable std::atomic<std::vector<const GeometricSearchDet*>*> theComponents;
0051   std::vector<const Phase2EndcapSubDisk*> theComps;
0052   struct SubDiskPar {
0053     float theSubDiskZ;
0054   };
0055   std::vector<SubDiskPar> subDiskPars;
0056   int theSubDisksSize;
0057 };
0058 
0059 #pragma GCC visibility pop
0060 #endif