CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementTrackerImpl.h
Go to the documentation of this file.
1 #ifndef MeasurementTrackerImpl_H
2 #define MeasurementTrackerImpl_H
3 
7 
14 
21 
25 
27 
28 #include <map>
29 #include <unordered_map>
30 #include <vector>
31 
32 
38 class GluedGeomDet;
39 class SiPixelFedCabling;
40 
42 public:
43  enum QualityFlags { BadModules=1, // for everybody
44  /* Strips: */ BadAPVFibers=2, BadStrips=4, MaskBad128StripBlocks=8,
45  /* Pixels: */ BadROCs=2 };
46 
49  const StripClusterParameterEstimator* stripCPE,
50  const SiStripRecHitMatcher* hitMatcher,
51  const TrackerGeometry* trackerGeom,
52  const GeometricSearchTracker* geometricSearchTracker,
53  const SiStripQuality *stripQuality,
54  int stripQualityFlags,
55  int stripQualityDebugFlags,
56  const SiPixelQuality *pixelQuality,
57  const SiPixelFedCabling *pixelCabling,
58  int pixelQualityFlags,
59  int pixelQualityDebugFlags);
60 
61  virtual ~MeasurementTrackerImpl();
62 
63  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
64 
66 
69  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
70  return MeasurementDetWithData(*idToDetBare(id, data), data);
71  }
72 
73  const MeasurementDet *
74  idToDetBare(const DetId& id, const MeasurementTrackerEvent &data) const {
75  return findDet(id);
76  }
77 
78 
79 
80  const MeasurementDet*
81  findDet(const DetId& id) const
82  {
83  auto it = theDetMap.find(id);
84  if(it !=theDetMap.end()) {
85  return it->second;
86  }else{
87  //throw exception;
88  }
89 
90  return 0; //to avoid compile warning
91  }
92 
93  typedef std::unordered_map<unsigned int,MeasurementDet*> DetContainer;
94 
96  const DetContainer& allDets() const {return theDetMap;}
97  const std::vector<TkStripMeasurementDet>& stripDets() const {return theStripDets;}
98  const std::vector<TkPixelMeasurementDet>& pixelDets() const {return thePixelDets;}
99  const std::vector<TkGluedMeasurementDet>& gluedDets() const {return theGluedDets;}
100 
101  virtual const StMeasurementConditionSet & stripDetConditions() const { return theStDetConditions; }
102  virtual const PxMeasurementConditionSet & pixelDetConditions() const { return thePxDetConditions; }
103 
104  protected:
107 
110 
112 
113  std::vector<TkPixelMeasurementDet> thePixelDets;
114  std::vector<TkStripMeasurementDet> theStripDets;
115  std::vector<TkGluedMeasurementDet> theGluedDets;
116 
118 
119  void initialize();
120  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet> & stripDets);
121  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet> & pixelDets);
122 
123  void addStripDet( const GeomDet* gd);
124  void addPixelDet( const GeomDet* gd);
125 
126  void addGluedDet( const GluedGeomDet* gd);
127  void initGluedDet( TkGluedMeasurementDet & det);
128 
129  void addPixelDets( const TrackingGeometry::DetContainer& dets);
130 
131  void addStripDets( const TrackingGeometry::DetContainer& dets);
132 
133  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
134 
135  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
136 };
137 
138 #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
StMeasurementConditionSet theStDetConditions
const TrackerGeometry * theTrackerGeom
const SiPixelFedCabling * thePixelCabling
const TrackingGeometry * geomTracker() const
const std::vector< TkStripMeasurementDet > & stripDets() const
std::vector< TkPixelMeasurementDet > thePixelDets
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
const edm::ParameterSet & pset_
const std::vector< TkPixelMeasurementDet > & pixelDets() const
tuple conf
Definition: dbtoconf.py:185
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)
Definition: DetId.h:18
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
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