6 #ifndef DataFormats_CTPPSDetId_CTPPSDiamondDetId 7 #define DataFormats_CTPPSDetId_CTPPSDiamondDetId 39 static bool check(
unsigned int raw) {
45 uint32_t
plane()
const {
return ((
id_ >> startPlaneBit) & maskPlane); }
52 uint32_t
channel()
const {
return ((
id_ >> startDetBit) & maskChannel); }
80 name += std::to_string(
plane());
98 name += std::to_string(
channel());
static const uint32_t lowMaskChannel
std::ostream & operator<<(std::ostream &os, const CTPPSDiamondDetId &id)
void setPlane(uint32_t channel)
CTPPSDiamondDetId(uint32_t id)
Construct from a raw id.
NameFlag
type of name returned by *Name functions
void setChannel(uint32_t channel)
void channelName(std::string &name, NameFlag flag=nFull) const
constexpr uint32_t rawId() const
get the raw id
static const uint32_t maxChannel
static const int kSubdetOffset
static const uint32_t maskChannel
void rpName(std::string &name, NameFlag flag=nFull) const
CTPPSDiamondDetId getPlaneId() const
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
static const uint32_t maxPlane
static const uint32_t startPlaneBit
void planeName(std::string &name, NameFlag flag=nFull) const
Base class for CTPPS detector IDs.
static const uint32_t lowMaskPlane
CTPPSDiamondDetId(const CTPPSDetId &id)
static const int kDetOffset
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
static const uint32_t startDetBit
static const uint32_t maskPlane