CMS 3D CMS Logo

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

Public Member Functions

std::unique_ptr< StripClusterParameterEstimatorproduce (const TkStripCPERecord &)
 
 StripCPEESProducer (const edm::ParameterSet &)
 
- 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 () 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)
 

Private Types

enum  CPE_t { SIMPLE, TRACKANGLE, GEOMETRIC, FAKE }
 

Private Attributes

edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcdbackPlaneCorrectionToken_
 
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcdconfObjToken_
 
CPE_t cpeNum
 
edm::ESGetToken< SiStripLatency, SiStripLatencyRcdlatencyToken_
 
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcdlorentzAngleToken_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
edm::ParameterSet parametersPSet
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpDDToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 19 of file StripCPEESProducer.cc.

Member Enumeration Documentation

◆ CPE_t

Enumerator
SIMPLE 
TRACKANGLE 
GEOMETRIC 
FAKE 

Definition at line 25 of file StripCPEESProducer.cc.

Constructor & Destructor Documentation

◆ StripCPEESProducer()

StripCPEESProducer::StripCPEESProducer ( const edm::ParameterSet p)

Definition at line 38 of file StripCPEESProducer.cc.

38  {
39  std::string name = p.getParameter<std::string>("ComponentName");
41  if (!p.exists("ComponentType"))
42  edm::LogWarning("StripCPEESProducer") << " the CPE producer should contain a ComponentType, probably identical to "
43  "ComponentName in the first step of migration. Falling back to:"
44  << type;
45  else
46  type = p.getParameter<std::string>("ComponentType");
47 
48  std::map<std::string, CPE_t> enumMap;
49  enumMap[std::string("SimpleStripCPE")] = SIMPLE;
50  enumMap[std::string("StripCPEfromTrackAngle")] = TRACKANGLE;
51  enumMap[std::string("StripCPEgeometric")] = GEOMETRIC;
52  enumMap[std::string("FakeStripCPE")] = FAKE;
53  if (enumMap.find(type) == enumMap.end())
54  throw cms::Exception("Unknown StripCPE type") << type;
55 
56  cpeNum = enumMap[type];
57  parametersPSet = (p.exists("parameters") ? p.getParameter<edm::ParameterSet>("parameters") : p);
58  setWhatProduced(this, name)
59  .setConsumes(pDDToken_)
60  .setConsumes(magfieldToken_)
61  .setConsumes(lorentzAngleToken_)
62  .setConsumes(backPlaneCorrectionToken_)
63  .setConsumes(confObjToken_)
64  .setConsumes(latencyToken_);
65 }

References backPlaneCorrectionToken_, confObjToken_, cpeNum, FAKE, GEOMETRIC, latencyToken_, lorentzAngleToken_, magfieldToken_, Skims_PA_cff::name, AlCaHLTBitMon_ParallelJobs::p, parametersPSet, pDDToken_, edm::ESProducer::setWhatProduced(), SIMPLE, AlCaHLTBitMon_QueryRunRegistry::string, and TRACKANGLE.

Member Function Documentation

◆ produce()

std::unique_ptr< StripClusterParameterEstimator > StripCPEESProducer::produce ( const TkStripCPERecord iRecord)

Definition at line 67 of file StripCPEESProducer.cc.

