CMS 3D CMS Logo

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  class IterationsInfo;
14 } // namespace mkfit
15 
16 class DetLayer;
18 class TrackerGeometry;
19 class TrackerTopology;
20 
25 public:
26  explicit MkFitGeometry(const TrackerGeometry& geom,
28  const TrackerTopology& ttopo,
29  std::unique_ptr<mkfit::TrackerInfo> trackerInfo,
30  std::unique_ptr<mkfit::IterationsInfo> iterationsInfo);
32 
33  int mkFitLayerNumber(DetId detId) const;
34  mkfit::LayerNumberConverter const& layerNumberConverter() const { return *lnc_; }
35  mkfit::TrackerInfo const& trackerInfo() const { return *trackerInfo_; }
36  mkfit::IterationsInfo const& iterationsInfo() const { return *iterationsInfo_; }
37  const std::vector<const DetLayer*>& detLayers() const { return dets_; }
38  unsigned int uniqueIdInLayer(int layer, unsigned int detId) const { return detIdToShortId_.at(layer).at(detId); }
39  const TrackerTopology* topology() const { return ttopo_; }
40 
41 private:
43  std::unique_ptr<mkfit::LayerNumberConverter> lnc_; // for pimpl pattern
44  std::unique_ptr<mkfit::TrackerInfo> trackerInfo_;
45  std::unique_ptr<mkfit::IterationsInfo> iterationsInfo_; // only temporarily here, to be moved into proper place later
46  std::vector<const DetLayer*> dets_;
47  std::vector<std::unordered_map<unsigned int, unsigned int>> detIdToShortId_;
48 };
49 
50 #endif
MkFitGeometry::mkFitLayerNumber
int mkFitLayerNumber(DetId detId) const
Definition: MkFitGeometry.cc:79
DetLayer
Definition: DetLayer.h:21
TrackerTopology
Definition: TrackerTopology.h:16
MkFitGeometry::trackerInfo_
std::unique_ptr< mkfit::TrackerInfo > trackerInfo_
Definition: MkFitGeometry.h:44
mkfit
Definition: MkFitEventOfHits.h:6
DetId
Definition: DetId.h:17
MkFitGeometry::~MkFitGeometry
~MkFitGeometry()
Definition: MkFitGeometry.cc:77
MkFitGeometry::topology
const TrackerTopology * topology() const
Definition: MkFitGeometry.h:39
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
MkFitGeometry::layerNumberConverter
mkfit::LayerNumberConverter const & layerNumberConverter() const
Definition: MkFitGeometry.h:34
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
MkFitGeometry
Definition: MkFitGeometry.h:24
MkFitGeometry::detLayers
const std::vector< const DetLayer * > & detLayers() const
Definition: MkFitGeometry.h:37
MkFitGeometry::MkFitGeometry
MkFitGeometry(const TrackerGeometry &geom, const GeometricSearchTracker &tracker, const TrackerTopology &ttopo, std::unique_ptr< mkfit::TrackerInfo > trackerInfo, std::unique_ptr< mkfit::IterationsInfo > iterationsInfo)
Definition: MkFitGeometry.cc:18
MkFitGeometry::detIdToShortId_
std::vector< std::unordered_map< unsigned int, unsigned int > > detIdToShortId_
Definition: MkFitGeometry.h:47
MkFitGeometry::trackerInfo
mkfit::TrackerInfo const & trackerInfo() const
Definition: MkFitGeometry.h:35
MkFitGeometry::ttopo_
const TrackerTopology * ttopo_
Definition: MkFitGeometry.h:42
MkFitGeometry::dets_
std::vector< const DetLayer * > dets_
Definition: MkFitGeometry.h:46
MkFitGeometry::uniqueIdInLayer
unsigned int uniqueIdInLayer(int layer, unsigned int detId) const
Definition: MkFitGeometry.h:38
MkFitGeometry::iterationsInfo
mkfit::IterationsInfo const & iterationsInfo() const
Definition: MkFitGeometry.h:36
DetId.h
MkFitGeometry::lnc_
std::unique_ptr< mkfit::LayerNumberConverter > lnc_
Definition: MkFitGeometry.h:43
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
MkFitGeometry::iterationsInfo_
std::unique_ptr< mkfit::IterationsInfo > iterationsInfo_
Definition: MkFitGeometry.h:45
TrackerGeometry
Definition: TrackerGeometry.h:14