18 throw cms::Exception(
"InvalidDetId") <<
"EcalScDetId: Cannot create object. Indexes out of bounds \n" 19 <<
"x = " << ix <<
" y = " << iy <<
" z = " << iz;
21 const int scBit = 1 << 15;
23 id_ |= (iy & 0x7f) | ((ix & 0x7f) << 7) | ((iz > 0) ? (1 << 14) : (0)) | scBit;
42 const int xMiddle =
IX_MAX / 2;
43 const int yMiddle =
IY_MAX / 2;
60 static const char endcapMap[401] = {
65 " XXXXXXXXXXXXXXXXXX " 66 " XXXXXXXXXXXXXXXXXX " 67 " XXXXXXXXXXXXXXXXXX " 68 "XXXXXXXXXXXXXXXXXXXX" 73 "XXXXXXXXXXXXXXXXXXXX" 74 " XXXXXXXXXXXXXXXXXX " 75 " XXXXXXXXXXXXXXXXXX " 76 " XXXXXXXXXXXXXXXXXX " 82 return abs(iZ) == 1 && endcapMap[iX - 1 + (iY - 1) * 20] !=
' ';
86 return s <<
"(EE iz " << ((
id.zside() > 0) ? (
"+ ") : (
"- ")) <<
" ix " <<
id.ix() <<
" , iy " <<
id.iy() <<
')';
94 for (
int iZ = -1; iZ <= +1; iZ += 2) {
static bool validDetId(int ix, int iy, int iz)
EcalScDetId & operator=(const DetId &id)
constexpr bool null() const
is this a null id ?
constexpr uint32_t rawId() const
get the raw id
static EcalScDetId hashedIndex2DetId[kSizeForDenseIndexing]
static std::once_flag initializedFlag
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
static const int nEndcaps
std::ostream & operator<<(std::ostream &s, const EcalScDetId &id)
static void checkHashedIndexMap()
constexpr Detector det() const
get the detector field from this detid
static short xyz2HashedIndex[IX_MAX][IY_MAX][nEndcaps]