CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MkFitGeometry.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFit_MkFitGeometry_h
2 #define RecoTracker_MkFit_MkFitGeometry_h
3 
5 
6 #include <memory>
7 #include <unordered_map>
8 #include <vector>
9 
10 namespace mkfit {
11  class LayerNumberConverter;
12  class TrackerInfo;
13 } // namespace mkfit
14 
15 class DetLayer;
17 class TrackerGeometry;
18 class TrackerTopology;
19 
24 public:
25  explicit MkFitGeometry(const TrackerGeometry& geom,
26  const GeometricSearchTracker& tracker,
27  const TrackerTopology& ttopo,
28  std::unique_ptr<mkfit::TrackerInfo> trackerInfo);
30 
31  int mkFitLayerNumber(DetId detId) const;
33  mkfit::TrackerInfo const& trackerInfo() const { return *trackerInfo_; }
34  const std::vector<const DetLayer*>& detLayers() const { return dets_; }
35  unsigned int uniqueIdInLayer(int layer, unsigned int detId) const { return detIdToShortId_.at(layer).at(detId); }
36  const TrackerTopology* topology() const { return ttopo_; }
37 
38 private:
40  std::unique_ptr<mkfit::LayerNumberConverter> lnc_; // for pimpl pattern
41  std::unique_ptr<mkfit::TrackerInfo> trackerInfo_;
42  std::vector<const DetLayer*> dets_;
43  std::vector<std::unordered_map<unsigned int, unsigned int>> detIdToShortId_;
44 };
45 
46 #endif
unsigned int uniqueIdInLayer(int layer, unsigned int detId) const
Definition: MkFitGeometry.h:35
const std::vector< const DetLayer * > & detLayers() const
Definition: MkFitGeometry.h:34
mkfit::LayerNumberConverter const & layerNumberConverter() const
Definition: MkFitGeometry.h:32
std::unique_ptr< mkfit::LayerNumberConverter > lnc_
Definition: MkFitGeometry.h:40
constexpr std::array< uint8_t, layerIndexSize > layer
const TrackerTopology * ttopo_
Definition: MkFitGeometry.h:39
Definition: DetId.h:17
int mkFitLayerNumber(DetId detId) const
std::unique_ptr< mkfit::TrackerInfo > trackerInfo_
Definition: MkFitGeometry.h:41
MkFitGeometry(const TrackerGeometry &geom, const GeometricSearchTracker &tracker, const TrackerTopology &ttopo, std::unique_ptr< mkfit::TrackerInfo > trackerInfo)
const TrackerTopology * topology() const
Definition: MkFitGeometry.h:36
mkfit::TrackerInfo const & trackerInfo() const
Definition: MkFitGeometry.h:33
std::vector< std::unordered_map< unsigned int, unsigned int > > detIdToShortId_
Definition: MkFitGeometry.h:43
std::vector< const DetLayer * > dets_
Definition: MkFitGeometry.h:42