CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiStripRegionConnectivity Class Reference

#include <SiStripRegionConnectivity.h>

Inheritance diagram for SiStripRegionConnectivity:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::auto_ptr
< SiStripRegionCabling
produceRegionCabling (const SiStripRegionCablingRcd &)
 
 SiStripRegionConnectivity (const edm::ParameterSet &)
 
virtual ~SiStripRegionConnectivity ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

uint32_t etadivisions_
 
double etamax_
 
uint32_t phidivisions_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 15 of file SiStripRegionConnectivity.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file SiStripRegionConnectivity.cc.

References produceRegionCabling(), and edm::ESProducer::setWhatProduced().

12  :
13 
14  etadivisions_(pset.getUntrackedParameter<unsigned int>("EtaDivisions",10)),
15  phidivisions_(pset.getUntrackedParameter<unsigned int>("PhiDivisions",10)),
16  etamax_(pset.getUntrackedParameter<double>("EtaMax",2.4))
17 
18 {
20 }
T getUntrackedParameter(std::string const &, T const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< SiStripRegionCabling > produceRegionCabling(const SiStripRegionCablingRcd &)
SiStripRegionConnectivity::~SiStripRegionConnectivity ( )
virtual

Definition at line 22 of file SiStripRegionConnectivity.cc.

22 {}

Member Function Documentation

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

Definition at line 24 of file SiStripRegionConnectivity.cc.

References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, eta(), etadivisions_, etamax_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), sistrip::invalid32_, SiStripRegionCabling::layerFromDetId(), phi, phidivisions_, SiStripRegionCabling::region(), SiStripRegionCabling::setRegionCabling(), and SiStripRegionCabling::subdetFromDetId().

Referenced by SiStripRegionConnectivity().

24  {
25 
27  iRecord.getRecord<SiStripDetCablingRcd>().get( detcabling );
28 
30  iRecord.getRecord<TrackerDigiGeometryRecord>().get( tkgeom );
31 
32  //here build an object of type SiStripRegionCabling using the information from class SiStripDetCabling **PLUS** the geometry.
33 
34  //Construct region cabling object
36 
37  //Construct region cabling map
39 
40  //Loop det cabling
41  std::map< uint32_t, std::vector<const FedChannelConnection *> >::const_iterator idet = detcabling->getDetCabling().begin();
42  for (;idet!=detcabling->getDetCabling().end();idet++) {
43  if (!idet->first || (idet->first == sistrip::invalid32_)) continue;
44 
45  // Check if geom det unit exists
46  GeomDetUnit* geom_det = const_cast<GeomDetUnit*>( tkgeom->idToDetUnit(DetId(idet->first)) );
47  StripGeomDetUnit* strip_det = dynamic_cast<StripGeomDetUnit*>( geom_det );
48  if ( !strip_det ) { continue; }
49 
50  //Calculate region from geometry
51  double eta = tkgeom->idToDet(DetId(idet->first))->position().eta();
52  double phi = tkgeom->idToDet(DetId(idet->first))->position().phi().value();
53  uint32_t reg = RegionConnections->region(SiStripRegionCabling::Position(eta,phi));
54 
55  //Find subdet from det-id
56  uint32_t subdet = static_cast<uint32_t>(SiStripRegionCabling::subdetFromDetId(idet->first));
57 
58  //Find layer from det-id
59  uint32_t layer = SiStripRegionCabling::layerFromDetId(idet->first);
60 
61  //@@ BELOW IS TEMP FIX TO HANDLE BUG IN DET CABLING
62  std::vector<const FedChannelConnection *> conns = idet->second;
63  std::vector<const FedChannelConnection *>::iterator iconn = conns.begin();
64  std::vector<const FedChannelConnection *>::iterator jconn = conns.end();
65 
66  //Update region cabling map
67  regioncabling[reg][subdet][layer][idet->first].resize(conns.size());
68  for ( ; iconn != jconn; ++iconn ) {
69  if ( ((*iconn) != 0) && ((*iconn)->apvPairNumber() < conns.size()) ) {
70  regioncabling[reg][subdet][layer][idet->first][(*iconn)->apvPairNumber()] = **iconn;
71  }
72  }
73  }
74 
75  //Add map to region cabling object
76  RegionConnections->setRegionCabling(regioncabling);
77 
78  return std::auto_ptr<SiStripRegionCabling>( RegionConnections );
79 }
static const uint32_t invalid32_
Definition: Constants.h:16
T eta() const
void setRegionCabling(const Cabling &)
std::vector< ElementCabling > WedgeCabling
static const SubDet subdetFromDetId(const uint32_t detid)
std::pair< double, double > Position
Definition: DetId.h:20
static const uint32_t layerFromDetId(const uint32_t detid)
const uint32_t region(const Position) const
std::vector< WedgeCabling > RegionCabling
std::map< uint32_t, std::vector< FedChannelConnection > > ElementCabling
std::vector< RegionCabling > Cabling
Definition: DDAxes.h:10

Member Data Documentation

uint32_t SiStripRegionConnectivity::etadivisions_
private

Number of regions in eta,phi

Definition at line 27 of file SiStripRegionConnectivity.h.

Referenced by produceRegionCabling().

double SiStripRegionConnectivity::etamax_
private

Tracker extent in eta

Definition at line 31 of file SiStripRegionConnectivity.h.

Referenced by produceRegionCabling().

uint32_t SiStripRegionConnectivity::phidivisions_
private

Definition at line 28 of file SiStripRegionConnectivity.h.

Referenced by produceRegionCabling().