CMS 3D CMS Logo

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

#include <EcalReadoutTools.h>

Classes

struct  ESGetTokens
 

Public Member Functions

 EcalReadoutTools (const EcalReadoutTools &)=delete
 
 EcalReadoutTools (const edm::Event &, const edm::EventSetup &, const ESGetTokens &)
 
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 12 of file EcalReadoutTools.h.

Constructor & Destructor Documentation

◆ EcalReadoutTools() [1/2]

EcalReadoutTools::EcalReadoutTools ( const edm::Event ,
const edm::EventSetup iSetup,
const ESGetTokens esGetTokens 
)

Definition at line 3 of file EcalReadoutTools.cc.

3  {
4  triggerTowerMap_ = &iSetup.getData(esGetTokens.ecalTrigTowerConstituentsMapToken);
5  elecMap_ = &iSetup.getData(esGetTokens.ecalElectronicsMappingToken);
6 }

References EcalReadoutTools::ESGetTokens::ecalElectronicsMappingToken, EcalReadoutTools::ESGetTokens::ecalTrigTowerConstituentsMapToken, elecMap_, edm::EventSetup::getData(), 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 8 of file EcalReadoutTools.cc.

8  {
9  return triggerTowerMap_->towerOf(xtalId);
10 }

References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.

Referenced by HLTRechitsToDigis::produce().

◆ readOutUnitOf() [2/2]

EcalScDetId EcalReadoutTools::readOutUnitOf ( const EEDetId xtalId) const

Definition at line 12 of file EcalReadoutTools.cc.

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

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

Member Data Documentation

◆ elecMap_

const EcalElectronicsMapping* EcalReadoutTools::elecMap_
private

Definition at line 15 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().

◆ triggerTowerMap_

const EcalTrigTowerConstituentsMap* EcalReadoutTools::triggerTowerMap_
private

Definition at line 14 of file EcalReadoutTools.h.

Referenced by EcalReadoutTools(), and readOutUnitOf().

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:15
EcalScDetId
Definition: EcalScDetId.h:24
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
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
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:14