![]() |
![]() |
#include <DataFormats/EcalDetId/interface/EcalPnDiodeDetId.h>
Public Member Functions | |
EcalPnDiodeDetId (const DetId &id) | |
Constructor from a generic cell id. | |
EcalPnDiodeDetId (int EcalSubDetectorId, int DCCId, int PnId) | |
Constructor from signed EcalSubDetectorId, DCCId, PnId. | |
EcalPnDiodeDetId (uint32_t rawid) | |
Constructor from a raw value. | |
EcalPnDiodeDetId () | |
Constructor of a null id. | |
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) |
Assignment from a generic cell 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 |
[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 | ) |
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.
00011 : DetId(Ecal,EcalLaserPnDiode) { 00012 if ( (DCCId < MIN_DCCID) || (DCCId > MAX_DCCID) || 00013 (PnId < MIN_PNID) || (PnId > MAX_PNID) || 00014 (EcalSubDetectorId != EcalBarrel && EcalSubDetectorId != EcalEndcap)) 00015 throw cms::Exception("InvalidDetId") << "EcalPnDiodeDetId: Cannot create object. Indexes out of bounds."; 00016 id_|= ((((EcalSubDetectorId==EcalBarrel)?(0):(1))<<11) | 00017 ((DCCId&0x7F)<<4) | 00018 (PnId&0xF)); 00019 }
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().
00021 { 00022 if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) { 00023 throw cms::Exception("InvalidDetId"); 00024 } 00025 id_=gen.rawId(); 00026 }
int EcalPnDiodeDetId::hashedIndex | ( | ) | const |
get a compact index for arrays [TODO: NEEDS WORK]
Definition at line 36 of file EcalPnDiodeDetId.cc.
References Exception.
00037 { 00038 throw cms::Exception("MethodNotImplemented"); 00039 }
int EcalPnDiodeDetId::iDCCId | ( | ) | const [inline] |
get the DCCId
Definition at line 47 of file EcalPnDiodeDetId.h.
References DetId::id_.
Referenced by EcalDigiDisplay::readPNDigis().
00047 { 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_.
00045 { return (id_ & 0x800 ) ? (EcalEndcap):(EcalBarrel); }
int EcalPnDiodeDetId::iPnId | ( | ) | const [inline] |
get the PnId
Definition at line 49 of file EcalPnDiodeDetId.h.
References DetId::id_.
00049 { 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().
00028 { 00029 if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) { 00030 throw cms::Exception("InvalidDetId"); 00031 } 00032 id_=gen.rawId(); 00033 return *this; 00034 }
const int EcalPnDiodeDetId::MAX_DCCID = 54 [static] |
const int EcalPnDiodeDetId::MAX_PNID = 15 [static] |
const int EcalPnDiodeDetId::MIN_DCCID = 1 [static] |
const int EcalPnDiodeDetId::MIN_PNID = 1 [static] |