CMS 3D CMS Logo

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

Public Member Functions

std::unique_ptr< SiStripRegionCablingproduceRegionCabling (const SiStripRegionCablingRcd &)
 
 SiStripRegionConnectivity (const edm::ParameterSet &)
 
 ~SiStripRegionConnectivity () override
 
- 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)
 

Private Attributes

edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcddetcablingToken_
 
uint32_t etadivisions_
 
double etamax_
 
uint32_t phidivisions_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkgeomToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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 16 of file SiStripRegionConnectivity.cc.

Constructor & Destructor Documentation

◆ SiStripRegionConnectivity()

SiStripRegionConnectivity::SiStripRegionConnectivity ( const edm::ParameterSet pset)

Definition at line 36 of file SiStripRegionConnectivity.cc.

References gpuPixelDoublets::cc, detcablingToken_, produceRegionCabling(), edm::ESProducer::setWhatProduced(), tkgeomToken_, and tTopoToken_.

37  : etadivisions_(pset.getUntrackedParameter<unsigned int>("EtaDivisions", 10)),
38  phidivisions_(pset.getUntrackedParameter<unsigned int>("PhiDivisions", 10)),
39  etamax_(pset.getUntrackedParameter<double>("EtaMax", 2.4))
40 
41 {
43  detcablingToken_ = cc.consumes();
44  tkgeomToken_ = cc.consumes();
45  tTopoToken_ = cc.consumes();
46 }
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkgeomToken_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detcablingToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::unique_ptr< SiStripRegionCabling > produceRegionCabling(const SiStripRegionCablingRcd &)

◆ ~SiStripRegionConnectivity()

SiStripRegionConnectivity::~SiStripRegionConnectivity ( )
override

Definition at line 48 of file SiStripRegionConnectivity.cc.

48 {}

Member Function Documentation

◆ produceRegionCabling()

std::unique_ptr< SiStripRegionCabling > SiStripRegionConnectivity::produceRegionCabling ( const SiStripRegionCablingRcd iRecord)

Definition at line 50 of file SiStripRegionConnectivity.cc.

References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, runTheMatrix::const, detcablingToken_, PVValHelper::eta, etadivisions_, etamax_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), sistrip::invalid32_, nano_mu_digi_cff::layer, phi, phidivisions_, SiStripRegionCabling::subdetFromDetId(), tkgeomToken_, and tTopoToken_.

Referenced by SiStripRegionConnectivity().

51  {
52  const auto& detcabling = iRecord.get(detcablingToken_);
53  const auto& tkgeom = iRecord.get(tkgeomToken_);
54  const auto& tTopo = iRecord.get(tTopoToken_);
55 
56  //here build an object of type SiStripRegionCabling using the information from class SiStripDetCabling **PLUS** the geometry.
57 
58  //Construct region cabling object
59  auto RegionConnections = std::make_unique<SiStripRegionCabling>(etadivisions_, phidivisions_, etamax_);
60 
61  //Construct region cabling map
62  SiStripRegionCabling::Cabling regioncabling(
67 
68  //Loop det cabling
69  for (const auto& idet : detcabling.getDetCabling()) {
70  if (!idet.first || (idet.first == sistrip::invalid32_))
71  continue;
72 
73  // Check if geom det unit exists
74  auto geom_det = tkgeom.idToDetUnit(DetId(idet.first));
75  auto strip_det = dynamic_cast<StripGeomDetUnit const*>(geom_det);
76  if (!strip_det) {
77  continue;
78  }
79 
80  //Calculate region from geometry
81  double eta = tkgeom.idToDet(DetId(idet.first))->position().eta();
82  double phi = tkgeom.idToDet(DetId(idet.first))->position().phi().value();
83  uint32_t reg = RegionConnections->region(SiStripRegionCabling::Position(eta, phi));
84 
85  //Find subdet from det-id
86  uint32_t subdet = static_cast<uint32_t>(SiStripRegionCabling::subdetFromDetId(idet.first));
87 
88  //Find layer from det-id
89  uint32_t layer = tTopo.layer(idet.first);
90 
91  //@@ BELOW IS TEMP FIX TO HANDLE BUG IN DET CABLING
92  const std::vector<const FedChannelConnection*>& conns = idet.second;
93 
94  //Update region cabling map
95  regioncabling[reg][subdet][layer].push_back(SiStripRegionCabling::Element());
96  auto& elem = regioncabling[reg][subdet][layer].back();
97  elem.first = idet.first;
98  elem.second.resize(conns.size());
99  for (const auto& iconn : conns) {
100  if ((iconn != nullptr) && (iconn->apvPairNumber() < conns.size())) {
101  elem.second[iconn->apvPairNumber()] = *iconn;
102  }
103  }
104  }
105 
106  //Add map to region cabling object
107  RegionConnections->setRegionCabling(regioncabling);
108 
109  return RegionConnections;
110 }
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkgeomToken_
std::pair< uint32_t, std::vector< FedChannelConnection > > Element
static const uint32_t invalid32_
Definition: Constants.h:15
std::vector< Element > ElementCabling
static const SubDet subdetFromDetId(const uint32_t detid)
std::vector< RegionCabling > Cabling
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detcablingToken_
Definition: DetId.h:17
std::pair< double, double > Position
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< WedgeCabling > RegionCabling
std::vector< ElementCabling > WedgeCabling
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const

Member Data Documentation

◆ detcablingToken_

edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> SiStripRegionConnectivity::detcablingToken_
private

Definition at line 24 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling(), and SiStripRegionConnectivity().

◆ etadivisions_

uint32_t SiStripRegionConnectivity::etadivisions_
private

Number of regions in eta,phi

Definition at line 29 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling().

◆ etamax_

double SiStripRegionConnectivity::etamax_
private

Tracker extent in eta

Definition at line 33 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling().

◆ phidivisions_

uint32_t SiStripRegionConnectivity::phidivisions_
private

Definition at line 30 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling().

◆ tkgeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripRegionConnectivity::tkgeomToken_
private

Definition at line 25 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling(), and SiStripRegionConnectivity().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripRegionConnectivity::tTopoToken_
private

Definition at line 26 of file SiStripRegionConnectivity.cc.

Referenced by produceRegionCabling(), and SiStripRegionConnectivity().