CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MeasurementTrackerESProducer Class Reference

#include <MeasurementTrackerESProducer.h>

Inheritance diagram for MeasurementTrackerESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 MeasurementTrackerESProducer (const edm::ParameterSet &p)
 
std::shared_ptr< MeasurementTrackerproduce (const CkfComponentsRecord &)
 
virtual ~MeasurementTrackerESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

std::shared_ptr< MeasurementTracker_measurementTracker
 
std::string matcherName
 
std::string phase2TrackerCPEName
 
std::string pixelCPEName
 
edm::ParameterSet pset_
 
std::string stripCPEName
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 10 of file MeasurementTrackerESProducer.h.

Constructor & Destructor Documentation

MeasurementTrackerESProducer::MeasurementTrackerESProducer ( const edm::ParameterSet p)

Definition at line 38 of file MeasurementTrackerESProducer.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

39 {
40  std::string myname = p.getParameter<std::string>("ComponentName");
41  pixelCPEName = p.getParameter<std::string>("PixelCPE");
42  stripCPEName = p.getParameter<std::string>("StripCPE");
43  matcherName = p.getParameter<std::string>("HitMatcher");
44 
45  //FIXME:: just temporary solution for phase2!
47  if (p.existsAs<std::string>("Phase2StripCPE")) {
48  phase2TrackerCPEName = p.getParameter<std::string>("Phase2StripCPE");
49  }
50 
51  pset_ = p;
52  setWhatProduced(this,myname);
53 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
MeasurementTrackerESProducer::~MeasurementTrackerESProducer ( )
virtual

Definition at line 55 of file MeasurementTrackerESProducer.cc.

55 {}

Member Function Documentation

std::shared_ptr< MeasurementTracker > MeasurementTrackerESProducer::produce ( const CkfComponentsRecord iRecord)

Definition at line 58 of file MeasurementTrackerESProducer.cc.

References MeasurementTracker::BadAPVFibers, MeasurementTracker::BadModules, MeasurementTracker::BadROCs, MeasurementTracker::BadStrips, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), MeasurementTracker::MaskBad128StripBlocks, jetCoreClusterSplitter_cfi::pixelCPE, edm::ESHandle< T >::product(), SiStripRecHitConverter_cfi::siStripQualityLabel, and AlCaHLTBitMon_QueryRunRegistry::string.

