1 #ifndef EcalDQMCommonUtils_H
2 #define EcalDQMCommonUtils_H
39 unsigned dccId(
unsigned);
76 extern const std::set<unsigned>
dccNoMEM;
91 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::dccId(" << _id.
rawId() <<
")" << std::endl;
100 inline unsigned dccId(
unsigned _index){
105 while(count <= _index)
135 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::tccId(" << uint32_t(_id) <<
")" << std::endl;
161 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) <<
")" << std::endl;
182 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) <<
")" << std::endl;
197 std::stringstream ss;
199 unsigned iSM(_dccId - 1);
202 ss <<
"EE-" << std::setw(2) << std::setfill(
'0') << (((iSM -
kEEmLow + 6) % 9) + 1);
204 ss <<
"EB-" << std::setw(2) << std::setfill(
'0') << (iSM -
kEBmLow + 1);
206 ss <<
"EB+" << std::setw(2) << std::setfill(
'0') << (iSM -
kEBpLow + 1);
208 ss <<
"EE+" << std::setw(2) << std::setfill(
'0') << (((iSM -
kEEpLow + 6) % 9) + 1);
217 if(_ab == 0)
return 650;
220 if(_ab == 0)
return 605;
223 if(_ab == 0)
return 601;
226 if(_ab == 0)
return 647;
235 unsigned iSM(_dccId - 1);
268 inline bool ccuExists(
unsigned _dccId,
unsigned _towerId){
269 if(_towerId == 69 || _towerId == 70)
return true;
270 else if((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24)
return false;
271 else if(_dccId <= kEEmHigh + 1 || _dccId >=
kEEpLow + 1){
unsigned memDCCIndex(unsigned)
const EcalElectronicsMapping * getElectronicsMap()
void setTrigTowerMap(const EcalTrigTowerConstituentsMap *)
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
const EcalElectronicsMapping * electronicsMap
unsigned getEEPnDCC(unsigned, unsigned)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
const EcalTrigTowerConstituentsMap * trigtowerMap
std::string smName(unsigned _dccId)
int towerId() const
get the tower id
unsigned dccId(const DetId &)
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
bool ccuExists(unsigned, unsigned)
std::pair< int, int > getDCCandSC(EcalScDetId id) const
uint32_t rawId() const
get the raw id
int TCCid(const EBDetId &id) const
returns the TCCid of an EBDetId
void setElectronicsMap(const EcalElectronicsMapping *)
unsigned towerId(const DetId &)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int ttId() const
get the tower id
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int iDCCId() const
get the DCCId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool isEcalScDetId(const DetId &_id)
const std::set< unsigned > dccNoMEM
unsigned getNSuperCrystals(unsigned)
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
const EcalTrigTowerConstituentsMap * getTrigTowerMap()
unsigned tccId(const DetId &)
unsigned ttId(const DetId &)
void checkElectronicsMap()
int iTT() const
sequential index within one DCC