14 crystal_ieta = index1;
15 crystal_iphi = index2;
25 crystal_ieta = -(i + 1);
29 throw cms::Exception(
"InvalidDetId") <<
"EBDetId: Cannot create object. Unknown mode for (int, int) constructor.";
34 throw cms::Exception(
"InvalidDetId") <<
"EBDetId: Cannot create object. Indexes out of bounds \n"
35 <<
"eta = " << crystal_ieta <<
" phi = " << crystal_iphi;
37 id_ |= ((crystal_ieta > 0) ? (0x10000 | (crystal_ieta << 9)) : ((-crystal_ieta) << 9)) | (crystal_iphi & 0x1FF);
44 (
positiveZ() ? (kCrystalsInPhi - ((
iphi() - 1) % kCrystalsInPhi)) : ((
iphi() - 1) % kCrystalsInPhi + 1));
51 int newEta =
ieta() + nrStepsEta;
52 if (newEta *
ieta() <= 0) {
55 }
else if (
ieta() > 0) {
59 int newPhi =
iphi() + nrStepsPhi;
73 int newEta =
ieta() * -1;
101 int iphi_simple = ((
iphi() - 1) / 5) + 1;
103 return ((iphi_simple <= 0) ? (iphi_simple + 72) : (iphi_simple));
109 int ieta =
id.ietaSM();
114 int iphi =
id.iphiSM();
115 return iphi == 1 || iphi == 20;
131 while (result <= -PI)
147 return s <<
"(EB ieta " <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" ; ism " <<
id.ism() <<
" , ic " <<
id.ic() <<
')';
static bool isNextToEtaBoundary(EBDetId id)
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
constexpr uint32_t rawId() const
get the raw id
EBDetId switchZSide() const
static const int kCrystalsPerSM
std::ostream & operator<<(std::ostream &out, const ALILine &li)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int ism() const
get the ECAL/SM id
static bool validDetId(int i, int j)
check if a valid index combination
int iphi() const
get the crystal iphi
static const int kCrystalsInPhi
static int distanceEta(const EBDetId &a, const EBDetId &b)
static bool isNextToBoundary(EBDetId id)
static int distancePhi(const EBDetId &a, const EBDetId &b)
static bool isNextToPhiBoundary(EBDetId id)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
static const int kModuleBoundaries[4]
static const float crystalUnitToEta
EBDetId offsetBy(int nrStepsEta, int nrStepsPhi) const
int ieta() const
get the crystal ieta
static const int ETAPHIMODE
int ic() const
get ECAL/crystal number inside SM
static const int SMCRYSTALMODE
int ietaAbs() const
get the absolute value of the crystal ieta
constexpr DetId()
Create an empty or null id (also for persistence)
constexpr Detector det() const
get the detector field from this detid