Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-22 00:47:27

0001 #ifndef RecoTracker_MkFit_MkFitGeometry_h
0002 #define RecoTracker_MkFit_MkFitGeometry_h
0003 
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
0006 
0007 #include <memory>
0008 #include <unordered_map>
0009 #include <vector>
0010 
0011 namespace mkfit {
0012   class LayerNumberConverter;
0013 }  // namespace mkfit
0014 
0015 class DetLayer;
0016 class GeometricSearchTracker;
0017 class TrackerGeometry;
0018 class TrackerTopology;
0019 
0020 /**
0021  * Collection of geometry-related objects for mkFit
0022  */
0023 class MkFitGeometry {
0024 public:
0025   explicit MkFitGeometry(const TrackerGeometry& geom,
0026                          const GeometricSearchTracker& tracker,
0027                          const TrackerTopology& ttopo,
0028                          std::unique_ptr<mkfit::TrackerInfo> trackerInfo,
0029                          const mkfit::LayerNumberConverter& layNConv);
0030   ~MkFitGeometry();
0031 
0032   int mkFitLayerNumber(DetId detId) const;
0033   mkfit::LayerNumberConverter const& layerNumberConverter() const { return *lnc_; }
0034   mkfit::TrackerInfo const& trackerInfo() const { return *trackerInfo_; }
0035   const std::vector<const DetLayer*>& detLayers() const { return dets_; }
0036   unsigned int uniqueIdInLayer(int layer, unsigned int detId) const {
0037     return trackerInfo_->layer(layer).short_id(detId);
0038   }
0039   const TrackerTopology* topology() const { return ttopo_; }
0040 
0041 private:
0042   const TrackerTopology* ttopo_;
0043   std::unique_ptr<mkfit::LayerNumberConverter> lnc_;  // for pimpl pattern
0044   std::unique_ptr<mkfit::TrackerInfo> trackerInfo_;
0045   std::vector<const DetLayer*> dets_;
0046 };
0047 
0048 #endif