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 
33  public:
34  bool operator() ( uint32_t p,const uint32_t& i) const {return p < i;}
35 };
36 
42 class GluedGeomDet;
43 class SiPixelFedCabling;
44 
46 public:
47  enum QualityFlags { BadModules=1, // for everybody
49  /* Pixels: */ BadROCs=2 };
50 
52  const PixelClusterParameterEstimator* pixelCPE,
53  const StripClusterParameterEstimator* stripCPE,
54  const SiStripRecHitMatcher* hitMatcher,
55  const TrackerGeometry* trackerGeom,
57  const SiStripQuality *stripQuality,
58  int stripQualityFlags,
59  int stripQualityDebugFlags,
60  const SiPixelQuality *pixelQuality,
61  const SiPixelFedCabling *pixelCabling,
62  int pixelQualityFlags,
63  int pixelQualityDebugFlags);
64 
65  virtual ~MeasurementTrackerImpl();
66 
67  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
68 
70 
73  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
74  return MeasurementDetWithData(*idToDetBare(id, data), data);
75  }
76 
77  const MeasurementDet *
78  idToDetBare(const DetId& id, const MeasurementTrackerEvent &data) const {
79  return findDet(id);
80  }
81 
82 
83 
84  const MeasurementDet*
85  findDet(const DetId& id) const
86  {
87  auto it = theDetMap.find(id);
88  if(it !=theDetMap.end()) {
89  return it->second;
90  }else{
91  //throw exception;
92  }
93 
94  return 0; //to avoid compile warning
95  }
96 
97  typedef std::unordered_map<unsigned int,MeasurementDet*> DetContainer;
98 
100  const DetContainer& allDets() const {return theDetMap;}
101  const std::vector<TkStripMeasurementDet>& stripDets() const {return theStripDets;}
102  const std::vector<TkPixelMeasurementDet>& pixelDets() const {return thePixelDets;}
103  const std::vector<TkGluedMeasurementDet>& gluedDets() const {return theGluedDets;}
104 
107 
108  protected:
111 
114 
116 
117  std::vector<TkPixelMeasurementDet> thePixelDets;
118  std::vector<TkStripMeasurementDet> theStripDets;
119  std::vector<TkGluedMeasurementDet> theGluedDets;
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 initGluedDet( TkGluedMeasurementDet & det);
132 
133  void addPixelDets( const TrackingGeometry::DetContainer& dets);
134 
135  void addStripDets( const TrackingGeometry::DetContainer& dets);
136 
137  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
138 
139  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
140 };
141 
142 #endif
int i
Definition: DBlmapReader.cc:9
void addStripDet(const GeomDet *gd)
std::vector< TkStripMeasurementDet > theStripDets
const MeasurementDet * findDet(const DetId &id) const
const GeometricSearchTracker * theGeometricSearchTracker
virtual const PxMeasurementConditionSet & pixelDetConditions() const
StMeasurementConditionSet theStDetConditions
void initializeStripStatus(const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
const TrackerGeometry * theTrackerGeom
void initGluedDet(TkGluedMeasurementDet &det)
const SiPixelFedCabling * thePixelCabling
void addPixelDets(const TrackingGeometry::DetContainer &dets)
void addPixelDet(const GeomDet *gd)
void addStripDets(const TrackingGeometry::DetContainer &dets)
const TrackingGeometry * geomTracker() const
const std::vector< TkStripMeasurementDet > & stripDets() const
std::vector< TkPixelMeasurementDet > thePixelDets
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
void initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
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
MeasurementTrackerImpl(const edm::ParameterSet &conf, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags)
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
void addGluedDet(const GluedGeomDet *gd)
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const DetContainer & allDets() const
For debug only.
bool operator()(uint32_t p, const uint32_t &i) const
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
std::vector< GeomDet const * > DetContainer
virtual const StMeasurementConditionSet & stripDetConditions() const
Provide templates to be filled in.
const GeometricSearchTracker * geometricSearchTracker() const