1 #ifndef ECALDETID_EBDETID_H 2 #define ECALDETID_EBDETID_H 28 id_ |= ((crystal_ieta > 0) ? (0x10000 | (crystal_ieta << 9)) : ((-crystal_ieta) << 9)) | (crystal_iphi & 0x1FF);
45 int zside()
const {
return (
id_ & 0x10000) ? (1) : (-1); }
66 return ii < 0 ? 1 : (
ii / 20 + 2);
static const int MIN_IPHI
static bool isNextToEtaBoundary(EBDetId id)
int ietaAbs() const
get the absolute value of the crystal ieta
static EcalSubdetector subdet()
get the subdetector .i.e EcalBarrel (what else?)
static const int kCrystalsInEta
static const int MAX_HASH
int iphi() const
get the crystal iphi
int numberByEtaPhi() const
static const int MIN_IETA
range constants
static const int kTowersInPhi
int im() const
get the number of module inside the SM (1-4)
static const int kCrystalsPerSM
uint32_t denseIndex() const
static bool validDetId(int i, int j)
check if a valid index combination
int ieta() const
get the crystal ieta
static EBDetId detIdFromDenseIndex(uint32_t di)
int tower_ieta() const
get the HCAL/trigger ieta of this crystal
static const int kCrystalsInPhi
static int distanceEta(const EBDetId &a, const EBDetId &b)
static bool isNextToBoundary(EBDetId id)
static const int MIN_HASH
static int distancePhi(const EBDetId &a, const EBDetId &b)
int ic() const
get ECAL/crystal number inside SM
static bool isNextToPhiBoundary(EBDetId id)
static const int kModulesPerSM
int ism() const
get the ECAL/SM id
Abs< T >::type abs(const T &t)
static const int kModuleBoundaries[4]
static const float crystalUnitToEta
int zside() const
get the z-side of the crystal (1/-1)
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
EBDetId(int crystal_ieta, int crystal_iphi)
static const int ETAPHIMODE
EBDetId switchZSide() const
std::ostream & operator<<(std::ostream &s, const EBDetId &id)
static const int MAX_IPHI
static const int MAX_IETA
static const int kChannelsPerCard
static bool validHashIndex(int i)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
EBDetId offsetBy(int nrStepsEta, int nrStepsPhi) const
int hashedIndex() const
get a compact index for arrays
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
int iphiSM() const
get the crystal iphi (1-20)
EBDetId & operator=(const DetId &id)
static const int SMCRYSTALMODE
int ietaSM() const
get the crystal ieta in the SM convention (1-85)
static bool validDenseIndex(uint32_t din)