CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
MeasurementTrackerESProducer Class Reference
Inheritance diagram for MeasurementTrackerESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 MeasurementTrackerESProducer (const edm::ParameterSet &p)
 
std::unique_ptr< MeasurementTrackerproduce (const CkfComponentsRecord &)
 
 ~MeasurementTrackerESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

MeasurementTrackerImpl::BadStripCutsDet badStripCuts_
 
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecordgeometricSearchTrackerToken_
 
edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecordhitMatcherToken_
 
edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkStripCPERecordphase2TrackerCPEToken_
 
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdpixelCablingToken_
 
edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecordpixelCPEToken_
 
int pixelQualityDebugFlags_
 
int pixelQualityFlags_
 
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcdpixelQualityToken_
 
edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecordstripCPEToken_
 
int stripQualityDebugFlags_
 
int stripQualityFlags_
 
edm::ESGetToken< SiStripQuality, SiStripQualityRcdstripQualityToken_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeomToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyToken_
 
bool usePhase2_ = false
 

Additional Inherited Members

- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 37 of file MeasurementTrackerESProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 121 of file MeasurementTrackerESProducer.cc.

References MeasurementTrackerImpl::BadStrips, HltBtagPostValidation_cff::c, edm::ParameterSet::getParameter(), muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

121  {
122  std::string myname = p.getParameter<std::string>("ComponentName");
123 
124  auto c = setWhatProduced(this, myname);
125 
126  std::tie(pixelQualityFlags_, pixelQualityDebugFlags_) = pixelFlags(p);
127  if (pixelQualityFlags_ != 0) {
128  c.setConsumes(pixelQualityToken_);
129  c.setConsumes(pixelCablingToken_);
130  }
131 
132  std::tie(stripQualityFlags_, stripQualityDebugFlags_) = stripFlags(p);
133  if (stripQualityFlags_ != 0) {
134  c.setConsumes(stripQualityToken_, edm::ESInputTag("", p.getParameter<std::string>("SiStripQualityLabel")));
136  auto makeBadStripCuts = [](edm::ParameterSet const &pset) {
137  return StMeasurementConditionSet::BadStripCuts(pset.getParameter<uint32_t>("maxBad"),
138  pset.getParameter<uint32_t>("maxConsecutiveBad"));
139  };
140 
141  auto cutPset = p.getParameter<edm::ParameterSet>("badStripCuts");
142  badStripCuts_.tib = makeBadStripCuts(cutPset.getParameter<edm::ParameterSet>("TIB"));
143  badStripCuts_.tob = makeBadStripCuts(cutPset.getParameter<edm::ParameterSet>("TOB"));
144  badStripCuts_.tid = makeBadStripCuts(cutPset.getParameter<edm::ParameterSet>("TID"));
145  badStripCuts_.tec = makeBadStripCuts(cutPset.getParameter<edm::ParameterSet>("TEC"));
146  }
147  }
148 
149  c.setConsumes(pixelCPEToken_, edm::ESInputTag("", p.getParameter<std::string>("PixelCPE")));
150  c.setConsumes(stripCPEToken_, edm::ESInputTag("", p.getParameter<std::string>("StripCPE")));
151  c.setConsumes(hitMatcherToken_, edm::ESInputTag("", p.getParameter<std::string>("HitMatcher")));
152  c.setConsumes(trackerTopologyToken_);
153  c.setConsumes(trackerGeomToken_);
154  c.setConsumes(geometricSearchTrackerToken_);
155 
156  //FIXME:: just temporary solution for phase2!
157  auto phase2 = p.getParameter<std::string>("Phase2StripCPE");
158  if (not phase2.empty()) {
159  usePhase2_ = true;
160  c.setConsumes(phase2TrackerCPEToken_, edm::ESInputTag("", phase2));
161  }
162 }
edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > stripCPEToken_
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > pixelCablingToken_
StMeasurementConditionSet::BadStripCuts tib
edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkStripCPERecord > phase2TrackerCPEToken_
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > geometricSearchTrackerToken_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > hitMatcherToken_
StMeasurementConditionSet::BadStripCuts tec
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
StMeasurementConditionSet::BadStripCuts tob
MeasurementTrackerImpl::BadStripCutsDet badStripCuts_
StMeasurementConditionSet::BadStripCuts tid
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixelQualityToken_
edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > pixelCPEToken_
MeasurementTrackerESProducer::~MeasurementTrackerESProducer ( )
override

