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 
33 class GluedGeomDet;
34 class StackGeomDet;
35 class SiPixelFedCabling;
36 class TrackerGeometry;
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 TrackerGeometry* geomTracker() const { return theTrackerGeom; }
74 
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 
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()
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 StMeasurementConditionSet & stripDetConditions() const override
Provide templates to be filled in.
std::vector< const GeomDet * > DetContainer
StMeasurementConditionSet::BadStripCuts tib
std::vector< TkPixelMeasurementDet > thePixelDets
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