CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
PPSPixelTopologyESSource Class Reference

Loads PPSPixelTopology from a config file. More...

Inheritance diagram for PPSPixelTopologyESSource:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

 PPSPixelTopologyESSource (const edm::ParameterSet &)
 
std::unique_ptr< PPSPixelTopologyproduce (const PPSPixelTopologyRcd &)
 
 ~PPSPixelTopologyESSource () override=default
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Static Public Member Functions

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

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 sets infinite validity of this data More...
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
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::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

std::unique_ptr< PPSPixelTopologyfillPPSPixelTopology ()
 Fill PPSPixelTopology object. More...
 
void setPPSPixelTopology (const edm::ParameterSet &)
 Set PPS Topology parameters to their values from config. More...
 

Private Attributes

double active_edge_sigma_
 
double dead_edge_width_
 
unsigned short no_of_pixels_
 
unsigned short no_of_pixels_simX_
 
unsigned short no_of_pixels_simY_
 
double phys_active_edge_dist_
 
double pitch_simX_
 
double pitch_simY_
 
std::string runType_
 
double simX_width_
 
double simY_width_
 
double thickness_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 

Detailed Description

Loads PPSPixelTopology from a config file.

Definition at line 35 of file PPSPixelTopologyESSource.cc.

Constructor & Destructor Documentation

◆ PPSPixelTopologyESSource()

PPSPixelTopologyESSource::PPSPixelTopologyESSource ( const edm::ParameterSet iConfig)

Definition at line 72 of file PPSPixelTopologyESSource.cc.

References Exception, runType_, setPPSPixelTopology(), and edm::ESProducer::setWhatProduced().

73  : runType_(""),
74  pitch_simY_(0.),
75  pitch_simX_(0.),
76  thickness_(0.),
79  no_of_pixels_(0.),
80  simX_width_(0.),
81  simY_width_(0.),
82  dead_edge_width_(0.),
85  setPPSPixelTopology(iConfig);
86 
87  // validate input
88  if (runType_ != "Run2" && runType_ != "Run3")
89  throw cms::Exception("PPS") << runType_ << " is not valid runType.";
90 
91  setWhatProduced(this);
92  findingRecord<PPSPixelTopologyRcd>();
93 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
void setPPSPixelTopology(const edm::ParameterSet &)
Set PPS Topology parameters to their values from config.

◆ ~PPSPixelTopologyESSource()

PPSPixelTopologyESSource::~PPSPixelTopologyESSource ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 159 of file PPSPixelTopologyESSource.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