Definition at line 164 of file MeasurementTrackerESProducer.cc.

164 {}

Member Function Documentation

void MeasurementTrackerESProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 203 of file MeasurementTrackerESProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addOptional(), edm::ParameterSetDescription::addUntracked(), DEFINE_FWK_EVENTSETUP_MODULE, and AlCaHLTBitMon_QueryRunRegistry::string.

203  {
205 
206  desc.add<std::string>("ComponentName", "");
207 
208  desc.add<std::string>("PixelCPE", "PixelCPEGeneric");
209  desc.add<std::string>("StripCPE", "StripCPEfromTrackAngle");
210  desc.add<std::string>("HitMatcher", "StandardMatcher");
211 
212  desc.add<std::string>("Phase2StripCPE", "")->setComment("empty string used to turn off Phase 2");
213 
214  desc.add<std::string>("SiStripQualityLabel", "");
215  desc.add<bool>("UseStripModuleQualityDB", true);
216  desc.addUntracked<bool>("DebugStripModuleQualityDB", false)->setComment("Dump out info on module status");
217  desc.add<bool>("UseStripAPVFiberQualityDB", true)->setComment("Read APV and Fiber status from SiStripQuality");
218  desc.addUntracked<bool>("DebugStripAPVFiberQualityDB", false)->setComment("Dump out info on module status");
219  desc.add<bool>("MaskBadAPVFibers", true)
220  ->setComment(
221  "if set to true, clusters with barycenter on bad APV and Fibers are ignored. (UseStripAPVFiberQualityDB must "
222  "also be true for this to work)");
223 
224  desc.add<bool>("UseStripStripQualityDB", true)->setComment("read Strip status from SiStripQuality");
225  desc.addUntracked<bool>("DebugStripStripQualityDB", false)->setComment("dump out info on module status");
226 
227  {
228  //used by MeasurementTrackerImpl
229  edm::ParameterSetDescription badStripCutsDesc;
230  badStripCutsDesc.add<uint32_t>("maxBad", 4);
231  badStripCutsDesc.add<uint32_t>("maxConsecutiveBad", 2);
232 
234  mtiDesc.add<edm::ParameterSetDescription>("TIB", badStripCutsDesc);
235  mtiDesc.add<edm::ParameterSetDescription>("TOB", badStripCutsDesc);
236  mtiDesc.add<edm::ParameterSetDescription>("TID", badStripCutsDesc);
237  mtiDesc.add<edm::ParameterSetDescription>("TEC", badStripCutsDesc);
238 
239  desc.addOptional<edm::ParameterSetDescription>("badStripCuts", mtiDesc);
240  }
241 
242  desc.add<bool>("UsePixelModuleQualityDB", true)->setComment("Use DB info at the module level (that is, detid level)");
243  desc.addUntracked<bool>("DebugPixelModuleQualityDB", false)->setComment("dump out info on module status");
244  desc.add<bool>("UsePixelROCQualityDB", true)->setComment("Use DB info at the ROC level");
245  desc.addUntracked<bool>("DebugPixelROCQualityDB", false)->setComment("dump out info om module status ");
246 
247  descriptions.add("_MeasurementTrackerESProducer_default", desc);
248 }
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< MeasurementTracker > MeasurementTrackerESProducer::produce ( const CkfComponentsRecord iRecord)

Definition at line 166 of file MeasurementTrackerESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get().

