CMS 3D CMS Logo

MeasurementTrackerImpl.h
Go to the documentation of this file.
1 #ifndef MeasurementTrackerImpl_H
2 #define MeasurementTrackerImpl_H
3 
7 
15 
22 
26 
28 
29 #include <map>
30 #include <unordered_map>
31 #include <vector>
32 
33 
41 class GluedGeomDet;
42 class StackGeomDet;
43 class SiPixelFedCabling;
44 
46 public:
47  enum QualityFlags { BadModules=1, // for everybody
48  /* Strips: */ BadAPVFibers=2, BadStrips=4, MaskBad128StripBlocks=8,
49  /* Pixels: */ BadROCs=2 };
50 
53  const StripClusterParameterEstimator* stripCPE,
54  const SiStripRecHitMatcher* hitMatcher,
55  const TrackerTopology* trackerTopology,
56  const TrackerGeometry* trackerGeom,
57  const GeometricSearchTracker* geometricSearchTracker,
58  const SiStripQuality *stripQuality,
59  int stripQualityFlags,
60  int stripQualityDebugFlags,
61  const SiPixelQuality *pixelQuality,
62  const SiPixelFedCabling *pixelCabling,
63  int pixelQualityFlags,
64  int pixelQualityDebugFlags,
65  const ClusterParameterEstimator<Phase2TrackerCluster1D>* phase2OTCPE = nullptr);
66 
67  ~MeasurementTrackerImpl() override;
68 
69  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
70 
72 
75  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const override {
76  return MeasurementDetWithData(*idToDetBare(id, data), data);
77  }
78 
79  const MeasurementDet *
80  idToDetBare(const DetId& id, const MeasurementTrackerEvent &data) const {
81  return findDet(id);
82  }
83 
84 
85 
86  const MeasurementDet*
87  findDet(const DetId& id) const
88  {
89  auto it = theDetMap.find(id);
90  if(it !=theDetMap.end()) {
91  return it->second;
92  }else{
93  //throw exception;
94  }
95 
96  return nullptr; //to avoid compile warning
97  }
98 
99  typedef std::unordered_map<unsigned int,MeasurementDet*> DetContainer;
100 
102  const DetContainer& allDets() const {return theDetMap;}
103  const std::vector<TkStripMeasurementDet>& stripDets() const {return theStripDets;}
104  const std::vector<TkPixelMeasurementDet>& pixelDets() const {return thePixelDets;}
105  const std::vector<TkGluedMeasurementDet>& gluedDets() const {return theGluedDets;}
106  const std::vector<TkStackMeasurementDet>& stackDets() const {return theStackDets;}
107 
108  const StMeasurementConditionSet & stripDetConditions() const override { return theStDetConditions; }
109  const PxMeasurementConditionSet & pixelDetConditions() const override { return thePxDetConditions; }
110  const Phase2OTMeasurementConditionSet & phase2DetConditions() const override { return thePhase2DetConditions; }
111 
112  protected:
115 
119 
120  DetContainer theDetMap;
121 
122  std::vector<TkPixelMeasurementDet> thePixelDets;
123  std::vector<TkStripMeasurementDet> theStripDets;
124  std::vector<TkPhase2OTMeasurementDet> thePhase2Dets;
125  std::vector<TkGluedMeasurementDet> theGluedDets;
126  std::vector<TkStackMeasurementDet> theStackDets;
127 
129 
130  void initialize(const TrackerTopology* trackerTopology);
131  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet> & stripDets);
132  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet> & pixelDets);
133  void initPhase2OTMeasurementConditionSet(std::vector<TkPhase2OTMeasurementDet> & phase2Dets);
134 
135  void addStripDet( const GeomDet* gd);
136  void addPixelDet( const GeomDet* gd);
137  void addPhase2Det( const GeomDet* gd);
138 
139  void addGluedDet( const GluedGeomDet* gd);
140  void addStackDet( const StackGeomDet* gd);
141 
142  void initGluedDet( TkGluedMeasurementDet & det, const TrackerTopology* trackerTopology);
143  void initStackDet( TkStackMeasurementDet & det);
144 
145  void addDets( const TrackingGeometry::DetContainer& dets, bool subIsPixel, bool subIsOT);
146 
147  bool checkDets();
148 
149 
150  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
151 
152  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
153 };
154 
155 #endif
static AlgebraicMatrix initialize()
#define dso_hidden
std::vector< TkStripMeasurementDet > theStripDets
const MeasurementDet * findDet(const DetId &id) const
const GeometricSearchTracker * theGeometricSearchTracker
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
const TrackerGeometry * theTrackerGeom
const SiPixelFedCabling * thePixelCabling
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
const PxMeasurementConditionSet & pixelDetConditions() const override
const TrackingGeometry * geomTracker() const
const std::vector< TkStripMeasurementDet > & stripDets() const
std::vector< TkPixelMeasurementDet > thePixelDets
const Phase2OTMeasurementConditionSet & phase2DetConditions() const override
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
const edm::ParameterSet & pset_
const std::vector< TkPixelMeasurementDet > & pixelDets() const
const MeasurementDet * idToDetBare(const DetId &id, const MeasurementTrackerEvent &data) const
const std::vector< TkGluedMeasurementDet > & gluedDets() const
const std::vector< TkStackMeasurementDet > & stackDets() const
Definition: DetId.h:18
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
std::vector< const GeomDet * > DetContainer
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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)
const GeometricSearchTracker * geometricSearchTracker() const