#include <CaloGenericDetId.h>
Public Member Functions | |
CaloGenericDetId (uint32_t rawid) | |
CaloGenericDetId (const DetId &id) | |
CaloGenericDetId (DetId::Detector iDet, int iSub, uint32_t iDenseIndex) | |
uint32_t | denseIndex () const |
bool | isCalo () const |
bool | isCaloTower () const |
bool | isCastor () const |
bool | isEB () const |
bool | isEcal () const |
bool | isEE () const |
bool | isES () const |
bool | isHcal () const |
bool | isZDC () const |
uint32_t | sizeForDenseIndexing () const |
bool | validDetId () const |
Definition at line 12 of file CaloGenericDetId.h.
CaloGenericDetId::CaloGenericDetId | ( | uint32_t | rawid | ) | [inline] |
Definition at line 16 of file CaloGenericDetId.h.
: DetId( rawid ) {}
CaloGenericDetId::CaloGenericDetId | ( | const DetId & | id | ) | [inline] |
Definition at line 18 of file CaloGenericDetId.h.
: DetId ( id ) {}
CaloGenericDetId::CaloGenericDetId | ( | DetId::Detector | iDet, |
int | iSub, | ||
uint32_t | iDenseIndex | ||
) |
Definition at line 5 of file CaloGenericDetId.cc.
References dtNoiseDBValidation_cfg::cerr, DetId::det(), CaloTowerDetId::detIdFromDenseIndex(), HcalCastorDetId::detIdFromDenseIndex(), ESDetId::detIdFromDenseIndex(), EBDetId::detIdFromDenseIndex(), HcalZDCDetId::detIdFromDenseIndex(), EEDetId::detIdFromDenseIndex(), Exception, DetId::Hcal, DetId::id_, isCaloTower(), isCastor(), isEB(), isEE(), isES(), isZDC(), and DetId::rawId().
: DetId( iDet, iSub ) { if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; cms::Exception("No support"); } else { id_ = ( isEB() ? EBDetId::detIdFromDenseIndex( iDin ).rawId() : ( isEE() ? EEDetId::detIdFromDenseIndex( iDin ).rawId() : ( isES() ? ESDetId::detIdFromDenseIndex( iDin ).rawId() : ( isZDC() ? HcalZDCDetId::detIdFromDenseIndex( iDin ).rawId() : ( isCastor() ? HcalCastorDetId::detIdFromDenseIndex( iDin ).rawId() : ( isCaloTower() ? CaloTowerDetId::detIdFromDenseIndex( iDin ).rawId() : 0 ) ) ) ) ) ); } }
uint32_t CaloGenericDetId::denseIndex | ( | ) | const |
Definition at line 24 of file CaloGenericDetId.cc.
References dtNoiseDBValidation_cfg::cerr, DetId::det(), Exception, DetId::Hcal, isCaloTower(), isCastor(), isEB(), isEE(), isES(), isZDC(), and DetId::rawId().
Referenced by CaloSubdetectorGeometry::indexFor(), CaloTowerGeometry::newCell(), ZdcGeometry::newCell(), and CastorGeometry::newCell().
{ if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; cms::Exception("No support"); } return ( isEB() ? EBDetId( rawId() ).denseIndex() : ( isEE() ? EEDetId( rawId() ).denseIndex() : ( isES() ? ESDetId( rawId() ).denseIndex() : ( isZDC() ? HcalZDCDetId( rawId() ).denseIndex() : ( isCastor() ? HcalCastorDetId( rawId() ).denseIndex() : ( isCaloTower() ? CaloTowerDetId( rawId() ).denseIndex() : ~0 ) ) ) ) ) ) ; }
bool CaloGenericDetId::isCalo | ( | ) | const [inline] |
Definition at line 34 of file CaloGenericDetId.h.
References DetId::Calo, and DetId::det().
Referenced by isCaloTower(), isCastor(), and isZDC().
{ return det() == DetId::Calo ; }
bool CaloGenericDetId::isCaloTower | ( | ) | const [inline] |
Definition at line 38 of file CaloGenericDetId.h.
References isCalo(), CaloTowerDetId::SubdetId, and DetId::subdetId().
Referenced by CaloTowerGeometry::alignmentTransformIndexLocal(), CaloGenericDetId(), denseIndex(), CaloTowerGeometry::newCell(), sizeForDenseIndexing(), and validDetId().
{ return isCalo() && subdetId() == CaloTowerDetId::SubdetId ; }
bool CaloGenericDetId::isCastor | ( | ) | const [inline] |
Definition at line 37 of file CaloGenericDetId.h.
References isCalo(), HcalCastorDetId::SubdetectorId, and DetId::subdetId().
Referenced by CastorGeometry::alignmentTransformIndexLocal(), CaloGenericDetId(), denseIndex(), CastorGeometry::newCell(), sizeForDenseIndexing(), and validDetId().
{ return isCalo() && subdetId() == HcalCastorDetId::SubdetectorId ; }
bool CaloGenericDetId::isEB | ( | ) | const [inline] |
Definition at line 31 of file CaloGenericDetId.h.
References isEcal(), EBDetId::Subdet, and DetId::subdetId().
Referenced by CaloGenericDetId(), denseIndex(), sizeForDenseIndexing(), and validDetId().
{ return isEcal() && subdetId() == EBDetId::Subdet ; }
bool CaloGenericDetId::isEcal | ( | ) | const [inline] |
Definition at line 30 of file CaloGenericDetId.h.
References DetId::det(), and DetId::Ecal.
Referenced by isEB(), isEE(), and isES().
{ return det() == DetId::Ecal ; }
bool CaloGenericDetId::isEE | ( | ) | const [inline] |
Definition at line 32 of file CaloGenericDetId.h.
References isEcal(), EEDetId::Subdet, and DetId::subdetId().
Referenced by CaloGenericDetId(), denseIndex(), sizeForDenseIndexing(), and validDetId().
{ return isEcal() && subdetId() == EEDetId::Subdet ; }
bool CaloGenericDetId::isES | ( | ) | const [inline] |
Definition at line 33 of file CaloGenericDetId.h.
References isEcal(), ESDetId::Subdet, and DetId::subdetId().
Referenced by EcalPreshowerGeometry::alignmentTransformIndexLocal(), CaloGenericDetId(), denseIndex(), sizeForDenseIndexing(), and validDetId().
{ return isEcal() && subdetId() == ESDetId::Subdet ; }
bool CaloGenericDetId::isHcal | ( | ) | const [inline] |
Definition at line 35 of file CaloGenericDetId.h.
References DetId::det(), and DetId::Hcal.
{ return det() == DetId::Hcal ; }
bool CaloGenericDetId::isZDC | ( | ) | const [inline] |
Definition at line 36 of file CaloGenericDetId.h.
References isCalo(), HcalZDCDetId::SubdetectorId, and DetId::subdetId().
Referenced by ZdcGeometry::alignmentTransformIndexLocal(), CaloGenericDetId(), denseIndex(), ZdcGeometry::newCell(), sizeForDenseIndexing(), and validDetId().
{ return isCalo() && subdetId() == HcalZDCDetId::SubdetectorId ; }
uint32_t CaloGenericDetId::sizeForDenseIndexing | ( | ) | const |
Definition at line 40 of file CaloGenericDetId.cc.
References dtNoiseDBValidation_cfg::cerr, DetId::det(), Exception, DetId::Hcal, isCaloTower(), isCastor(), isEB(), isEE(), isES(), isZDC(), EBDetId::kSizeForDenseIndexing, ESDetId::kSizeForDenseIndexing, CaloTowerDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, HcalCastorDetId::kSizeForDenseIndexing, and HcalZDCDetId::kSizeForDenseIndexing.
Referenced by CaloSubdetectorGeometry::sizeForDenseIndex().
{ if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; cms::Exception("No support"); } return ( isEB() ? EBDetId::kSizeForDenseIndexing : ( isEE() ? EEDetId::kSizeForDenseIndexing : ( isES() ? ESDetId::kSizeForDenseIndexing : ( isZDC() ? HcalZDCDetId::kSizeForDenseIndexing : ( isCastor() ? HcalCastorDetId::kSizeForDenseIndexing : ( isCaloTower() ? CaloTowerDetId::kSizeForDenseIndexing : 0 ) ) ) ) ) ) ; }
bool CaloGenericDetId::validDetId | ( | ) | const |
Definition at line 56 of file CaloGenericDetId.cc.
References dtNoiseDBValidation_cfg::cerr, HcalZDCDetId::channel(), DetId::det(), Exception, DetId::Hcal, EBDetId::ieta(), CaloTowerDetId::ieta(), EBDetId::iphi(), CaloTowerDetId::iphi(), isCaloTower(), isCastor(), isEB(), isEE(), isES(), isZDC(), EEDetId::ix(), EEDetId::iy(), HcalCastorDetId::module(), ESDetId::plane(), DetId::rawId(), HcalCastorDetId::section(), HcalZDCDetId::section(), HcalCastorDetId::sector(), ESDetId::six(), ESDetId::siy(), ESDetId::strip(), ESDetId::zside(), HcalCastorDetId::zside(), and EEDetId::zside().
{ bool returnValue ( false ) ; if( isEB() ) { const EBDetId ebid ( rawId() ) ; returnValue = EBDetId::validDetId( ebid.ieta(), ebid.iphi() ) ; } else { if( isEE() ) { const EEDetId eeid ( rawId() ) ; returnValue = EEDetId::validDetId( eeid.ix(), eeid.iy(), eeid.zside() ) ; } else { if( isES() ) { const ESDetId esid ( rawId() ) ; returnValue = ESDetId::validDetId( esid.strip(), esid.six(), esid.siy(), esid.plane(), esid.zside() ) ; } else { if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; cms::Exception("No support"); returnValue = false; } else { if( isZDC() ) { const HcalZDCDetId zdid ( rawId() ) ; returnValue = HcalZDCDetId::validDetId( zdid.section(), zdid.channel() ) ; } else { if( isCastor() ) { const HcalCastorDetId zdid ( rawId() ) ; returnValue = HcalCastorDetId::validDetId( zdid.section(), zdid.zside()>0, zdid.sector(), zdid.module() ) ; } else { if( isCaloTower() ) { const CaloTowerDetId ctid ( rawId() ) ; returnValue = CaloTowerDetId::validDetId( ctid.ieta(), ctid.iphi() ) ; } } } } } } } return returnValue ; }