1 #ifndef DATAFORMATS_DETID_H 2 #define DATAFORMATS_DETID_H 35 :
id_(((det&kDetMask)<<kDetOffset)|((subdet&kSubdetMask)<<kSubdetOffset))
43 0 : ((
id_>>kSubdetOffset)&kSubdetMask));
83 return std::hash<uint32_t>()(
id.
rawId());
constexpr bool operator==(DetId id) const
equality
constexpr bool null() const
is this a null id ?
constexpr uint32_t rawId() const
get the raw id
constexpr bool operator<(DetId id) const
comparison
static const int kSubdetOffset
static const int kSubdetMask
constexpr DetId(Detector det, int subdet)
Create an id, filling the detector and subdetector fields as specified.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
constexpr bool operator!=(DetId id) const
inequality
constexpr uint32_t operator()() const
result_type operator()(argument_type const &id) const noexcept
constexpr DetId(uint32_t id)
Create an id from a raw number.
static const int kDetMask
static const int kDetOffset
constexpr DetId()
Create an empty or null id (also for persistence)
constexpr Detector det() const
get the detector field from this detid