#include <HcalZDCDetId.h>
Public Types | |
enum | { kSizeForDenseIndexing = 2*kDepTot } |
enum | Section { Unknown = 0, EM = 1, HAD = 2, LUM = 3 } |
Public Member Functions | |
int | channel () const |
get the channel | |
uint32_t | denseIndex () const |
int | depth () const |
get the depth (1 for EM, channel + 1 for HAD, not sure yet for LUM, leave as default) | |
HcalZDCDetId (const DetId &id) | |
HcalZDCDetId (uint32_t rawid) | |
HcalZDCDetId () | |
HcalZDCDetId (Section section, bool true_for_positive_eta, int channel) | |
HcalZDCDetId & | operator= (const DetId &id) |
Section | section () const |
get the section | |
int | zside () const |
get the z-side of the cell (1/-1) | |
Static Public Member Functions | |
static HcalZDCDetId | detIdFromDenseIndex (uint32_t di) |
static bool | validDenseIndex (uint32_t di) |
static bool | validDetId (Section se, int dp) |
Static Public Attributes | |
static const int | SubdetectorId = 2 |
Private Types | |
enum | { kDepEM = 5, kDepHAD = 4, kDepLUM = 2, kDepTot = kDepEM + kDepHAD + kDepLUM } |
Contents of the HcalZDCDetId : [6] Z position (true for positive) [5:4] Section (EM/HAD/Lumi) [3:0] Channel
Definition at line 18 of file HcalZDCDetId.h.
anonymous enum [private] |
anonymous enum |
Definition at line 61 of file HcalZDCDetId.h.
{ kSizeForDenseIndexing = 2*kDepTot } ;
HcalZDCDetId::HcalZDCDetId | ( | ) |
Create a null cellid
Definition at line 4 of file HcalZDCDetId.cc.
Referenced by detIdFromDenseIndex().
: DetId() { }
HcalZDCDetId::HcalZDCDetId | ( | uint32_t | rawid | ) |
Create cellid from raw id (0=invalid tower id)
Definition at line 8 of file HcalZDCDetId.cc.
: DetId(rawid) { }
HcalZDCDetId::HcalZDCDetId | ( | Section | section, |
bool | true_for_positive_eta, | ||
int | channel | ||
) |
Constructor from section, eta sign, and channel
Definition at line 11 of file HcalZDCDetId.cc.
References DetId::id_.
: DetId(DetId::Calo,SubdetectorId) { id_|=(section&0x3)<<4; if (true_for_positive_eta) id_|=0x40; id_|=channel&0xF; }
HcalZDCDetId::HcalZDCDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id
Definition at line 17 of file HcalZDCDetId.cc.
References DetId::Calo, DetId::det(), Exception, DetId::id_, DetId::null(), DetId::rawId(), SubdetectorId, and DetId::subdetId().
{ if (!gen.null() && (gen.det()!=Calo || gen.subdetId()!=SubdetectorId)) { throw cms::Exception("Invalid DetId") << "Cannot initialize ZDCDetId from " << std::hex << gen.rawId() << std::dec; } id_=gen.rawId(); }
int HcalZDCDetId::channel | ( | ) | const [inline] |
get the channel
Definition at line 42 of file HcalZDCDetId.h.
References DetId::id_.
Referenced by ZdcTBAnalysis::analyze(), denseIndex(), HcalGenericDetId::hashedId(), HcalText2DetIdConverter::init(), ZdcTopology::longitudinal(), HcalHardcodeGeometryLoader::makeCell(), ZDCLogicalMapEntry::printLMapLine(), ZdcTopology::transverse(), and CaloGenericDetId::validDetId().
{ return id_&0xF; }
uint32_t HcalZDCDetId::denseIndex | ( | ) | const |
int HcalZDCDetId::depth | ( | ) | const [inline] |
get the depth (1 for EM, channel + 1 for HAD, not sure yet for LUM, leave as default)
Definition at line 40 of file HcalZDCDetId.h.
References DetId::id_.
Referenced by ZdcTBAnalysis::analyze(), and ZDCLogicalMapEntry::printLMapLine().
HcalZDCDetId HcalZDCDetId::detIdFromDenseIndex | ( | uint32_t | di | ) | [static] |
Definition at line 42 of file HcalZDCDetId.cc.
References EM, HAD, HcalZDCDetId(), recoMuon::in, kDepEM, kDepHAD, kDepTot, LUM, and validDenseIndex().
Referenced by CaloGenericDetId::CaloGenericDetId().
{ if( validDenseIndex( di ) ) { const bool lz ( di >= kDepTot ) ; const uint32_t in ( di%kDepTot ) ; const Section se ( in<kDepEM ? EM : ( in<kDepEM+kDepHAD ? HAD : LUM ) ) ; const uint32_t dp ( EM == se ? in+1 : ( HAD == se ? in - kDepEM + 1 : in - kDepEM - kDepHAD + 1 ) ) ; return HcalZDCDetId( se, lz, dp ) ; } else { return HcalZDCDetId() ; } }
HcalZDCDetId & HcalZDCDetId::operator= | ( | const DetId & | id | ) |
Assignment from a generic cell id
Definition at line 24 of file HcalZDCDetId.cc.
References DetId::Calo, DetId::det(), Exception, DetId::id_, DetId::null(), DetId::rawId(), SubdetectorId, and DetId::subdetId().
{ if (!gen.null() && (gen.det()!=Calo || gen.subdetId()!=SubdetectorId)) { throw cms::Exception("Invalid DetId") << "Cannot assign ZDCDetId from " << std::hex << gen.rawId() << std::dec; } id_=gen.rawId(); return *this; }
Section HcalZDCDetId::section | ( | ) | const [inline] |
get the section
Definition at line 38 of file HcalZDCDetId.h.
References DetId::id_.
Referenced by ZdcTBAnalysis::analyze(), denseIndex(), HcalGenericDetId::hashedId(), HcalText2DetIdConverter::init(), ZdcTopology::longitudinal(), HcalHardcodeGeometryLoader::makeCell(), ZDCLogicalMapEntry::printLMapLine(), ZdcTopology::transverse(), and CaloGenericDetId::validDetId().
static bool HcalZDCDetId::validDenseIndex | ( | uint32_t | di | ) | [inline, static] |
Definition at line 46 of file HcalZDCDetId.h.
References kSizeForDenseIndexing.
Referenced by detIdFromDenseIndex().
{ return ( di < kSizeForDenseIndexing ) ; }
bool HcalZDCDetId::validDetId | ( | Section | se, |
int | dp | ||
) | [static] |
int HcalZDCDetId::zside | ( | ) | const [inline] |
get the z-side of the cell (1/-1)
Definition at line 36 of file HcalZDCDetId.h.
References DetId::id_.
Referenced by ZdcGeometry::alignmentTransformIndexLocal(), ZdcTBAnalysis::analyze(), Digi2Raw2Digi::compare(), denseIndex(), reco::CentralityProducer::filter(), HcalGenericDetId::hashedId(), HcalText2DetIdConverter::init(), ZdcTopology::longitudinal(), HcalHardcodeGeometryLoader::makeCell(), ZDCLogicalMapEntry::printLMapLine(), and ZdcTopology::transverse().
{ return (id_&0x40)?(1):(-1); }
const int HcalZDCDetId::SubdetectorId = 2 [static] |
Definition at line 22 of file HcalZDCDetId.h.
Referenced by ZDCHitFilter::accepts(), ValidateGeometry::analyze(), HcalHitCorrection::delay(), HcalTimeSlewSim::delay(), HcalPacker::findSamples(), HcalGenericDetId::genericSubdet(), HcalHitReconstructor::HcalHitReconstructor(), HcalZDCDetId(), CaloGenericDetId::isZDC(), ZdcHardcodeGeometryLoader::load(), operator=(), HcalZDCMonitor::processEvent(), ZdcHitReconstructor::produce(), ZdcSimpleReconstructor::produce(), CaloGeometryBuilder::produceAligned(), HcalHitCorrection::timeOfFlight(), HcalUnpacker::unpack(), HcalDigitizer::updateGeometry(), ZdcHitReconstructor::ZdcHitReconstructor(), and ZdcSimpleReconstructor::ZdcSimpleReconstructor().