7#ifndef DETDESCR_ECALABSTRACTID_H_
8#define DETDESCR_ECALABSTRACTID_H_
11#include "DetDescr/DetectorID.h"
30 static const RawValue CELL_TYPE_MASK{
32 static const RawValue CELL_TYPE_SHIFT{23};
33 static const RawValue ECAL_PAYLOAD_MASK{0x007FFFFF};
44 SUBDETECTORID_TEST(
"EcalAbstractID", SD_ECAL);
51 SUBDETECTORID_TEST(
"EcalAbstractID", SD_ECAL);
67 int cell_type()
const {
return (
id_ >> CELL_TYPE_SHIFT) & CELL_TYPE_MASK; }
Defines a 32-bit packed ID for uniquely identifying hits and detector components.
RawValue id_
The raw, packed value of the ID.
Parent of precision and trigger EcalIDs.
EcalAbstractID(RawValue rawid)
Create from raw number.
int payload() const
Get the value of the payload field from the ID.
EcalAbstractID()
Empty ECAL id (but not null!)
int cell_type() const
Get the value of the cell field from the ID.
EcalAbstractID(unsigned int cell_type, unsigned int payload)
Create from pieces.
EcalAbstractID(const DetectorID id)
Create from a DetectorID, but check.