67  {
68  TrackerGeometry const& pDD = iRecord.get(pDDToken_);
69  MagneticField const& magfield = iRecord.get(magfieldToken_);
70  SiStripLorentzAngle const& lorentzAngle = iRecord.get(lorentzAngleToken_);
71  SiStripBackPlaneCorrection const& backPlaneCorrection = iRecord.get(backPlaneCorrectionToken_);
72  SiStripConfObject const& confObj = iRecord.get(confObjToken_);
73  SiStripLatency const& latency = iRecord.get(latencyToken_);
74 
75  std::unique_ptr<StripClusterParameterEstimator> cpe;
76 
77  switch (cpeNum) {
78  case SIMPLE:
79  cpe = std::make_unique<StripCPE>(
80  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
81  break;
82 
83  case TRACKANGLE:
84  cpe = std::make_unique<StripCPEfromTrackAngle>(
85  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
86  break;
87 
88  case GEOMETRIC:
89  cpe = std::make_unique<StripCPEgeometric>(
90  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
91  break;
92 
93  case FAKE:
94  cpe = std::make_unique<StripFakeCPE>();
95  break;
96  }
97 
98  return cpe;
99 }

References backPlaneCorrectionToken_, confObjToken_, cpeNum, FAKE, GEOMETRIC, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), config_102169_raw_cff::latency, latencyToken_, lorentzAngleToken_, volumeBasedMagneticField_160812_cfi::magfield, magfieldToken_, parametersPSet, pDDToken_, SIMPLE, and TRACKANGLE.

Member Data Documentation

◆ backPlaneCorrectionToken_

edm::ESGetToken<SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd> StripCPEESProducer::backPlaneCorrectionToken_
private

Definition at line 33 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ confObjToken_

edm::ESGetToken<SiStripConfObject, SiStripConfObjectRcd> StripCPEESProducer::confObjToken_
private

Definition at line 34 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ cpeNum

CPE_t StripCPEESProducer::cpeNum
private

Definition at line 27 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ latencyToken_

edm::ESGetToken<SiStripLatency, SiStripLatencyRcd> StripCPEESProducer::latencyToken_
private

Definition at line 35 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ lorentzAngleToken_

edm::ESGetToken<SiStripLorentzAngle, SiStripLorentzAngleDepRcd> StripCPEESProducer::lorentzAngleToken_
private

Definition at line 32 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ magfieldToken_

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

Definition at line 31 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ parametersPSet

edm::ParameterSet StripCPEESProducer::parametersPSet
private

Definition at line 28 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ pDDToken_

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

Definition at line 30 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

StripCPEESProducer::backPlaneCorrectionToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd > backPlaneCorrectionToken_
Definition: StripCPEESProducer.cc:33
config_102169_raw_cff.latency
latency
Definition: config_102169_raw_cff.py:29
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
StripCPEESProducer::GEOMETRIC
Definition: StripCPEESProducer.cc:25
StripCPEESProducer::cpeNum
CPE_t cpeNum
Definition: StripCPEESProducer.cc:27
StripCPEESProducer::TRACKANGLE
Definition: StripCPEESProducer.cc:25
StripCPEESProducer::magfieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
Definition: StripCPEESProducer.cc:31
SiStripLorentzAngle
Definition: SiStripLorentzAngle.h:26
StripCPEESProducer::SIMPLE
Definition: StripCPEESProducer.cc:25
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
StripCPEESProducer::lorentzAngleToken_
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcd > lorentzAngleToken_
Definition: StripCPEESProducer.cc:32
edm::ParameterSet
Definition: ParameterSet.h:36
StripCPEESProducer::confObjToken_
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcd > confObjToken_
Definition: StripCPEESProducer.cc:34
StripCPEESProducer::FAKE
Definition: StripCPEESProducer.cc:25
StripCPEESProducer::latencyToken_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
Definition: StripCPEESProducer.cc:35
type
type
Definition: HCALResponse.h:21
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cms::Exception
Definition: Exception.h:70
SiStripLatency
Definition: SiStripLatency.h:59
MagneticField
Definition: MagneticField.h:19
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
SiStripBackPlaneCorrection
Definition: SiStripBackPlaneCorrection.h:27
StripCPEESProducer::parametersPSet
edm::ParameterSet parametersPSet
Definition: StripCPEESProducer.cc:28
StripCPEESProducer::pDDToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
Definition: StripCPEESProducer.cc:30
TrackerGeometry
Definition: TrackerGeometry.h:14
SiStripConfObject
Definition: SiStripConfObject.h:31