159  {
161  desc.add<std::string>("RunType", "Run3");
162  desc.add<double>("PitchSimY", 150e-3);
163  desc.add<double>("PitchSimX", 100e-3);
164  desc.add<double>("thickness", 0.23);
165  desc.add<int>("noOfPixelSimX", 160);
166  desc.add<int>("noOfPixelSimY", 104);
167  desc.add<int>("noOfPixels", 160 * 104);
168  desc.add<double>("simXWidth", 16.6);
169  desc.add<double>("simYWidth", 16.2);
170  desc.add<double>("deadEdgeWidth", 200e-3);
171  desc.add<double>("activeEdgeSigma", 0.02);
172  desc.add<double>("physActiveEdgeDist", 0.150);
173 
174  descriptions.add("ppsPixelTopologyESSource", desc);
175 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillPPSPixelTopology()

std::unique_ptr< PPSPixelTopology > PPSPixelTopologyESSource::fillPPSPixelTopology ( )
private

Fill PPSPixelTopology object.

Definition at line 124 of file PPSPixelTopologyESSource.cc.

References active_edge_sigma_, dead_edge_width_, no_of_pixels_, no_of_pixels_simX_, no_of_pixels_simY_, AlCaHLTBitMon_ParallelJobs::p, phys_active_edge_dist_, pitch_simX_, pitch_simY_, runType_, simX_width_, simY_width_, and thickness_.

Referenced by produce().

124  {
125  auto p = std::make_unique<PPSPixelTopology>();
126 
127  p->setRunType(runType_);
128  p->setPitchSimY(pitch_simY_);
129  p->setPitchSimX(pitch_simX_);
130  p->setThickness(thickness_);
131  p->setNoPixelsSimX(no_of_pixels_simX_);
132  p->setNoPixelsSimY(no_of_pixels_simY_);
133  p->setNoPixels(no_of_pixels_);
134  p->setSimXWidth(simX_width_);
135  p->setSimYWidth(simY_width_);
136  p->setDeadEdgeWidth(dead_edge_width_);
137  p->setActiveEdgeSigma(active_edge_sigma_);
138  p->setPhysActiveEdgeDist(phys_active_edge_dist_);
139  p->setActiveEdgeX(simX_width_ / 2. - phys_active_edge_dist_);
140  p->setActiveEdgeY(simY_width_ / 2. - phys_active_edge_dist_);
141 
142  return p;
143 }

◆ produce()

std::unique_ptr< PPSPixelTopology > PPSPixelTopologyESSource::produce ( const PPSPixelTopologyRcd )

Definition at line 97 of file PPSPixelTopologyESSource.cc.

References fillPPSPixelTopology().

97  {
98  auto topo = fillPPSPixelTopology();
99 
100  edm::LogInfo("PPS") << "PixelTopologyESSource::produce \n" << *topo;
101 
102  return topo;
103 }
std::unique_ptr< PPSPixelTopology > fillPPSPixelTopology()
Fill PPSPixelTopology object.
Log< level::Info, false > LogInfo

◆ setIntervalFor()

void PPSPixelTopologyESSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey key,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

sets infinite validity of this data

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 147 of file PPSPixelTopologyESSource.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::EventID::event(), edm::IOVSyncValue::eventID(), infinity, crabWrapper::key, and edm::EventID::run().

149  {
150  edm::LogInfo("PPS") << ">> PPSPixelTopologyESSource::setIntervalFor(" << key.name() << ")\n"
151  << " run=" << iosv.eventID().run() << ", event=" << iosv.eventID().event();
152 
154  oValidity = infinity;
155 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const double infinity
Log< level::Info, false > LogInfo
RunNumber_t run() const
Definition: EventID.h:38
const EventID & eventID() const
Definition: IOVSyncValue.h:40
EventNumber_t event() const
Definition: EventID.h:40

◆ setPPSPixelTopology()

void PPSPixelTopologyESSource::setPPSPixelTopology ( const edm::ParameterSet iConfig)
private

Set PPS Topology parameters to their values from config.

Definition at line 107 of file PPSPixelTopologyESSource.cc.

References active_edge_sigma_, dead_edge_width_, edm::ParameterSet::getParameter(), no_of_pixels_, no_of_pixels_simX_, no_of_pixels_simY_, phys_active_edge_dist_, pitch_simX_, pitch_simY_, runType_, simX_width_, simY_width_, AlCaHLTBitMon_QueryRunRegistry::string, and thickness_.

Referenced by PPSPixelTopologyESSource().

107  {
108  runType_ = iConfig.getParameter<std::string>("RunType");
109  pitch_simY_ = iConfig.getParameter<double>("PitchSimY");
110  pitch_simX_ = iConfig.getParameter<double>("PitchSimX");
111  thickness_ = iConfig.getParameter<double>("thickness");
112  no_of_pixels_simX_ = iConfig.getParameter<int>("noOfPixelSimX");
113  no_of_pixels_simY_ = iConfig.getParameter<int>("noOfPixelSimY");
114  no_of_pixels_ = iConfig.getParameter<int>("noOfPixels");
115  simX_width_ = iConfig.getParameter<double>("simXWidth");
116  simY_width_ = iConfig.getParameter<double>("simYWidth");
117  dead_edge_width_ = iConfig.getParameter<double>("deadEdgeWidth");
118  active_edge_sigma_ = iConfig.getParameter<double>("activeEdgeSigma");
119  phys_active_edge_dist_ = iConfig.getParameter<double>("physActiveEdgeDist");
120 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Data Documentation

◆ active_edge_sigma_

double PPSPixelTopologyESSource::active_edge_sigma_
private

Definition at line 60 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ dead_edge_width_

double PPSPixelTopologyESSource::dead_edge_width_
private

Definition at line 59 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ no_of_pixels_

unsigned short PPSPixelTopologyESSource::no_of_pixels_
private

Definition at line 56 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ no_of_pixels_simX_

unsigned short PPSPixelTopologyESSource::no_of_pixels_simX_
private

Definition at line 54 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ no_of_pixels_simY_

unsigned short PPSPixelTopologyESSource::no_of_pixels_simY_
private

Definition at line 55 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ phys_active_edge_dist_

double PPSPixelTopologyESSource::phys_active_edge_dist_
private

Definition at line 61 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ pitch_simX_

double PPSPixelTopologyESSource::pitch_simX_
private

Definition at line 52 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ pitch_simY_

double PPSPixelTopologyESSource::pitch_simY_
private

Definition at line 51 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ runType_

std::string PPSPixelTopologyESSource::runType_
private

◆ simX_width_

double PPSPixelTopologyESSource::simX_width_
private

Definition at line 57 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ simY_width_

double PPSPixelTopologyESSource::simY_width_
private

Definition at line 58 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().

◆ thickness_

double PPSPixelTopologyESSource::thickness_
private

Definition at line 53 of file PPSPixelTopologyESSource.cc.

Referenced by fillPPSPixelTopology(), and setPPSPixelTopology().