166  {
167  // ========= SiPixelQuality related tasks =============
168  const SiPixelQuality *ptr_pixelQuality = nullptr;
169  const SiPixelFedCabling *ptr_pixelCabling = nullptr;
170 
171  if (pixelQualityFlags_ != 0) {
172  ptr_pixelQuality = &iRecord.get(pixelQualityToken_);
173  ptr_pixelCabling = &iRecord.get(pixelCablingToken_);
174  }
175 
176  // ========= SiStripQuality related tasks =============
177  const SiStripQuality *ptr_stripQuality = nullptr;
178  if (stripQualityFlags_ != 0) {
179  ptr_stripQuality = &iRecord.get(stripQualityToken_);
180  }
181 
182  const ClusterParameterEstimator<Phase2TrackerCluster1D> *ptr_phase2TrackerCPE = nullptr;
183  if (usePhase2_) {
184  ptr_phase2TrackerCPE = &iRecord.get(phase2TrackerCPEToken_);
185  }
186  return std::make_unique<MeasurementTrackerImpl>(badStripCuts_,
187  &iRecord.get(pixelCPEToken_),
188  &iRecord.get(stripCPEToken_),
189  &iRecord.get(hitMatcherToken_),
190  &iRecord.get(trackerTopologyToken_),
191  &iRecord.get(trackerGeomToken_),
193  ptr_stripQuality,
196  ptr_pixelQuality,
197  ptr_pixelCabling,
200  ptr_phase2TrackerCPE);
201 }
edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > stripCPEToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > pixelCablingToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkStripCPERecord > phase2TrackerCPEToken_
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > geometricSearchTrackerToken_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > hitMatcherToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
MeasurementTrackerImpl::BadStripCutsDet badStripCuts_
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixelQualityToken_
edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > pixelCPEToken_

Member Data Documentation

MeasurementTrackerImpl::BadStripCutsDet MeasurementTrackerESProducer::badStripCuts_
private

Definition at line 58 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<GeometricSearchTracker, TrackerRecoGeometryRecord> MeasurementTrackerESProducer::geometricSearchTrackerToken_
private

Definition at line 55 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<SiStripRecHitMatcher, TkStripCPERecord> MeasurementTrackerESProducer::hitMatcherToken_
private

Definition at line 52 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<ClusterParameterEstimator<Phase2TrackerCluster1D>, TkStripCPERecord> MeasurementTrackerESProducer::phase2TrackerCPEToken_
private

Definition at line 56 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> MeasurementTrackerESProducer::pixelCablingToken_
private

Definition at line 47 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<PixelClusterParameterEstimator, TkPixelCPERecord> MeasurementTrackerESProducer::pixelCPEToken_
private

Definition at line 50 of file MeasurementTrackerESProducer.cc.

int MeasurementTrackerESProducer::pixelQualityDebugFlags_
private

Definition at line 61 of file MeasurementTrackerESProducer.cc.

int MeasurementTrackerESProducer::pixelQualityFlags_
private

Definition at line 60 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<SiPixelQuality, SiPixelQualityRcd> MeasurementTrackerESProducer::pixelQualityToken_
private

Definition at line 46 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<StripClusterParameterEstimator, TkStripCPERecord> MeasurementTrackerESProducer::stripCPEToken_
private

Definition at line 51 of file MeasurementTrackerESProducer.cc.

int MeasurementTrackerESProducer::stripQualityDebugFlags_
private

Definition at line 64 of file MeasurementTrackerESProducer.cc.

int MeasurementTrackerESProducer::stripQualityFlags_
private

Definition at line 63 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<SiStripQuality, SiStripQualityRcd> MeasurementTrackerESProducer::stripQualityToken_
private

Definition at line 48 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> MeasurementTrackerESProducer::trackerGeomToken_
private

Definition at line 54 of file MeasurementTrackerESProducer.cc.

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> MeasurementTrackerESProducer::trackerTopologyToken_
private

Definition at line 53 of file MeasurementTrackerESProducer.cc.

bool MeasurementTrackerESProducer::usePhase2_ = false
private

Definition at line 66 of file MeasurementTrackerESProducer.cc.