1 #ifndef DATAFORMATS_HCALDETID_HCALDETID_H 2 #define DATAFORMATS_HCALDETID_HCALDETID_H 1 53 ((tower_ieta > 0) ? (kHcalZsideMask2 | (tower_ieta <<
kHcalEtaOffset2)) : ((-tower_ieta) << kHcalEtaOffset2)) |
54 (tower_iphi & kHcalPhiMask2);
63 <<
"Cannot initialize HcalDetId from " << std::hex << gen.
rawId() <<
std::dec;
95 uint32_t rawid = gen.
rawId();
98 int zsid{0},
eta{0},
phi{0}, dep{0};
106 uint32_t rawid = gen.
rawId();
109 int zsid{0},
eta{0},
phi{0}, dep{0};
117 uint32_t rawid = gen.
rawId();
118 if ((rawid & kHcalIdFormat2) == (
id_ & kHcalIdFormat2)) {
121 int zsid{0},
eta{0},
phi{0}, dep{0};
131 (
phi & kHcalPhiMask2));
133 return (
id_ < rawid);
143 return (
id_ & kHcalZsideMask1) ? (1) : (-1);
145 return (
id_ & kHcalZsideMask2) ? (1) : (-1);
182 return (
id_ | kHcalDepthSet1);
184 return (
id_ | kHcalDepthSet2);
201 uint32_t rawid(inpid);
202 if ((rawid & kHcalIdFormat2) == 0) {
203 int zsid{0},
eta{0},
phi{0}, dep{0};
208 (
phi & kHcalPhiMask2));
214 uint32_t rawid = gen.
rawId();
217 int zsid{0},
eta{0},
phi{0}, dep{0};
218 if ((
id_ & kHcalIdMask) != (rawid & kHcalIdMask))
230 int zsid{0},
eta{0},
phi{0}, dep{0};
236 (
phi & kHcalPhiMask2);
245 int zsid{0},
eta{0},
phi{0}, dep{0};
251 (
phi & kHcalPhiMask2);
262 int simple_iphi = ((
iphi() - 1) * 5) + 1;
264 return ((simple_iphi > 360) ? (simple_iphi - 360) : (simple_iphi));
268 int simple_iphi = ((
iphi() - 1) * 5) + 5;
270 return ((simple_iphi > 360) ? (simple_iphi - 360) : (simple_iphi));
279 if ((rawid & kHcalIdFormat2) == 0) {
static const HcalDetId Undefined
static uint32_t kHcalDepthSet1
HcalDetId(HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
HcalSubdetector subdet() const
get the subdetector
static int32_t newForm(const uint32_t &inpid)
static uint32_t kHcalEtaMask2
HcalDetId & operator=(const DetId &gen)
constexpr bool null() const
is this a null id ?
int zside() const
get the z-side of the cell (1/-1)
static uint32_t kHcalZsideMask1
int crystal_iphi_low() const
get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
static uint32_t kHcalEtaOffset1
constexpr uint32_t rawId() const
get the raw id
static uint32_t kHcalIdMask
HcalDetId(const DetId &gen)
static const int kSubdetOffset
uint32_t maskDepth() const
get the tower depth
static uint32_t kHcalDepthSet2
int hfdepth() const
get full depth information for HF
bool operator!=(DetId gen) const
bool operator==(DetId gen) const
bool sameBaseDetId(const DetId &gen) const
base detId for HF dual channels
int depth() const
get the tower depth
static uint32_t kHcalDepthOffset1
HcalDetId(uint32_t rawid)
static const int kSubdetMask
int crystal_ieta_low() const
get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
std::ostream & operator<<(std::ostream &, const HcalDetId &id)
static uint32_t kHcalDepthMask2
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
static uint32_t kHcalPhiMask1
int ieta() const
get the cell ieta
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
HcalDetId baseDetId() const
static uint32_t kHcalEtaMask1
int ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the cell iphi
uint32_t otherForm() const
change format
static uint32_t kHcalPhiMask2
static const int kDetMask
int crystal_ieta_high() const
get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
static uint32_t kHcalEtaOffset2
static uint32_t kHcalDepthMask1
static uint32_t kHcalIdFormat2
static uint32_t kHcalZsideMask2
static const int kDetOffset
void newFromOld(const uint32_t &rawid)
bool operator<(DetId gen) const
int crystal_iphi_high() const
get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
HcalDetId secondAnodeId() const
second PMT anode detId for HF dual channels
static uint32_t kHcalDepthOffset2
constexpr Detector det() const
get the detector field from this detid