CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TrackerTopologyEP Class Reference
Inheritance diagram for TrackerTopologyEP:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Types

using ReturnType = std::unique_ptr< TrackerTopology >
 

Public Member Functions

ReturnType produce (const TrackerTopologyRcd &)
 
 TrackerTopologyEP (const edm::ParameterSet &)
 
- 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)
 

Static Public Member Functions

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

Private Member Functions

void fillParameters (const PTrackerParameters &, TrackerTopology::PixelBarrelValues &pxbVals, TrackerTopology::PixelEndcapValues &pxfVals, TrackerTopology::TECValues &tecVals, TrackerTopology::TIBValues &tibVals, TrackerTopology::TIDValues &tidVals, TrackerTopology::TOBValues &tobVals)
 

Private Attributes

const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcdtoken_
 

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 > >>
 
- 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)
 

Detailed Description

Definition at line 18 of file TrackerTopologyEP.cc.

Member Typedef Documentation

◆ ReturnType

Definition at line 22 of file TrackerTopologyEP.cc.

Constructor & Destructor Documentation

◆ TrackerTopologyEP()

TrackerTopologyEP::TrackerTopologyEP ( const edm::ParameterSet conf)

Definition at line 40 of file TrackerTopologyEP.cc.

41  : token_(setWhatProduced(this).consumesFrom<PTrackerParameters, PTrackerParametersRcd>(edm::ESInputTag())) {
42  edm::LogInfo("TRACKER") << "TrackerTopologyEP::TrackerTopologyEP";
43 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > token_
Log< level::Info, false > LogInfo

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 45 of file TrackerTopologyEP.cc.

References edm::ConfigurationDescriptions::add().

45  {
47  descriptions.add("trackerTopology", ttc);
48 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillParameters()

void TrackerTopologyEP::fillParameters ( const PTrackerParameters ptp,
TrackerTopology::PixelBarrelValues pxbVals,
TrackerTopology::PixelEndcapValues pxfVals,
TrackerTopology::TECValues tecVals,
TrackerTopology::TIBValues tibVals,
TrackerTopology::TIDValues tidVals,
TrackerTopology::TOBValues tobVals 
)
private

Definition at line 66 of file TrackerTopologyEP.cc.

References TrackerTopology::PixelEndcapValues::bladeMask_, TrackerTopology::PixelEndcapValues::bladeStartBit_, TrackerTopology::PixelEndcapValues::diskMask_, TrackerTopology::PixelEndcapValues::diskStartBit_, TrackerTopology::PixelBarrelValues::doubleMask_, TrackerTopology::PixelBarrelValues::doubleStartBit_, TrackerTopology::PixelBarrelValues::ladderMask_, TrackerTopology::PixelBarrelValues::ladderStartBit_, TrackerTopology::PixelBarrelValues::layerMask_, TrackerTopology::TIBValues::layerMask_, TrackerTopology::TOBValues::layerMask_, TrackerTopology::PixelBarrelValues::layerStartBit_, TrackerTopology::TIBValues::layerStartBit_, TrackerTopology::TOBValues::layerStartBit_, TrackerTopology::TIDValues::module_fw_bwMask_, TrackerTopology::TIDValues::module_fw_bwStartBit_, TrackerTopology::PixelBarrelValues::moduleMask_, TrackerTopology::PixelEndcapValues::moduleMask_, TrackerTopology::TECValues::moduleMask_, TrackerTopology::TIBValues::moduleMask_, TrackerTopology::TIDValues::moduleMask_, TrackerTopology::TOBValues::moduleMask_, TrackerTopology::PixelBarrelValues::moduleStartBit_, TrackerTopology::PixelEndcapValues::moduleStartBit_, TrackerTopology::TECValues::moduleStartBit_, TrackerTopology::TIBValues::moduleStartBit_, TrackerTopology::TIDValues::moduleStartBit_, TrackerTopology::TOBValues::moduleStartBit_, TrackerTopology::PixelEndcapValues::panelMask_, TrackerTopology::PixelEndcapValues::panelStartBit_, TrackerTopology::TECValues::petal_fw_bwMask_, TrackerTopology::TECValues::petal_fw_bwStartBit_, TrackerTopology::TECValues::petalMask_, TrackerTopology::TECValues::petalStartBit_, TrackerTopology::TECValues::ringMask_, TrackerTopology::TIDValues::ringMask_, TrackerTopology::TECValues::ringStartBit_, TrackerTopology::TIDValues::ringStartBit_, TrackerTopology::TOBValues::rod_fw_bwMask_, TrackerTopology::TOBValues::rod_fw_bwStartBit_, TrackerTopology::TOBValues::rodMask_, TrackerTopology::TOBValues::rodStartBit_, TrackerTopology::PixelEndcapValues::sideMask_, TrackerTopology::TECValues::sideMask_, TrackerTopology::TIDValues::sideMask_, TrackerTopology::PixelEndcapValues::sideStartBit_, TrackerTopology::TECValues::sideStartBit_, TrackerTopology::TIDValues::sideStartBit_, TrackerTopology::TECValues::sterMask_, TrackerTopology::TIBValues::sterMask_, TrackerTopology::TIDValues::sterMask_, TrackerTopology::TOBValues::sterMask_, TrackerTopology::TECValues::sterStartBit_, TrackerTopology::TIBValues::sterStartBit_, TrackerTopology::TIDValues::sterStartBit_, TrackerTopology::TOBValues::sterStartBit_, TrackerTopology::TIBValues::str_fw_bwMask_, TrackerTopology::TIBValues::str_fw_bwStartBit_, TrackerTopology::TIBValues::str_int_extMask_, TrackerTopology::TIBValues::str_int_extStartBit_, TrackerTopology::TIBValues::strMask_, TrackerTopology::TIBValues::strStartBit_, PTrackerParameters::vitems, TrackerTopology::TECValues::wheelMask_, TrackerTopology::TIDValues::wheelMask_, TrackerTopology::TECValues::wheelStartBit_, and TrackerTopology::TIDValues::wheelStartBit_.

Referenced by produce().

72  {
73  if (ptp.vitems[0].vpars.size() > 6) { //Phase 2: extra hierarchy level for 3D sensors
74  pxbVals.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
75  pxbVals.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
76  pxbVals.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
77  pxbVals.doubleStartBit_ = ptp.vitems[0].vpars[3]; // 0
78  pxbVals.layerMask_ = ptp.vitems[0].vpars[4]; // 0xF
79  pxbVals.ladderMask_ = ptp.vitems[0].vpars[5]; // 0xFF
80  pxbVals.moduleMask_ = ptp.vitems[0].vpars[6]; // 0x3F
81  pxbVals.doubleMask_ = ptp.vitems[0].vpars[7]; // 0x3
82  } else { //Phase 1
83  pxbVals.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
84  pxbVals.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
85  pxbVals.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
86  pxbVals.layerMask_ = ptp.vitems[0].vpars[3]; // 0xF
87  pxbVals.ladderMask_ = ptp.vitems[0].vpars[4]; // 0xFF
88  pxbVals.moduleMask_ = ptp.vitems[0].vpars[5]; // 0x3F
89  }
90 
91  if (ptp.vitems[1].vpars.size() >
92  11) { //Tracker with subdisk hierarchy level (additional hierarchy level wrt original)
93  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
94  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
95  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[3];
96  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[4];
97  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[5];
98  pxfVals.sideMask_ = ptp.vitems[1].vpars[6];
99  pxfVals.diskMask_ = ptp.vitems[1].vpars[7];
100  pxfVals.bladeMask_ = ptp.vitems[1].vpars[9];
101  pxfVals.panelMask_ = ptp.vitems[1].vpars[10];
102  pxfVals.moduleMask_ = ptp.vitems[1].vpars[11];
103  } else { //Original tracker
104  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
105  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
106  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[2];
107  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[3];
108  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[4];
109  pxfVals.sideMask_ = ptp.vitems[1].vpars[5];
110  pxfVals.diskMask_ = ptp.vitems[1].vpars[6];
111  pxfVals.bladeMask_ = ptp.vitems[1].vpars[7];
112  pxfVals.panelMask_ = ptp.vitems[1].vpars[8];
113  pxfVals.moduleMask_ = ptp.vitems[1].vpars[9];
114  }
115 
116  // TEC: 6
117  tecVals.sideStartBit_ = ptp.vitems[5].vpars[0];
118  tecVals.wheelStartBit_ = ptp.vitems[5].vpars[1];
119  tecVals.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
120  tecVals.petalStartBit_ = ptp.vitems[5].vpars[3];
121  tecVals.ringStartBit_ = ptp.vitems[5].vpars[4];
122  tecVals.moduleStartBit_ = ptp.vitems[5].vpars[5];
123  tecVals.sterStartBit_ = ptp.vitems[5].vpars[6];
124  tecVals.sideMask_ = ptp.vitems[5].vpars[7];
125  tecVals.wheelMask_ = ptp.vitems[5].vpars[8];
126  tecVals.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
127  tecVals.petalMask_ = ptp.vitems[5].vpars[10];
128  tecVals.ringMask_ = ptp.vitems[5].vpars[11];
129  tecVals.moduleMask_ = ptp.vitems[5].vpars[12];
130  tecVals.sterMask_ = ptp.vitems[5].vpars[13];
131 
132  // TIB: 3
133  tibVals.layerStartBit_ = ptp.vitems[2].vpars[0];
134  tibVals.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
135  tibVals.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
136  tibVals.strStartBit_ = ptp.vitems[2].vpars[3];
137  tibVals.moduleStartBit_ = ptp.vitems[2].vpars[4];
138  tibVals.sterStartBit_ = ptp.vitems[2].vpars[5];
139  tibVals.layerMask_ = ptp.vitems[2].vpars[6];
140  tibVals.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
141  tibVals.str_int_extMask_ = ptp.vitems[2].vpars[8];
142  tibVals.strMask_ = ptp.vitems[2].vpars[9];
143  tibVals.moduleMask_ = ptp.vitems[2].vpars[10];
144  tibVals.sterMask_ = ptp.vitems[2].vpars[11];
145 
146  // TID: 4
147  tidVals.sideStartBit_ = ptp.vitems[3].vpars[0];
148  tidVals.wheelStartBit_ = ptp.vitems[3].vpars[1];
149  tidVals.ringStartBit_ = ptp.vitems[3].vpars[2];
150  tidVals.module_fw_bwStartBit_ = ptp.vitems[3].vpars[3];
151  tidVals.moduleStartBit_ = ptp.vitems[3].vpars[4];
152  tidVals.sterStartBit_ = ptp.vitems[3].vpars[5];
153  tidVals.sideMask_ = ptp.vitems[3].vpars[6];
154  tidVals.wheelMask_ = ptp.vitems[3].vpars[7];
155  tidVals.ringMask_ = ptp.vitems[3].vpars[8];
156  tidVals.module_fw_bwMask_ = ptp.vitems[3].vpars[9];
157  tidVals.moduleMask_ = ptp.vitems[3].vpars[10];
158  tidVals.sterMask_ = ptp.vitems[3].vpars[11];
159 
160  // TOB: 5
161  tobVals.layerStartBit_ = ptp.vitems[4].vpars[0];
162  tobVals.rod_fw_bwStartBit_ = ptp.vitems[4].vpars[1];
163  tobVals.rodStartBit_ = ptp.vitems[4].vpars[2];
164  tobVals.moduleStartBit_ = ptp.vitems[4].vpars[3];
165  tobVals.sterStartBit_ = ptp.vitems[4].vpars[4];
166  tobVals.layerMask_ = ptp.vitems[4].vpars[5];
167  tobVals.rod_fw_bwMask_ = ptp.vitems[4].vpars[6];
168  tobVals.rodMask_ = ptp.vitems[4].vpars[7];
169  tobVals.moduleMask_ = ptp.vitems[4].vpars[8];
170  tobVals.sterMask_ = ptp.vitems[4].vpars[9];
171 }
std::vector< Item > vitems
unsigned int module_fw_bwStartBit_

◆ produce()

TrackerTopologyEP::ReturnType TrackerTopologyEP::produce ( const TrackerTopologyRcd iRecord)

Definition at line 50 of file TrackerTopologyEP.cc.

References fillParameters(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and token_.

50  {
51  edm::LogInfo("TrackerTopologyEP") << "TrackerTopologyEP::produce(const TrackerTopologyRcd& iRecord)";
52  auto ptp = iRecord.getRecord<PTrackerParametersRcd>().getTransientHandle(token_);
53 
60 
61  fillParameters(*ptp, pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
62 
63  return std::make_unique<TrackerTopology>(pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
64 }
void fillParameters(const PTrackerParameters &, TrackerTopology::PixelBarrelValues &pxbVals, TrackerTopology::PixelEndcapValues &pxfVals, TrackerTopology::TECValues &tecVals, TrackerTopology::TIBValues &tibVals, TrackerTopology::TIDValues &tidVals, TrackerTopology::TOBValues &tobVals)
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > token_
Log< level::Info, false > LogInfo

Member Data Documentation

◆ token_

const edm::ESGetToken<PTrackerParameters, PTrackerParametersRcd> TrackerTopologyEP::token_
private

Definition at line 37 of file TrackerTopologyEP.cc.

Referenced by produce().