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 
37 class TkStripMeasurementDet;
39 class TkGluedMeasurementDet;
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  bool isRegional=false);
65 
66  virtual ~MeasurementTrackerImpl();
67 
68  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
69 
71 
73  virtual MeasurementDetWithData
74  idToDet(const DetId& id, const MeasurementTrackerEvent &data) const {
75  return MeasurementDetWithData(*idToDetBare(id, data), data);
76  }
77 
79  virtual 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 
109 
110  protected:
113 
116 
118 
119  std::vector<TkPixelMeasurementDet> thePixelDets;
120  std::vector<TkStripMeasurementDet> theStripDets;
121  std::vector<TkGluedMeasurementDet> theGluedDets;
122 
124 
125  void initialize();
126  void initStMeasurementConditionSet(std::vector<TkStripMeasurementDet> & stripDets);
127  void initPxMeasurementConditionSet(std::vector<TkPixelMeasurementDet> & pixelDets);
128 
129  void addStripDet( const GeomDet* gd);
130  void addPixelDet( const GeomDet* gd);
131 
132  void addGluedDet( const GluedGeomDet* gd);
133  void initGluedDet( TkGluedMeasurementDet & det);
134 
135  void addPixelDets( const TrackingGeometry::DetContainer& dets);
136 
137  void addStripDets( const TrackingGeometry::DetContainer& dets);
138 
139  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
140 
141  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
142 };
143 
144 #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
std::vector< GeomDet * > DetContainer
void addPixelDets(const TrackingGeometry::DetContainer &dets)
void addPixelDet(const GeomDet *gd)
virtual const MeasurementDet * idToDetBare(const DetId &id, const MeasurementTrackerEvent &data) const
This interface (will be overloaded by the OnDemand one)
void addStripDets(const TrackingGeometry::DetContainer &dets)
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, bool isRegional=false)
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)
virtual MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const
MeasurementDetSystem interface (won&#39;t be overloaded anymore)
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
const edm::ParameterSet & pset_
const std::vector< TkPixelMeasurementDet > & pixelDets() const
tuple conf
Definition: dbtoconf.py:185
const std::vector< TkGluedMeasurementDet > & gluedDets() const
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)
virtual const StMeasurementConditionSet & stripDetConditions() const
Provide templates to be filled in.
const GeometricSearchTracker * geometricSearchTracker() const