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,
66 
67  virtual ~MeasurementTrackerImpl();
68 
69  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
70 
72 
75  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
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 0; //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  virtual const StMeasurementConditionSet & stripDetConditions() const { return theStDetConditions; }
109  virtual const PxMeasurementConditionSet & pixelDetConditions() const { return thePxDetConditions; }
110  virtual const Phase2OTMeasurementConditionSet & phase2DetConditions() const { 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
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