CMS 3D CMS Logo

EcalReadoutTools.cc
Go to the documentation of this file.
2 
3 EcalReadoutTools::EcalReadoutTools(const edm::Event&, const edm::EventSetup& iSetup, const ESGetTokens& esGetTokens) {
5  elecMap_ = &iSetup.getData(esGetTokens.ecalElectronicsMappingToken);
6 }
7 
9  return triggerTowerMap_->towerOf(xtalId);
10 }
11 
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 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
EcalReadoutTools(const edm::Event &, const edm::EventSetup &, const ESGetTokens &)
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
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > const ecalElectronicsMappingToken
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
const EcalTrigTowerConstituentsMap * triggerTowerMap_
int towerId() const
get the tower id
const EcalElectronicsMapping * elecMap_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > const ecalTrigTowerConstituentsMapToken
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.
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const