CMS 3D CMS Logo

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