59 {
60 
61  // ========= SiPixelQuality related tasks =============
62  const SiPixelQuality *ptr_pixelQuality = 0;
63  const SiPixelFedCabling *ptr_pixelCabling = 0;
64  int pixelQualityFlags = 0;
65  int pixelQualityDebugFlags = 0;
66  edm::ESHandle<SiPixelQuality> pixelQuality;
68 
69  if (pset_.getParameter<bool>("UsePixelModuleQualityDB")) {
70  pixelQualityFlags += MeasurementTracker::BadModules;
71  if (pset_.getUntrackedParameter<bool>("DebugPixelModuleQualityDB", false)) {
72  pixelQualityDebugFlags += MeasurementTracker::BadModules;
73  }
74  }
75  if (pset_.getParameter<bool>("UsePixelROCQualityDB")) {
76  pixelQualityFlags += MeasurementTracker::BadROCs;
77  if (pset_.getUntrackedParameter<bool>("DebugPixelROCQualityDB", false)) {
78  pixelQualityDebugFlags += MeasurementTracker::BadROCs;
79  }
80  }
81 
82 
83  if (pixelQualityFlags != 0) {
84  iRecord.getRecord<SiPixelQualityRcd>().get(pixelQuality);
85  ptr_pixelQuality = pixelQuality.product();
86  iRecord.getRecord<SiPixelFedCablingMapRcd>().get(pixelCabling);
87  ptr_pixelCabling = pixelCabling.product();
88  }
89 
90  // ========= SiStripQuality related tasks =============
91  const SiStripQuality *ptr_stripQuality = 0;
92  int stripQualityFlags = 0;
93  int stripQualityDebugFlags = 0;
94  edm::ESHandle<SiStripQuality> stripQuality;
95 
96  if (pset_.getParameter<bool>("UseStripModuleQualityDB")) {
97  stripQualityFlags += MeasurementTracker::BadModules;
98  if (pset_.getUntrackedParameter<bool>("DebugStripModuleQualityDB", false)) {
99  stripQualityDebugFlags += MeasurementTracker::BadModules;
100  }
101  }
102  if (pset_.getParameter<bool>("UseStripAPVFiberQualityDB")) {
103  stripQualityFlags += MeasurementTracker::BadAPVFibers;
104  if (pset_.getUntrackedParameter<bool>("DebugStripAPVFiberQualityDB", false)) {
105  stripQualityDebugFlags += MeasurementTracker::BadAPVFibers;
106  }
107  if (pset_.getParameter<bool>("MaskBadAPVFibers")) {
108  stripQualityFlags += MeasurementTracker::MaskBad128StripBlocks;
109  }
110  }
111  if (pset_.getParameter<bool>("UseStripStripQualityDB")) {
112  stripQualityFlags += MeasurementTracker::BadStrips;
113  if (pset_.getUntrackedParameter<bool>("DebugStripStripQualityDB", false)) {
114  stripQualityDebugFlags += MeasurementTracker::BadStrips;
115  }
116  }
117 
118  if (stripQualityFlags != 0) {
120  iRecord.getRecord<SiStripQualityRcd>().get(siStripQualityLabel, stripQuality);
121  ptr_stripQuality = stripQuality.product();
122  }
123 
127  edm::ESHandle<TrackerTopology> trackerTopology;
128  edm::ESHandle<TrackerGeometry> trackerGeom;
129  edm::ESHandle<GeometricSearchTracker> geometricSearchTracker;
131 
132  iRecord.getRecord<TkPixelCPERecord>().get(pixelCPEName,pixelCPE);
133  iRecord.getRecord<TkStripCPERecord>().get(stripCPEName,stripCPE);
134  iRecord.getRecord<TkStripCPERecord>().get(matcherName,hitMatcher);
135  iRecord.getRecord<TrackerTopologyRcd>().get(trackerTopology);
136  iRecord.getRecord<TrackerDigiGeometryRecord>().get(trackerGeom);
137  iRecord.getRecord<TrackerRecoGeometryRecord>().get(geometricSearchTracker);
138 
139  if(phase2TrackerCPEName != ""){
140  iRecord.getRecord<TkStripCPERecord>().get(phase2TrackerCPEName,phase2TrackerCPE);
141  _measurementTracker = std::make_shared<MeasurementTrackerImpl>(pset_,
142  pixelCPE.product(),
143  stripCPE.product(),
144  hitMatcher.product(),
145  trackerTopology.product(),
146  trackerGeom.product(),
147  geometricSearchTracker.product(),
148  ptr_stripQuality,
149  stripQualityFlags,
150  stripQualityDebugFlags,
151  ptr_pixelQuality,
152  ptr_pixelCabling,
153  pixelQualityFlags,
154  pixelQualityDebugFlags,
155  phase2TrackerCPE.product());
156  } else {
157  _measurementTracker = std::make_shared<MeasurementTrackerImpl>(pset_,
158  pixelCPE.product(),
159  stripCPE.product(),
160  hitMatcher.product(),
161  trackerTopology.product(),
162  trackerGeom.product(),
163  geometricSearchTracker.product(),
164  ptr_stripQuality,
165  stripQualityFlags,
166  stripQualityDebugFlags,
167  ptr_pixelQuality,
168  ptr_pixelCabling,
169  pixelQualityFlags,
170  pixelQualityDebugFlags);
171  }
172  return _measurementTracker;
173 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::shared_ptr< MeasurementTracker > _measurementTracker
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

std::shared_ptr<MeasurementTracker> MeasurementTrackerESProducer::_measurementTracker
private

Definition at line 16 of file MeasurementTrackerESProducer.h.

std::string MeasurementTrackerESProducer::matcherName
private

Definition at line 20 of file MeasurementTrackerESProducer.h.

std::string MeasurementTrackerESProducer::phase2TrackerCPEName
private

Definition at line 21 of file MeasurementTrackerESProducer.h.

std::string MeasurementTrackerESProducer::pixelCPEName
private

Definition at line 18 of file MeasurementTrackerESProducer.h.

edm::ParameterSet MeasurementTrackerESProducer::pset_
private

Definition at line 17 of file MeasurementTrackerESProducer.h.

std::string MeasurementTrackerESProducer::stripCPEName
private

Definition at line 19 of file MeasurementTrackerESProducer.h.