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 TrackerGeometry* trackerGeom,
56  const GeometricSearchTracker* geometricSearchTracker,
57  const SiStripQuality *stripQuality,
58  int stripQualityFlags,
59  int stripQualityDebugFlags,
60  const SiPixelQuality *pixelQuality,
61  const SiPixelFedCabling *pixelCabling,
62  int pixelQualityFlags,
63  int pixelQualityDebugFlags,
65 
66  virtual ~MeasurementTrackerImpl();
67 
68  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
69 
71 
74  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
75  return MeasurementDetWithData(*idToDetBare(id, data), data);
76  }
77 
78  const MeasurementDet *
79  idToDetBare(const DetId& id, const MeasurementTrackerEvent &data) const {
80  return findDet(id);
81  }
82 
83 
84 
85  const MeasurementDet*
86  findDet(const DetId& id) const
87  {
88  auto it = theDetMap.find(id);
89  if(it !=theDetMap.end()) {
90  return it->second;
91  }else{
92  //throw exception;
93  }
94 
95  return 0; //to avoid compile warning
96  }
97 
98  typedef std::unordered_map<unsigned int,MeasurementDet*> DetContainer;
99 
101  const DetContainer& allDets() const {return theDetMap;}
102  const std::vector<TkStripMeasurementDet>& stripDets() const {return theStripDets;}
103  const std::vector<TkPixelMeasurementDet>& pixelDets() const {return thePixelDets;}
104  const std::vector<TkGluedMeasurementDet>& gluedDets() const {return theGluedDets;}
105  const std::vector<TkStackMeasurementDet>& stackDets() const {return theStackDets;}
106 
107  virtual const StMeasurementConditionSet & stripDetConditions() const { return theStDetConditions; }
108  virtual const PxMeasurementConditionSet & pixelDetConditions() const { return thePxDetConditions; }
109  virtual const Phase2OTMeasurementConditionSet & phase2DetConditions() const { return thePhase2DetConditions; }
110 
111  protected:
114 
118 
119  DetContainer theDetMap;
120 
121  std::vector<TkPixelMeasurementDet> thePixelDets;
122  std::vector<TkStripMeasurementDet> theStripDets;
123  std::vector<TkPhase2OTMeasurementDet> thePhase2Dets;
124  std::vector<TkGluedMeasurementDet> theGluedDets;
125  std::vector<TkStackMeasurementDet> theStackDets;
126 
128 
129  void initialize();
130  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet> & stripDets);
131  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet> & pixelDets);
132  void initPhase2OTMeasurementConditionSet(std::vector<TkPhase2OTMeasurementDet> & phase2Dets);
133 
134  void addStripDet( const GeomDet* gd);
135  void addPixelDet( const GeomDet* gd);
136  void addPhase2Det( const GeomDet* gd);
137 
138  void addGluedDet( const GluedGeomDet* gd);
139  void addStackDet( const StackGeomDet* gd);
140 
141  void initGluedDet( TkGluedMeasurementDet & det);
142  void initStackDet( TkStackMeasurementDet & det);
143 
144  void addDets( const TrackingGeometry::DetContainer& dets, bool subIsPixel, bool subIsOT);
145 
146  bool checkDets();
147 
148 
149  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
150 
151  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
152 };
153 
154 #endif
static AlgebraicMatrix initialize()
#define dso_hidden
std::vector< TkStripMeasurementDet > theStripDets
const MeasurementDet * findDet(const DetId &id) const
const GeometricSearchTracker * theGeometricSearchTracker
virtual const PxMeasurementConditionSet & pixelDetConditions() const
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
const TrackerGeometry * theTrackerGeom
const SiPixelFedCabling * thePixelCabling
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
const TrackingGeometry * geomTracker() const
const std::vector< TkStripMeasurementDet > & stripDets() const
std::vector< TkPixelMeasurementDet > thePixelDets
virtual const Phase2OTMeasurementConditionSet & phase2DetConditions() const
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
MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const
MeasurementDetSystem interface (won&#39;t be overloaded anymore)
const std::vector< TkStackMeasurementDet > & stackDets() const
Definition: DetId.h:18
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const DetContainer & allDets() const
For debug only.
std::vector< GeomDet const * > DetContainer
virtual const StMeasurementConditionSet & stripDetConditions() const
Provide templates to be filled in.
const GeometricSearchTracker * geometricSearchTracker() const