CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalReadoutTools Class Reference

#include <EcalReadoutTools.h>

Public Member Functions

 EcalReadoutTools (const EcalReadoutTools &)=delete
 
 EcalReadoutTools (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
EcalReadoutToolsoperator= (const EcalReadoutTools &)=delete
 
EcalTrigTowerDetId readOutUnitOf (const EBDetId &xtalId) const
 
EcalScDetId readOutUnitOf (const EEDetId &xtalId) const
 

Private Attributes

const EcalElectronicsMappingelecMap_
 
const EcalTrigTowerConstituentsMaptriggerTowerMap_
 

Detailed Description

Definition at line 13 of file EcalReadoutTools.h.

Constructor & Destructor Documentation

◆ EcalReadoutTools() [1/2]

EcalReadoutTools::EcalReadoutTools ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 3 of file EcalReadoutTools.cc.

3  {
5  iSetup.get<IdealGeometryRecord>().get(hTriggerTowerMap);
6  triggerTowerMap_ = hTriggerTowerMap.product();
7 
9  iSetup.get<EcalMappingRcd>().get(ecalmapping);
10  elecMap_ = ecalmapping.product();
11 }

References elecMap_, edm::EventSetup::get(), get, edm::ESHandle< T >::product(), and triggerTowerMap_.

◆ EcalReadoutTools() [2/2]

EcalReadoutTools::EcalReadoutTools ( const EcalReadoutTools )
delete

Member Function Documentation

◆ operator=()

EcalReadoutTools& EcalReadoutTools::operator= ( const EcalReadoutTools )
delete

◆ readOutUnitOf() [1/2]

EcalTrigTowerDetId EcalReadoutTools::readOutUnitOf ( const EBDetId xtalId) const

Definition at line 13 of file EcalReadoutTools.cc.

13  {
14  return triggerTowerMap_->towerOf(xtalId);
15 }

References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.

Referenced by HLTRechitsToDigis::produce().

◆ readOutUnitOf() [2/2]

EcalScDetId EcalReadoutTools::readOutUnitOf ( const EEDetId xtalId) const

Definition at line 17 of file EcalReadoutTools.cc.

17  {
18  const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId);
19  int iDCC = EcalElecId.dccId();
20  int iDccChan = EcalElecId.towerId();
21  const bool ignoreSingle = true;
22  const std::vector<EcalScDetId> id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle);
23  return !id.empty() ? id[0] : EcalScDetId();
24 }

References EcalElectronicsId::dccId(), elecMap_, EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), and EcalElectronicsId::towerId().

Member Data Documentation

◆ elecMap_

const EcalElectronicsMapping* EcalReadoutTools::elecMap_
private

Definition at line 16 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().

◆ triggerTowerMap_

const EcalTrigTowerConstituentsMap* EcalReadoutTools::triggerTowerMap_
private

Definition at line 15 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalElectronicsMapping::getEcalScDetId
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
Definition: EcalElectronicsMapping.cc:799
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EcalReadoutTools::elecMap_
const EcalElectronicsMapping * elecMap_
Definition: EcalReadoutTools.h:16
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
EcalScDetId
Definition: EcalScDetId.h:24
edm::ESHandle< EcalTrigTowerConstituentsMap >
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
get
#define get
EcalTrigTowerConstituentsMap::towerOf
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
Definition: EcalTrigTowerConstituentsMap.cc:11
EcalReadoutTools::triggerTowerMap_
const EcalTrigTowerConstituentsMap * triggerTowerMap_
Definition: EcalReadoutTools.h:15
EcalMappingRcd
Definition: EcalMappingRcd.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25