Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:39

0001 #ifndef RecoMTD_DetLayers_MTDSectorForwardDoubleLayer_H
0002 #define RecoMTD_DetLayers_MTDSectorForwardDoubleLayer_H
0003 
0004 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0005 #include "Utilities/BinningTools/interface/BaseBinFinder.h"
0006 #include "RecoMTD/DetLayers/interface/MTDSectorForwardLayer.h"
0007 
0008 class MTDDetSector;
0009 class GeomDet;
0010 
0011 class MTDSectorForwardDoubleLayer : public ForwardDetLayer {
0012 public:
0013   /// Constructor, takes ownership of pointers
0014   MTDSectorForwardDoubleLayer(const std::vector<const MTDDetSector*>& frontSectors,
0015                               const std::vector<const MTDDetSector*>& backSectors);
0016 
0017   ~MTDSectorForwardDoubleLayer() override {}
0018 
0019   // GeometricSearchDet interface
0020 
0021   const std::vector<const GeomDet*>& basicComponents() const override { return theBasicComponents; }
0022 
0023   const std::vector<const GeometricSearchDet*>& components() const override { return theComponents; }
0024 
0025   bool isInsideOut(const TrajectoryStateOnSurface& tsos) const;
0026 
0027   // tries closest layer first
0028   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface&,
0029                                                        const Propagator&,
0030                                                        const MeasurementEstimator&) const override;
0031 
0032   std::vector<DetWithState> compatibleDets(const TrajectoryStateOnSurface& startingState,
0033                                            const Propagator& prop,
0034                                            const MeasurementEstimator& est) const override;
0035 
0036   std::vector<DetGroup> groupedCompatibleDets(const TrajectoryStateOnSurface& startingState,
0037                                               const Propagator& prop,
0038                                               const MeasurementEstimator& est) const override;
0039 
0040   // DetLayer interface
0041   SubDetector subDetector() const override { return theBackLayer.subDetector(); }
0042 
0043   // Extension of the interface
0044 
0045   /// Return the vector of sectors.
0046   virtual const std::vector<const MTDDetSector*>& sectors() const { return theSectors; }
0047 
0048   bool isCrack(const GlobalPoint& gp) const;
0049 
0050   const MTDSectorForwardLayer* frontLayer() const { return &theFrontLayer; }
0051   const MTDSectorForwardLayer* backLayer() const { return &theBackLayer; }
0052 
0053   void selfTest() const;
0054 
0055 protected:
0056   BoundDisk* computeSurface() override;
0057 
0058 private:
0059   MTDSectorForwardLayer theFrontLayer;
0060   MTDSectorForwardLayer theBackLayer;
0061   std::vector<const MTDDetSector*> theSectors;
0062   std::vector<const GeometricSearchDet*> theComponents;  // duplication of the above
0063   std::vector<const GeomDet*> theBasicComponents;        // All chambers
0064 };
0065 #endif