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 
5 #include "TkMeasurementDetSet.h"
6 
13 
20 
24 
26 
27 #include <map>
28 #include <unordered_map>
29 #include <vector>
30 
32  public:
33  bool operator() ( uint32_t p,const uint32_t& i) const {return p < i;}
34 };
35 
41 class GluedGeomDet;
42 class SiPixelFedCabling;
43 
45 public:
46  enum QualityFlags { BadModules=1, // for everybody
48  /* Pixels: */ BadROCs=2 };
49 
51  const PixelClusterParameterEstimator* pixelCPE,
52  const StripClusterParameterEstimator* stripCPE,
53  const SiStripRecHitMatcher* hitMatcher,
54  const TrackerGeometry* trackerGeom,
56  const SiStripQuality *stripQuality,
57  int stripQualityFlags,
58  int stripQualityDebugFlags,
59  const SiPixelQuality *pixelQuality,
60  const SiPixelFedCabling *pixelCabling,
61  int pixelQualityFlags,
62  int pixelQualityDebugFlags,
63  bool isRegional=false);
64 
65  virtual ~MeasurementTrackerImpl();
66 
67  virtual void update( const edm::Event&) const;
68  void updatePixels( const edm::Event&) const;
69  void updateStrips( const edm::Event&) const;
70 
71  const TrackingGeometry* geomTracker() const { return theTrackerGeom;}
72 
74 
76  virtual const MeasurementDet*
77  idToDet(const DetId& id) const {
78  return findDet(id);
79  }
80 
81  const MeasurementDet*
82  findDet(const DetId& id) const
83  {
84  auto it = theDetMap.find(id);
85  if(it !=theDetMap.end()) {
86  return it->second;
87  }else{
88  //throw exception;
89  }
90 
91  return 0; //to avoid compile warning
92  }
93 
94 
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 
105  void setClusterToSkip(const edm::InputTag & cluster, const edm::Event& event) const;
106  void unsetClusterToSkip() const;
107 
108  protected:
110  const std::string name_;
111 
113 
115 
116 
117  mutable std::vector<TkPixelMeasurementDet*> thePixelDets;
118 
119  mutable std::vector<TkStripMeasurementDet> theStripDets;
120  mutable std::vector<TkGluedMeasurementDet> theGluedDets;
121 
122  mutable std::vector<bool> thePixelsToSkip;
123 
126 
127  const std::vector<edm::InputTag> theInactivePixelDetectorLabels;
128  const std::vector<edm::InputTag> theInactiveStripDetectorLabels;
129 
131 
132  void initialize();
133 
134  void addStripDet( const GeomDet* gd);
135  void addPixelDet( const GeomDet* gd,
136  const PixelClusterParameterEstimator* cpe);
137 
138  void addGluedDet( const GluedGeomDet* gd);
139  void initGluedDet( TkGluedMeasurementDet & det);
140 
141  void addPixelDets( const TrackingGeometry::DetContainer& dets);
142 
143  void addStripDets( const TrackingGeometry::DetContainer& dets);
144 
145  void initializeStripStatus (const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags);
146 
147  void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags);
148 
149  void getInactiveStrips(const edm::Event& event,std::vector<uint32_t> & rawInactiveDetIds) const;
150 };
151 
152 #endif
int i
Definition: DBlmapReader.cc:9
void addStripDet(const GeomDet *gd)
const std::vector< TkPixelMeasurementDet * > & pixelDets() const
std::vector< TkStripMeasurementDet > theStripDets
const MeasurementDet * findDet(const DetId &id) const
const GeometricSearchTracker * theGeometricSearchTracker
void initializeStripStatus(const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
const TrackerGeometry * theTrackerGeom
void initGluedDet(TkGluedMeasurementDet &det)
void updateStrips(const edm::Event &) const
const std::vector< edm::InputTag > theInactiveStripDetectorLabels
const SiPixelFedCabling * thePixelCabling
std::vector< GeomDet * > DetContainer
void addPixelDets(const TrackingGeometry::DetContainer &dets)
void addStripDets(const TrackingGeometry::DetContainer &dets)
virtual void update(const edm::Event &) 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, bool isRegional=false)
const TrackingGeometry * geomTracker() const
const PixelClusterParameterEstimator * thePixelCPE
const std::vector< TkStripMeasurementDet > & stripDets() const
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
TkStripMeasurementDet * concreteDetUpdatable(DetId id) const
void updatePixels(const edm::Event &) const
const std::vector< edm::InputTag > theInactivePixelDetectorLabels
void setClusterToSkip(const edm::InputTag &cluster, const edm::Event &event) const
std::unordered_map< unsigned int, MeasurementDet * > DetContainer
const edm::ParameterSet & pset_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void getInactiveStrips(const edm::Event &event, std::vector< uint32_t > &rawInactiveDetIds) const
tuple conf
Definition: dbtoconf.py:185
const std::vector< TkGluedMeasurementDet > & gluedDets() const
Definition: DetId.h:20
void addGluedDet(const GluedGeomDet *gd)
virtual const MeasurementDet * idToDet(const DetId &id) const
MeasurementDetSystem interface (can be overloaded!)
std::vector< TkGluedMeasurementDet > theGluedDets
void addPixelDet(const GeomDet *gd, const PixelClusterParameterEstimator *cpe)
const DetContainer & allDets() const
For debug only.
bool operator()(uint32_t p, const uint32_t &i) const
std::vector< bool > thePixelsToSkip
std::vector< TkPixelMeasurementDet * > thePixelDets
const GeometricSearchTracker * geometricSearchTracker() const
StMeasurementDetSet theStDets