Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-07 05:53:39

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   ~MkFitGeometry();
0030 
0031   int mkFitLayerNumber(DetId detId) const;
0032   mkfit::LayerNumberConverter const& layerNumberConverter() const { return *lnc_; }
0033   mkfit::TrackerInfo const& trackerInfo() const { return *trackerInfo_; }
0034   const std::vector<const DetLayer*>& detLayers() const { return dets_; }
0035   unsigned int uniqueIdInLayer(int layer, unsigned int detId) const {
0036     return trackerInfo_->layer(layer).short_id(detId);
0037   }
0038   const TrackerTopology* topology() const { return ttopo_; }
0039 
0040 private:
0041   const TrackerTopology* ttopo_;
0042   std::unique_ptr<mkfit::LayerNumberConverter> lnc_;  // for pimpl pattern
0043   std::unique_ptr<mkfit::TrackerInfo> trackerInfo_;
0044   std::vector<const DetLayer*> dets_;
0045 };
0046 
0047 #endif