CMS 3D CMS Logo

MeasurementTrackerImpl.h
Go to the documentation of this file.
1 #ifndef MeasurementTrackerImpl_H
2 #define MeasurementTrackerImpl_H
3 
7 
14 
16 
20 
22 
23 #include <map>
24 #include <unordered_map>
25 #include <vector>
26 
34 class GluedGeomDet;
35 class StackGeomDet;
36 class SiPixelFedCabling;
37 
39 public:
40  enum QualityFlags {
41  BadModules = 1, // for everybody
42  /* Strips: */ BadAPVFibers = 2,
43  BadStrips = 4,
44  MaskBad128StripBlocks = 8,
45  /* Pixels: */ BadROCs = 2
46  };
47 
48  struct BadStripCutsDet {
53  };
54 
57  const StripClusterParameterEstimator* stripCPE,
58  const SiStripRecHitMatcher* hitMatcher,
59  const TrackerTopology* trackerTopology,
60  const TrackerGeometry* trackerGeom,
61  const GeometricSearchTracker* geometricSearchTracker,
62  const SiStripQuality* stripQuality,
63  int stripQualityFlags,
64  int stripQualityDebugFlags,
65  const SiPixelQuality* pixelQuality,
66  const SiPixelFedCabling* pixelCabling,
67  int pixelQualityFlags,
68  int pixelQualityDebugFlags,
69  const ClusterParameterEstimator<Phase2TrackerCluster1D>* phase2OTCPE = nullptr);
70 
71  ~MeasurementTrackerImpl() override;
72 
73  const TrackingGeometry* geomTracker() const { return theTrackerGeom; }
74 
75  const GeometricSearchTracker* geometricSearchTracker() const { return theGeometricSearchTracker; }
76 
78  MeasurementDetWithData idToDet(const DetId& id, const MeasurementTrackerEvent& data) const override {
79  return MeasurementDetWithData(*idToDetBare(id, data), data);
80  }
81 
82  const MeasurementDet* idToDetBare(const DetId& id, const MeasurementTrackerEvent& data) const { return findDet(id); }
83 
84  const MeasurementDet* findDet(const DetId& id) const {
85  auto it = theDetMap.find(id);
86  if (it != theDetMap.end()) {
87  return it->second;
88  } else {
89  //throw exception;
90  }
91 
92  return nullptr; //to avoid compile warning
93  }
94 
95  typedef std::unordered_map<unsigned int, MeasurementDet*> DetContainer;
96 
98  const DetContainer& allDets() const { return theDetMap; }
99  const std::vector<TkStripMeasurementDet>& stripDets() const { return theStripDets; }
100  const std::vector<TkPixelMeasurementDet>& pixelDets() const { return thePixelDets; }
101  const std::vector<TkGluedMeasurementDet>& gluedDets() const { return theGluedDets; }
102  const std::vector<TkStackMeasurementDet>& stackDets() const { return theStackDets; }
103 
104  const StMeasurementConditionSet& stripDetConditions() const override { return theStDetConditions; }
105  const PxMeasurementConditionSet& pixelDetConditions() const override { return thePxDetConditions; }
106  const Phase2OTMeasurementConditionSet& phase2DetConditions() const override { return thePhase2DetConditions; }
107 
108 protected:
112 
113  DetContainer theDetMap;
114 
115  std::vector<TkPixelMeasurementDet> thePixelDets;
116  std::vector<TkStripMeasurementDet> theStripDets;
117  std::vector<TkPhase2OTMeasurementDet> thePhase2Dets;
118  std::vector<TkGluedMeasurementDet> theGluedDets;
119  std::vector<TkStackMeasurementDet> theStackDets;
120 
122 
123  void initialize(const TrackerTopology* trackerTopology);
124  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet>& stripDets);
125  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet>& pixelDets);
126  void initPhase2OTMeasurementConditionSet(std::vector<TkPhase2OTMeasurementDet>& phase2Dets);
127 
128  void addStripDet(const GeomDet* gd);
129  void addPixelDet(const GeomDet* gd);
130  void addPhase2Det(const GeomDet* gd);
131 
132  void addGluedDet(const GluedGeomDet* gd);
133  void addStackDet(const StackGeomDet* gd);
134 
135  void initGluedDet(TkGluedMeasurementDet& det, const TrackerTopology* trackerTopology);
136  void initStackDet(TkStackMeasurementDet& det);
137 
138  void addDets(const TrackingGeometry::DetContainer& dets, bool subIsPixel, bool subIsOT);
139 
140  bool checkDets();
141 
142  void initializeStripStatus(const BadStripCutsDet& badStripCuts,
143  const SiStripQuality* stripQuality,
144  int qualityFlags,
145  int qualityDebugFlags);
146 
147  void initializePixelStatus(const SiPixelQuality* stripQuality,
148  const SiPixelFedCabling* pixelCabling,
149  int qualityFlags,
150  int qualityDebugFlags);
151 };
152 
153 #endif
static AlgebraicMatrix initialize()
std::vector< TkStripMeasurementDet > theStripDets
const MeasurementDet * findDet(const DetId &id) const
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
const SiPixelFedCabling * thePixelCabling
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
const PxMeasurementConditionSet & pixelDetConditions() const override
std::vector< const GeomDet * > DetContainer
StMeasurementConditionSet::BadStripCuts tib
const TrackingGeometry * geomTracker() const
const std::vector< TkStripMeasurementDet > & stripDets() const
std::vector< TkPixelMeasurementDet > thePixelDets
const Phase2OTMeasurementConditionSet & phase2DetConditions() const override
const std::vector< TkPixelMeasurementDet > & pixelDets() const
StMeasurementConditionSet::BadStripCuts tec
const MeasurementDet * idToDetBare(const DetId &id, const MeasurementTrackerEvent &data) const
const std::vector< TkGluedMeasurementDet > & gluedDets() const
#define dso_hidden
Definition: Visibility.h:12
const std::vector< TkStackMeasurementDet > & stackDets() const
Definition: DetId.h:17
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
StMeasurementConditionSet::BadStripCuts tob
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const DetContainer & allDets() const
For debug only.
const StMeasurementConditionSet & stripDetConditions() const override
Provide templates to be filled in.
MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const override
MeasurementDetSystem interface (won&#39;t be overloaded anymore)
StMeasurementConditionSet::BadStripCuts tid
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
const GeometricSearchTracker * geometricSearchTracker() const