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 edm::Event &, const edm::EventSetup &, const ESGetTokens &)
 
 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 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.

References EcalReadoutTools::ESGetTokens::ecalElectronicsMappingToken, EcalReadoutTools::ESGetTokens::ecalTrigTowerConstituentsMapToken, elecMap_, edm::EventSetup::getData(), and triggerTowerMap_.

3  {
4  triggerTowerMap_ = &iSetup.getData(esGetTokens.ecalTrigTowerConstituentsMapToken);
5  elecMap_ = &iSetup.getData(esGetTokens.ecalElectronicsMappingToken);
6 }
const EcalTrigTowerConstituentsMap * triggerTowerMap_
const EcalElectronicsMapping * elecMap_
bool getData(T &iHolder) const
Definition: EventSetup.h:122

◆ 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.

References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.

Referenced by HLTRechitsToDigis::produce().

8  {
9  return triggerTowerMap_->towerOf(xtalId);
10 }
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
const EcalTrigTowerConstituentsMap * triggerTowerMap_

◆ readOutUnitOf() [2/2]

EcalScDetId EcalReadoutTools::readOutUnitOf ( const EEDetId xtalId) const

Definition at line 12 of file EcalReadoutTools.cc.

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

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 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
int towerId() const
get the tower id
const EcalElectronicsMapping * elecMap_
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.

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().