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 
39 class GluedGeomDet;
40 class StackGeomDet;
41 class SiPixelFedCabling;
42 
44 public:
45  enum QualityFlags { BadModules=1, // for everybody
46  /* Strips: */ BadAPVFibers=2, BadStrips=4, MaskBad128StripBlocks=8,
47  /* Pixels: */ BadROCs=2 };
48 
51  const StripClusterParameterEstimator* stripCPE,
52  const SiStripRecHitMatcher* hitMatcher,
53  const TrackerGeometry* trackerGeom,
54  const GeometricSearchTracker* geometricSearchTracker,
55  const SiStripQuality *stripQuality,
56  int stripQualityFlags,
57  int stripQualityDebugFlags,
58  const SiPixelQuality *pixelQuality,
59  const SiPixelFedCabling *pixelCabling,
60  int pixelQualityFlags,
61  int pixelQualityDebugFlags);
62 
63  virtual ~MeasurementTrackerImpl();
64 
65  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
66 
68 
71  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
72  return MeasurementDetWithData(*idToDetBare(id, data), data);
73  }
74 
75  const MeasurementDet *
76  idToDetBare(const DetId& id, const MeasurementTrackerEvent &data) const {
77  return findDet(id);
78  }
79 
80 
81 
82  const MeasurementDet*
83  findDet(const DetId& id) const
84  {
85  auto it = theDetMap.find(id);
86  if(it !=theDetMap.end()) {
87  return it->second;
88  }else{
89  //throw exception;
90  }
91 
92  return 0; //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  virtual const StMeasurementConditionSet & stripDetConditions() const { return theStDetConditions; }
105  virtual const PxMeasurementConditionSet & pixelDetConditions() const { return thePxDetConditions; }
106 
107  protected:
110 
113 
115 
116  std::vector<TkPixelMeasurementDet> thePixelDets;
117  std::vector<TkStripMeasurementDet> theStripDets;
118  std::vector<TkGluedMeasurementDet> theGluedDets;
119  std::vector<TkStackMeasurementDet> theStackDets;
120 
122 
123  void initialize();
124  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet> & stripDets);
125  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet> & pixelDets);
126 
127  void addStripDet( const GeomDet* gd);
128  void addPixelDet( const GeomDet* gd);
129 
130  void addGluedDet( const GluedGeomDet* gd);
131  void addStackDet( const StackGeomDet* gd);
132 
133  void initGluedDet( TkGluedMeasurementDet & det);
134  void initStackDet( TkStackMeasurementDet & det);
135 
136  void addDets( const TrackingGeometry::DetContainer& dets, bool subIsPixel);
137 
138  bool checkDets();
139 
140 
141  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
142 
143  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
144 };
145 
146 #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
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
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
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