19 <<
"EcalTriggerTowerDetId: Cannot create object. SUBDETDCCTTMODE not yet implemented.";
21 throw cms::Exception(
"InvalidDetId") <<
"EcalTriggerTowerDetId: Cannot create object. Unknown mode for (int, "
22 "EcalSubdetector, int, int) constructor.";
24 if (tower_i >
MAX_I || tower_i < MIN_I || tower_j >
MAX_J || tower_j <
MIN_J)
25 throw cms::Exception(
"InvalidDetId") <<
"EcalTriggerTowerDetId: Cannot create object. Indexes out of bounds.";
27 id_ |= ((zside > 0) ? (0x8000) : (0x0)) | ((subDet ==
EcalBarrel) ? (0x4000) : (0x0)) | (tower_i << 7) |
50 int iphi_simple =
iphi() + 2;
52 iphi_simple = iphi_simple % 72;
58 throw cms::Exception(
"MethodNotImplemented") <<
"EcalTriggerTowerDetId: iDCC not yet implemented";
65 int iphi_simple =
iphi() + 2;
67 iphi_simple = iphi_simple % 72;
76 throw cms::Exception(
"MethodNotImplemented") <<
"EcalTriggerTowerDetId: iTT not yet implemented";
83 throw cms::Exception(
"MethodNotApplicable") <<
"EcalTriggerTowerDetId: iquadrant not applicable";
90 (27 > i || ((0 > iz && 0 == j % 2) || (0 < iz && 1 == j % 2))))));
94 const unsigned int iea(
ietaAbs());
95 const unsigned int iph(
iphi());
113 const unsigned int idc(di / kEBTowersPerSM);
140 return s <<
"(EcalTT subDet " << ((
id.subDet() ==
EcalBarrel) ? (
"Barrel") : (
"Endcap")) <<
" iz "
141 << ((
id.zside() > 0) ? (
"+ ") : (
"- ")) <<
" ieta " <<
id.ietaAbs() <<
" iphi " <<
id.iphi() <<
')';
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
uint16_t *__restrict__ id
constexpr bool null() const
is this a null id ?
static const int SUBDETIJMODE
constexpr uint32_t rawId() const
get the raw id
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
static const int kEBTowersInPhi
std::ostream & operator<<(std::ostream &out, const ALILine &li)
int iDCC() const
get the ECAL DCC id - in the barrrel ism == iDCC
int zside() const
get the z-side of the tower (1/-1)
static const int kEETowersInPhiPerQuadrant
int ietaAbs() const
get the absolute value of the tower ieta
EcalTrigTowerDetId & operator=(const DetId &id)
static const int kEBTowersInEta
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)
int iphi() const
get the tower iphi
static const int SUBDETDCCTTMODE
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
int iTT() const
sequential index within one DCC
static const int kEBTowersPerSM
constexpr Detector det() const
get the detector field from this detid