CMS 3D CMS Logo

Public Member Functions | Private Member Functions

SiStripHashedDetIdESModule Class Reference

Builds hashed DetId map based on DetIds read from geometry database. More...

#include <SiStripHashedDetIdESModule.h>

Inheritance diagram for SiStripHashedDetIdESModule:
SiStripHashedDetIdESProducer edm::ESProducer edm::ESProducer edm::ESProxyFactoryProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 SiStripHashedDetIdESModule (const edm::ParameterSet &)
virtual ~SiStripHashedDetIdESModule ()

Private Member Functions

virtual SiStripHashedDetIdmake (const SiStripHashedDetIdRcd &)

Detailed Description

Builds hashed DetId map based on DetIds read from geometry database.

Author:
R.Bainbridge

Definition at line 15 of file SiStripHashedDetIdESModule.h.


Constructor & Destructor Documentation

SiStripHashedDetIdESModule::SiStripHashedDetIdESModule ( const edm::ParameterSet pset)

Definition at line 13 of file SiStripHashedDetIdESModule.cc.

  : SiStripHashedDetIdESProducer( pset )
{
  edm::LogVerbatim("HashedDetId") 
    << "[SiStripHashedDetIdESSourceFromGeom::" << __func__ << "]"
    << " Constructing object...";
}
SiStripHashedDetIdESModule::~SiStripHashedDetIdESModule ( ) [virtual]

Definition at line 23 of file SiStripHashedDetIdESModule.cc.

                                                        {
  edm::LogVerbatim("HashedDetId")
    << "[SiStripHashedDetIdESSourceFromGeom::" << __func__ << "]"
    << " Destructing object...";
}

Member Function Documentation

SiStripHashedDetId * SiStripHashedDetIdESModule::make ( const SiStripHashedDetIdRcd rcd) [private, virtual]

Builds hashed DetId map based on geometry.

Implements SiStripHashedDetIdESProducer.

Definition at line 31 of file SiStripHashedDetIdESModule.cc.

References GeomDet::geographicalId(), relativeConstraints::geom, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), cond::hash, LogTrace, sistrip::mlDqmCommon_, and strip().

                                                                                       {
  edm::LogVerbatim("HashedDetId")
    << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
    << " Building \"fake\" hashed DetId map from geometry";
  
  edm::ESHandle<TrackerGeometry> geom;
  rcd.getRecord<TrackerDigiGeometryRecord>().get( geom );
  
  std::vector<uint32_t> dets;
  dets.reserve(16000);

  TrackerGeometry::DetUnitContainer::const_iterator iter = geom->detUnits().begin();
  for( ; iter != geom->detUnits().end(); ++iter ) {
    const StripGeomDetUnit* strip = dynamic_cast<StripGeomDetUnit*>(*iter);
    if ( strip ) { dets.push_back( (strip->geographicalId()).rawId() ); }
  }
  edm::LogVerbatim(mlDqmCommon_)
    << "[SiStripHashedDetIdESModule::" << __func__ << "]"
    << " Retrieved " << dets.size()
    << " sistrip DetIds from geometry!";
  
  // Create hash map object
  SiStripHashedDetId* hash = new SiStripHashedDetId( dets );
  LogTrace(mlDqmCommon_)
    << "[SiStripHashedDetIdESModule::" << __func__ << "]"
    << " DetId hash map: " << std::endl
    << *hash;
  
  return hash;

}