1 #ifndef DATAFORMATS_HCALDETID_HCALDETID_H 2 #define DATAFORMATS_HCALDETID_HCALDETID_H 1 56 ((tower_ieta>0)?(kHcalZsideMask2|(tower_ieta<<
kHcalEtaOffset2)):((-tower_ieta)<<kHcalEtaOffset2)) |
57 (tower_iphi&kHcalPhiMask2);
103 uint32_t rawid = gen.
rawId();
104 if (rawid ==
id_)
return true;
105 int zsid{0},
eta{0},
phi{0}, dep{0};
112 uint32_t rawid = gen.
rawId();
113 if (rawid ==
id_)
return false;
114 int zsid{0},
eta{0},
phi{0}, dep{0};
121 uint32_t rawid = gen.
rawId();
122 if ((rawid&kHcalIdFormat2)==(
id_&kHcalIdFormat2)) {
125 int zsid{0},
eta{0},
phi{0}, dep{0};
147 else return (
id_&kHcalZsideMask2)?(1):(-1);
170 if (dep > 2) dep -= 2;
177 else return (
id_|kHcalDepthSet2);
198 uint32_t rawid(inpid);
199 if ((rawid&kHcalIdFormat2)==0) {
200 int zsid{0},
eta{0},
phi{0}, dep{0};
211 uint32_t rawid = gen.
rawId();
212 if (rawid ==
id_)
return true;
213 int zsid{0},
eta{0},
phi{0}, dep{0};
214 if ((
id_&kHcalIdMask) != (rawid&kHcalIdMask))
return false;
225 int zsid{0},
eta{0},
phi{0}, dep{0};
240 int zsid{0},
eta{0},
phi{0}, dep{0};
257 int simple_iphi=((
iphi()-1)*5)+1;
259 return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
263 int simple_iphi=((
iphi()-1)*5)+5;
265 return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
278 if ((rawid&kHcalIdFormat2)==0) {
static const HcalDetId Undefined
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)
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)
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 const int kHcalDepthMask1
constexpr uint32_t rawId() const
get the raw id
static const int kHcalDepthSet2
static const int kHcalDepthSet1
HcalDetId(const DetId &gen)
static const int kSubdetOffset
uint32_t maskDepth() const
get the tower depth
int hfdepth() const
get full depth information for HF
bool operator!=(DetId gen) const
static const int kHcalDepthMask2
bool operator==(DetId gen) const
bool sameBaseDetId(const DetId &gen) const
base detId for HF dual channels
int depth() const
get the tower depth
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 void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
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 const int kHcalDepthOffset1
static const int kHcalIdMask
int ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the cell iphi
static const int kHcalPhiMask2
uint32_t otherForm() const
change format
static const int kHcalIdFormat2
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 const int kHcalZsideMask1
static const int kHcalEtaOffset2
static const int kDetOffset
void newFromOld(const uint32_t &rawid)
static const int kHcalZsideMask2
static const int kHcalEtaMask2
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 const int kHcalEtaMask1
static const int kHcalPhiMask1
static const int kHcalDepthOffset2
static const int kHcalEtaOffset1
constexpr Detector det() const
get the detector field from this detid