|
|
Go to the documentation of this file.
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);
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();
119 if (
a.ieta() *
b.ieta() > 0)
120 return abs(
a.ieta() -
b.ieta());
122 return abs(
a.ieta() -
b.ieta()) - 1;
147 return s <<
"(EB ieta " <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" ; ism " <<
id.ism() <<
" , ic " <<
id.ic() <<
')';
static const int kCrystalsInPhi
static const float crystalUnitToEta
static bool isNextToEtaBoundary(EBDetId id)
static const int kCrystalsPerSM
int ieta() const
get the crystal ieta
static bool isNextToBoundary(EBDetId id)
int ic() const
get ECAL/crystal number inside SM
static const int kModuleBoundaries[4]
constexpr Detector det() const
get the detector field from this detid
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
static const int ETAPHIMODE
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
static int distanceEta(const EBDetId &a, const EBDetId &b)
EBDetId offsetBy(int nrStepsEta, int nrStepsPhi) const
static bool validDetId(int i, int j)
check if a valid index combination
static bool isNextToPhiBoundary(EBDetId id)
EBDetId switchZSide() const
constexpr uint32_t rawId() const
get the raw id
int ietaAbs() const
get the absolute value of the crystal ieta
constexpr DetId()
Create an empty or null id (also for persistence)
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
Abs< T >::type abs(const T &t)
static int distancePhi(const EBDetId &a, const EBDetId &b)
std::ostream & operator<<(std::ostream &s, const EBDetId &id)
static const int SMCRYSTALMODE