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
PxMeasurementConditionSet
Definition: TkMeasurementDetSet.h:295
StMeasurementConditionSet::BadStripCuts
Definition: TkMeasurementDetSet.h:48
PixelClusterParameterEstimator
Definition: PixelClusterParameterEstimator.h:15
MeasurementTrackerImpl::thePhase2DetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
Definition: MeasurementTrackerImpl.h:111
MeasurementTrackerEvent.h
MeasurementTrackerImpl::idToDetBare
const MeasurementDet * idToDetBare(const DetId &id, const MeasurementTrackerEvent &data) const
Definition: MeasurementTrackerImpl.h:82
GeomDet
Definition: GeomDet.h:27
TrackerTopology
Definition: TrackerTopology.h:16
MeasurementTrackerImpl::thePxDetConditions
PxMeasurementConditionSet thePxDetConditions
Definition: MeasurementTrackerImpl.h:110
MeasurementTrackerImpl::stackDets
const std::vector< TkStackMeasurementDet > & stackDets() const
Definition: MeasurementTrackerImpl.h:102
MeasurementTrackerImpl::gluedDets
const std::vector< TkGluedMeasurementDet > & gluedDets() const
Definition: MeasurementTrackerImpl.h:101
StMeasurementConditionSet
Definition: TkMeasurementDetSet.h:38
PixelClusterParameterEstimator.h
TkMeasurementDetSet.h
Phase2OTMeasurementConditionSet
Definition: TkMeasurementDetSet.h:405
MeasurementTrackerImpl::theGluedDets
std::vector< TkGluedMeasurementDet > theGluedDets
Definition: MeasurementTrackerImpl.h:118
SiStripNoises.h
MeasurementDet
Definition: MeasurementDet.h:16
MeasurementTrackerImpl::DetContainer
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
Definition: MeasurementTrackerImpl.h:95
SiPixelFedCabling
Definition: SiPixelFedCabling.h:10
DetId
Definition: DetId.h:17
StripClusterParameterEstimator
Definition: StripClusterParameterEstimator.h:25
MeasurementTracker
Definition: MeasurementTracker.h:21
MeasurementTrackerImpl::theStripDets
std::vector< TkStripMeasurementDet > theStripDets
Definition: MeasurementTrackerImpl.h:116
HLT_FULL_cff.pixelCPE
pixelCPE
Definition: HLT_FULL_cff.py:50762
SiStripDetCabling.h
MeasurementTrackerImpl
Definition: MeasurementTrackerImpl.h:38
MeasurementTrackerImpl::theStackDets
std::vector< TkStackMeasurementDet > theStackDets
Definition: MeasurementTrackerImpl.h:119
MeasurementTrackerImpl::findDet
const MeasurementDet * findDet(const DetId &id) const
Definition: MeasurementTrackerImpl.h:84
Phase2StripCPE.h
MeasurementTrackerImpl::BadStripCutsDet::tib
StMeasurementConditionSet::BadStripCuts tib
Definition: MeasurementTrackerImpl.h:49
dso_hidden
#define dso_hidden
Definition: Visibility.h:12
ClusterParameterEstimator< Phase2TrackerCluster1D >
GluedGeomDet
Definition: GluedGeomDet.h:7
TkStackMeasurementDet
Definition: TkStackMeasurementDet.h:14
MeasurementTrackerImpl::pixelDetConditions
const PxMeasurementConditionSet & pixelDetConditions() const override
Definition: MeasurementTrackerImpl.h:105
TkGluedMeasurementDet
Definition: TkGluedMeasurementDet.h:17
TkStripMeasurementDet
Definition: TkStripMeasurementDet.h:74
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
SiPixelQuality
Definition: SiPixelQuality.h:27
MeasurementTrackerImpl::geometricSearchTracker
const GeometricSearchTracker * geometricSearchTracker() const
Definition: MeasurementTrackerImpl.h:75
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
MeasurementTracker::theGeometricSearchTracker
const GeometricSearchTracker * theGeometricSearchTracker
Definition: MeasurementTracker.h:50
MeasurementTrackerImpl::thePixelDets
std::vector< TkPixelMeasurementDet > thePixelDets
Definition: MeasurementTrackerImpl.h:115
MeasurementTrackerImpl::phase2DetConditions
const Phase2OTMeasurementConditionSet & phase2DetConditions() const override
Definition: MeasurementTrackerImpl.h:106
MeasurementTrackerImpl::BadStripCutsDet::tec
StMeasurementConditionSet::BadStripCuts tec
Definition: MeasurementTrackerImpl.h:52
MeasurementTrackerImpl::pixelDets
const std::vector< TkPixelMeasurementDet > & pixelDets() const
Definition: MeasurementTrackerImpl.h:100
MeasurementTrackerImpl::theDetMap
DetContainer theDetMap
Definition: MeasurementTrackerImpl.h:113
TkPhase2OTMeasurementDet
Definition: TkPhase2OTMeasurementDet.h:16
MeasurementTrackerImpl::theStDetConditions
StMeasurementConditionSet theStDetConditions
Definition: MeasurementTrackerImpl.h:109
MeasurementTrackerImpl::stripDetConditions
const StMeasurementConditionSet & stripDetConditions() const override
Provide templates to be filled in.
Definition: MeasurementTrackerImpl.h:104
MeasurementTrackerImpl::BadStripCutsDet::tob
StMeasurementConditionSet::BadStripCuts tob
Definition: MeasurementTrackerImpl.h:50
MeasurementTracker::QualityFlags
QualityFlags
Definition: MeasurementTracker.h:23
StackGeomDet
Definition: StackGeomDet.h:7
MeasurementTrackerImpl::geomTracker
const TrackerGeometry * geomTracker() const
Definition: MeasurementTrackerImpl.h:73
MeasurementDetWithData
Definition: MeasurementDetWithData.h:6
HLTSiStripMonitoring_cff.badStripCuts
badStripCuts
Definition: HLTSiStripMonitoring_cff.py:100
MeasurementTrackerImpl::BadStripCutsDet::tid
StMeasurementConditionSet::BadStripCuts tid
Definition: MeasurementTrackerImpl.h:51
DetId.h
MeasurementTrackerImpl::allDets
const DetContainer & allDets() const
For debug only.
Definition: MeasurementTrackerImpl.h:98
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
SiStripQuality.h
StripClusterParameterEstimator.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
MeasurementTrackerImpl::idToDet
MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const override
MeasurementDetSystem interface (won't be overloaded anymore)
Definition: MeasurementTrackerImpl.h:78
MeasurementTrackerImpl::BadStripCutsDet
Definition: MeasurementTrackerImpl.h:48
SiPixelQuality.h
MeasurementTrackerImpl::stripDets
const std::vector< TkStripMeasurementDet > & stripDets() const
Definition: MeasurementTrackerImpl.h:99
initialize
static AlgebraicMatrix initialize()
Definition: BeamSpotTransientTrackingRecHit.cc:24
MeasurementTrackerImpl::thePixelCabling
const SiPixelFedCabling * thePixelCabling
Definition: MeasurementTrackerImpl.h:121
ParameterSet.h
SiStripRecHitMatcher
Definition: SiStripRecHitMatcher.h:24
MeasurementTrackerImpl::thePhase2Dets
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
Definition: MeasurementTrackerImpl.h:117
MeasurementTracker::theTrackerGeom
const TrackerGeometry * theTrackerGeom
Definition: MeasurementTracker.h:49
TkPixelMeasurementDet
Definition: TkPixelMeasurementDet.h:17
MeasurementTracker.h
TrackerGeometry
Definition: TrackerGeometry.h:14
SiStripQuality
Definition: SiStripQuality.h:32