CMS 3D CMS Logo

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

#include <EcalReadoutTools.h>

Public Member Functions

 EcalReadoutTools (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
 EcalReadoutTools (const EcalReadoutTools &)=delete
 
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::EcalReadoutTools ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 3 of file EcalReadoutTools.cc.

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

3  {
4 
6  iSetup.get<IdealGeometryRecord>().get(hTriggerTowerMap);
7  triggerTowerMap_ = hTriggerTowerMap.product();
8 
10  iSetup.get< EcalMappingRcd >().get(ecalmapping);
11  elecMap_ = ecalmapping.product();
12 
13 }
const EcalTrigTowerConstituentsMap * triggerTowerMap_
const EcalElectronicsMapping * elecMap_
T get() const
Definition: EventSetup.h:62
T const * product() const
Definition: ESHandle.h:86
EcalReadoutTools::EcalReadoutTools ( const EcalReadoutTools )
delete

Member Function Documentation

EcalReadoutTools& EcalReadoutTools::operator= ( const EcalReadoutTools )
delete
EcalTrigTowerDetId EcalReadoutTools::readOutUnitOf ( const EBDetId xtalId) const

Definition at line 15 of file EcalReadoutTools.cc.

References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.

Referenced by PFClusterEMEnergyCorrector::correctEnergies(), and HLTRechitsToDigis::produce().

15  {
16  return triggerTowerMap_->towerOf(xtalId);
17 }
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
const EcalTrigTowerConstituentsMap * triggerTowerMap_
EcalScDetId EcalReadoutTools::readOutUnitOf ( const EEDetId xtalId) const

Definition at line 19 of file EcalReadoutTools.cc.

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

19  {
20  const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId);
21  int iDCC= EcalElecId.dccId();
22  int iDccChan = EcalElecId.towerId();
23  const bool ignoreSingle = true;
24  const std::vector<EcalScDetId> id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle);
25  return !id.empty()?id[0]:EcalScDetId();
26 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int towerId() const
get the tower id
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
const EcalElectronicsMapping * elecMap_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const

Member Data Documentation

const EcalElectronicsMapping* EcalReadoutTools::elecMap_
private

Definition at line 17 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().

const EcalTrigTowerConstituentsMap* EcalReadoutTools::triggerTowerMap_
private

Definition at line 16 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().