CMS 3D CMS Logo

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

Public Member Functions

 PixelCPEGenericESProducer (const edm::ParameterSet &p)
 
std::unique_ptr< PixelClusterParameterEstimatorproduce (const TkPixelCPERecord &)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(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

std::string CPEgenericMode_
 
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcdgenErrorDBObjectToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdhTTToken_
 
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcdlorentzAngleToken_
 
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcdlorentzAngleWidthToken_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpDDToken_
 
edm::ParameterSet pset_
 
bool UseErrorsFromTemplates_
 
bool useLAWidthFromDB_
 

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={})
 
void usesResources (std::vector< std::string > const &)
 
- 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 23 of file PixelCPEGenericESProducer.cc.

Constructor & Destructor Documentation

◆ PixelCPEGenericESProducer()

PixelCPEGenericESProducer::PixelCPEGenericESProducer ( const edm::ParameterSet p)

Definition at line 45 of file PixelCPEGenericESProducer.cc.

References c, HLT_2022v12_cff::doLorentzFromAlignment, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

45  {
46  CPEgenericMode_ = p.getParameter<std::string>("ComponentName");
47  // Use LA-width from DB. If both (upper and this) are false LA-width is calcuated from LA-offset
48  useLAWidthFromDB_ = p.getParameter<bool>("useLAWidthFromDB");
49  // Use Alignment LA-offset
50  const bool doLorentzFromAlignment = p.getParameter<bool>("doLorentzFromAlignment");
51  char const* laLabel = ""; // standard LA, from calibration, label=""
53  laLabel = "fromAlignment";
54  }
55 
56  auto magname = p.getParameter<edm::ESInputTag>("MagneticFieldRecord");
57  UseErrorsFromTemplates_ = p.getParameter<bool>("UseErrorsFromTemplates");
58 
59  pset_ = p;
60  auto c = setWhatProduced(this, CPEgenericMode_);
61  magfieldToken_ = c.consumes(magname);
62  pDDToken_ = c.consumes();
63  hTTToken_ = c.consumes();
64  lorentzAngleToken_ = c.consumes(edm::ESInputTag("", laLabel));
65  if (useLAWidthFromDB_) {
66  lorentzAngleWidthToken_ = c.consumes(edm::ESInputTag("", "forWidth"));
67  }
69  genErrorDBObjectToken_ = c.consumes();
70  }
71 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 107 of file PixelCPEGenericESProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, PixelCPEGeneric::fillPSetDescription(), PixelCPEBase::fillPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

107  {
109 
110  // from PixelCPEBase
112 
113  // from PixelCPEGeneric
115 
116  // specific to PixelCPEGenericESProducer
117  desc.add<std::string>("ComponentName", "PixelCPEGeneric");
118  desc.add<edm::ESInputTag>("MagneticFieldRecord", edm::ESInputTag(""));
119  descriptions.add("_generic_default", desc);
120 }
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ produce()

std::unique_ptr< PixelClusterParameterEstimator > PixelCPEGenericESProducer::produce ( const TkPixelCPERecord iRecord)

Definition at line 73 of file PixelCPEGenericESProducer.cc.

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

73  {
74  // add the new la width object
75  const SiPixelLorentzAngle* lorentzAngleWidthProduct = nullptr;
76  if (useLAWidthFromDB_) { // use the width LA
77  lorentzAngleWidthProduct = &iRecord.get(lorentzAngleWidthToken_);
78  }
79  //std::cout<<" la width "<<lorentzAngleWidthProduct<<std::endl; //dk
80 
81  const SiPixelGenErrorDBObject* genErrorDBObjectProduct = nullptr;
82 
83  // Errors take only from new GenError
84  if (UseErrorsFromTemplates_) { // do only when generrors are needed
85  genErrorDBObjectProduct = &iRecord.get(genErrorDBObjectToken_);
86  //} else {
87  //std::cout<<" pass an empty GenError pointer"<<std::endl;
88  }
89 
90  return (CPEgenericMode_ == "PixelCPEGenericForBricked")
91  ? std::make_unique<PixelCPEGenericForBricked>(pset_,
92  &iRecord.get(magfieldToken_),
93  iRecord.get(pDDToken_),
94  iRecord.get(hTTToken_),
95  &iRecord.get(lorentzAngleToken_),
96  genErrorDBObjectProduct,
97  lorentzAngleWidthProduct)
98  : std::make_unique<PixelCPEGeneric>(pset_,
99  &iRecord.get(magfieldToken_),
100  iRecord.get(pDDToken_),
101  iRecord.get(hTTToken_),
102  &iRecord.get(lorentzAngleToken_),
103  genErrorDBObjectProduct,
104  lorentzAngleWidthProduct);
105 }
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const

Member Data Documentation

◆ CPEgenericMode_

std::string PixelCPEGenericESProducer::CPEgenericMode_
private

Definition at line 40 of file PixelCPEGenericESProducer.cc.

◆ genErrorDBObjectToken_

edm::ESGetToken<SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd> PixelCPEGenericESProducer::genErrorDBObjectToken_
private

Definition at line 35 of file PixelCPEGenericESProducer.cc.

◆ hTTToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> PixelCPEGenericESProducer::hTTToken_
private

Definition at line 32 of file PixelCPEGenericESProducer.cc.

◆ lorentzAngleToken_

edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleRcd> PixelCPEGenericESProducer::lorentzAngleToken_
private

Definition at line 33 of file PixelCPEGenericESProducer.cc.

◆ lorentzAngleWidthToken_

edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleRcd> PixelCPEGenericESProducer::lorentzAngleWidthToken_
private

Definition at line 34 of file PixelCPEGenericESProducer.cc.

◆ magfieldToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PixelCPEGenericESProducer::magfieldToken_
private

Definition at line 30 of file PixelCPEGenericESProducer.cc.

◆ pDDToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> PixelCPEGenericESProducer::pDDToken_
private

Definition at line 31 of file PixelCPEGenericESProducer.cc.

◆ pset_

edm::ParameterSet PixelCPEGenericESProducer::pset_
private

Definition at line 37 of file PixelCPEGenericESProducer.cc.

◆ UseErrorsFromTemplates_

bool PixelCPEGenericESProducer::UseErrorsFromTemplates_
private

Definition at line 39 of file PixelCPEGenericESProducer.cc.

◆ useLAWidthFromDB_

bool PixelCPEGenericESProducer::useLAWidthFromDB_
private

Definition at line 38 of file PixelCPEGenericESProducer.cc.