#include <EcalPnDiodeDetId.h>
Public Member Functions | |
EcalPnDiodeDetId () | |
EcalPnDiodeDetId (uint32_t rawid) | |
EcalPnDiodeDetId (const DetId &id) | |
EcalPnDiodeDetId (int EcalSubDetectorId, int DCCId, int PnId) | |
Constructor from signed EcalSubDetectorId, DCCId, PnId. | |
int | hashedIndex () const |
get a compact index for arrays [TODO: NEEDS WORK] | |
int | iDCCId () const |
get the DCCId | |
int | iEcalSubDetectorId () const |
get EcalSubDetectorId | |
int | iPnId () const |
get the PnId | |
EcalPnDiodeDetId & | operator= (const DetId &id) |
Static Public Attributes | |
static const int | MAX_DCCID = 54 |
static const int | MAX_PNID = 15 |
static const int | MIN_DCCID = 1 |
static const int | MIN_PNID = 1 |
DetId for an Calo Trigger tower Packing:
[31:28] Global det == ECAL [27:25] ECAL det == EcalLaserPnDiode [24:12] Not Used [10] SubDetectorId: EB (1) ,EE (2) [9:4] DCCId (relative to SubDetector. In barrel it is the SupermoduleId from 1-36) [3:0] PnId (In barrel from 1-10 according CMS IN-2005/021)
Definition at line 25 of file EcalPnDiodeDetId.h.
EcalPnDiodeDetId::EcalPnDiodeDetId | ( | ) |
EcalPnDiodeDetId::EcalPnDiodeDetId | ( | uint32_t | rawid | ) |
EcalPnDiodeDetId::EcalPnDiodeDetId | ( | int | EcalSubDetectorId, |
int | DCCId, | ||
int | PnId | ||
) |
Constructor from signed EcalSubDetectorId, DCCId, PnId.
Definition at line 11 of file EcalPnDiodeDetId.cc.
References EcalBarrel, EcalEndcap, Exception, DetId::id_, MAX_DCCID, MAX_PNID, MIN_DCCID, and MIN_PNID.
: DetId(Ecal,EcalLaserPnDiode) { if ( (DCCId < MIN_DCCID) || (DCCId > MAX_DCCID) || (PnId < MIN_PNID) || (PnId > MAX_PNID) || (EcalSubDetectorId != EcalBarrel && EcalSubDetectorId != EcalEndcap)) throw cms::Exception("InvalidDetId") << "EcalPnDiodeDetId: Cannot create object. Indexes out of bounds."; id_|= ((((EcalSubDetectorId==EcalBarrel)?(0):(1))<<11) | ((DCCId&0x7F)<<4) | (PnId&0xF)); }
EcalPnDiodeDetId::EcalPnDiodeDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id
Definition at line 21 of file EcalPnDiodeDetId.cc.
References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); }
int EcalPnDiodeDetId::hashedIndex | ( | ) | const |
get a compact index for arrays [TODO: NEEDS WORK]
Definition at line 36 of file EcalPnDiodeDetId.cc.
References Exception.
{ throw cms::Exception("MethodNotImplemented"); }
int EcalPnDiodeDetId::iDCCId | ( | ) | const [inline] |
get the DCCId
Definition at line 47 of file EcalPnDiodeDetId.h.
References DetId::id_.
Referenced by EcalTestPulseAnalyzer::analyze(), EcalLaserAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), and EcalDigiDisplay::readPNDigis().
{ return (id_>>4) & 0x7F; }
int EcalPnDiodeDetId::iEcalSubDetectorId | ( | ) | const [inline] |
get EcalSubDetectorId
Definition at line 45 of file EcalPnDiodeDetId.h.
References EcalBarrel, EcalEndcap, and DetId::id_.
{ return (id_ & 0x800 ) ? (EcalEndcap):(EcalBarrel); }
int EcalPnDiodeDetId::iPnId | ( | ) | const [inline] |
get the PnId
Definition at line 49 of file EcalPnDiodeDetId.h.
References DetId::id_.
Referenced by EcalLaserAnalyzer::analyze(), and EcalLaserAnalyzer2::analyze().
{ return id_&0xF; }
EcalPnDiodeDetId & EcalPnDiodeDetId::operator= | ( | const DetId & | id | ) |
Assignment from a generic cell id
Definition at line 28 of file EcalPnDiodeDetId.cc.
References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); return *this; }
const int EcalPnDiodeDetId::MAX_DCCID = 54 [static] |
Definition at line 39 of file EcalPnDiodeDetId.h.
Referenced by EcalPnDiodeDetId().
const int EcalPnDiodeDetId::MAX_PNID = 15 [static] |
Definition at line 41 of file EcalPnDiodeDetId.h.
Referenced by EcalPnDiodeDetId().
const int EcalPnDiodeDetId::MIN_DCCID = 1 [static] |
Definition at line 40 of file EcalPnDiodeDetId.h.
Referenced by EcalPnDiodeDetId().
const int EcalPnDiodeDetId::MIN_PNID = 1 [static] |
Definition at line 42 of file EcalPnDiodeDetId.h.
Referenced by EcalPnDiodeDetId().