CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
HcalTopology Class Reference

#include <HcalTopology.h>

Inheritance diagram for HcalTopology:
CaloSubdetectorTopology

Public Member Functions

const HcalDDDRecConstantsdddConstants () const
 
int decIEta (const HcalDetId &id, HcalDetId neighbors[2]) const
 
bool decIPhi (const HcalDetId &id, HcalDetId &neighbor) const
 
bool decrementDepth (HcalDetId &id) const
 
DetId denseId2detId (unsigned int) const override
 return a linear packed id More...
 
HcalCalibDetId denseId2detIdCALIB (const unsigned int &id) const
 return a Calib DetId from linear packed id More...
 
void depthBinInformation (HcalSubdetector subdet, int etaRing, int iphi, int zside, int &nDepthBins, int &startingBin) const
 finds the number of depth bins and which is the number to start with More...
 
unsigned int detId2denseId (const DetId &id) const override
 return a linear packed id More...
 
unsigned int detId2denseIdCALIB (const DetId &id) const
 return a linear packed id from CALIB More...
 
unsigned int detId2denseIdHB (const DetId &id) const
 return a linear packed id from HB More...
 
unsigned int detId2denseIdHE (const DetId &id) const
 return a linear packed id from HE More...
 
unsigned int detId2denseIdHF (const DetId &id) const
 return a linear packed id from HF More...
 
unsigned int detId2denseIdHO (const DetId &id) const
 return a linear packed id from HO More...
 
unsigned int detId2denseIdHT (const DetId &id) const
 return a linear packed id from HT More...
 
int doublePhiBins () const
 
std::vector< DetIddown (const DetId &id) const override
 
std::vector< DetIdeast (const DetId &id) const override
 
double etaMax (HcalSubdetector subdet) const
 
std::pair< double, double > etaRange (HcalSubdetector subdet, int ieta) const
 
int etaRing (HcalSubdetector subdet, double eta) const
 eta and phi index from eta, phi values More...
 
void exclude (const HcalDetId &id)
 
int exclude (HcalSubdetector subdet, int ieta1, int ieta2, int iphi1, int iphi2, int depth1=1, int depth2=4)
 
void excludeSubdetector (HcalSubdetector subdet)
 
int firstHBRing () const
 
int firstHEDoublePhiRing () const
 
int firstHEQuadPhiRing () const
 
int firstHERing () const
 
int firstHETripleDepthRing () const
 
int firstHFQuadPhiRing () const
 
int firstHFRing () const
 
int firstHORing () const
 
unsigned int getCALIBSize () const
 
void getDepthSegmentation (const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
 
unsigned int getHBSize () const
 
unsigned int getHESize () const
 
unsigned int getHFSize () const
 
unsigned int getHOSize () const
 
unsigned int getHTSize () const
 
bool getMergePositionFlag () const
 
unsigned int getNumberOfShapes () const
 
int getPhiZOne (std::vector< std::pair< int, int > > &phiz) const
 
 HcalTopology (const HcalDDDRecConstants *hcons, const bool mergePosition=false)
 
 HcalTopology (HcalTopologyMode::Mode mode, int maxDepthHB, int maxDepthHE, HcalTopologyMode::TriggerMode tmode=HcalTopologyMode::TriggerMode_2009)
 
HcalDetId idBack (const HcalDetId &id) const
 
HcalDetId idFront (const HcalDetId &id) const
 
int incIEta (const HcalDetId &id, HcalDetId neighbors[2]) const
 
bool incIPhi (const HcalDetId &id, HcalDetId &neighbor) const
 
bool incrementDepth (HcalDetId &id) const
 
bool isBH () const
 
int lastHBHERing () const
 
int lastHBRing () const
 
int lastHERing () const
 
int lastHFRing () const
 
int lastHORing () const
 
int maxDepth (HcalSubdetector subdet) const
 
int maxDepth (void) const
 
int maxDepthHB () const
 
int maxDepthHE () const
 
bool mergedDepth29 (HcalDetId id) const
 
HcalDetId mergedDepthDetId (const HcalDetId &id) const
 
std::vector< int > mergedDepthList29 (HcalDetId id) const
 
HcalTopologyMode::Mode mode () const
 
unsigned int ncells () const override
 return a count of valid cells (for dense indexing use) More...
 
std::vector< DetIdnorth (const DetId &id) const override
 
int nPhiBins (HcalSubdetector subdet, int etaRing) const
 
int nPhiBins (int etaRing) const
 how many phi segments in this ring More...
 
int phiBin (HcalSubdetector subdet, int etaRing, double phi) const
 
std::pair< int, int > segmentBoundaries (const unsigned ring, const unsigned depth, const bool flag=false) const
 
void setDepthSegmentation (const unsigned ring, const std::vector< int > &readoutDepths, const bool flag)
 
int singlePhiBins () const
 
std::vector< DetIdsouth (const DetId &id) const override
 
int topoVersion () const override
 return a version which identifies the given topology More...
 
HcalTopologyMode::TriggerMode triggerMode () const
 
void unmergeDepthDetId (const HcalDetId &id, std::vector< HcalDetId > &ids) const
 
std::vector< DetIdup (const DetId &id) const override
 
bool valid (const DetId &id) const override
 
bool validCalib (const HcalCalibDetId &id) const
 
bool validDetId (HcalSubdetector subdet, int ieta, int iphi, int depth) const
 
bool validHcal (const HcalDetId &id) const
 
bool validHcal (const HcalDetId &id, const unsigned int flag) const
 
bool validHT (const HcalTrigTowerDetId &id) const
 
std::vector< DetIdwest (const DetId &id) const override
 
bool withSpecialRBXHBHE () const
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor More...
 
virtual bool denseIdConsistent (int topoVer) const
 return whether this topology is consistent with the numbering in the given topology More...
 
virtual std::vector< DetIdgetAllNeighbours (const DetId &id) const
 
virtual std::vector< DetIdgetNeighbours (const DetId &id, const CaloDirection &dir) const
 
virtual std::vector< DetIdgetWindow (const DetId &id, const int &northSouthSize, const int &eastWestSize) const
 
virtual DetId goDown (const DetId &id) const
 
virtual DetId goEast (const DetId &id) const
 
virtual DetId goNorth (const DetId &id) const
 
virtual DetId goSouth (const DetId &id) const
 
virtual DetId goUp (const DetId &id) const
 
virtual DetId goWest (const DetId &id) const
 
virtual ~CaloSubdetectorTopology ()
 virtual destructor More...
 

Static Public Member Functions

static std::string producerTag ()
 

Private Types

enum  {
  kHBhalf = 1296, kHEhalf = 1296, kHOhalf = 1080, kHFhalf = 864,
  kHThalf = 2088, kZDChalf = 11, kCASTORhalf = 224, kCALIBhalf = 693,
  kHThalfPhase1 = 2520, kHcalhalf = kHBhalf + kHEhalf + kHOhalf + kHFhalf
}
 
enum  { kSizeForDenseIndexingPreLS1 = 2 * kHcalhalf }
 
enum  { kHBSizePreLS1 = 2 * kHBhalf }
 
enum  { kHESizePreLS1 = 2 * kHEhalf }
 
enum  { kHOSizePreLS1 = 2 * kHOhalf }
 
enum  { kHFSizePreLS1 = 2 * kHFhalf }
 
enum  { kHTSizePreLS1 = 2 * kHThalf }
 
enum  { kHTSizePhase1 = 2 * kHThalfPhase1 }
 
enum  { kCALIBSizePreLS1 = 2 * kCALIBhalf }
 
typedef std::map< unsigned, std::vector< int > > SegmentationMap
 

Private Member Functions

int decAIEta (const HcalDetId &id, HcalDetId neighbors[2]) const
 
unsigned int detId2denseIdPreLS1 (const DetId &id) const
 
int incAIEta (const HcalDetId &id, HcalDetId neighbors[2]) const
 
bool isExcluded (const HcalDetId &id) const
 
bool validDetIdPreLS1 (const HcalDetId &id) const
 
bool validRaw (const HcalDetId &id) const
 

Private Attributes

unsigned int CALIBSize_
 
SegmentationMap depthSegmentation_
 
SegmentationMap depthSegmentationOne_
 
int doublePhiBins_
 
std::vector< double > dPhiTable
 
std::vector< double > dPhiTableHF
 
std::vector< HcalDDDRecConstants::HcalEtaBinetaBinsHB_
 
std::vector< HcalDDDRecConstants::HcalEtaBinetaBinsHE_
 
int etaHE2HF_
 
int etaHF2HE_
 
std::vector< double > etaTable
 
std::vector< double > etaTableHF
 
bool excludeHB_
 
bool excludeHE_
 
bool excludeHF_
 
bool excludeHO_
 
std::vector< HcalDetIdexclusionList_
 
int firstHBRing_
 
int firstHEDoublePhiRing_
 
int firstHEQuadPhiRing_
 
int firstHERing_
 
int firstHETripleDepthRing_
 
int firstHFQuadPhiRing_
 
int firstHFRing_
 
int firstHORing_
 
unsigned int HBSize_
 
const HcalDDDRecConstantshcons_
 
unsigned int HESize_
 
unsigned int HFSize_
 
unsigned int HOSize_
 
unsigned int HTSize_
 
int lastHBRing_
 
int lastHERing_
 
int lastHFRing_
 
int lastHORing_
 
int maxDepthHB_
 
int maxDepthHE_
 
int maxDepthHF_
 
int maxEta_
 
int maxPhiHE_
 
bool mergePosition_
 
HcalTopologyMode::Mode mode_
 
int nEtaHB_
 
int nEtaHE_
 
unsigned int numberOfShapes_
 
std::vector< double > phioff
 
int singlePhiBins_
 
int topoVersion_
 
HcalTopologyMode::TriggerMode triggerMode_
 
std::vector< int > unitPhi
 
std::vector< int > unitPhiHF
 

Static Private Attributes

static constexpr int chanCalibHB_ [nchanCalibHB_] = {0, 1, 2}
 
static constexpr int chanCalibHE1_ [nchanCalibHE1_] = {0, 1, 3, 4, 5, 6}
 
static constexpr int chanCalibHE2_ = 2
 
static constexpr int chanCalibHF1_ [nchanCalibHF1_] = {0, 1, 8}
 
static constexpr int chanCalibHF2_ = 9
 
static constexpr int chanCalibHO_ [nchanCalibHO_] = {0, 1}
 
static constexpr int chanCalibHOs_ = 7
 
static constexpr int etaCalibHB_ [nEtaCalibHB_] = {-1, 1}
 
static constexpr int etaCalibHBX_ = 16
 
static constexpr int etaCalibHE_ [nEtaCalibHE_] = {-1, 1}
 
static constexpr int etaCalibHEX_ [nEtaCalibHEX_] = {25, 27}
 
static constexpr int etaCalibHF_ [nEtaCalibHF_] = {-1, 1}
 
static constexpr int etaCalibHO_ [nEtaCalibHO_] = {-2, -1, 0, 1, 2}
 
static constexpr int etaCalibHOX_ [nEtaCalibHOX_] = {4, 15}
 
static constexpr unsigned int kchanCalibHB_ = nchanCalibHB_ * kPhiCalibHB_
 
static constexpr unsigned int kchanCalibHE1_ = nchanCalibHE1_ * kPhiCalibHE_
 
static constexpr unsigned int kchanCalibHE2_ = kPhiCalibHE_
 
static constexpr unsigned int kchanCalibHF1_ = nchanCalibHF1_ * kPhiCalibHF1_
 
static constexpr unsigned int kchanCalibHF2_ = 1
 
static constexpr unsigned int kOffCalibHB_ = 0
 
static constexpr unsigned int kOffCalibHBX_ = kOffCalibHOX_ + nCalibHOX_
 
static constexpr unsigned int kOffCalibHE1_ = kOffCalibHB_ + nCalibHB_
 
static constexpr unsigned int kOffCalibHE2_ = kOffCalibHO2_ + nCalibHO2_
 
static constexpr unsigned int kOffCalibHEX_ = kOffCalibHBX_ + nCalibHBX_
 
static constexpr unsigned int kOffCalibHF1_ = kOffCalibHE1_ + nCalibHE1_
 
static constexpr unsigned int kOffCalibHF2_ = kOffCalibHE2_ + nCalibHE2_
 
static constexpr unsigned int kOffCalibHFX_ = kOffCalibHEX_ + nCalibHEX_
 
static constexpr unsigned int kOffCalibHO1_ = kOffCalibHF1_ + nCalibHF1_
 
static constexpr unsigned int kOffCalibHO2_ = kOffCalibHO1_ + nCalibHO1_
 
static constexpr unsigned int kOffCalibHOX_ = kOffCalibHF2_ + nCalibHF2_
 
static constexpr unsigned int kPhiCalibHB_ = maxPhi_ / mPhiCalibHB_
 
static constexpr unsigned int kPhiCalibHBX_ = maxPhi_ / mPhiCalibHBX_
 
static constexpr unsigned int kPhiCalibHE_ = maxPhi_ / mPhiCalibHE_
 
static constexpr unsigned int kPhiCalibHEX_ = maxPhi_ / mPhiCalibHEX_
 
static constexpr unsigned int kPhiCalibHF1_ = maxPhi_ / mPhiCalibHF1_
 
static constexpr unsigned int kPhiCalibHO0_ = maxPhi_ / mPhiCalibHO0_
 
static constexpr unsigned int kPhiCalibHO1_ = maxPhi_ / mPhiCalibHO1_
 
static constexpr unsigned int kPhiCalibHO2_ = 4 * kPhiCalibHO1_ + kPhiCalibHO0_
 
static constexpr unsigned int maxPhi_ = 72
 
static constexpr int minMaxDepth_ = 4
 
static constexpr unsigned int minPhi_ = 1
 
static constexpr unsigned int mPhiCalibHB_ = 4
 
static constexpr unsigned int mPhiCalibHBX_ = 1
 
static constexpr unsigned int mPhiCalibHE_ = 4
 
static constexpr unsigned int mPhiCalibHEX_ = 2
 
static constexpr unsigned int mPhiCalibHF1_ = 18
 
static constexpr unsigned int mPhiCalibHO0_ = 6
 
static constexpr unsigned int mPhiCalibHO1_ = 12
 
static constexpr unsigned int mPhiCalibHOX_ [nEtaCalibHOX_] = {2, 1}
 
static constexpr unsigned int nCalibHB_ = kchanCalibHB_ * nEtaCalibHB_
 
static constexpr unsigned int nCalibHBX_ = 2 * kPhiCalibHBX_ * nEtaCalibHBX_
 
static constexpr unsigned int nCalibHE1_ = kchanCalibHE1_ * nEtaCalibHE_
 
static constexpr unsigned int nCalibHE2_ = kchanCalibHE2_ * nEtaCalibHE_
 
static constexpr unsigned int nCalibHEX_ = 2 * kPhiCalibHEX_ * nEtaCalibHEX_
 
static constexpr unsigned int nCalibHF1_ = kchanCalibHF1_ * nEtaCalibHF_
 
static constexpr unsigned int nCalibHF2_ = nEtaCalibHF_
 
static constexpr unsigned int nCalibHO1_ = kPhiCalibHO2_ * nchanCalibHO_
 
static constexpr unsigned int nCalibHO2_ = nEtaCalibHO_
 
static constexpr int nCalibHOX_ = 2 * (nPhiCalibHOX_[0] + nPhiCalibHOX_[1])
 
static constexpr unsigned int nchanCalibHB_ = 3
 
static constexpr unsigned int nchanCalibHE1_ = 6
 
static constexpr unsigned int nchanCalibHF1_ = 3
 
static constexpr unsigned int nchanCalibHO_ = 2
 
static constexpr unsigned int nEtaCalibHB_ = 2
 
static constexpr unsigned int nEtaCalibHBX_ = 1
 
static constexpr unsigned int nEtaCalibHE_ = 2
 
static constexpr unsigned int nEtaCalibHEX_ = 2
 
static constexpr unsigned int nEtaCalibHF_ = 2
 
static constexpr unsigned int nEtaCalibHO_ = 5
 
static constexpr unsigned int nEtaCalibHOX_ = 2
 
static constexpr unsigned int nPhiCalibHOX_ [nEtaCalibHOX_] = {36, 72}
 
static constexpr int phiCalibHF2_ = 1
 
static constexpr int phiCalibHO_ [nEtaCalibHO_] = {59, 47, 53, 47, 47}
 
static constexpr int phiCalibHOX1_ = 4
 
static constexpr int phiCalibHOX2_ = 12
 
static constexpr int phiCalibHOX3_ = 6
 

Additional Inherited Members

- Protected Types inherited from CaloSubdetectorTopology
typedef std::pair< int, int > Coordinate
 
- Protected Member Functions inherited from CaloSubdetectorTopology
Coordinate getNeighbourIndex (const Coordinate &coord, const CaloDirection &dir) const
 

Detailed Description

The HcalTopology class contains a set of constants which represent the topology (tower relationship) of the CMS HCAL as built. These constants can be used to determine neighbor relationships and existence of cells.

For use with limited setups (testbeam, cosmic stands, etc), the topology can be limited by creating a rejection list – a list of cells which would normally exist in the full CMS HCAL, but are not present for the specified topology.

Definition at line 26 of file HcalTopology.h.

Member Typedef Documentation

◆ SegmentationMap

typedef std::map<unsigned, std::vector<int> > HcalTopology::SegmentationMap
private

Definition at line 223 of file HcalTopology.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kHBhalf 
kHEhalf 
kHOhalf 
kHFhalf 
kHThalf 
kZDChalf 
kCASTORhalf 
kCALIBhalf 
kHThalfPhase1 
kHcalhalf 

Definition at line 227 of file HcalTopology.h.

227  {
228  kHBhalf = 1296,
229  kHEhalf = 1296,
230  kHOhalf = 1080,
231  kHFhalf = 864,
232  kHThalf = 2088,
233  kZDChalf = 11,
234  kCASTORhalf = 224,
235  kCALIBhalf = 693,
236  kHThalfPhase1 = 2520,
238  };

◆ anonymous enum

anonymous enum
private
Enumerator
kSizeForDenseIndexingPreLS1 

Definition at line 239 of file HcalTopology.h.

◆ anonymous enum

anonymous enum
private
Enumerator
kHBSizePreLS1 

Definition at line 240 of file HcalTopology.h.

240 { kHBSizePreLS1 = 2 * kHBhalf };

◆ anonymous enum

anonymous enum
private
Enumerator
kHESizePreLS1 

Definition at line 241 of file HcalTopology.h.

241 { kHESizePreLS1 = 2 * kHEhalf };

◆ anonymous enum

anonymous enum
private
Enumerator
kHOSizePreLS1 

Definition at line 242 of file HcalTopology.h.

242 { kHOSizePreLS1 = 2 * kHOhalf };

◆ anonymous enum

anonymous enum
private
Enumerator
kHFSizePreLS1 

Definition at line 243 of file HcalTopology.h.

243 { kHFSizePreLS1 = 2 * kHFhalf };

◆ anonymous enum

anonymous enum
private
Enumerator
kHTSizePreLS1 

Definition at line 244 of file HcalTopology.h.

244 { kHTSizePreLS1 = 2 * kHThalf };

◆ anonymous enum

anonymous enum
private
Enumerator
kHTSizePhase1 

Definition at line 245 of file HcalTopology.h.

245 { kHTSizePhase1 = 2 * kHThalfPhase1 };

◆ anonymous enum

anonymous enum
private
Enumerator
kCALIBSizePreLS1 

Definition at line 246 of file HcalTopology.h.

246 { kCALIBSizePreLS1 = 2 * kCALIBhalf };

Constructor & Destructor Documentation

◆ HcalTopology() [1/2]

HcalTopology::HcalTopology ( const HcalDDDRecConstants hcons,
const bool  mergePosition = false 
)

Definition at line 17 of file HcalTopology.cc.

18  : hcons_(hcons),
19  mergePosition_(mergePosition),
20  excludeHB_(false),
21  excludeHE_(false),
22  excludeHO_(false),
23  excludeHF_(false),
24  firstHBRing_(1),
25  firstHERing_(999),
26  lastHERing_(0),
27  firstHFRing_(29),
28  lastHFRing_(41),
29  firstHORing_(1),
30  lastHORing_(15),
36  doublePhiBins_(36),
47  if (hcons_->getNPhi(1) > maxPhiHE_)
48  maxPhiHE_ = hcons_->getNPhi(1);
49  for (auto& i : etaBinsHE_) {
50  if (firstHERing_ > i.ieta)
51  firstHERing_ = i.ieta;
52  if (lastHERing_ < i.ieta)
53  lastHERing_ = i.ieta;
54  int unit = static_cast<int>((i.dphi / 5.0_deg) + 0.01);
55  if (unit == 2 && firstHEDoublePhiRing_ > i.ieta)
56  firstHEDoublePhiRing_ = i.ieta;
57  if (unit == 4 && firstHEQuadPhiRing_ > i.ieta)
58  firstHEQuadPhiRing_ = i.ieta;
59  if (i.layer.size() > 2 && firstHETripleDepthRing_ > i.ieta)
61  }
62  if (firstHERing_ > lastHERing_) {
64  } else {
66  }
68  topoVersion_ = 0; //DL
69  HBSize_ = kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
70  HESize_ = kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
71  HOSize_ = kHOSizePreLS1; // ieta * iphi * 2
72  HFSize_ = kHFSizePreLS1; // ieta * iphi * depth * 2
74  numberOfShapes_ = 87;
75  } else if (mode_ == HcalTopologyMode::SLHC) { // need to know more eventually
76  topoVersion_ = 10;
79  HOSize_ = (lastHORing_ - firstHORing_ + 1) * IPHI_MAX * 2; // ieta * iphi * 2
80  HFSize_ = (lastHFRing_ - firstHFRing_ + 1) * IPHI_MAX * maxDepthHF_ * 2; // ieta * iphi * depth * 2
82  numberOfShapes_ = (maxPhiHE_ > 72) ? 1200 : 500;
83  }
87  } else {
89  }
90 
91 #ifdef EDM_ML_DEBUG
92  edm::LogVerbatim("HCalGeom") << "Topo sizes " << HBSize_ << ":" << HESize_ << ":" << HOSize_ << ":" << HFSize_ << ":"
93  << HTSize_ << ":" << CALIBSize_ << " for mode " << mode_ << ":" << triggerMode_;
94 #endif
95 
96  //The transition between HE/HF in eta
101  phioff = hcons_->getPhiOffs();
102  std::pair<int, int> ietaHF = hcons_->getEtaRange(2);
105  if (etaBinsHE_.size() > 1) {
106  double eta = etaBinsHE_[etaBinsHE_.size() - 1].etaMax;
107  for (unsigned int i = 1; i < etaTableHF.size(); ++i) {
108  if (eta < etaTableHF[i]) {
109  etaHE2HF_ = ietaHF.first + i - 1;
110  break;
111  }
112  }
113  eta = etaTableHF[0];
114  for (auto& i : etaBinsHE_) {
115  if (eta < i.etaMax) {
116  etaHF2HE_ = i.ieta;
117  break;
118  }
119  }
120  }
121  const double fiveDegInRad = 5.0_deg;
122  for (double k : dPhiTable) {
123  int units = (int)(k / fiveDegInRad + 0.5);
124  unitPhi.emplace_back(units);
125  }
126  for (double k : dPhiTableHF) {
127  int units = (int)(k / fiveDegInRad + 0.5);
128  unitPhiHF.emplace_back(units);
129  }
130  int nEta = hcons_->getNEta();
131  for (int ring = 1; ring <= nEta; ++ring) {
132  std::vector<int> segmentation = hcons_->getDepth(ring - 1, false);
133  setDepthSegmentation(ring, segmentation, false);
134 #ifdef EDM_ML_DEBUG
135  edm::LogVerbatim("HCalGeom") << "Set segmentation for ring " << ring << " with " << segmentation.size()
136  << " elements:";
137  for (unsigned int k = 0; k < segmentation.size(); ++k)
138  edm::LogVerbatim("HCalGeom") << "[" << k << "] " << segmentation[k];
139 #endif
140  segmentation = hcons_->getDepth(ring - 1, true);
141  setDepthSegmentation(ring, segmentation, true);
142 #ifdef EDM_ML_DEBUG
143  edm::LogVerbatim("HCalGeom") << "Set Plan-1 segmentation for ring " << ring << " with " << segmentation.size()
144  << " elements:";
145  for (unsigned int k = 0; k < segmentation.size(); ++k)
146  edm::LogVerbatim("HCalGeom") << "[" << k << "] " << segmentation[k];
147 #endif
148  }
149 
150 #ifdef EDM_ML_DEBUG
151  edm::LogVerbatim("HCalGeom") << "Constants in HcalTopology " << firstHBRing_ << ":" << lastHBRing_ << " "
152  << firstHERing_ << ":" << lastHERing_ << ":" << firstHEDoublePhiRing_ << ":"
153  << firstHEQuadPhiRing_ << ":" << firstHETripleDepthRing_ << " " << firstHFRing_ << ":"
154  << lastHFRing_ << ":" << firstHFQuadPhiRing_ << " " << firstHORing_ << ":" << lastHORing_
155  << " " << maxDepthHB_ << ":" << maxDepthHE_ << " " << nEtaHB_ << ":" << nEtaHE_ << " "
156  << etaHE2HF_ << ":" << etaHF2HE_ << " " << maxPhiHE_;
157 #endif
158 }

References CALIBSize_, dPhiTable, dPhiTableHF, PVValHelper::eta, etaBinsHB_, etaBinsHE_, etaHE2HF_, etaHF2HE_, etaTable, etaTableHF, dqmdumpme::first, firstHBRing_, firstHEDoublePhiRing_, firstHEQuadPhiRing_, firstHERing_, firstHETripleDepthRing_, firstHFQuadPhiRing_, firstHFRing_, firstHORing_, HcalDDDRecConstants::getDepth(), HcalDDDRecConstants::getEtaBins(), HcalDDDRecConstants::getEtaRange(), HcalDDDRecConstants::getEtaTable(), HcalDDDRecConstants::getEtaTableHF(), HcalDDDRecConstants::getMaxDepth(), HcalDDDRecConstants::getNEta(), HcalDDDRecConstants::getNPhi(), HcalDDDRecConstants::getPhiOffs(), HcalDDDRecConstants::getPhiTable(), HcalDDDRecConstants::getPhiTableHF(), HcalDDDRecConstants::getTopoMode(), HcalDDDRecConstants::getTriggerMode(), HBSize_, hcons_, HESize_, HFSize_, HOSize_, HTSize_, mps_fire::i, createfilelist::int, IPHI_MAX, dqmdumpme::k, kCALIBSizePreLS1, kHBSizePreLS1, kHESizePreLS1, kHFSizePreLS1, kHOSizePreLS1, kHTSizePhase1, kHTSizePreLS1, kOffCalibHFX_, lastHBRing_, lastHERing_, lastHFRing_, lastHORing_, HcalTopologyMode::LHC, maxDepthHB_, maxDepthHE_, maxDepthHF_, maxEta_, maxPhiHE_, mode_, HLT_FULL_cff::nEta, nEtaHB_, nEtaHE_, numberOfShapes_, phioff, relativeConstraints::ring, edm::second(), setDepthSegmentation(), HcalTopologyMode::SLHC, topoVersion_, triggerMode_, HcalTopologyMode::TriggerMode_2009, unit(), unitPhi, unitPhiHF, and units().

Referenced by HcalHardcodeGeometryEP::HcalHardcodeGeometryEP(), and HcalTopologyIdealEP::produce().

◆ HcalTopology() [2/2]

HcalTopology::HcalTopology ( HcalTopologyMode::Mode  mode,
int  maxDepthHB,
int  maxDepthHE,
HcalTopologyMode::TriggerMode  tmode = HcalTopologyMode::TriggerMode_2009 
)

Definition at line 160 of file HcalTopology.cc.

164  : hcons_(nullptr),
165  mergePosition_(false),
166  excludeHB_(false),
167  excludeHE_(false),
168  excludeHO_(false),
169  excludeHF_(false),
170  mode_(mode),
171  triggerMode_(tmode),
172  firstHBRing_(1),
173  lastHBRing_(16),
174  firstHERing_(16),
175  lastHERing_(29),
176  firstHFRing_(29),
177  lastHFRing_(41),
178  firstHORing_(1),
179  lastHORing_(15),
181  firstHEQuadPhiRing_(999),
185  doublePhiBins_(36),
188  maxDepthHF_(2),
189  etaHE2HF_(30),
190  etaHF2HE_(29),
198  numberOfShapes_((mode == HcalTopologyMode::SLHC) ? 500 : 87) {
199  if (mode_ == HcalTopologyMode::LHC) {
200  topoVersion_ = 0; //DL
201  HBSize_ = kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
202  HESize_ = kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
203  HOSize_ = kHOSizePreLS1; // ieta * iphi * 2
204  HFSize_ = kHFSizePreLS1; // phi * eta * depth * pm
205  } else if (mode_ == HcalTopologyMode::SLHC) { // need to know more eventually
206  HBSize_ = maxDepthHB * 16 * IPHI_MAX * 2;
207  HESize_ = maxDepthHE * (29 - 16 + 1) * maxPhiHE_ * 2;
208  HOSize_ = 15 * IPHI_MAX * 2; // ieta * iphi * 2
209  HFSize_ = IPHI_MAX * 13 * maxDepthHF_ * 2; // phi * eta * depth * pm
211  topoVersion_ = 10;
212  }
213  nEtaHB_ = (lastHBRing_ - firstHBRing_ + 1);
214  nEtaHE_ = (lastHERing_ - firstHERing_ + 1);
217  } else {
219  }
220 
221  edm::LogWarning("HCalGeom") << "This is an incomplete constructor of HcalTopology - be warned that many "
222  << "functionalities will not be there - revert from this - get from EventSetup";
223 }

References CALIBSize_, firstHBRing_, firstHERing_, HBSize_, HESize_, HFSize_, HOSize_, HTSize_, IPHI_MAX, kHBSizePreLS1, kHESizePreLS1, kHFSizePreLS1, kHOSizePreLS1, kHTSizePhase1, kHTSizePreLS1, kOffCalibHFX_, lastHBRing_, lastHERing_, HcalTopologyMode::LHC, maxDepthHB(), maxDepthHE(), maxDepthHF_, maxPhiHE_, mode_, nEtaHB_, nEtaHE_, HcalTopologyMode::SLHC, topoVersion_, triggerMode_, and HcalTopologyMode::TriggerMode_2009.

Member Function Documentation

◆ dddConstants()

const HcalDDDRecConstants* HcalTopology::dddConstants ( ) const
inline

◆ decAIEta()

int HcalTopology::decAIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const
private

Get the neighbors of the given cell with lower absolute ieta

Decreasing in |ieta|, there are two neighbors of 40 and 21

Definition at line 769 of file HcalTopology.cc.

769  {
770  int n = 1;
771  int aieta = id.ietaAbs();
772 
773  if (aieta == firstHEDoublePhiRing()) {
774  n = 2;
775  neighbors[0] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi(), id.depth());
776  neighbors[1] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi() + 1, id.depth());
777  } else if (aieta == firstHFQuadPhiRing()) {
778  n = 2;
779  neighbors[0] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi(), id.depth());
780  if (id.iphi() == IPHI_MAX - 1)
781  neighbors[1] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), 1, id.depth());
782  else
783  neighbors[1] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi() + 2, id.depth());
784  } else if (aieta == firstHEQuadPhiRing()) {
785  n = 2;
786  neighbors[0] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi(), id.depth());
787  if (id.iphi() == IPHI_MAX - 1)
788  neighbors[1] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), 1, id.depth());
789  else
790  neighbors[1] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi() + 2, id.depth());
791  } else if (aieta == 1) {
792  neighbors[0] = HcalDetId(id.subdet(), -aieta * id.zside(), id.iphi(), id.depth());
793  } else if (aieta == firstHERing() && id.subdet() == HcalEndcap) {
794  neighbors[0] = HcalDetId(HcalBarrel, (aieta - 1) * id.zside(), id.iphi(), 1);
795  } else if (aieta == firstHFRing() && id.subdet() == HcalForward) {
796  neighbors[0] = HcalDetId(HcalEndcap, etaHF2HE_ * id.zside(), id.iphi(), 1);
797  } else
798  neighbors[0] = HcalDetId(id.subdet(), (aieta - 1) * id.zside(), id.iphi(), id.depth());
799 
800  if (!valid(neighbors[0]) && n == 2) {
801  if (!valid(neighbors[1]))
802  n = 0;
803  else {
804  n = 1;
805  neighbors[0] = neighbors[1];
806  }
807  }
808  if (n == 2 && !valid(neighbors[1]))
809  n = 1;
810  if (n == 1 && !valid(neighbors[0]))
811  n = 0;
812 
813  return n;
814 }

References LEDCalibrationChannels::depth, etaHF2HE_, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHERing(), firstHFQuadPhiRing(), firstHFRing(), HcalBarrel, HcalEndcap, HcalForward, LEDCalibrationChannels::iphi, IPHI_MAX, dqmiodumpmetadata::n, valid(), and ecaldqm::zside().

Referenced by decIEta(), and incIEta().

◆ decIEta()

int HcalTopology::decIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

Get the neighbors of the given cell with lower (signed) ieta

Definition at line 736 of file HcalTopology.cc.

736  {
737  if (id.zside() == 1)
738  return decAIEta(id, neighbors);
739  else
740  return incAIEta(id, neighbors);
741 }

References decAIEta(), incAIEta(), and ecaldqm::zside().

Referenced by east().

◆ decIPhi()

bool HcalTopology::decIPhi ( const HcalDetId id,
HcalDetId neighbor 
) const

Get the neighbor (if present) of the given cell with lower iphi

Definition at line 678 of file HcalTopology.cc.

678  {
679  bool ok = valid(id);
680  if (ok) {
681  switch (id.subdet()) {
682  case (HcalBarrel):
683  case (HcalOuter):
684  if (id.iphi() == 1)
685  neighbor = HcalDetId(id.subdet(), id.ieta(), IPHI_MAX, id.depth());
686  else
687  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 1, id.depth());
688  break;
689  case (HcalEndcap):
690  if (id.ietaAbs() >= firstHEQuadPhiRing()) {
691  if (id.iphi() == 3)
692  neighbor = HcalDetId(id.subdet(), id.ieta(), IPHI_MAX - 1, id.depth());
693  else
694  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 4, id.depth());
695  } else if (id.ietaAbs() >= firstHEDoublePhiRing()) {
696  if (id.iphi() == 1)
697  neighbor = HcalDetId(id.subdet(), id.ieta(), IPHI_MAX - 1, id.depth());
698  else
699  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 2, id.depth());
700  } else {
701  if (id.iphi() == 1)
702  neighbor = HcalDetId(id.subdet(), id.ieta(), maxPhiHE_, id.depth());
703  else
704  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 1, id.depth());
705  }
706  break;
707  case (HcalForward):
708  if (id.ietaAbs() >= firstHFQuadPhiRing()) {
709  if (id.iphi() == 3)
710  neighbor = HcalDetId(id.subdet(), id.ieta(), IPHI_MAX - 1, id.depth());
711  else
712  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 4, id.depth());
713  } else {
714  if (id.iphi() == 1)
715  neighbor = HcalDetId(id.subdet(), id.ieta(), IPHI_MAX - 1, id.depth());
716  else
717  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() - 2, id.depth());
718  }
719  if (!validRaw(neighbor))
720  ok = false;
721  break;
722  default:
723  ok = false;
724  }
725  }
726  return ok;
727 }

References LEDCalibrationChannels::depth, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, IPHI_MAX, maxPhiHE_, convertSQLiteXML::ok, valid(), and validRaw().

Referenced by HFStripFilter::runFilter(), and south().

◆ decrementDepth()

bool HcalTopology::decrementDepth ( HcalDetId id) const

Get the detector in front of this one

Definition at line 910 of file HcalTopology.cc.

910  {
911  HcalSubdetector subdet = detId.subdet();
912  int ieta = detId.ieta();
913  int etaRing = detId.ietaAbs();
914  int depth = detId.depth();
915  int iphi = detId.iphi();
916  int zside = detId.zside();
917  int nDepthBins, startingBin;
918  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
919 
920  // see if the new depth bin exists
921  --depth;
922  if ((subdet == HcalOuter) || (subdet == HcalEndcap && etaRing == firstHERing())) {
923  subdet = HcalBarrel;
924  for (int i = 0; i < nEtaHB_; ++i) {
925  if (etaRing == etaBinsHB_[i].ieta) {
926  depth = etaBinsHB_[i].depthStart + etaBinsHB_[i].layer.size() - 1;
927  break;
928  }
929  }
930  } else if (subdet == HcalEndcap && etaRing == lastHERing() && depth == hcons_->getDepthEta29(iphi, zside, 0) &&
932  (ieta > 0) ? --ieta : ++ieta;
933  } else if (depth <= 0) {
934  if (subdet == HcalForward && etaRing == firstHFRing()) {
935  // overlap
936  subdet = HcalEndcap;
937  etaRing = etaHF2HE_;
938  ieta = (ieta > 0) ? etaRing : -etaRing;
939  for (const auto& i : etaBinsHE_) {
940  if (etaRing == i.ieta) {
941  depth = i.depthStart + i.layer.size() - 1;
942  break;
943  }
944  }
945  } else {
946  // no more chances
947  detId = HcalDetId();
948  return false;
949  }
950  }
951  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
952  return validRaw(detId);
953 }

References LEDCalibrationChannels::depth, HcalDetId::depth(), depthBinInformation(), etaBinsHB_, etaBinsHE_, etaHF2HE_, etaRing(), firstHERing(), firstHFRing(), HcalDDDRecConstants::getDepthEta29(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons_, mps_fire::i, LEDCalibrationChannels::ieta, HcalDetId::ieta(), HcalDetId::ietaAbs(), LEDCalibrationChannels::iphi, HcalDetId::iphi(), lastHERing(), mode_, nEtaHB_, HcalTopologyMode::SLHC, HcalDetId::subdet(), validRaw(), HcalDetId::zside(), and ecaldqm::zside().

Referenced by down().

◆ denseId2detId()

DetId HcalTopology::denseId2detId ( unsigned int  denseid) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1561 of file HcalTopology.cc.

1561  {
1563  int ie(0);
1564  int ip(0);
1565  int dp(0);
1566  int in(denseid);
1567  int iz(1);
1568  if (topoVersion_ == 0) { //DL// pre-LS1
1569  if (denseid < kSizeForDenseIndexingPreLS1) {
1570  if (in > 2 * (kHBhalf + kHEhalf + kHOhalf) - 1) { // HF
1571  sd = HcalForward;
1572  in -= 2 * (kHBhalf + kHEhalf + kHOhalf);
1573  iz = (in < kHFhalf ? 1 : -1);
1574  in %= kHFhalf;
1575  ip = 4 * (in / 48);
1576  in %= 48;
1577  ip += 1 + (in > 21 ? 2 : 0);
1578  if (3 == ip % 4)
1579  in -= 22;
1580  ie = 29 + in / 2;
1581  dp = 1 + in % 2;
1582  } else if (in > 2 * (kHBhalf + kHEhalf) - 1) { // HO
1583  sd = HcalOuter;
1584  in -= 2 * (kHBhalf + kHEhalf);
1585  iz = (in < kHOhalf ? 1 : -1);
1586  in %= kHOhalf;
1587  dp = 4;
1588  ip = 1 + in / 15;
1589  ie = 1 + (in - 15 * (ip - 1));
1590  } else if (in > 2 * kHBhalf - 1) { // Endcap
1591  sd = HcalEndcap;
1592  in -= 2 * kHBhalf;
1593  iz = (in < kHEhalf ? 1 : -1);
1594  in %= kHEhalf;
1595  ip = 2 * (in / 36);
1596  in %= 36;
1597  ip += 1 + in / 28;
1598  if (0 == ip % 2)
1599  in %= 28;
1600  ie = 15 + (in < 2 ? 1 + in : 2 + (in < 20 ? 1 + (in - 2) / 2 : 9 + (in < 26 ? 1 + (in - 20) / 3 : 3)));
1601  dp = (in < 1
1602  ? 3
1603  : (in < 2 ? 1 : (in < 20 ? 1 + (in - 2) % 2 : (in < 26 ? 1 + (in - 20) % 3 : (1 + (in - 26) % 2)))));
1604  } else { // barrel
1605  iz = (in < kHBhalf ? 1 : -1);
1606  in %= kHBhalf;
1607  ip = in / 18 + 1;
1608  in %= 18;
1609  if (in < 14) {
1610  dp = 1;
1611  ie = in + 1;
1612  } else {
1613  in %= 14;
1614  dp = 1 + in % 2;
1615  ie = 15 + in / 2;
1616  }
1617  }
1618  }
1619  } else if (topoVersion_ == 10) {
1620  if (denseid < ncells()) {
1621  if (denseid >= (HBSize_ + HESize_ + HOSize_)) {
1622  sd = HcalForward;
1623  in -= (HBSize_ + HESize_ + HOSize_);
1624  dp = (in % maxDepthHF_) + 1;
1625  ip = (in - dp + 1) % (maxDepthHF_ * IPHI_MAX);
1626  ip = (ip / maxDepthHF_) + 1;
1627  ie = (in - dp + 1 - maxDepthHF_ * (ip - 1)) / (IPHI_MAX * maxDepthHF_);
1628  if (ie > 12) {
1629  ie = 54 - ie;
1630  iz = -1;
1631  } else {
1632  ie += 29;
1633  iz = 1;
1634  }
1635  } else if (denseid >= (HBSize_ + HESize_)) {
1636  sd = HcalOuter;
1637  in -= (HBSize_ + HESize_);
1638  dp = 4;
1639  ip = (in % IPHI_MAX) + 1;
1640  ie = (in - ip + 1) / IPHI_MAX;
1641  if (ie > 14) {
1642  ie = 30 - ie;
1643  iz = -1;
1644  } else {
1645  ie += 1;
1646  iz = 1;
1647  }
1648  } else if (denseid >= (HBSize_)) {
1649  sd = HcalEndcap;
1650  in -= (HBSize_);
1651  dp = (in % maxDepthHE_) + 1;
1652  ip = (in - dp + 1) % (maxDepthHE_ * maxPhiHE_);
1653  ip = (ip / maxDepthHE_) + 1;
1654  ie = (in - dp + 1 - maxDepthHE_ * (ip - 1)) / (maxPhiHE_ * maxDepthHE_);
1655  if (ie >= nEtaHE_) {
1656  ie = lastHERing() + nEtaHE_ - ie;
1657  iz = -1;
1658  } else {
1659  ie = firstHERing() + ie;
1660  iz = 1;
1661  }
1662  } else {
1663  sd = HcalBarrel;
1664  dp = (in % maxDepthHB_) + 1;
1665  ip = (in - dp + 1) % (maxDepthHB_ * IPHI_MAX);
1666  ip = (ip / maxDepthHB_) + 1;
1667  ie = (in - dp + 1 - maxDepthHB_ * (ip - 1)) / (IPHI_MAX * maxDepthHB_);
1668  if (ie >= nEtaHB_) {
1669  ie = lastHBRing() + nEtaHB_ - ie;
1670  iz = -1;
1671  } else {
1672  ie = firstHBRing() + ie;
1673  iz = 1;
1674  }
1675  }
1676  }
1677  }
1678  HcalDetId hid(sd, iz * int(ie), ip, dp);
1679 #ifdef EDM_ML_DEBUG
1680  edm::LogVerbatim("HcalGeom") << "Dens2Det " << topoVersion_ << " i/p " << std::hex << denseid << " : " << hid.rawId()
1681  << std::dec << " | " << hid;
1682 #endif
1683  return hid;
1684 }

References TauDecayModes::dec, Calorimetry_cff::dp, firstHBRing(), firstHERing(), HBSize_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HESize_, HOSize_, recoMuon::in, IPHI_MAX, kHBhalf, kHEhalf, kHFhalf, kHOhalf, kSizeForDenseIndexingPreLS1, lastHBRing(), lastHERing(), maxDepthHB_, maxDepthHE_, maxDepthHF_, maxPhiHE_, ncells(), nEtaHB_, nEtaHE_, DetId::rawId(), sd, and topoVersion_.

Referenced by HcalGeometry::localCorners().

◆ denseId2detIdCALIB()

HcalCalibDetId HcalTopology::denseId2detIdCALIB ( const unsigned int &  id) const

return a Calib DetId from linear packed id

Definition at line 1385 of file HcalTopology.cc.

1385  {
1387  unsigned int hid0(hid);
1388  if (hid0 < kOffCalibHOX_) {
1389  HcalSubdetector subdet(HcalEmpty);
1390  int id0, keta, ieta, iphi, ichan, ctype;
1391  if (hid0 < kOffCalibHE1_) {
1392  id0 = static_cast<int>(hid0);
1393  subdet = HcalBarrel;
1394  iphi = hid0 % kPhiCalibHB_;
1395  keta = (hid0 < kchanCalibHB_) ? 0 : 1;
1396  ieta = etaCalibHB_[keta];
1397  ichan = (id0 - iphi - keta * kchanCalibHB_) / kPhiCalibHB_;
1398  iphi = mPhiCalibHB_ * (iphi + 1) - 1;
1399  ctype = chanCalibHB_[ichan];
1400  } else if (hid0 < kOffCalibHF1_) {
1401  hid0 -= kOffCalibHE1_;
1402  id0 = static_cast<int>(hid0);
1403  subdet = HcalEndcap;
1404  iphi = hid0 % kPhiCalibHE_;
1405  keta = (hid0 < kchanCalibHE1_) ? 0 : 1;
1406  ieta = etaCalibHE_[keta];
1407  ichan = (id0 - iphi - keta * kchanCalibHE1_) / kPhiCalibHE_;
1408  iphi = mPhiCalibHE_ * (iphi + 1) - 1;
1409  ctype = chanCalibHE1_[ichan];
1410  } else if (hid0 < kOffCalibHO1_) {
1411  hid0 -= kOffCalibHF1_;
1412  id0 = static_cast<int>(hid0);
1413  subdet = HcalForward;
1414  iphi = hid0 % kPhiCalibHF1_;
1415  keta = (hid0 < kchanCalibHF1_) ? 0 : 1;
1416  ieta = etaCalibHF_[keta];
1417  ichan = (id0 - iphi - keta * kchanCalibHF1_) / kPhiCalibHF1_;
1418  iphi = mPhiCalibHF1_ * iphi + 1;
1419  ctype = chanCalibHF1_[ichan];
1420  } else if (hid0 < kOffCalibHO2_) {
1421  hid0 -= kOffCalibHO1_;
1422  id0 = static_cast<int>(hid0);
1423  subdet = HcalOuter;
1424  unsigned int kphi = hid0 % kPhiCalibHO2_;
1425  if (kphi < 2 * kPhiCalibHO1_) {
1426  ieta = (kphi >= kPhiCalibHO1_) ? etaCalibHO_[1] : etaCalibHO_[0];
1427  iphi = kphi % kPhiCalibHO1_;
1428  ichan = (id0 - iphi - (ieta + 2) * kPhiCalibHO1_) / kPhiCalibHO2_;
1429  iphi = (iphi + 1) * mPhiCalibHO1_ - 1;
1430  } else if (kphi < (2 * kPhiCalibHO1_ + kPhiCalibHO0_)) {
1431  ieta = etaCalibHO_[2];
1432  iphi = kphi % kPhiCalibHO0_;
1433  ichan = (id0 - iphi - (ieta + 2) * kPhiCalibHO1_) / kPhiCalibHO2_;
1434  iphi = (iphi + 1) * mPhiCalibHO0_ - 1;
1435  } else {
1436  ieta = (kphi >= 3 * kPhiCalibHO1_ + kPhiCalibHO0_) ? etaCalibHO_[4] : etaCalibHO_[3];
1437  iphi = kphi % kPhiCalibHO1_;
1438  ichan = (id0 - iphi - (ieta + 1) * kPhiCalibHO1_ - kPhiCalibHO0_) / kPhiCalibHO2_;
1439  iphi = (iphi + 1) * mPhiCalibHO1_ - 1;
1440  }
1441  ctype = chanCalibHO_[ichan];
1442  } else if (hid0 < kOffCalibHE2_) {
1443  hid0 -= kOffCalibHO2_;
1444  subdet = HcalOuter;
1445  iphi = phiCalibHO_[hid0];
1446  ctype = static_cast<int>(chanCalibHOs_);
1447  ieta = etaCalibHO_[hid0];
1448  } else if (hid0 < kOffCalibHF2_) {
1449  hid0 -= kOffCalibHE2_;
1450  id0 = static_cast<int>(hid0);
1451  subdet = HcalEndcap;
1452  iphi = hid0 % kPhiCalibHE_;
1453  keta = (hid0 < kchanCalibHE2_) ? 0 : 1;
1454  ieta = etaCalibHE_[keta];
1455  iphi = mPhiCalibHE_ * (iphi + 1) - 1;
1456  ctype = chanCalibHE2_;
1457  } else {
1458  hid0 -= kOffCalibHF2_;
1459  id0 = static_cast<int>(hid0);
1460  subdet = HcalForward;
1461  keta = (hid0 < kchanCalibHF2_) ? 0 : 1;
1462  ieta = etaCalibHF_[keta];
1463  iphi = phiCalibHF2_;
1464  ctype = chanCalibHF2_;
1465  }
1466  id = HcalCalibDetId(subdet, ieta, iphi, ctype);
1467 #ifdef EDM_ML_DEBUG
1468  edm::LogVerbatim("HCalGeom") << "CalibrationBox: " << hid << " o/p " << ieta << ":" << iphi << ":" << ichan << ":"
1469  << ctype << " " << id;
1470 #endif
1471  } else if (hid < kOffCalibHBX_) {
1472  hid0 -= kOffCalibHOX_;
1473  int iphi, ieta;
1474  if (hid0 < nPhiCalibHOX_[1]) {
1475  iphi = static_cast<int>(hid0) + 1;
1476  ieta = -etaCalibHOX_[1];
1477  } else if (hid0 < (nPhiCalibHOX_[1] + nPhiCalibHOX_[0])) {
1478  hid0 -= nPhiCalibHOX_[1];
1479  iphi = ((hid0 + phiCalibHOX1_) % phiCalibHOX2_ < phiCalibHOX3_) ? 2 * hid0 + 1 : 2 * hid0 + 2;
1480  ieta = -etaCalibHOX_[0];
1481  } else if (hid0 < (nPhiCalibHOX_[1] + 2 * nPhiCalibHOX_[0])) {
1482  hid0 -= (nPhiCalibHOX_[1] + nPhiCalibHOX_[0]);
1483  iphi = ((hid0 + phiCalibHOX1_) % phiCalibHOX2_ < phiCalibHOX3_) ? 2 * hid0 + 1 : 2 * hid0 + 2;
1484  ieta = etaCalibHOX_[0];
1485  } else {
1486  hid0 -= (nPhiCalibHOX_[1] + 2 * nPhiCalibHOX_[0]);
1487  iphi = static_cast<int>(hid0) + 1;
1488  ieta = etaCalibHOX_[1];
1489  }
1491 #ifdef EDM_ML_DEBUG
1492  edm::LogVerbatim("HCalGeom") << "HOCrossTalk: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " "
1493  << id;
1494 #endif
1495  } else if (hid < kOffCalibHEX_) {
1496  hid0 -= kOffCalibHBX_;
1497  int ieta = (hid0 >= kPhiCalibHBX_) ? etaCalibHBX_ : -etaCalibHBX_;
1498  int iphi = (hid0 % kPhiCalibHBX_) + 1;
1500 #ifdef EDM_ML_DEBUG
1501  edm::LogVerbatim("HCalGeom") << "HBX: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " " << id;
1502 #endif
1503  } else if (hid < kOffCalibHFX_) {
1504  hid0 -= kOffCalibHEX_;
1505  int iphi = 2 * (hid0 % kPhiCalibHEX_) + 1;
1506  int ieta = ((hid0 < kPhiCalibHEX_)
1507  ? -etaCalibHEX_[0]
1508  : ((hid0 < 2 * kPhiCalibHEX_) ? etaCalibHEX_[0]
1509  : ((hid0 < 3 * kPhiCalibHEX_) ? -etaCalibHEX_[1] : etaCalibHEX_[1])));
1511 #ifdef EDM_ML_DEBUG
1512  edm::LogVerbatim("HCalGeom") << "HEX: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " " << id;
1513 #endif
1514  }
1515  return id;
1516 }

References chanCalibHB_, chanCalibHE1_, chanCalibHE2_, chanCalibHF1_, chanCalibHF2_, chanCalibHO_, chanCalibHOs_, etaCalibHB_, etaCalibHBX_, etaCalibHE_, etaCalibHEX_, etaCalibHF_, etaCalibHO_, etaCalibHOX_, HcalCalibDetId::HBX, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOuter, HcalCalibDetId::HEX, HcalCalibDetId::HOCrosstalk, triggerObjects_cff::id, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, kchanCalibHB_, kchanCalibHE1_, kchanCalibHE2_, kchanCalibHF1_, kchanCalibHF2_, kOffCalibHBX_, kOffCalibHE1_, kOffCalibHE2_, kOffCalibHEX_, kOffCalibHF1_, kOffCalibHF2_, kOffCalibHFX_, kOffCalibHO1_, kOffCalibHO2_, kOffCalibHOX_, kPhiCalibHB_, kPhiCalibHBX_, kPhiCalibHE_, kPhiCalibHEX_, kPhiCalibHF1_, kPhiCalibHO0_, kPhiCalibHO1_, kPhiCalibHO2_, mPhiCalibHB_, mPhiCalibHE_, mPhiCalibHF1_, mPhiCalibHO0_, mPhiCalibHO1_, nPhiCalibHOX_, phiCalibHF2_, phiCalibHO_, phiCalibHOX1_, phiCalibHOX2_, and phiCalibHOX3_.

◆ depthBinInformation()

void HcalTopology::depthBinInformation ( HcalSubdetector  subdet,
int  etaRing,
int  iphi,
int  zside,
int &  nDepthBins,
int &  startingBin 
) const

finds the number of depth bins and which is the number to start with

Definition at line 816 of file HcalTopology.cc.

817  {
818  if (subdet == HcalBarrel) {
820  startingBin = hcons_->getMinDepth(0, etaRing, iphi, zside);
821  if (etaRing == lastHBRing()) {
822  nDepthBins = hcons_->getDepthEta16(1, iphi, zside) - startingBin + 1;
823  } else {
824  nDepthBins = hcons_->getMaxDepth(0, etaRing, iphi, zside) - startingBin + 1;
825  }
826  } else {
827  if (etaRing <= 14) {
828  nDepthBins = 1;
829  startingBin = 1;
830  } else {
831  nDepthBins = 2;
832  startingBin = 1;
833  }
834  }
835  } else if (subdet == HcalEndcap) {
837  if (etaRing == firstHERing()) {
838  startingBin = hcons_->getDepthEta16(2, iphi, zside);
839  } else {
840  startingBin = hcons_->getMinDepth(1, etaRing, iphi, zside);
841  }
842  nDepthBins = hcons_->getMaxDepth(1, etaRing, iphi, zside) - startingBin + 1;
843  } else {
844  if (etaRing == firstHERing()) {
845  nDepthBins = 1;
846  startingBin = 3;
847  } else if (etaRing == 17) {
848  nDepthBins = 1;
849  startingBin = 1;
850  } else if (etaRing == lastHERing()) {
851  nDepthBins = 2;
852  startingBin = 1;
853  } else {
854  nDepthBins = (etaRing >= firstHETripleDepthRing()) ? 3 : 2;
855  startingBin = 1;
856  }
857  }
858  } else if (subdet == HcalForward) {
859  nDepthBins = maxDepthHF_;
860  startingBin = 1;
861  } else if (subdet == HcalOuter) {
862  nDepthBins = 1;
863  startingBin = 4;
864  } else {
865  edm::LogWarning("HCalGeom") << "Bad HCAL subdetector " << subdet;
866  }
867 }

References etaRing(), firstHERing(), firstHETripleDepthRing(), HcalDDDRecConstants::getDepthEta16(), HcalDDDRecConstants::getMaxDepth(), HcalDDDRecConstants::getMinDepth(), HcalTopologyMode::H2HE, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons_, LEDCalibrationChannels::iphi, lastHBRing(), lastHERing(), maxDepthHF_, mode_, HcalTopologyMode::SLHC, and ecaldqm::zside().

Referenced by CaloTowerConstituentsMap::constituentsOf(), decrementDepth(), HcalTrigTowerGeometry::detIds(), and incrementDepth().

◆ detId2denseId()

unsigned int HcalTopology::detId2denseId ( const DetId id) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1518 of file HcalTopology.cc.

1518  {
1519  unsigned int retval(0);
1520  if (topoVersion_ == 0) { // pre-LS1
1521  retval = detId2denseIdPreLS1(id);
1522  } else if (topoVersion_ == 10) {
1523  HcalDetId hid(id);
1524  if (hid.subdet() == HcalBarrel) {
1525  retval = (hid.depth() - 1) + maxDepthHB_ * (hid.iphi() - 1);
1526  if (hid.ieta() > 0)
1527  retval += maxDepthHB_ * IPHI_MAX * (hid.ieta() - firstHBRing());
1528  else
1529  retval += maxDepthHB_ * IPHI_MAX * (hid.ieta() + lastHBRing() + nEtaHB_);
1530  } else if (hid.subdet() == HcalEndcap) {
1531  retval = HBSize_;
1532  retval += (hid.depth() - 1) + maxDepthHE_ * (hid.iphi() - 1);
1533  if (hid.ieta() > 0)
1534  retval += maxDepthHE_ * maxPhiHE_ * (hid.ieta() - firstHERing());
1535  else
1536  retval += maxDepthHE_ * maxPhiHE_ * (hid.ieta() + lastHERing() + nEtaHE_);
1537  } else if (hid.subdet() == HcalOuter) {
1538  retval = HBSize_ + HESize_;
1539  if (hid.ieta() > 0)
1540  retval += (hid.iphi() - 1) + IPHI_MAX * (hid.ieta() - 1);
1541  else
1542  retval += (hid.iphi() - 1) + IPHI_MAX * (30 + hid.ieta());
1543  } else if (hid.subdet() == HcalForward) {
1544  retval = HBSize_ + HESize_ + HOSize_;
1545  retval += (hid.depth() - 1) + maxDepthHF_ * (hid.iphi() - 1);
1546  if (hid.ieta() > 0)
1547  retval += maxDepthHF_ * IPHI_MAX * (hid.ieta() - 29);
1548  else
1549  retval += maxDepthHF_ * IPHI_MAX * ((41 + 13) + hid.ieta());
1550  } else {
1551  retval = 0xFFFFFFFu;
1552  }
1553  }
1554 #ifdef EDM_ML_DEBUG
1555  edm::LogVerbatim("HcalGeom") << "DetId2Dense " << topoVersion_ << " ID " << std::hex << id.rawId() << std::dec
1556  << " | " << HcalDetId(id) << " : " << std::hex << retval << std::dec;
1557 #endif
1558  return retval;
1559 }

References TauDecayModes::dec, HcalDetId::depth(), detId2denseIdPreLS1(), firstHBRing(), firstHERing(), HBSize_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HESize_, HOSize_, HcalDetId::ieta(), HcalDetId::iphi(), IPHI_MAX, lastHBRing(), lastHERing(), maxDepthHB_, maxDepthHE_, maxDepthHF_, maxPhiHE_, nEtaHB_, nEtaHE_, HcalDetId::subdet(), and topoVersion_.

Referenced by HFPreReconstructor::fillInfos(), HcalGeometry::getGeometry(), HcalGeometry::getGeometryBase(), HcalGeometry::indexFor(), HcalDDDGeometry::newCellImpl(), HcalGeometry::newCellImpl(), and HBHEPhase1Reconstructor::processData().

◆ detId2denseIdCALIB()

unsigned int HcalTopology::detId2denseIdCALIB ( const DetId id) const

return a linear packed id from CALIB

Definition at line 1278 of file HcalTopology.cc.

1278  {
1279  HcalCalibDetId tid(id);
1280  int channel = tid.cboxChannel();
1281  int ieta = tid.ieta();
1282  int iphi = tid.iphi();
1283  int zside = tid.zside();
1284  unsigned int index = 0xFFFFFFFFu;
1285 
1286  if (tid.calibFlavor() == HcalCalibDetId::CalibrationBox) {
1287  HcalSubdetector subDet = tid.hcalSubdet();
1288 
1289  if (subDet == HcalBarrel) {
1290  //std::cout<<"CALIB_HB: ";
1291  //dphi = 4 (18 phi values), 3 channel types (0,1,2), eta = -1 or 1
1292  //total of 18*3*2=108 channels
1294  auto kndx = std::find(chanCalibHB_, chanCalibHB_ + nchanCalibHB_, channel);
1295  if (indx != etaCalibHB_ + nEtaCalibHB_ && kndx != chanCalibHB_ + nchanCalibHB_) {
1296  int keta = static_cast<int>(indx - etaCalibHB_);
1297  int kchn = static_cast<int>(kndx - chanCalibHB_);
1298  index = ((iphi + 1) / mPhiCalibHB_ - 1) + kPhiCalibHB_ * kchn + keta * kchanCalibHB_ + kOffCalibHB_;
1299  }
1300  } else if (subDet == HcalEndcap) {
1301  //std::cout<<"CALIB_HE: ";
1302  //dphi = 4 (18 phi values), 7 channel types (0,1,2,3,4,5,6), eta = -1/+1
1303  //total of 18*7*2=252 channels
1304  // if (channel > 2) channel -= 1;
1306  if (indx != etaCalibHE_ + nEtaCalibHE_) {
1307  int keta = static_cast<int>(indx - etaCalibHE_);
1308  auto kndx = std::find(chanCalibHE1_, chanCalibHE1_ + nchanCalibHE1_, channel);
1309  if (kndx != chanCalibHE1_ + nchanCalibHE1_) {
1310  int kchn = static_cast<int>(kndx - chanCalibHE1_);
1311  index = ((iphi + 1) / mPhiCalibHE_ - 1) + kPhiCalibHE_ * kchn + keta * kchanCalibHE1_ + kOffCalibHE1_;
1312  } else if (channel == chanCalibHE2_) {
1313  index = ((iphi + 1) / mPhiCalibHE_ - 1) + keta * kchanCalibHE2_ + kOffCalibHE2_;
1314  }
1315  }
1316  } else if (subDet == HcalForward) {
1317  //std::cout<<"CALIB_HF: ";
1318  //dphi = 18 (4 phi values), 3 channel types (0,1,8), eta = -1 or +1
1319  // or iphi = 1; channel = 9, eta = -1 or +1
1320  //total channels 4*3*2=24 + 2
1322  if (indx != etaCalibHF_ + nEtaCalibHF_) {
1323  int keta = static_cast<int>(indx - etaCalibHF_);
1324  auto kndx = std::find(chanCalibHF1_, chanCalibHF1_ + nchanCalibHF1_, channel);
1325  if (kndx != chanCalibHF1_ + nchanCalibHF1_) {
1326  int kchn = static_cast<int>(kndx - chanCalibHF1_);
1327  index = ((iphi - 1) / mPhiCalibHF1_) + kPhiCalibHF1_ * kchn + keta * kchanCalibHF1_ + kOffCalibHF1_;
1328  } else if (channel == chanCalibHF2_) {
1329  index = keta * kchanCalibHF2_ + kOffCalibHF2_;
1330  }
1331  }
1332  } else if (subDet == HcalOuter) {
1333  //std::cout<<"CALIB_HO: ";
1335  if (indx != etaCalibHO_ + nEtaCalibHO_) {
1336  int keta = static_cast<int>(indx - etaCalibHO_);
1337  auto kndx = std::find(chanCalibHO_, chanCalibHO_ + nchanCalibHO_, channel);
1338  //there are 5 special calib crosstalk channels, one in each ring
1339  if (channel == chanCalibHOs_) {
1340  index = keta + kOffCalibHO2_;
1341  } else if (kndx != chanCalibHO_ + nchanCalibHO_) {
1342  //for HOM/HOP dphi = 6 (12 phi values), 2 channel types (0,1), eta = -2,-1 or 1,2
1343  //for HO0/YB0 dphi = 12 (6 phi values), 2 channel types (0,1), eta = 0
1344  int kchn = static_cast<int>(kndx - chanCalibHO_);
1345  int kphi = (ieta == 0) ? ((iphi + 1) / mPhiCalibHO0_ - 1) : ((iphi + 1) / mPhiCalibHO1_ - 1);
1346  if (ieta < 0) {
1347  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * keta + kOffCalibHO1_;
1348  } else if (ieta > 0) {
1349  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * (keta - 1) + kPhiCalibHO0_ + kOffCalibHO1_;
1350  } else {
1351  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * keta + kOffCalibHO1_;
1352  }
1353  }
1354  }
1355  } else {
1356  edm::LogWarning("HGCalGeom") << "HCAL Det Id not valid!";
1357  }
1358  } else if (tid.calibFlavor() == HcalCalibDetId::HOCrosstalk) {
1359  //std::cout<<"HX: ";
1360  //for YB0/HO0 phi is grouped in 6 groups of 6 with dphi=2 but the transitions are 1 or 3
1361  // in such a way that the %36 operation yeilds unique values for every iphi
1362  //ieta = 0 for HO2M/HO1M ieta=2 for HO1P/HO2P;
1363  //ieta = 1 YB0/HO0;
1364  int kphi = ((std::abs(ieta) == etaCalibHOX_[0]) ? ((iphi % 2 == 0) ? (iphi / 2 - 1) : (iphi - 1) / 2) : (iphi - 1));
1365  if (std::abs(ieta) == etaCalibHOX_[0]) {
1366  index = kphi + (((zside + 1) * nPhiCalibHOX_[0]) / 2) + nPhiCalibHOX_[1] + kOffCalibHOX_;
1367  } else if (std::abs(ieta) == etaCalibHOX_[1]) {
1368  index = kphi + ((zside + 1) * nPhiCalibHOX_[1]) + kOffCalibHOX_;
1369  }
1370  } else if (tid.calibFlavor() == HcalCalibDetId::HBX) {
1371  if (std::abs(ieta) == etaCalibHBX_) {
1372  index = kOffCalibHBX_ + (iphi - 1) + (zside + 1) * kPhiCalibHBX_ / 2;
1373  }
1374  } else if (tid.calibFlavor() == HcalCalibDetId::HEX) {
1375  if (std::abs(ieta) == etaCalibHEX_[0]) {
1376  index = kOffCalibHEX_ + (iphi - 1) / mPhiCalibHEX_ + (zside + 1) * kPhiCalibHEX_ / 2;
1377  } else if (std::abs(ieta) == etaCalibHEX_[1]) {
1378  index = kOffCalibHEX_ + (iphi - 1) / mPhiCalibHEX_ + (zside + 1) * kPhiCalibHEX_ / 2 + 2 * kPhiCalibHEX_;
1379  }
1380  }
1381  //std::cout << " " << ieta << " " << zside << " " << iphi << " " << depth << " " << index << std::endl;
1382  return index;
1383 }

References funct::abs(), HcalCalibDetId::calibFlavor(), HcalCalibDetId::CalibrationBox, HcalCalibDetId::cboxChannel(), chanCalibHB_, chanCalibHE1_, chanCalibHE2_, chanCalibHF1_, chanCalibHF2_, chanCalibHO_, chanCalibHOs_, etaCalibHB_, etaCalibHBX_, etaCalibHE_, etaCalibHEX_, etaCalibHF_, etaCalibHO_, etaCalibHOX_, spr::find(), HcalCalibDetId::HBX, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalCalibDetId::hcalSubdet(), HcalCalibDetId::HEX, HcalCalibDetId::HOCrosstalk, LEDCalibrationChannels::ieta, HcalCalibDetId::ieta(), LEDCalibrationChannels::iphi, HcalCalibDetId::iphi(), kchanCalibHB_, kchanCalibHE1_, kchanCalibHE2_, kchanCalibHF1_, kchanCalibHF2_, kOffCalibHB_, kOffCalibHBX_, kOffCalibHE1_, kOffCalibHE2_, kOffCalibHEX_, kOffCalibHF1_, kOffCalibHF2_, kOffCalibHO1_, kOffCalibHO2_, kOffCalibHOX_, kPhiCalibHB_, kPhiCalibHBX_, kPhiCalibHE_, kPhiCalibHEX_, kPhiCalibHF1_, kPhiCalibHO0_, kPhiCalibHO1_, kPhiCalibHO2_, mPhiCalibHB_, mPhiCalibHE_, mPhiCalibHEX_, mPhiCalibHF1_, mPhiCalibHO0_, mPhiCalibHO1_, nchanCalibHB_, nchanCalibHE1_, nchanCalibHF1_, nchanCalibHO_, nEtaCalibHB_, nEtaCalibHE_, nEtaCalibHF_, nEtaCalibHO_, nPhiCalibHOX_, HcalCalibDetId::zside(), and ecaldqm::zside().

Referenced by HcalLogicalMapGenerator::buildCALIBMap(), HcalLogicalMapGenerator::buildHOXMap(), HcalLogicalMap::checkHashIds(), HcalLogicalMap::getHcalFrontEndId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdHB()

unsigned int HcalTopology::detId2denseIdHB ( const DetId id) const

return a linear packed id from HB

Definition at line 1169 of file HcalTopology.cc.

1169  {
1170  HcalDetId hid(id);
1171  const int ip(hid.iphi());
1172  const int ie(hid.ietaAbs());
1173  const int dp(hid.depth());
1174  const int zn(hid.zside() < 0 ? 1 : 0);
1175  unsigned int retval = 0xFFFFFFFFu;
1176  if (topoVersion_ == 0) {
1177  retval = (ip - 1) * 18 + dp - 1 + ie - (ie < 16 ? 1 : 0) + zn * kHBhalf;
1178  } else if (topoVersion_ == 10) {
1179  retval = (dp - 1) + maxDepthHB_ * (ip - 1);
1180  if (hid.ieta() > 0)
1181  retval += maxDepthHB_ * IPHI_MAX * (hid.ieta() - firstHBRing());
1182  else
1183  retval += maxDepthHB_ * IPHI_MAX * (hid.ieta() + lastHBRing() + nEtaHB_);
1184  }
1185  return retval;
1186 }

References HcalDetId::depth(), Calorimetry_cff::dp, firstHBRing(), HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), IPHI_MAX, kHBhalf, lastHBRing(), maxDepthHB_, nEtaHB_, topoVersion_, and HcalDetId::zside().

Referenced by HcalLogicalMapGenerator::buildHBEFTMap(), HcalLogicalMap::checkHashIds(), HcalLogicalMap::getHcalFrontEndId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdHE()

unsigned int HcalTopology::detId2denseIdHE ( const DetId id) const

return a linear packed id from HE

Definition at line 1188 of file HcalTopology.cc.

1188  {
1189  HcalDetId hid(id);
1190  const int ip(hid.iphi());
1191  const int ie(hid.ietaAbs());
1192  const int dp(hid.depth());
1193  const int zn(hid.zside() < 0 ? 1 : 0);
1194  unsigned int retval = 0xFFFFFFFFu;
1195  if (topoVersion_ == 0) {
1196  retval = (ip - 1) * 8 + (ip / 2) * 20 +
1197  ((ie == 16 || ie == 17)
1198  ? ie - 16
1199  : ((ie >= 18 && ie <= 20)
1200  ? 2 + 2 * (ie - 18) + dp - 1
1201  : ((ie >= 21 && ie <= 26) ? 8 + 2 * (ie - 21) + dp - 1
1202  : ((ie >= 27 && ie <= 28) ? 20 + 3 * (ie - 27) + dp - 1
1203  : 26 + 2 * (ie - 29) + dp - 1)))) +
1204  zn * kHEhalf;
1205  } else if (topoVersion_ == 10) {
1206  retval = (dp - 1) + maxDepthHE_ * (ip - 1);
1207  if (hid.ieta() > 0)
1208  retval += maxDepthHE_ * maxPhiHE_ * (hid.ieta() - firstHERing());
1209  else
1210  retval += maxDepthHE_ * maxPhiHE_ * (hid.ieta() + lastHERing() + nEtaHE_);
1211  }
1212  return retval;
1213 }

References HcalDetId::depth(), Calorimetry_cff::dp, firstHERing(), HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), kHEhalf, lastHERing(), maxDepthHE_, maxPhiHE_, nEtaHE_, topoVersion_, and HcalDetId::zside().

Referenced by HcalLogicalMapGenerator::buildHBEFTMap(), HcalLogicalMap::checkHashIds(), HcalLogicalMap::getHcalFrontEndId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdHF()

unsigned int HcalTopology::detId2denseIdHF ( const DetId id) const

return a linear packed id from HF

Definition at line 1233 of file HcalTopology.cc.

1233  {
1234  HcalDetId hid(id);
1235  const int ip(hid.iphi());
1236  const int ie(hid.ietaAbs());
1237  const int dp(hid.depth());
1238  const int zn(hid.zside() < 0 ? 1 : 0);
1239 
1240  unsigned int retval = 0xFFFFFFFFu;
1241  if (topoVersion_ == 0) {
1242  retval = ((ip - 1) / 4) * 4 + ((ip - 1) / 2) * 22 + 2 * (ie - 29) + (dp - 1) + zn * kHFhalf;
1243  } else if (topoVersion_ == 10) {
1244  retval = dp - 1 + 2 * (ip - 1);
1245  if (hid.ieta() > 0)
1246  retval += maxDepthHF_ * IPHI_MAX * (hid.ieta() - 29);
1247  else
1248  retval += maxDepthHF_ * IPHI_MAX * ((41 + 13) + hid.ieta());
1249  }
1250  return retval;
1251 }

References HcalDetId::depth(), Calorimetry_cff::dp, HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), IPHI_MAX, kHFhalf, maxDepthHF_, topoVersion_, and HcalDetId::zside().

Referenced by HcalLogicalMapGenerator::buildHBEFTMap(), HcalLogicalMap::checkHashIds(), HcalLogicalMap::getHcalFrontEndId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdHO()

unsigned int HcalTopology::detId2denseIdHO ( const DetId id) const

return a linear packed id from HO

Definition at line 1215 of file HcalTopology.cc.

1215  {
1216  HcalDetId hid(id);
1217  const int ip(hid.iphi());
1218  const int ie(hid.ietaAbs());
1219  const int zn(hid.zside() < 0 ? 1 : 0);
1220 
1221  unsigned int retval = 0xFFFFFFFFu;
1222  if (topoVersion_ == 0) {
1223  retval = (ip - 1) * 15 + (ie - 1) + zn * kHOhalf;
1224  } else if (topoVersion_ == 10) {
1225  if (hid.ieta() > 0)
1226  retval = (ip - 1) + IPHI_MAX * (hid.ieta() - 1);
1227  else
1228  retval = (ip - 1) + IPHI_MAX * (30 + hid.ieta());
1229  }
1230  return retval;
1231 }

References HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), IPHI_MAX, kHOhalf, topoVersion_, and HcalDetId::zside().

Referenced by HcalLogicalMapGenerator::buildHOXMap(), HcalLogicalMap::checkHashIds(), HcalLogicalMap::getHcalFrontEndId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdHT()

unsigned int HcalTopology::detId2denseIdHT ( const DetId id) const

return a linear packed id from HT

Definition at line 1253 of file HcalTopology.cc.

1253  {
1254  HcalTrigTowerDetId tid(id);
1255  int zside = tid.zside();
1256  unsigned int ietaAbs = tid.ietaAbs();
1257  unsigned int iphi = tid.iphi();
1258  unsigned int ivers = tid.version();
1259 
1260  unsigned int index;
1261  if (ivers == 0) {
1262  if ((iphi - 1) % 4 == 0)
1263  index = (iphi - 1) * 32 + (ietaAbs - 1) - (12 * ((iphi - 1) / 4));
1264  else
1265  index = (iphi - 1) * 28 + (ietaAbs - 1) + (4 * (((iphi - 1) / 4) + 1));
1266  if (zside == -1)
1267  index += kHThalf;
1268  } else {
1269  index = kHTSizePreLS1;
1270  if (zside == -1)
1271  index += ((kHTSizePhase1 - kHTSizePreLS1) / 2);
1272  index += (36 * (ietaAbs - 30) + ((iphi - 1) / 2));
1273  }
1274 
1275  return index;
1276 }

References HcalTrigTowerDetId::ietaAbs(), HcalTrigTowerDetId::iphi(), LEDCalibrationChannels::iphi, kHThalf, kHTSizePhase1, kHTSizePreLS1, HcalTrigTowerDetId::version(), HcalTrigTowerDetId::zside(), and ecaldqm::zside().

Referenced by HcalLogicalMap::checkHashIds(), CaloTPGTranscoderULUT::getOutputLUTId(), and HcalCondObjectContainerBase::indexFor().

◆ detId2denseIdPreLS1()

unsigned int HcalTopology::detId2denseIdPreLS1 ( const DetId id) const
private

Definition at line 1140 of file HcalTopology.cc.

1140  {
1141  HcalDetId hid(id);
1142  const HcalSubdetector sd(hid.subdet());
1143  const int ip(hid.iphi());
1144  const int ie(hid.ietaAbs());
1145  const int dp(hid.depth());
1146  const int zn(hid.zside() < 0 ? 1 : 0);
1147  unsigned int retval =
1148  ((sd == HcalBarrel)
1149  ? (ip - 1) * 18 + dp - 1 + ie - (ie < 16 ? 1 : 0) + zn * kHBhalf
1150  : ((sd == HcalEndcap)
1151  ? 2 * kHBhalf + (ip - 1) * 8 + (ip / 2) * 20 +
1152  ((ie == 16 || ie == 17)
1153  ? ie - 16
1154  : ((ie >= 18 && ie <= 20)
1155  ? 2 + 2 * (ie - 18) + dp - 1
1156  : ((ie >= 21 && ie <= 26)
1157  ? 8 + 2 * (ie - 21) + dp - 1
1158  : ((ie >= 27 && ie <= 28) ? 20 + 3 * (ie - 27) + dp - 1
1159  : 26 + 2 * (ie - 29) + dp - 1)))) +
1160  zn * kHEhalf
1161  : ((sd == HcalOuter)
1162  ? 2 * kHBhalf + 2 * kHEhalf + (ip - 1) * 15 + (ie - 1) + zn * kHOhalf
1163  : ((sd == HcalForward) ? 2 * kHBhalf + 2 * kHEhalf + 2 * kHOhalf + ((ip - 1) / 4) * 4 +
1164  ((ip - 1) / 2) * 22 + 2 * (ie - 29) + (dp - 1) + zn * kHFhalf
1165  : 0xFFFFFFFFu))));
1166  return retval;
1167 }

References HcalDetId::depth(), Calorimetry_cff::dp, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalDetId::ietaAbs(), HcalDetId::iphi(), kHBhalf, kHEhalf, kHFhalf, kHOhalf, sd, HcalDetId::subdet(), and HcalDetId::zside().

Referenced by detId2denseId().

◆ doublePhiBins()

int HcalTopology::doublePhiBins ( ) const
inline

Definition at line 106 of file HcalTopology.h.

106 { return doublePhiBins_; }

References doublePhiBins_.

◆ down()

std::vector< DetId > HcalTopology::down ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in down direction (inward)

Implements CaloSubdetectorTopology.

Definition at line 457 of file HcalTopology.cc.

457  {
458  HcalDetId neighbor = id;
459  std::vector<DetId> vNeighborsDetId;
460  if (decrementDepth(neighbor)) {
461  if (neighbor.oldFormat())
462  neighbor.changeForm();
463  vNeighborsDetId.emplace_back(neighbor);
464  }
465  return vNeighborsDetId;
466 }

References HcalDetId::changeForm(), decrementDepth(), triggerObjects_cff::id, and HcalDetId::oldFormat().

◆ east()

std::vector< DetId > HcalTopology::east ( const DetId id) const
overridevirtual

Flag=0 for unmerged Id's; =1 for for merged Id's; =2 for either Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 402 of file HcalTopology.cc.

402  {
403  std::vector<DetId> vNeighborsDetId;
404  HcalDetId neighbors[2];
405  for (int i = 0; i < decIEta(HcalDetId(id), neighbors); i++) {
406  if (neighbors[i].oldFormat())
407  neighbors[i].changeForm();
408  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
409  }
410  return vNeighborsDetId;
411 }

References decIEta(), and mps_fire::i.

◆ etaMax()

double HcalTopology::etaMax ( HcalSubdetector  subdet) const

Definition at line 1100 of file HcalTopology.cc.

1100  {
1101  double eta(0);
1102  switch (subdet) {
1103  case (HcalBarrel):
1104  if (lastHBRing_ < (int)(etaTable.size()))
1106  break;
1107  case (HcalEndcap):
1108  if (lastHERing_ < (int)(etaTable.size()) && nEtaHE_ > 0)
1110  break;
1111  case (HcalOuter):
1112  if (lastHORing_ < (int)(etaTable.size()))
1114  break;
1115  case (HcalForward):
1116  if (!etaTableHF.empty())
1117  eta = etaTableHF[etaTableHF.size() - 1];
1118  break;
1119  default:
1120  eta = 0;
1121  }
1122  return eta;
1123 }

References PVValHelper::eta, etaTable, etaTableHF, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, lastHBRing_, lastHERing_, lastHORing_, and nEtaHE_.

Referenced by HcalGeometry::getCells(), and HcalGeometry::getClosestCell().

◆ etaRange()

std::pair< double, double > HcalTopology::etaRange ( HcalSubdetector  subdet,
int  ieta 
) const

Definition at line 1124 of file HcalTopology.cc.

1124  {
1125  int ieta = (keta > 0) ? keta : -keta;
1126  if (subdet == HcalForward) {
1127  if (ieta >= firstHFRing_) {
1128  unsigned int ii = (unsigned int)(ieta - firstHFRing_);
1129  if (ii + 1 < etaTableHF.size())
1130  return std::pair<double, double>(etaTableHF[ii], etaTableHF[ii + 1]);
1131  }
1132  } else {
1133  int ietal = (mode_ == HcalTopologyMode::LHC && ieta == lastHERing_ - 1) ? (ieta + 1) : ieta;
1134  if ((ietal < (int)(etaTable.size())) && (ieta > 0))
1135  return std::pair<double, double>(etaTable[ieta - 1], etaTable[ietal]);
1136  }
1137  return std::pair<double, double>(0, 0);
1138 }

References etaTable, etaTableHF, firstHFRing_, HcalForward, LEDCalibrationChannels::ieta, cuy::ii, createfilelist::int, lastHERing_, HcalTopologyMode::LHC, and mode_.

Referenced by HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHFStatusBitFromRecHits::hfSetFlagFromRecHits(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HcaluLUTTPGCoder::make_cosh_ieta_map(), and HcalTrigTowerGeometry::towerEtaBounds().

◆ etaRing()

int HcalTopology::etaRing ( HcalSubdetector  subdet,
double  eta 
) const

eta and phi index from eta, phi values

Definition at line 997 of file HcalTopology.cc.

997  {
998  int etaring = firstHBRing_;
999  if (bc == HcalForward) {
1000  etaring = firstHFRing_;
1001  for (unsigned int k = 0; k < etaTableHF.size() - 1; ++k) {
1002  if (abseta < etaTableHF[k + 1]) {
1003  etaring += k;
1004  break;
1005  }
1006  }
1007  } else {
1008  for (unsigned int k = 0; k < etaTable.size() - 1; ++k) {
1009  if (abseta < etaTable[k + 1]) {
1010  etaring += k;
1011  break;
1012  }
1013  }
1014  if (abseta >= etaTable[etaTable.size() - 1])
1015  etaring = lastHERing_;
1016  }
1017  return etaring;
1018 }

References etaTable, etaTableHF, firstHBRing_, firstHFRing_, HcalForward, dqmdumpme::k, and lastHERing_.

Referenced by decrementDepth(), depthBinInformation(), HcalGeometry::etaRing(), incrementDepth(), and nPhiBins().

◆ exclude() [1/2]

void HcalTopology::exclude ( const HcalDetId id)

Add a cell to exclusion list

Definition at line 376 of file HcalTopology.cc.

376  {
377  std::vector<HcalDetId>::iterator i = std::lower_bound(exclusionList_.begin(), exclusionList_.end(), id);
378  if (i == exclusionList_.end() || *i != id) {
379  exclusionList_.insert(i, id);
380  }
381 }

References exclusionList_, mps_fire::i, triggerObjects_cff::id, and pfDeepBoostedJetPreprocessParams_cfi::lower_bound.

Referenced by exclude(), and HcalTopologyRestrictionParser::parse().

◆ exclude() [2/2]

int HcalTopology::exclude ( HcalSubdetector  subdet,
int  ieta1,
int  ieta2,
int  iphi1,
int  iphi2,
int  depth1 = 1,
int  depth2 = 4 
)

Exclude an eta/phi/depth range for a given subdetector

Definition at line 468 of file HcalTopology.cc.

468  {
469  bool exed = false;
470  // first, check the full detector exclusions... (fast)
471  switch (subdet) {
472  case (HcalBarrel):
473  exed = excludeHB_;
474  break;
475  case (HcalEndcap):
476  exed = excludeHE_;
477  break;
478  case (HcalOuter):
479  exed = excludeHO_;
480  break;
481  case (HcalForward):
482  exed = excludeHF_;
483  break;
484  default:
485  exed = false;
486  }
487  if (exed)
488  return 0; // if the whole detector is excluded...
489 
490  int ieta_l = std::min(ieta1, ieta2);
491  int ieta_h = std::max(ieta1, ieta2);
492  int iphi_l = std::min(iphi1, iphi2);
493  int iphi_h = std::max(iphi1, iphi2);
494  int depth_l = std::min(depth1, depth2);
495  int depth_h = std::max(depth1, depth2);
496 
497  int n = 0;
498  for (int ieta = ieta_l; ieta <= ieta_h; ieta++)
499  for (int iphi = iphi_l; iphi <= iphi_h; iphi++)
500  for (int depth = depth_l; depth <= depth_h; depth++) {
501  HcalDetId id(subdet, ieta, iphi, depth);
502  if (validRaw(id)) { // use 'validRaw' to include check validity in "uncut" detector
503  exclude(id);
504  n++;
505  }
506  }
507  return n;
508 }

References LEDCalibrationChannels::depth, exclude(), excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, triggerObjects_cff::id, LEDCalibrationChannels::ieta, hcaltpdigi_cfi::ieta1, hcaltpdigi_cfi::ieta2, LEDCalibrationChannels::iphi, SiStripPI::max, min(), dqmiodumpmetadata::n, and validRaw().

◆ excludeSubdetector()

void HcalTopology::excludeSubdetector ( HcalSubdetector  subdet)

Exclude an entire subdetector

Definition at line 383 of file HcalTopology.cc.

383  {
384  switch (subdet) {
385  case (HcalBarrel):
386  excludeHB_ = true;
387  break;
388  case (HcalEndcap):
389  excludeHE_ = true;
390  break;
391  case (HcalOuter):
392  excludeHO_ = true;
393  break;
394  case (HcalForward):
395  excludeHF_ = true;
396  break;
397  default:
398  break;
399  }
400 }

References excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by HcalTopologyRestrictionParser::parse().

◆ firstHBRing()

int HcalTopology::firstHBRing ( ) const
inline

◆ firstHEDoublePhiRing()

int HcalTopology::firstHEDoublePhiRing ( ) const
inline

◆ firstHEQuadPhiRing()

int HcalTopology::firstHEQuadPhiRing ( ) const
inline

◆ firstHERing()

int HcalTopology::firstHERing ( ) const
inline

◆ firstHETripleDepthRing()

int HcalTopology::firstHETripleDepthRing ( ) const
inline

Definition at line 104 of file HcalTopology.h.

104 { return firstHETripleDepthRing_; }

References firstHETripleDepthRing_.

Referenced by depthBinInformation(), and validRaw().

◆ firstHFQuadPhiRing()

int HcalTopology::firstHFQuadPhiRing ( ) const
inline

◆ firstHFRing()

int HcalTopology::firstHFRing ( ) const
inline

◆ firstHORing()

int HcalTopology::firstHORing ( ) const
inline

Definition at line 98 of file HcalTopology.h.

98 { return firstHORing_; }

References firstHORing_.

Referenced by CaloTowerTopology::CaloTowerTopology(), and CaloTowerTopology::convertHcaltoCT().

◆ getCALIBSize()

unsigned int HcalTopology::getCALIBSize ( ) const
inline

Definition at line 137 of file HcalTopology.h.

137 { return CALIBSize_; }

References CALIBSize_.

Referenced by HcalCondObjectContainerBase::sizeFor().

◆ getDepthSegmentation()

void HcalTopology::getDepthSegmentation ( const unsigned  ring,
std::vector< int > &  readoutDepths,
const bool  flag = false 
) const

for each of the ~17 depth segments, specify which readout bin they belong to if the ring is not found, the first one with a lower ring will be returned.

Definition at line 1064 of file HcalTopology.cc.

1064  {
1065  // if it doesn't exist, return the first entry with a lower index. So if we only
1066  // have entries for 1 and 17, any input from 1-16 should return the entry for ring 1
1067  SegmentationMap::const_iterator pos;
1068  if (!one) {
1069  pos = depthSegmentation_.upper_bound(ring);
1070  if (pos == depthSegmentation_.begin()) {
1071  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
1072  }
1073  } else {
1074  pos = depthSegmentationOne_.upper_bound(ring);
1075  if (pos == depthSegmentationOne_.begin()) {
1076  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
1077  }
1078  }
1079  --pos;
1080  // pos now refers to the last element with key <= ring.
1081  readoutDepths = pos->second;
1082 }

References depthSegmentation_, depthSegmentationOne_, Exception, SiPixelPI::one, and relativeConstraints::ring.

Referenced by HcalDbHardcode::getLayersInDepth(), HcalHardcodeGeometryLoader::load(), and segmentBoundaries().

◆ getHBSize()

unsigned int HcalTopology::getHBSize ( ) const
inline

Definition at line 132 of file HcalTopology.h.

132 { return HBSize_; }

References HBSize_.

Referenced by HcalGeometry::init(), and HcalCondObjectContainerBase::sizeFor().

◆ getHESize()

unsigned int HcalTopology::getHESize ( ) const
inline

Definition at line 133 of file HcalTopology.h.

133 { return HESize_; }

References HESize_.

Referenced by HcalGeometry::init(), and HcalCondObjectContainerBase::sizeFor().

◆ getHFSize()

unsigned int HcalTopology::getHFSize ( ) const
inline

◆ getHOSize()

unsigned int HcalTopology::getHOSize ( ) const
inline

Definition at line 134 of file HcalTopology.h.

134 { return HOSize_; }

References HOSize_.

Referenced by HcalGeometry::init(), and HcalCondObjectContainerBase::sizeFor().

◆ getHTSize()

unsigned int HcalTopology::getHTSize ( ) const
inline

Definition at line 136 of file HcalTopology.h.

136 { return HTSize_; }

References HTSize_.

Referenced by CaloTPGTranscoderULUT::setup(), and HcalCondObjectContainerBase::sizeFor().

◆ getMergePositionFlag()

bool HcalTopology::getMergePositionFlag ( ) const
inline

◆ getNumberOfShapes()

unsigned int HcalTopology::getNumberOfShapes ( ) const
inline

Definition at line 161 of file HcalTopology.h.

161 { return numberOfShapes_; }

References numberOfShapes_.

Referenced by HcalGeometry::numberOfShapes().

◆ getPhiZOne()

int HcalTopology::getPhiZOne ( std::vector< std::pair< int, int > > &  phiz) const
inline

Definition at line 130 of file HcalTopology.h.

130 { return hcons_->getPhiZOne(phiz); }

References HcalDDDRecConstants::getPhiZOne(), and hcons_.

◆ idBack()

HcalDetId HcalTopology::idBack ( const HcalDetId id) const
inline

Definition at line 171 of file HcalTopology.h.

171 { return hcons_->idBack(id); }

References hcons_, and HcalDDDRecConstants::idBack().

Referenced by CaloTowersCreationAlgo::hadShwPosFromCells(), and CaloTowersCreationAlgo::hadShwrPos().

◆ idFront()

HcalDetId HcalTopology::idFront ( const HcalDetId id) const
inline

◆ incAIEta()

int HcalTopology::incAIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const
private

Get the neighbors of the given cell with higher absolute ieta

Increasing in |ieta|, there is always at most one neighbor

Definition at line 744 of file HcalTopology.cc.

744  {
745  int n = 1;
746  int aieta = id.ietaAbs();
747 
748  if (aieta == firstHEDoublePhiRing() - 1 && (id.iphi() % 2) == 0)
749  neighbors[0] = HcalDetId(id.subdet(), (aieta + 1) * id.zside(), id.iphi() - 1, id.depth());
750  else if (aieta == firstHFQuadPhiRing() - 1 && ((id.iphi() + 1) % 4) != 0)
751  neighbors[0] =
752  HcalDetId(id.subdet(), (aieta + 1) * id.zside(), ((id.iphi() == 1) ? (71) : (id.iphi() - 2)), id.depth());
753  else if (aieta == firstHEQuadPhiRing() - 1 && ((id.iphi() + 1) % 4) != 0)
754  neighbors[0] =
755  HcalDetId(id.subdet(), (aieta + 1) * id.zside(), ((id.iphi() == 1) ? (71) : (id.iphi() - 2)), id.depth());
756  else if (aieta == lastHBRing() && id.subdet() == HcalBarrel)
757  neighbors[0] = HcalDetId(HcalEndcap, (aieta + 1) * id.zside(), id.iphi(), 1);
758  else if (aieta == lastHERing() && id.subdet() == HcalEndcap)
759  neighbors[0] = HcalDetId(HcalForward, etaHE2HF_ * id.zside(), id.iphi(), 1);
760  else
761  neighbors[0] = HcalDetId(id.subdet(), (aieta + 1) * id.zside(), id.iphi(), id.depth());
762 
763  if (!valid(neighbors[0]))
764  n = 0;
765  return n;
766 }

References LEDCalibrationChannels::depth, etaHE2HF_, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, LEDCalibrationChannels::iphi, lastHBRing(), lastHERing(), dqmiodumpmetadata::n, valid(), and ecaldqm::zside().

Referenced by decIEta(), and incIEta().

◆ incIEta()

int HcalTopology::incIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

Get the neighbors of the given cell with higher (signed) ieta

Definition at line 729 of file HcalTopology.cc.

729  {
730  if (id.zside() == 1)
731  return incAIEta(id, neighbors);
732  else
733  return decAIEta(id, neighbors);
734 }

References decAIEta(), incAIEta(), and ecaldqm::zside().

Referenced by west().

◆ incIPhi()

bool HcalTopology::incIPhi ( const HcalDetId id,
HcalDetId neighbor 
) const

Get the neighbor (if present) of the given cell with higher iphi

Definition at line 626 of file HcalTopology.cc.

626  {
627  bool ok = valid(id);
628  if (ok) {
629  switch (id.subdet()) {
630  case (HcalBarrel):
631  case (HcalOuter):
632  if (id.iphi() == IPHI_MAX)
633  neighbor = HcalDetId(id.subdet(), id.ieta(), 1, id.depth());
634  else
635  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 1, id.depth());
636  break;
637  case (HcalEndcap):
638  if (id.ietaAbs() >= firstHEQuadPhiRing()) {
639  if (id.iphi() == IPHI_MAX - 1)
640  neighbor = HcalDetId(id.subdet(), id.ieta(), 3, id.depth());
641  else
642  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 4, id.depth());
643  } else if (id.ietaAbs() >= firstHEDoublePhiRing()) {
644  if (id.iphi() == IPHI_MAX - 1)
645  neighbor = HcalDetId(id.subdet(), id.ieta(), 1, id.depth());
646  else
647  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 2, id.depth());
648  } else {
649  if (id.iphi() == maxPhiHE_)
650  neighbor = HcalDetId(id.subdet(), id.ieta(), 1, id.depth());
651  else
652  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 1, id.depth());
653  }
654  break;
655  case (HcalForward):
656  if (id.ietaAbs() >= firstHFQuadPhiRing()) {
657  if (id.iphi() == IPHI_MAX - 1)
658  neighbor = HcalDetId(id.subdet(), id.ieta(), 3, id.depth());
659  else
660  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 4, id.depth());
661  } else {
662  if (id.iphi() == IPHI_MAX - 1)
663  neighbor = HcalDetId(id.subdet(), id.ieta(), 1, id.depth());
664  else
665  neighbor = HcalDetId(id.subdet(), id.ieta(), id.iphi() + 2, id.depth());
666  }
667  if (!validRaw(neighbor))
668  ok = false;
669  break;
670  default:
671  ok = false;
672  }
673  }
674  return ok;
675 }

References LEDCalibrationChannels::depth, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, IPHI_MAX, maxPhiHE_, convertSQLiteXML::ok, valid(), and validRaw().

Referenced by north(), and HFStripFilter::runFilter().

◆ incrementDepth()

bool HcalTopology::incrementDepth ( HcalDetId id) const

Get the detector behind this one

Definition at line 869 of file HcalTopology.cc.

869  {
870  HcalSubdetector subdet = detId.subdet();
871  int ieta = detId.ieta();
872  int etaRing = detId.ietaAbs();
873  int depth = detId.depth();
874  int iphi = detId.iphi();
875  int zside = detId.zside();
876  int nDepthBins(0), startingBin(0);
877  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
878 
879  // see if the new depth bin exists
880  ++depth;
881  if (depth >= (startingBin + nDepthBins)) {
882  // handle on a case-by-case basis
883  if (subdet == HcalBarrel && etaRing < lastHORing()) {
884  // HO
885  subdet = HcalOuter;
886  depth = 4;
887  } else if (subdet == HcalBarrel && etaRing == lastHBRing()) {
888  // overlap
889  subdet = HcalEndcap;
892  } else if (subdet == HcalEndcap && etaRing == lastHERing() - 1 && mode_ != HcalTopologyMode::SLHC) {
893  // guard ring HF29 is behind HE 28
894  subdet = HcalForward;
895  (ieta > 0) ? ++ieta : --ieta;
896  depth = 1;
897  } else if (subdet == HcalEndcap && etaRing == lastHERing() && mode_ != HcalTopologyMode::SLHC) {
898  // split cells go to bigger granularity. Ring 29 -> 28
899  (ieta > 0) ? --ieta : ++ieta;
900  } else {
901  // no more chances
902  detId = HcalDetId();
903  return false;
904  }
905  }
906  detId = HcalDetId(subdet, ieta, iphi, depth);
907  return validRaw(detId);
908 }

References LEDCalibrationChannels::depth, HcalDetId::depth(), depthBinInformation(), etaRing(), HcalDDDRecConstants::getDepthEta16(), HcalTopologyMode::H2HE, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons_, LEDCalibrationChannels::ieta, HcalDetId::ieta(), HcalDetId::ietaAbs(), LEDCalibrationChannels::iphi, HcalDetId::iphi(), lastHBRing(), lastHERing(), lastHORing(), mode_, HcalTopologyMode::SLHC, HcalDetId::subdet(), validRaw(), HcalDetId::zside(), and ecaldqm::zside().

Referenced by HcalGeometry::getClosestCell(), and up().

◆ isBH()

bool HcalTopology::isBH ( ) const
inline

Definition at line 162 of file HcalTopology.h.

162 { return ((hcons_ == nullptr) ? false : hcons_->isBH()); }

References hcons_, and HcalDDDRecConstants::isBH().

Referenced by CaloTowerTopology::CaloTowerTopology().

◆ isExcluded()

bool HcalTopology::isExcluded ( const HcalDetId id) const
private

Definition at line 348 of file HcalTopology.cc.

348  {
349  bool exed = false;
350  // first, check the full detector exclusions... (fast)
351  switch (id.subdet()) {
352  case (HcalBarrel):
353  exed = excludeHB_;
354  break;
355  case (HcalEndcap):
356  exed = excludeHE_;
357  break;
358  case (HcalOuter):
359  exed = excludeHO_;
360  break;
361  case (HcalForward):
362  exed = excludeHF_;
363  break;
364  default:
365  exed = false;
366  }
367  // next, check the list (slower)
368  if (!exed && !exclusionList_.empty()) {
369  std::vector<HcalDetId>::const_iterator i = std::lower_bound(exclusionList_.begin(), exclusionList_.end(), id);
370  if (i != exclusionList_.end() && *i == id)
371  exed = true;
372  }
373  return exed;
374 }

References excludeHB_, excludeHE_, excludeHF_, excludeHO_, exclusionList_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, triggerObjects_cff::id, and pfDeepBoostedJetPreprocessParams_cfi::lower_bound.

Referenced by validHcal().

◆ lastHBHERing()

int HcalTopology::lastHBHERing ( ) const
inline

Definition at line 95 of file HcalTopology.h.

95 { return std::max(lastHBRing_, lastHERing_); }

References lastHBRing_, lastHERing_, and SiStripPI::max.

Referenced by CaloTPGTranscoderULUT::getOutputLUTSize().

◆ lastHBRing()

int HcalTopology::lastHBRing ( ) const
inline

◆ lastHERing()

int HcalTopology::lastHERing ( ) const
inline

◆ lastHFRing()

int HcalTopology::lastHFRing ( ) const
inline

◆ lastHORing()

int HcalTopology::lastHORing ( ) const
inline

◆ maxDepth() [1/2]

int HcalTopology::maxDepth ( HcalSubdetector  subdet) const

Definition at line 986 of file HcalTopology.cc.

986  {
987  if (bc == HcalBarrel)
988  return maxDepthHB_;
989  else if (bc == HcalEndcap)
990  return maxDepthHE_;
991  else if (bc == HcalForward)
992  return maxDepthHF_;
993  else
994  return 4;
995 }

References HcalBarrel, HcalEndcap, HcalForward, maxDepthHB_, maxDepthHE_, and maxDepthHF_.

◆ maxDepth() [2/2]

int HcalTopology::maxDepth ( void  ) const

Definition at line 980 of file HcalTopology.cc.

980  {
981  int maxd1 = std::max(maxDepthHB_, maxDepthHE_);
982  int maxd2 = std::max(maxDepthHF_, minMaxDepth_);
983  return std::max(maxd1, maxd2);
984 }

References SiStripPI::max, maxDepthHB_, maxDepthHE_, maxDepthHF_, and minMaxDepth_.

Referenced by HcalGeometry::getCells(), and HcaluLUTTPGCoder::init().

◆ maxDepthHB()

int HcalTopology::maxDepthHB ( ) const
inline

Definition at line 139 of file HcalTopology.h.

139 { return maxDepthHB_; }

References maxDepthHB_.

Referenced by RecAnalyzerMinbias::beginRun(), and HcalTopology().

◆ maxDepthHE()

int HcalTopology::maxDepthHE ( ) const
inline

Definition at line 140 of file HcalTopology.h.

140 { return maxDepthHE_; }

References maxDepthHE_.

Referenced by RecAnalyzerMinbias::beginRun(), HcalTopology(), and HcalTrigTowerGeometry::towerIds().

◆ mergedDepth29()

bool HcalTopology::mergedDepth29 ( HcalDetId  id) const
inline

◆ mergedDepthDetId()

HcalDetId HcalTopology::mergedDepthDetId ( const HcalDetId id) const
inline

◆ mergedDepthList29()

std::vector<int> HcalTopology::mergedDepthList29 ( HcalDetId  id) const
inline

◆ mode()

HcalTopologyMode::Mode HcalTopology::mode ( void  ) const
inline

Definition at line 34 of file HcalTopology.h.

34 { return mode_; }

References mode_.

Referenced by HcalHardcodeGeometryLoader::load(), and HcalFlexiHardcodeGeometryLoader::load().

◆ ncells()

unsigned int HcalTopology::ncells ( ) const
overridevirtual

return a count of valid cells (for dense indexing use)

Reimplemented from CaloSubdetectorTopology.

Definition at line 1686 of file HcalTopology.cc.

1686 { return HBSize_ + HESize_ + HOSize_ + HFSize_; }

References HBSize_, HESize_, HFSize_, and HOSize_.

Referenced by denseId2detId(), HcalGeometry::getSummary(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), and HcalGeometry::sizeForDenseIndex().

◆ north()

std::vector< DetId > HcalTopology::north ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 424 of file HcalTopology.cc.

424  {
425  std::vector<DetId> vNeighborsDetId;
426  HcalDetId neighbor;
427  if (incIPhi(HcalDetId(id), neighbor)) {
428  if (neighbor.oldFormat())
429  neighbor.changeForm();
430  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
431  }
432  return vNeighborsDetId;
433 }

References HcalDetId::changeForm(), incIPhi(), HcalDetId::oldFormat(), and DetId::rawId().

◆ nPhiBins() [1/2]

int HcalTopology::nPhiBins ( HcalSubdetector  subdet,
int  etaRing 
) const

Definition at line 967 of file HcalTopology.cc.

967  {
968  double phiTableVal;
969  if (bc == HcalForward) {
970  phiTableVal = dPhiTableHF[etaRing - firstHFRing_];
971  } else {
972  phiTableVal = dPhiTable[etaRing - firstHBRing_];
973  }
974  int lastPhiBin = 0;
975  if (phiTableVal != 0.0)
976  lastPhiBin = static_cast<int>((2._pi / phiTableVal) + 0.001);
977  return lastPhiBin;
978 }

References dPhiTable, dPhiTableHF, etaRing(), firstHBRing_, firstHFRing_, and HcalForward.

◆ nPhiBins() [2/2]

int HcalTopology::nPhiBins ( int  etaRing) const

how many phi segments in this ring

Definition at line 955 of file HcalTopology.cc.

955  {
956  int lastPhiBin = singlePhiBins_;
958  lastPhiBin = doublePhiBins_ / 2;
959  else if (etaRing >= firstHEDoublePhiRing())
960  lastPhiBin = doublePhiBins_;
961  if (hcons_ && etaRing >= hcons_->getEtaRange(1).first && etaRing <= hcons_->getEtaRange(1).second) {
962  return nPhiBins(HcalBarrel, etaRing);
963  }
964  return lastPhiBin;
965 }

References doublePhiBins_, etaRing(), firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHFQuadPhiRing(), HcalDDDRecConstants::getEtaRange(), HcalBarrel, hcons_, and singlePhiBins_.

Referenced by CaloTowerHardcodeGeometryLoader::makeCell().

◆ phiBin()

int HcalTopology::phiBin ( HcalSubdetector  subdet,
int  etaRing,
double  phi 
) const

Definition at line 1020 of file HcalTopology.cc.

1020  {
1021  //put phi in correct range (0->2pi)
1022  int index(0);
1023  if (bc == HcalBarrel) {
1024  index = (etaring - firstHBRing_);
1025  phi -= phioff[0];
1026  } else if (bc == HcalEndcap) {
1027  index = (etaring - firstHBRing_);
1028  phi -= phioff[1];
1029  } else if (bc == HcalForward) {
1030  index = (etaring - firstHFRing_);
1031  if (index < static_cast<int>(dPhiTableHF.size())) {
1032  if (index >= 0 && unitPhiHF[index] > 2)
1033  phi -= phioff[4];
1034  else
1035  phi -= phioff[2];
1036  }
1037  }
1038  if (index < 0)
1039  index = 0;
1040  if (phi < 0.0)
1041  phi += 2._pi;
1042  else if (phi > 2._pi)
1043  phi -= 2._pi;
1044  int phibin(1), unit(1);
1045  if (bc == HcalForward) {
1046  if (index < (int)(dPhiTableHF.size())) {
1047  unit = unitPhiHF[index];
1048  phibin = static_cast<int>(phi / dPhiTableHF[index]) + 1;
1049  }
1050  } else {
1051  if (index < (int)(dPhiTable.size())) {
1052  phibin = static_cast<int>(phi / dPhiTable[index]) + 1;
1053  unit = unitPhi[index];
1054  }
1055  }
1056  int iphi(phibin);
1057  if (unit == 2)
1058  iphi = (phibin - 1) * 2 + 1;
1059  else if (unit == 4)
1060  iphi = (phibin - 1) * 4 + 3;
1061  return iphi;
1062 }

References dPhiTable, dPhiTableHF, firstHBRing_, firstHFRing_, HcalBarrel, HcalEndcap, HcalForward, LEDCalibrationChannels::iphi, phi, phioff, unit(), unitPhi, and unitPhiHF.

Referenced by HcalGeometry::phiBin().

◆ producerTag()

static std::string HcalTopology::producerTag ( )
inlinestatic

Definition at line 43 of file HcalTopology.h.

43 { return "HCAL"; }

◆ segmentBoundaries()

std::pair< int, int > HcalTopology::segmentBoundaries ( const unsigned  ring,
const unsigned  depth,
const bool  flag = false 
) const

returns the boundaries of the depth segmentation, so that the first result is the first segment, and the second result is the first one of the next segment. Used for calculating physical bounds.

Definition at line 1092 of file HcalTopology.cc.

1092  {
1093  std::vector<int> readoutDepths;
1094  getDepthSegmentation(ring, readoutDepths, one);
1095  int d1 = std::lower_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
1096  int d2 = std::upper_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
1097  return std::pair<int, int>(d1, d2);
1098 }

References d1, LEDCalibrationChannels::depth, getDepthSegmentation(), pfDeepBoostedJetPreprocessParams_cfi::lower_bound, SiPixelPI::one, relativeConstraints::ring, and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.

◆ setDepthSegmentation()

void HcalTopology::setDepthSegmentation ( const unsigned  ring,
const std::vector< int > &  readoutDepths,
const bool  flag 
)

Definition at line 1084 of file HcalTopology.cc.

1084  {
1085  if (one) {
1086  depthSegmentationOne_[ring] = readoutDepths;
1087  } else {
1088  depthSegmentation_[ring] = readoutDepths;
1089  }
1090 }

References depthSegmentation_, depthSegmentationOne_, SiPixelPI::one, and relativeConstraints::ring.

Referenced by HcalTopology().

◆ singlePhiBins()

int HcalTopology::singlePhiBins ( ) const
inline

Definition at line 105 of file HcalTopology.h.

105 { return singlePhiBins_; }

References singlePhiBins_.

◆ south()

std::vector< DetId > HcalTopology::south ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 435 of file HcalTopology.cc.

435  {
436  std::vector<DetId> vNeighborsDetId;
437  HcalDetId neighbor;
438  if (decIPhi(HcalDetId(id), neighbor)) {
439  if (neighbor.oldFormat())
440  neighbor.changeForm();
441  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
442  }
443  return vNeighborsDetId;
444 }

References HcalDetId::changeForm(), decIPhi(), HcalDetId::oldFormat(), and DetId::rawId().

◆ topoVersion()

int HcalTopology::topoVersion ( ) const
overridevirtual

return a version which identifies the given topology

Reimplemented from CaloSubdetectorTopology.

Definition at line 1688 of file HcalTopology.cc.

1688 { return topoVersion_; }

References topoVersion_.

Referenced by HcalCondObjectContainerBase::HcalCondObjectContainerBase(), and HcalCondObjectContainerBase::setTopo().

◆ triggerMode()

HcalTopologyMode::TriggerMode HcalTopology::triggerMode ( ) const
inline

◆ unmergeDepthDetId()

void HcalTopology::unmergeDepthDetId ( const HcalDetId id,
std::vector< HcalDetId > &  ids 
) const
inline

◆ up()

std::vector< DetId > HcalTopology::up ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in up direction (outward)

Implements CaloSubdetectorTopology.

Definition at line 446 of file HcalTopology.cc.

446  {
447  HcalDetId neighbor = id;
448  std::vector<DetId> vNeighborsDetId;
449  if (incrementDepth(neighbor)) {
450  if (neighbor.oldFormat())
451  neighbor.changeForm();
452  vNeighborsDetId.emplace_back(neighbor);
453  }
454  return vNeighborsDetId;
455 }

References HcalDetId::changeForm(), triggerObjects_cff::id, incrementDepth(), and HcalDetId::oldFormat().

◆ valid()

bool HcalTopology::valid ( const DetId id) const
overridevirtual

◆ validCalib()

bool HcalTopology::validCalib ( const HcalCalibDetId id) const

Definition at line 276 of file HcalTopology.cc.

276  {
277  bool ok(false);
278  if (tid.calibFlavor() == HcalCalibDetId::CalibrationBox) {
279  HcalSubdetector subdet = tid.hcalSubdet();
280  int ieta = tid.ieta();
281  int chan = tid.cboxChannel();
282  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
283  if (subdet == HcalBarrel) {
286  (iphi >= minPhi_) && (iphi <= maxPhi_))
287  ok = true;
288  } else if (subdet == HcalEndcap) {
291  (chan == chanCalibHE2_)) &&
292  (iphi >= minPhi_) && (iphi <= maxPhi_))
293  ok = true;
294  } else if (subdet == HcalForward) {
297  (chan == chanCalibHF2_)) &&
298  (iphi >= minPhi_) && (iphi <= maxPhi_))
299  ok = true;
300  } else if (subdet == HcalOuter) {
303  (chan == chanCalibHOs_)) &&
304  (iphi >= minPhi_) && (iphi <= maxPhi_))
305  ok = true;
306  }
307  } else if (tid.calibFlavor() == HcalCalibDetId::HOCrosstalk) {
308  int ieta = std::abs(tid.ieta());
309  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
311  (iphi >= minPhi_) && (iphi <= maxPhi_))
312  ok = true;
313  } else if (tid.calibFlavor() == HcalCalibDetId::HBX) {
314  int ieta = std::abs(tid.ieta());
315  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
316  if ((ieta == etaCalibHBX_) && (iphi >= minPhi_) && (iphi <= maxPhi_))
317  ok = true;
318  } else if (tid.calibFlavor() == HcalCalibDetId::HEX) {
319  int ieta = std::abs(tid.ieta());
320  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
322  (iphi >= minPhi_) && (iphi <= maxPhi_))
323  ok = true;
324  } else if ((tid.calibFlavor() == HcalCalibDetId::uMNqie) || (tid.calibFlavor() == HcalCalibDetId::LASERMON) ||
325  (tid.calibFlavor() == HcalCalibDetId::CastorRadFacility)) {
326  ok = true;
327  }
328  return ok;
329 }

References funct::abs(), HcalCalibDetId::calibFlavor(), HcalCalibDetId::CalibrationBox, HcalCalibDetId::CastorRadFacility, HcalCalibDetId::cboxChannel(), officialStyle::chan, chanCalibHB_, chanCalibHE1_, chanCalibHE2_, chanCalibHF1_, chanCalibHF2_, chanCalibHO_, chanCalibHOs_, etaCalibHB_, etaCalibHBX_, etaCalibHE_, etaCalibHEX_, etaCalibHF_, etaCalibHO_, etaCalibHOX_, spr::find(), HcalCalibDetId::HBX, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalCalibDetId::hcalSubdet(), HcalCalibDetId::HEX, HcalCalibDetId::HOCrosstalk, LEDCalibrationChannels::ieta, HcalCalibDetId::ieta(), LEDCalibrationChannels::iphi, HcalCalibDetId::iphi(), HcalCalibDetId::LASERMON, maxPhi_, minPhi_, nchanCalibHB_, nchanCalibHE1_, nchanCalibHF1_, nchanCalibHO_, nEtaCalibHB_, nEtaCalibHE_, nEtaCalibHEX_, nEtaCalibHF_, nEtaCalibHO_, nEtaCalibHOX_, convertSQLiteXML::ok, and HcalCalibDetId::uMNqie.

Referenced by validRaw().

◆ validDetId()

bool HcalTopology::validDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 235 of file HcalTopology.cc.

235  {
236  return validHcal(HcalDetId(subdet, ieta, iphi, depth));
237 }

References LEDCalibrationChannels::depth, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and validHcal().

◆ validDetIdPreLS1()

bool HcalTopology::validDetIdPreLS1 ( const HcalDetId id) const
private

Is this a valid cell id, ignoring the exclusion list

Basic rules used to derive this code:

HB has 72 towers in iphi. Ieta 1-14 have depth=1, Ieta 15-16 have depth=1 or 2.

HE ieta=16-20 have 72 towers in iphi ieta=21-29 have 36 towers in iphi ieta=16 is depth 3 only ieta=17 is depth 1 only ieta=18-26 & 29 have depth 1 and 2 ieta=27-28 has depth 1-3

HF ieta=29-39 have 36 in iphi ieta=40-41 have 18 in iphi (71,3,7,11...) all have two depths

HO has 15 towers in ieta and 72 in iphi and depth = 4 (one value)

At H2:

HE ieta 17 is two depths HE ieta 22- have 36 towers in iphi (starts one higher) HE ieta 24- has three depths

Definition at line 536 of file HcalTopology.cc.

536  {
537  const HcalSubdetector sd(id.subdet());
538  const int ie(id.ietaAbs());
539  const int ip(id.iphi());
540  const int dp(id.depth());
541 
542  return ((ip >= 1) && (ip <= IPHI_MAX) && (dp >= 1) && (ie >= 1) &&
543  (((sd == HcalBarrel) && (((ie <= 14) && (dp == 1)) || (((ie == 15) || (ie == 16)) && (dp <= 2)))) ||
544  ((sd == HcalEndcap) &&
545  (((ie == firstHERing()) && (dp == 3)) || ((ie == 17) && (dp == 1)) ||
546  ((ie >= 18) && (ie <= 20) && (dp <= 2)) || ((ie >= 21) && (ie <= 26) && (dp <= 2) && (ip % 2 == 1)) ||
547  ((ie >= 27) && (ie <= 28) && (dp <= 3) && (ip % 2 == 1)) || ((ie == 29) && (dp <= 2) && (ip % 2 == 1)))) ||
548  ((sd == HcalOuter) && (ie <= 15) && (dp == 4)) ||
549  ((sd == HcalForward) && (dp <= 2) &&
550  (((ie >= firstHFRing()) && (ie < firstHFQuadPhiRing()) && (ip % 2 == 1)) ||
551  ((ie >= firstHFQuadPhiRing()) && (ie <= lastHFRing()) && (ip % 4 == 3))))));
552 }

References LEDCalibrationChannels::depth, Calorimetry_cff::dp, firstHERing(), firstHFQuadPhiRing(), firstHFRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, LEDCalibrationChannels::iphi, IPHI_MAX, lastHFRing(), and sd.

◆ validHcal() [1/2]

bool HcalTopology::validHcal ( const HcalDetId id) const

Is this a valid cell id?

Definition at line 230 of file HcalTopology.cc.

230  {
231  // check the raw rules
232  return validRaw(id) && !isExcluded(id);
233 }

References isExcluded(), and validRaw().

Referenced by HcalDigitizer::accumulateCaloHits(), HcalTestSimHitID::analyze(), HcalHBHEMuonAnalyzer::analyze(), HcalHBHEMuonHighEtaAnalyzer::analyzeTracks(), CaloTowersCreationAlgo::hadShwrPos(), valid(), validDetId(), and validHcal().

◆ validHcal() [2/2]

bool HcalTopology::validHcal ( const HcalDetId id,
const unsigned int  flag 
) const

Is this a valid cell in context of Plan1

Definition at line 331 of file HcalTopology.cc.

331  {
332  /* original logic show here because condensed form below is rather terse
333  // check the raw rules
334  bool ok = validHcal(id);
335  if (flag == 0) { // This is all what is needed
336  } else if (flag == 1) { // See if it is in the to be merged list and merged list
337  if (hcons_->isPlan1MergedId(id)) ok = true;
338  else if (hcons_->isPlan1ToBeMergedId(id)) ok = false;
339  } else if (!ok) {
340  ok = hcons_->isPlan1MergedId(id);
341  }
342  return ok;
343  */
344  return (flag > 0 and hcons_->isPlan1MergedId(id)) or
345  ((flag != 1 or !hcons_->isPlan1ToBeMergedId(id)) and validHcal(id));
346 }

References RemoveAddSevLevel::flag, hcons_, HcalDDDRecConstants::isPlan1MergedId(), HcalDDDRecConstants::isPlan1ToBeMergedId(), or, and validHcal().

◆ validHT()

bool HcalTopology::validHT ( const HcalTrigTowerDetId id) const

Definition at line 239 of file HcalTopology.cc.

239  {
240  if (id.iphi() < 1 || id.iphi() > IPHI_MAX || id.ieta() == 0)
241  return false;
242  if (id.depth() != 0)
243  return false;
244  if (maxDepthHE_ == 0) {
245  if (id.ietaAbs() > lastHBRing_ && id.ietaAbs() < firstHFRing_)
246  return false;
247  }
248  if (id.version() == 0) {
249  if (id.ietaAbs() > 28) {
251  return false;
253  return false;
254  if ((id.iphi() % 4) != 1)
255  return false;
256  if (id.ietaAbs() > 32)
257  return false;
258  }
259  } else if (id.version() == 1) {
261  return false;
262  if (id.ietaAbs() < 30 || id.ietaAbs() > 41)
263  return false;
264  if (id.ietaAbs() > 29 && ((id.iphi() % 2) == 0))
265  return false;
266  if (id.ietaAbs() > 39 && ((id.iphi() % 4) != 3))
267  return false;
268  } else if (id.version() > 1) {
269  // only versions 0 and 1 are supported
270  return false;
271  }
272 
273  return true;
274 }

References LEDCalibrationChannels::depth, firstHFRing_, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, IPHI_MAX, lastHBRing_, maxDepthHE_, triggerMode_, HcalTopologyMode::TriggerMode_2009, HcalTopologyMode::TriggerMode_2017, HcalTopologyMode::TriggerMode_2018legacy, and BeamSplash_cfg::version.

Referenced by CaloTPGTranscoderULUT::HTvalid(), CaloTPGTranscoderULUT::loadHCALCompress(), L1EGCrystalClusterEmulatorProducer::produce(), and validRaw().

◆ validRaw()

bool HcalTopology::validRaw ( const HcalDetId id) const
private

Is this a valid cell id?

Definition at line 555 of file HcalTopology.cc.

555  {
556  bool ok = true;
557  int ieta = id.ieta();
558  int aieta = id.ietaAbs();
559  int depth = id.depth();
560  int iphi = id.iphi();
561  int zside = id.zside();
562  HcalSubdetector subdet = id.subdet();
563  int maxPhi = (subdet == HcalEndcap) ? maxPhiHE_ : IPHI_MAX;
564  if ((ieta == 0 || iphi <= 0 || iphi > maxPhi) || aieta > maxEta_)
565  ok = false; // outer limits
566 
567  if (ok) {
568  if (subdet == HcalBarrel) {
570  if ((aieta > lastHBRing()) || (depth > hcons_->getMaxDepth(0, aieta, iphi, zside)) ||
571  (depth < hcons_->getMinDepth(0, aieta, iphi, zside)))
572  ok = false;
573  } else {
574  if (aieta > lastHBRing() || depth > 2 || (aieta <= 14 && depth > 1))
575  ok = false;
576  }
577  } else if (subdet == HcalEndcap) {
579  if ((depth > hcons_->getMaxDepth(1, aieta, iphi, zside)) ||
580  (depth < hcons_->getMinDepth(1, aieta, iphi, zside)) || (aieta < firstHERing()) || (aieta > lastHERing())) {
581  ok = false;
582  } else {
583  for (const auto& i : etaBinsHE_) {
584  if (aieta == i.ieta) {
585  if (aieta >= firstHEDoublePhiRing() && (iphi % 2) == 0)
586  ok = false;
587  if (aieta >= firstHEQuadPhiRing() && (iphi % 4) != 3)
588  ok = false;
589  if (aieta + 1 == hcons_->getNoff(1)) {
590  if (depth < 1)
591  ok = false;
592  } else {
593  if (depth < i.depthStart)
594  ok = false;
595  }
596  break;
597  }
598  }
599  }
600  } else {
601  if (depth > hcons_->getMaxDepth(1, aieta, iphi, zside) || aieta < firstHERing() || aieta > lastHERing() ||
602  (aieta == firstHERing() && depth != hcons_->getDepthEta16(2, iphi, zside)) ||
603  (aieta == 17 && depth != 1 && mode_ != HcalTopologyMode::H2) || // special case at H2
604  (((aieta >= 17 && aieta < firstHETripleDepthRing()) || aieta == lastHERing()) && depth > 2) ||
605  (aieta >= firstHEDoublePhiRing() && (iphi % 2) == 0))
606  ok = false;
607  }
608  } else if (subdet == HcalOuter) {
609  if (aieta > lastHORing() || iphi > IPHI_MAX || depth != 4)
610  ok = false;
611  } else if (subdet == HcalForward) {
612  if (aieta < firstHFRing() || aieta > lastHFRing() || ((iphi % 2) == 0) ||
613  (depth > hcons_->maxHFDepth(ieta, iphi)) || (aieta >= firstHFQuadPhiRing() && ((iphi + 1) % 4) != 0))
614  ok = false;
615  } else if (subdet == HcalTriggerTower) {
616  ok = validHT(HcalTrigTowerDetId(id.rawId()));
617  } else if (subdet == HcalOther) {
618  ok = validCalib(HcalCalibDetId(id.rawId()));
619  } else {
620  ok = false;
621  }
622  }
623  return ok;
624 }

References LEDCalibrationChannels::depth, etaBinsHE_, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHERing(), firstHETripleDepthRing(), firstHFQuadPhiRing(), firstHFRing(), HcalDDDRecConstants::getDepthEta16(), HcalDDDRecConstants::getMaxDepth(), HcalDDDRecConstants::getNoff(), HcalTopologyMode::H2, HcalTopologyMode::H2HE, HcalBarrel, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, hcons_, mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, IPHI_MAX, lastHBRing(), lastHERing(), lastHFRing(), lastHORing(), maxEta_, HcalDDDRecConstants::maxHFDepth(), HLT_FULL_cff::maxPhi, maxPhiHE_, mode_, convertSQLiteXML::ok, HcalTopologyMode::SLHC, validCalib(), validHT(), and ecaldqm::zside().

Referenced by decIPhi(), decrementDepth(), exclude(), incIPhi(), incrementDepth(), and validHcal().

◆ west()

std::vector< DetId > HcalTopology::west ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 413 of file HcalTopology.cc.

413  {
414  std::vector<DetId> vNeighborsDetId;
415  HcalDetId neighbors[2];
416  for (int i = 0; i < incIEta(HcalDetId(id), neighbors); i++) {
417  if (neighbors[i].oldFormat())
418  neighbors[i].changeForm();
419  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
420  }
421  return vNeighborsDetId;
422 }

References mps_fire::i, and incIEta().

◆ withSpecialRBXHBHE()

bool HcalTopology::withSpecialRBXHBHE ( ) const
inline

Definition at line 165 of file HcalTopology.h.

165 { return hcons_->withSpecialRBXHBHE(); }

References hcons_, and HcalDDDRecConstants::withSpecialRBXHBHE().

Member Data Documentation

◆ CALIBSize_

unsigned int HcalTopology::CALIBSize_
private

Definition at line 213 of file HcalTopology.h.

Referenced by getCALIBSize(), and HcalTopology().

◆ chanCalibHB_

constexpr int HcalTopology::chanCalibHB_[nchanCalibHB_] = {0, 1, 2}
staticconstexprprivate

Definition at line 252 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHE1_

constexpr int HcalTopology::chanCalibHE1_[nchanCalibHE1_] = {0, 1, 3, 4, 5, 6}
staticconstexprprivate

Definition at line 259 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHE2_

constexpr int HcalTopology::chanCalibHE2_ = 2
staticconstexprprivate

Definition at line 284 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHF1_

constexpr int HcalTopology::chanCalibHF1_[nchanCalibHF1_] = {0, 1, 8}
staticconstexprprivate

Definition at line 266 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHF2_

constexpr int HcalTopology::chanCalibHF2_ = 9
staticconstexprprivate

Definition at line 288 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHO_

constexpr int HcalTopology::chanCalibHO_[nchanCalibHO_] = {0, 1}
staticconstexprprivate

Definition at line 273 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ chanCalibHOs_

constexpr int HcalTopology::chanCalibHOs_ = 7
staticconstexprprivate

Definition at line 272 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ depthSegmentation_

SegmentationMap HcalTopology::depthSegmentation_
private

Definition at line 224 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

◆ depthSegmentationOne_

SegmentationMap HcalTopology::depthSegmentationOne_
private

Definition at line 225 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

◆ doublePhiBins_

int HcalTopology::doublePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by doublePhiBins(), and nPhiBins().

◆ dPhiTable

std::vector<double> HcalTopology::dPhiTable
private

Definition at line 216 of file HcalTopology.h.

Referenced by HcalTopology(), nPhiBins(), and phiBin().

◆ dPhiTableHF

std::vector<double> HcalTopology::dPhiTableHF
private

Definition at line 216 of file HcalTopology.h.

Referenced by HcalTopology(), nPhiBins(), and phiBin().

◆ etaBinsHB_

std::vector<HcalDDDRecConstants::HcalEtaBin> HcalTopology::etaBinsHB_
private

Definition at line 198 of file HcalTopology.h.

Referenced by decrementDepth(), and HcalTopology().

◆ etaBinsHE_

std::vector<HcalDDDRecConstants::HcalEtaBin> HcalTopology::etaBinsHE_
private

Definition at line 198 of file HcalTopology.h.

Referenced by decrementDepth(), HcalTopology(), and validRaw().

◆ etaCalibHB_

constexpr int HcalTopology::etaCalibHB_[nEtaCalibHB_] = {-1, 1}
staticconstexprprivate

Definition at line 253 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHBX_

constexpr int HcalTopology::etaCalibHBX_ = 16
staticconstexprprivate

Definition at line 300 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHE_

constexpr int HcalTopology::etaCalibHE_[nEtaCalibHE_] = {-1, 1}
staticconstexprprivate

Definition at line 260 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHEX_

constexpr int HcalTopology::etaCalibHEX_[nEtaCalibHEX_] = {25, 27}
staticconstexprprivate

Definition at line 305 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHF_

constexpr int HcalTopology::etaCalibHF_[nEtaCalibHF_] = {-1, 1}
staticconstexprprivate

Definition at line 267 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHO_

constexpr int HcalTopology::etaCalibHO_[nEtaCalibHO_] = {-2, -1, 0, 1, 2}
staticconstexprprivate

Definition at line 274 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaCalibHOX_

constexpr int HcalTopology::etaCalibHOX_[nEtaCalibHOX_] = {4, 15}
staticconstexprprivate

Definition at line 293 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), detId2denseIdCALIB(), and validCalib().

◆ etaHE2HF_

int HcalTopology::etaHE2HF_
private

Definition at line 205 of file HcalTopology.h.

Referenced by HcalTopology(), and incAIEta().

◆ etaHF2HE_

int HcalTopology::etaHF2HE_
private

Definition at line 205 of file HcalTopology.h.

Referenced by decAIEta(), decrementDepth(), and HcalTopology().

◆ etaTable

std::vector<double> HcalTopology::etaTable
private

Definition at line 216 of file HcalTopology.h.

Referenced by etaMax(), etaRange(), etaRing(), and HcalTopology().

◆ etaTableHF

std::vector<double> HcalTopology::etaTableHF
private

Definition at line 216 of file HcalTopology.h.

Referenced by etaMax(), etaRange(), etaRing(), and HcalTopology().

◆ excludeHB_

bool HcalTopology::excludeHB_
private

Definition at line 188 of file HcalTopology.h.

Referenced by exclude(), excludeSubdetector(), and isExcluded().

◆ excludeHE_

bool HcalTopology::excludeHE_
private

Definition at line 188 of file HcalTopology.h.

Referenced by exclude(), excludeSubdetector(), and isExcluded().

◆ excludeHF_

bool HcalTopology::excludeHF_
private

Definition at line 188 of file HcalTopology.h.

Referenced by exclude(), excludeSubdetector(), and isExcluded().

◆ excludeHO_

bool HcalTopology::excludeHO_
private

Definition at line 188 of file HcalTopology.h.

Referenced by exclude(), excludeSubdetector(), and isExcluded().

◆ exclusionList_

std::vector<HcalDetId> HcalTopology::exclusionList_
private

Definition at line 187 of file HcalTopology.h.

Referenced by exclude(), and isExcluded().

◆ firstHBRing_

int HcalTopology::firstHBRing_
private

Definition at line 193 of file HcalTopology.h.

Referenced by etaRing(), firstHBRing(), HcalTopology(), nPhiBins(), and phiBin().

◆ firstHEDoublePhiRing_

int HcalTopology::firstHEDoublePhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEDoublePhiRing(), and HcalTopology().

◆ firstHEQuadPhiRing_

int HcalTopology::firstHEQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEQuadPhiRing(), and HcalTopology().

◆ firstHERing_

int HcalTopology::firstHERing_
private

Definition at line 194 of file HcalTopology.h.

Referenced by firstHERing(), and HcalTopology().

◆ firstHETripleDepthRing_

int HcalTopology::firstHETripleDepthRing_
private

Definition at line 202 of file HcalTopology.h.

Referenced by firstHETripleDepthRing(), and HcalTopology().

◆ firstHFQuadPhiRing_

int HcalTopology::firstHFQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHFQuadPhiRing(), and HcalTopology().

◆ firstHFRing_

int HcalTopology::firstHFRing_
private

Definition at line 195 of file HcalTopology.h.

Referenced by etaRange(), etaRing(), firstHFRing(), HcalTopology(), nPhiBins(), phiBin(), and validHT().

◆ firstHORing_

int HcalTopology::firstHORing_
private

Definition at line 196 of file HcalTopology.h.

Referenced by firstHORing(), and HcalTopology().

◆ HBSize_

unsigned int HcalTopology::HBSize_
private

Definition at line 208 of file HcalTopology.h.

Referenced by denseId2detId(), detId2denseId(), getHBSize(), HcalTopology(), and ncells().

◆ hcons_

const HcalDDDRecConstants* HcalTopology::hcons_
private

◆ HESize_

unsigned int HcalTopology::HESize_
private

Definition at line 209 of file HcalTopology.h.

Referenced by denseId2detId(), detId2denseId(), getHESize(), HcalTopology(), and ncells().

◆ HFSize_

unsigned int HcalTopology::HFSize_
private

Definition at line 211 of file HcalTopology.h.

Referenced by getHFSize(), HcalTopology(), and ncells().

◆ HOSize_

unsigned int HcalTopology::HOSize_
private

Definition at line 210 of file HcalTopology.h.

Referenced by denseId2detId(), detId2denseId(), getHOSize(), HcalTopology(), and ncells().

◆ HTSize_

unsigned int HcalTopology::HTSize_
private

Definition at line 212 of file HcalTopology.h.

Referenced by getHTSize(), and HcalTopology().

◆ kchanCalibHB_

constexpr unsigned int HcalTopology::kchanCalibHB_ = nchanCalibHB_ * kPhiCalibHB_
staticconstexprprivate

Definition at line 254 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kchanCalibHE1_

constexpr unsigned int HcalTopology::kchanCalibHE1_ = nchanCalibHE1_ * kPhiCalibHE_
staticconstexprprivate

Definition at line 261 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kchanCalibHE2_

constexpr unsigned int HcalTopology::kchanCalibHE2_ = kPhiCalibHE_
staticconstexprprivate

Definition at line 285 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kchanCalibHF1_

constexpr unsigned int HcalTopology::kchanCalibHF1_ = nchanCalibHF1_ * kPhiCalibHF1_
staticconstexprprivate

Definition at line 268 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kchanCalibHF2_

constexpr unsigned int HcalTopology::kchanCalibHF2_ = 1
staticconstexprprivate

Definition at line 289 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHB_

constexpr unsigned int HcalTopology::kOffCalibHB_ = 0
staticconstexprprivate

Definition at line 249 of file HcalTopology.h.

Referenced by detId2denseIdCALIB().

◆ kOffCalibHBX_

constexpr unsigned int HcalTopology::kOffCalibHBX_ = kOffCalibHOX_ + nCalibHOX_
staticconstexprprivate

Definition at line 298 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHE1_

constexpr unsigned int HcalTopology::kOffCalibHE1_ = kOffCalibHB_ + nCalibHB_
staticconstexprprivate

Definition at line 256 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHE2_

constexpr unsigned int HcalTopology::kOffCalibHE2_ = kOffCalibHO2_ + nCalibHO2_
staticconstexprprivate

Definition at line 283 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHEX_

constexpr unsigned int HcalTopology::kOffCalibHEX_ = kOffCalibHBX_ + nCalibHBX_
staticconstexprprivate

Definition at line 303 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHF1_

constexpr unsigned int HcalTopology::kOffCalibHF1_ = kOffCalibHE1_ + nCalibHE1_
staticconstexprprivate

Definition at line 263 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHF2_

constexpr unsigned int HcalTopology::kOffCalibHF2_ = kOffCalibHE2_ + nCalibHE2_
staticconstexprprivate

Definition at line 287 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHFX_

constexpr unsigned int HcalTopology::kOffCalibHFX_ = kOffCalibHEX_ + nCalibHEX_
staticconstexprprivate

Definition at line 308 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and HcalTopology().

◆ kOffCalibHO1_

constexpr unsigned int HcalTopology::kOffCalibHO1_ = kOffCalibHF1_ + nCalibHF1_
staticconstexprprivate

Definition at line 270 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHO2_

constexpr unsigned int HcalTopology::kOffCalibHO2_ = kOffCalibHO1_ + nCalibHO1_
staticconstexprprivate

Definition at line 281 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kOffCalibHOX_

constexpr unsigned int HcalTopology::kOffCalibHOX_ = kOffCalibHF2_ + nCalibHF2_
staticconstexprprivate

Definition at line 291 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHB_

constexpr unsigned int HcalTopology::kPhiCalibHB_ = maxPhi_ / mPhiCalibHB_
staticconstexprprivate

Definition at line 251 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHBX_

constexpr unsigned int HcalTopology::kPhiCalibHBX_ = maxPhi_ / mPhiCalibHBX_
staticconstexprprivate

Definition at line 301 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHE_

constexpr unsigned int HcalTopology::kPhiCalibHE_ = maxPhi_ / mPhiCalibHE_
staticconstexprprivate

Definition at line 258 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHEX_

constexpr unsigned int HcalTopology::kPhiCalibHEX_ = maxPhi_ / mPhiCalibHEX_
staticconstexprprivate

Definition at line 306 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHF1_

constexpr unsigned int HcalTopology::kPhiCalibHF1_ = maxPhi_ / mPhiCalibHF1_
staticconstexprprivate

Definition at line 265 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHO0_

constexpr unsigned int HcalTopology::kPhiCalibHO0_ = maxPhi_ / mPhiCalibHO0_
staticconstexprprivate

Definition at line 277 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHO1_

constexpr unsigned int HcalTopology::kPhiCalibHO1_ = maxPhi_ / mPhiCalibHO1_
staticconstexprprivate

Definition at line 278 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ kPhiCalibHO2_

constexpr unsigned int HcalTopology::kPhiCalibHO2_ = 4 * kPhiCalibHO1_ + kPhiCalibHO0_
staticconstexprprivate

Definition at line 279 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ lastHBRing_

int HcalTopology::lastHBRing_
private

Definition at line 193 of file HcalTopology.h.

Referenced by etaMax(), HcalTopology(), lastHBHERing(), lastHBRing(), and validHT().

◆ lastHERing_

int HcalTopology::lastHERing_
private

Definition at line 194 of file HcalTopology.h.

Referenced by etaMax(), etaRange(), etaRing(), HcalTopology(), lastHBHERing(), and lastHERing().

◆ lastHFRing_

int HcalTopology::lastHFRing_
private

Definition at line 195 of file HcalTopology.h.

Referenced by HcalTopology(), and lastHFRing().

◆ lastHORing_

int HcalTopology::lastHORing_
private

Definition at line 196 of file HcalTopology.h.

Referenced by etaMax(), HcalTopology(), and lastHORing().

◆ maxDepthHB_

int HcalTopology::maxDepthHB_
private

◆ maxDepthHE_

int HcalTopology::maxDepthHE_
private

◆ maxDepthHF_

int HcalTopology::maxDepthHF_
private

◆ maxEta_

int HcalTopology::maxEta_
private

Definition at line 206 of file HcalTopology.h.

Referenced by HcalTopology(), and validRaw().

◆ maxPhi_

constexpr unsigned int HcalTopology::maxPhi_ = 72
staticconstexprprivate

Definition at line 248 of file HcalTopology.h.

Referenced by validCalib().

◆ maxPhiHE_

int HcalTopology::maxPhiHE_
private

◆ mergePosition_

bool HcalTopology::mergePosition_
private

Definition at line 186 of file HcalTopology.h.

Referenced by getMergePositionFlag().

◆ minMaxDepth_

constexpr int HcalTopology::minMaxDepth_ = 4
staticconstexprprivate

Definition at line 247 of file HcalTopology.h.

Referenced by maxDepth().

◆ minPhi_

constexpr unsigned int HcalTopology::minPhi_ = 1
staticconstexprprivate

Definition at line 248 of file HcalTopology.h.

Referenced by validCalib().

◆ mode_

HcalTopologyMode::Mode HcalTopology::mode_
private

◆ mPhiCalibHB_

constexpr unsigned int HcalTopology::mPhiCalibHB_ = 4
staticconstexprprivate

Definition at line 251 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ mPhiCalibHBX_

constexpr unsigned int HcalTopology::mPhiCalibHBX_ = 1
staticconstexprprivate

Definition at line 299 of file HcalTopology.h.

◆ mPhiCalibHE_

constexpr unsigned int HcalTopology::mPhiCalibHE_ = 4
staticconstexprprivate

Definition at line 258 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ mPhiCalibHEX_

constexpr unsigned int HcalTopology::mPhiCalibHEX_ = 2
staticconstexprprivate

Definition at line 304 of file HcalTopology.h.

Referenced by detId2denseIdCALIB().

◆ mPhiCalibHF1_

constexpr unsigned int HcalTopology::mPhiCalibHF1_ = 18
staticconstexprprivate

Definition at line 265 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ mPhiCalibHO0_

constexpr unsigned int HcalTopology::mPhiCalibHO0_ = 6
staticconstexprprivate

Definition at line 276 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ mPhiCalibHO1_

constexpr unsigned int HcalTopology::mPhiCalibHO1_ = 12
staticconstexprprivate

Definition at line 276 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ mPhiCalibHOX_

constexpr unsigned int HcalTopology::mPhiCalibHOX_[nEtaCalibHOX_] = {2, 1}
staticconstexprprivate

Definition at line 294 of file HcalTopology.h.

◆ nCalibHB_

constexpr unsigned int HcalTopology::nCalibHB_ = kchanCalibHB_ * nEtaCalibHB_
staticconstexprprivate

Definition at line 255 of file HcalTopology.h.

◆ nCalibHBX_

constexpr unsigned int HcalTopology::nCalibHBX_ = 2 * kPhiCalibHBX_ * nEtaCalibHBX_
staticconstexprprivate

Definition at line 302 of file HcalTopology.h.

◆ nCalibHE1_

constexpr unsigned int HcalTopology::nCalibHE1_ = kchanCalibHE1_ * nEtaCalibHE_
staticconstexprprivate

Definition at line 262 of file HcalTopology.h.

◆ nCalibHE2_

constexpr unsigned int HcalTopology::nCalibHE2_ = kchanCalibHE2_ * nEtaCalibHE_
staticconstexprprivate

Definition at line 286 of file HcalTopology.h.

◆ nCalibHEX_

constexpr unsigned int HcalTopology::nCalibHEX_ = 2 * kPhiCalibHEX_ * nEtaCalibHEX_
staticconstexprprivate

Definition at line 307 of file HcalTopology.h.

◆ nCalibHF1_

constexpr unsigned int HcalTopology::nCalibHF1_ = kchanCalibHF1_ * nEtaCalibHF_
staticconstexprprivate

Definition at line 269 of file HcalTopology.h.

◆ nCalibHF2_

constexpr unsigned int HcalTopology::nCalibHF2_ = nEtaCalibHF_
staticconstexprprivate

Definition at line 290 of file HcalTopology.h.

◆ nCalibHO1_

constexpr unsigned int HcalTopology::nCalibHO1_ = kPhiCalibHO2_ * nchanCalibHO_
staticconstexprprivate

Definition at line 280 of file HcalTopology.h.

◆ nCalibHO2_

constexpr unsigned int HcalTopology::nCalibHO2_ = nEtaCalibHO_
staticconstexprprivate

Definition at line 282 of file HcalTopology.h.

◆ nCalibHOX_

constexpr int HcalTopology::nCalibHOX_ = 2 * (nPhiCalibHOX_[0] + nPhiCalibHOX_[1])
staticconstexprprivate

Definition at line 296 of file HcalTopology.h.

◆ nchanCalibHB_

constexpr unsigned int HcalTopology::nchanCalibHB_ = 3
staticconstexprprivate

Definition at line 250 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nchanCalibHE1_

constexpr unsigned int HcalTopology::nchanCalibHE1_ = 6
staticconstexprprivate

Definition at line 257 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nchanCalibHF1_

constexpr unsigned int HcalTopology::nchanCalibHF1_ = 3
staticconstexprprivate

Definition at line 264 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nchanCalibHO_

constexpr unsigned int HcalTopology::nchanCalibHO_ = 2
staticconstexprprivate

Definition at line 271 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nEtaCalibHB_

constexpr unsigned int HcalTopology::nEtaCalibHB_ = 2
staticconstexprprivate

Definition at line 250 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nEtaCalibHBX_

constexpr unsigned int HcalTopology::nEtaCalibHBX_ = 1
staticconstexprprivate

Definition at line 299 of file HcalTopology.h.

◆ nEtaCalibHE_

constexpr unsigned int HcalTopology::nEtaCalibHE_ = 2
staticconstexprprivate

Definition at line 257 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nEtaCalibHEX_

constexpr unsigned int HcalTopology::nEtaCalibHEX_ = 2
staticconstexprprivate

Definition at line 304 of file HcalTopology.h.

Referenced by validCalib().

◆ nEtaCalibHF_

constexpr unsigned int HcalTopology::nEtaCalibHF_ = 2
staticconstexprprivate

Definition at line 264 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nEtaCalibHO_

constexpr unsigned int HcalTopology::nEtaCalibHO_ = 5
staticconstexprprivate

Definition at line 271 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

◆ nEtaCalibHOX_

constexpr unsigned int HcalTopology::nEtaCalibHOX_ = 2
staticconstexprprivate

Definition at line 292 of file HcalTopology.h.

Referenced by validCalib().

◆ nEtaHB_

int HcalTopology::nEtaHB_
private

◆ nEtaHE_

int HcalTopology::nEtaHE_
private

Definition at line 199 of file HcalTopology.h.

Referenced by denseId2detId(), detId2denseId(), detId2denseIdHE(), etaMax(), and HcalTopology().

◆ nPhiCalibHOX_

constexpr unsigned int HcalTopology::nPhiCalibHOX_[nEtaCalibHOX_] = {36, 72}
staticconstexprprivate

Definition at line 295 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

◆ numberOfShapes_

unsigned int HcalTopology::numberOfShapes_
private

Definition at line 214 of file HcalTopology.h.

Referenced by getNumberOfShapes(), and HcalTopology().

◆ phiCalibHF2_

constexpr int HcalTopology::phiCalibHF2_ = 1
staticconstexprprivate

Definition at line 288 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

◆ phiCalibHO_

constexpr int HcalTopology::phiCalibHO_[nEtaCalibHO_] = {59, 47, 53, 47, 47}
staticconstexprprivate

Definition at line 275 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

◆ phiCalibHOX1_

constexpr int HcalTopology::phiCalibHOX1_ = 4
staticconstexprprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

◆ phiCalibHOX2_

constexpr int HcalTopology::phiCalibHOX2_ = 12
staticconstexprprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

◆ phiCalibHOX3_

constexpr int HcalTopology::phiCalibHOX3_ = 6
staticconstexprprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

◆ phioff

std::vector<double> HcalTopology::phioff
private

Definition at line 217 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

◆ singlePhiBins_

int HcalTopology::singlePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by nPhiBins(), and singlePhiBins().

◆ topoVersion_

int HcalTopology::topoVersion_
private

◆ triggerMode_

HcalTopologyMode::TriggerMode HcalTopology::triggerMode_
private

Definition at line 191 of file HcalTopology.h.

Referenced by HcalTopology(), triggerMode(), and validHT().

◆ unitPhi

std::vector<int> HcalTopology::unitPhi
private

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

◆ unitPhiHF

std::vector<int> HcalTopology::unitPhiHF
private

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

HcalTopology::kCALIBSizePreLS1
Definition: HcalTopology.h:246
HcalOther
Definition: HcalAssistant.h:38
HcalTopology::kPhiCalibHBX_
static constexpr unsigned int kPhiCalibHBX_
Definition: HcalTopology.h:301
HcalDDDRecConstants::mergedDepthDetId
HcalDetId mergedDepthDetId(const HcalDetId &id) const
Definition: HcalDDDRecConstants.cc:647
HcalTopology::kHESizePreLS1
Definition: HcalTopology.h:241
HcalTopology::lastHFRing_
int lastHFRing_
Definition: HcalTopology.h:195
pfDeepBoostedJetPreprocessParams_cfi.upper_bound
upper_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:16
HcalTopology::CALIBSize_
unsigned int CALIBSize_
Definition: HcalTopology.h:213
HcalTopology::kPhiCalibHF1_
static constexpr unsigned int kPhiCalibHF1_
Definition: HcalTopology.h:265
HcalTopology::kOffCalibHEX_
static constexpr unsigned int kOffCalibHEX_
Definition: HcalTopology.h:303
HcalTopology::kOffCalibHO1_
static constexpr unsigned int kOffCalibHO1_
Definition: HcalTopology.h:270
HcalTopology::nEtaCalibHF_
static constexpr unsigned int nEtaCalibHF_
Definition: HcalTopology.h:264
HcalTopology::minMaxDepth_
static constexpr int minMaxDepth_
Definition: HcalTopology.h:247
HcalTopology::exclusionList_
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:187
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
HcalDDDRecConstants::getTopoMode
int getTopoMode() const
Definition: HcalDDDRecConstants.h:106
HcalTopology::validHcal
bool validHcal(const HcalDetId &id) const
Definition: HcalTopology.cc:230
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalTopologyMode::Mode
Mode
Definition: HcalTopologyMode.h:26
HcalDDDRecConstants::isPlan1MergedId
bool isPlan1MergedId(const HcalDetId &id) const
Definition: HcalDDDRecConstants.h:125
HcalTopology::etaTable
std::vector< double > etaTable
Definition: HcalTopology.h:216
HcalTopology::nEtaHB_
int nEtaHB_
Definition: HcalTopology.h:199
HcalTopology::kHOSizePreLS1
Definition: HcalTopology.h:242
HcalTopology::incIEta
int incIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: HcalTopology.cc:729
HcalTopology::maxPhiHE_
int maxPhiHE_
Definition: HcalTopology.h:206
HcalTopology::maxDepthHE
int maxDepthHE() const
Definition: HcalTopology.h:140
HLT_FULL_cff.nEta
nEta
Definition: HLT_FULL_cff.py:6596
HcalDDDRecConstants::getPhiTableHF
const std::vector< double > & getPhiTableHF() const
Definition: HcalDDDRecConstants.h:99
HcalTopology::firstHFQuadPhiRing_
int firstHFQuadPhiRing_
Definition: HcalTopology.h:201
IPHI_MAX
static const int IPHI_MAX
Definition: HcalTopology.cc:13
HcalTopology::nEtaCalibHB_
static constexpr unsigned int nEtaCalibHB_
Definition: HcalTopology.h:250
HcalTopology::kHcalhalf
Definition: HcalTopology.h:237
HcalTopology::kHThalfPhase1
Definition: HcalTopology.h:236
min
T min(T a, T b)
Definition: MathUtil.h:58
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HcalCalibDetId
Definition: HcalCalibDetId.h:45
HcalDDDRecConstants::getPhiOffs
const std::vector< double > & getPhiOffs() const
Definition: HcalDDDRecConstants.h:96
HcalTopology::lastHORing_
int lastHORing_
Definition: HcalTopology.h:196
HcalTopologyMode::TriggerMode_2009
Definition: HcalTopologyMode.h:29
HcalTopologyMode::LHC
Definition: HcalTopologyMode.h:26
pos
Definition: PixelAliasList.h:18
DetId::Hcal
Definition: DetId.h:28
HcalTopology::etaCalibHE_
static constexpr int etaCalibHE_[nEtaCalibHE_]
Definition: HcalTopology.h:260
HcalTopology::kHFhalf
Definition: HcalTopology.h:231
HcalTopology::kCASTORhalf
Definition: HcalTopology.h:234
HcalDDDRecConstants::getDepthEta16
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
Definition: HcalDDDRecConstants.h:66
HcalDDDRecConstants::withSpecialRBXHBHE
bool withSpecialRBXHBHE() const
Definition: HcalDDDRecConstants.h:123
HcalTopology::phiCalibHO_
static constexpr int phiCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:275
HcalTopology::chanCalibHOs_
static constexpr int chanCalibHOs_
Definition: HcalTopology.h:272
HcalTopology::kOffCalibHFX_
static constexpr unsigned int kOffCalibHFX_
Definition: HcalTopology.h:308
HcalDDDRecConstants::maxHFDepth
int maxHFDepth(int ieta, int iphi) const
Definition: HcalDDDRecConstants.h:111
cms::cuda::assert
assert(be >=bs)
HcalTopology::etaCalibHOX_
static constexpr int etaCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:293
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
HcalTopology::etaBinsHB_
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:198
HcalCalibDetId::uMNqie
Definition: HcalCalibDetId.h:51
HcalTopology::kHBhalf
Definition: HcalTopology.h:228
HcalTopology::chanCalibHF1_
static constexpr int chanCalibHF1_[nchanCalibHF1_]
Definition: HcalTopology.h:266
HcalDDDRecConstants::getNEta
int getNEta() const
Definition: HcalDDDRecConstants.h:91
HcalTopology::kHBSizePreLS1
Definition: HcalTopology.h:240
HcalTopology::kPhiCalibHO0_
static constexpr unsigned int kPhiCalibHO0_
Definition: HcalTopology.h:277
HcalTopology::nEtaCalibHO_
static constexpr unsigned int nEtaCalibHO_
Definition: HcalTopology.h:271
HcalDDDRecConstants::getNPhi
int getNPhi(const int &type) const
Definition: HcalDDDRecConstants.h:93
HcalTopology::decAIEta
int decAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: HcalTopology.cc:769
HcalTopology::nchanCalibHO_
static constexpr unsigned int nchanCalibHO_
Definition: HcalTopology.h:271
HcalDDDRecConstants::mergedDepthList29
bool mergedDepthList29(int ieta, int iphi, int depth) const
Definition: HcalDDDRecConstants.cc:580
HcalBarrel
Definition: HcalAssistant.h:33
HcalTopology::minPhi_
static constexpr unsigned int minPhi_
Definition: HcalTopology.h:248
HcalEmpty
Definition: HcalAssistant.h:32
HcalTopology::depthSegmentation_
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:224
HcalTopology::decIEta
int decIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: HcalTopology.cc:736
hcaltpdigi_cfi.ieta2
ieta2
Definition: hcaltpdigi_cfi.py:21
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HcalTopology::phiCalibHOX1_
static constexpr int phiCalibHOX1_
Definition: HcalTopology.h:297
HcalTopology::firstHEQuadPhiRing_
int firstHEQuadPhiRing_
Definition: HcalTopology.h:201
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HcalTopology::kOffCalibHB_
static constexpr unsigned int kOffCalibHB_
Definition: HcalTopology.h:249
HcalTopology::firstHERing
int firstHERing() const
Definition: HcalTopology.h:93
HcalTopology::firstHEQuadPhiRing
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:102
dqmdumpme.first
first
Definition: dqmdumpme.py:55
HcalTopology::kOffCalibHOX_
static constexpr unsigned int kOffCalibHOX_
Definition: HcalTopology.h:291
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HcalCalibDetId::HEX
Definition: HcalCalibDetId.h:55
HcalTopology::etaHF2HE_
int etaHF2HE_
Definition: HcalTopology.h:205
HcalTopology::etaRing
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
Definition: HcalTopology.cc:997
HcalTopologyMode::TriggerMode_2017
Definition: HcalTopologyMode.h:32
HcalTopology::triggerMode_
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:191
HcalTopology::HOSize_
unsigned int HOSize_
Definition: HcalTopology.h:210
HcalTopology::kHThalf
Definition: HcalTopology.h:232
HcalTopology::excludeHB_
bool excludeHB_
Definition: HcalTopology.h:188
HcalTopology::etaHE2HF_
int etaHE2HF_
Definition: HcalTopology.h:205
HcalDDDRecConstants::getPhiTable
const std::vector< double > & getPhiTable() const
Definition: HcalDDDRecConstants.h:98
HcalTopology::kHEhalf
Definition: HcalTopology.h:229
HcalTopology::nEtaCalibHEX_
static constexpr unsigned int nEtaCalibHEX_
Definition: HcalTopology.h:304
HcalDetId::changeForm
constexpr void changeForm()
Definition: HcalDetId.h:198
units
TString units(TString variable, Char_t axis)
HLT_FULL_cff.maxPhi
maxPhi
Definition: HLT_FULL_cff.py:53042
HcalTopology::etaTableHF
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalTopology::unitPhi
std::vector< int > unitPhi
Definition: HcalTopology.h:218
HcalTopology::firstHEDoublePhiRing
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:101
DetId
Definition: DetId.h:17
HcalTopology::firstHFRing
int firstHFRing() const
Definition: HcalTopology.h:96
HcalTopology::firstHERing_
int firstHERing_
Definition: HcalTopology.h:194
HcalDDDRecConstants::getEtaTableHF
const std::vector< double > & getEtaTableHF() const
Definition: HcalDDDRecConstants.h:76
HcalTopology::kOffCalibHO2_
static constexpr unsigned int kOffCalibHO2_
Definition: HcalTopology.h:281
HcalTopology::kZDChalf
Definition: HcalTopology.h:233
HcalTopology::chanCalibHE2_
static constexpr int chanCalibHE2_
Definition: HcalTopology.h:284
HcalTopology::etaCalibHB_
static constexpr int etaCalibHB_[nEtaCalibHB_]
Definition: HcalTopology.h:253
HcalTopology::detId2denseIdPreLS1
unsigned int detId2denseIdPreLS1(const DetId &id) const
Definition: HcalTopology.cc:1140
HcalTopology::lastHORing
int lastHORing() const
Definition: HcalTopology.h:99
HcalTopology::kHTSizePreLS1
Definition: HcalTopology.h:244
HcalCalibDetId::HBX
Definition: HcalCalibDetId.h:54
HcalTopology::kHOhalf
Definition: HcalTopology.h:230
HcalTopology::HBSize_
unsigned int HBSize_
Definition: HcalTopology.h:208
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HcalTopology::numberOfShapes_
unsigned int numberOfShapes_
Definition: HcalTopology.h:214
HcalTopology::doublePhiBins_
int doublePhiBins_
Definition: HcalTopology.h:203
HcalTopology::etaCalibHF_
static constexpr int etaCalibHF_[nEtaCalibHF_]
Definition: HcalTopology.h:267
HcalOuter
Definition: HcalAssistant.h:35
HcalTopology::chanCalibHO_
static constexpr int chanCalibHO_[nchanCalibHO_]
Definition: HcalTopology.h:273
HcalTopology::exclude
void exclude(const HcalDetId &id)
Definition: HcalTopology.cc:376
HcalTopologyMode::H2HE
Definition: HcalTopologyMode.h:26
HcalTopology::validHT
bool validHT(const HcalTrigTowerDetId &id) const
Definition: HcalTopology.cc:239
HcalTopology::firstHFRing_
int firstHFRing_
Definition: HcalTopology.h:195
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HcalTopology::kSizeForDenseIndexingPreLS1
Definition: HcalTopology.h:239
HcalTopology::kPhiCalibHE_
static constexpr unsigned int kPhiCalibHE_
Definition: HcalTopology.h:258
HcalTopology::kchanCalibHE1_
static constexpr unsigned int kchanCalibHE1_
Definition: HcalTopology.h:261
HcalTopology::lastHERing_
int lastHERing_
Definition: HcalTopology.h:194
HcalTopology::depthSegmentationOne_
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:225
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDDDRecConstants::getMinDepth
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
Definition: HcalDDDRecConstants.cc:353
HcalTopology::firstHETripleDepthRing_
int firstHETripleDepthRing_
Definition: HcalTopology.h:202
HcalTopologyMode::SLHC
Definition: HcalTopologyMode.h:26
HcalTopology::kOffCalibHE1_
static constexpr unsigned int kOffCalibHE1_
Definition: HcalTopology.h:256
HcalTopology::nchanCalibHE1_
static constexpr unsigned int nchanCalibHE1_
Definition: HcalTopology.h:257
HcalTopology::phiCalibHOX2_
static constexpr int phiCalibHOX2_
Definition: HcalTopology.h:297
HcalTopology::nchanCalibHF1_
static constexpr unsigned int nchanCalibHF1_
Definition: HcalTopology.h:264
HcalTopology::etaBinsHE_
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:198
HcalTopology::mode
HcalTopologyMode::Mode mode() const
Definition: HcalTopology.h:34
HcalTopologyMode::H2
Definition: HcalTopologyMode.h:26
HcalTopology::decrementDepth
bool decrementDepth(HcalDetId &id) const
Definition: HcalTopology.cc:910
HcalTopology::singlePhiBins_
int singlePhiBins_
Definition: HcalTopology.h:203
HcalTopology::validRaw
bool validRaw(const HcalDetId &id) const
Definition: HcalTopology.cc:555
HcalCalibDetId::CastorRadFacility
Definition: HcalCalibDetId.h:52
HcalTopology::mPhiCalibHE_
static constexpr unsigned int mPhiCalibHE_
Definition: HcalTopology.h:258
HcalTopology::dPhiTableHF
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:216
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
HcalTopology::phiCalibHF2_
static constexpr int phiCalibHF2_
Definition: HcalTopology.h:288
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalTopology::nEtaHE_
int nEtaHE_
Definition: HcalTopology.h:199
HcalTopology::excludeHE_
bool excludeHE_
Definition: HcalTopology.h:188
HcalTopology::etaCalibHEX_
static constexpr int etaCalibHEX_[nEtaCalibHEX_]
Definition: HcalTopology.h:305
HcalTopology::maxDepthHE_
int maxDepthHE_
Definition: HcalTopology.h:204
HcalTopology::etaCalibHO_
static constexpr int etaCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:274
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalTopology::incIPhi
bool incIPhi(const HcalDetId &id, HcalDetId &neighbor) const
Definition: HcalTopology.cc:626
HcalTopology::maxDepthHB_
int maxDepthHB_
Definition: HcalTopology.h:204
hcaltpdigi_cfi.ieta1
ieta1
Definition: hcaltpdigi_cfi.py:20
recoMuon::in
Definition: RecoMuonEnumerators.h:6
HcalTopology::firstHFQuadPhiRing
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:103
HcalTopology::mode_
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
HcalTopology::decIPhi
bool decIPhi(const HcalDetId &id, HcalDetId &neighbor) const
Definition: HcalTopology.cc:678
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
HcalTopology::kHTSizePhase1
Definition: HcalTopology.h:245
HcalTopology::firstHBRing_
int firstHBRing_
Definition: HcalTopology.h:193
HcalTopology::mergePosition_
bool mergePosition_
Definition: HcalTopology.h:186
HcalTopology::unitPhiHF
std::vector< int > unitPhiHF
Definition: HcalTopology.h:218
HcalTopology::nEtaCalibHOX_
static constexpr unsigned int nEtaCalibHOX_
Definition: HcalTopology.h:292
HcalTopology::firstHBRing
int firstHBRing() const
Definition: HcalTopology.h:91
HcalTopology::depthBinInformation
void depthBinInformation(HcalSubdetector subdet, int etaRing, int iphi, int zside, int &nDepthBins, int &startingBin) const
finds the number of depth bins and which is the number to start with
Definition: HcalTopology.cc:816
HcalTopology::lastHERing
int lastHERing() const
Definition: HcalTopology.h:94
HcalTopology::firstHORing_
int firstHORing_
Definition: HcalTopology.h:196
HcalTopology::kPhiCalibHO2_
static constexpr unsigned int kPhiCalibHO2_
Definition: HcalTopology.h:279
HcalTopology::HFSize_
unsigned int HFSize_
Definition: HcalTopology.h:211
HcalTopology::validCalib
bool validCalib(const HcalCalibDetId &id) const
Definition: HcalTopology.cc:276
HcalCalibDetId::LASERMON
Definition: HcalCalibDetId.h:53
HcalTopology::kchanCalibHF1_
static constexpr unsigned int kchanCalibHF1_
Definition: HcalTopology.h:268
HcalDetId::oldFormat
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
HcalTopology::kchanCalibHE2_
static constexpr unsigned int kchanCalibHE2_
Definition: HcalTopology.h:285
HcalTopology::nEtaCalibHE_
static constexpr unsigned int nEtaCalibHE_
Definition: HcalTopology.h:257
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
HcalTopology::chanCalibHB_
static constexpr int chanCalibHB_[nchanCalibHB_]
Definition: HcalTopology.h:252
HcalTopology::mPhiCalibHO1_
static constexpr unsigned int mPhiCalibHO1_
Definition: HcalTopology.h:276
HcalTopology::incAIEta
int incAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: HcalTopology.cc:744
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
HcalTopology::valid
bool valid(const DetId &id) const override
Definition: HcalTopology.cc:225
DDAxes::phi
HcalTopology::chanCalibHE1_
static constexpr int chanCalibHE1_[nchanCalibHE1_]
Definition: HcalTopology.h:259
HcalTopology::setDepthSegmentation
void setDepthSegmentation(const unsigned ring, const std::vector< int > &readoutDepths, const bool flag)
Definition: HcalTopology.cc:1084
HcalTopology::mPhiCalibHF1_
static constexpr unsigned int mPhiCalibHF1_
Definition: HcalTopology.h:265
HcalCalibDetId::HOCrosstalk
Definition: HcalCalibDetId.h:50
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalTopology::phioff
std::vector< double > phioff
Definition: HcalTopology.h:217
HcalTopology::kPhiCalibHB_
static constexpr unsigned int kPhiCalibHB_
Definition: HcalTopology.h:251
HcalTopology::getDepthSegmentation
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
Definition: HcalTopology.cc:1064
HcalDDDRecConstants::getEtaRange
std::pair< int, int > getEtaRange(const int &i) const
Definition: HcalDDDRecConstants.h:74
HcalTopology::kHFSizePreLS1
Definition: HcalTopology.h:243
HcalEndcap
Definition: HcalAssistant.h:34
HcalTopology::incrementDepth
bool incrementDepth(HcalDetId &id) const
Definition: HcalTopology.cc:869
HcalDDDRecConstants::getEtaBins
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
Definition: HcalDDDRecConstants.cc:68
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HcalTopology::kchanCalibHB_
static constexpr unsigned int kchanCalibHB_
Definition: HcalTopology.h:254
officialStyle.chan
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
Definition: officialStyle.py:106
HcalTopology::firstHETripleDepthRing
int firstHETripleDepthRing() const
Definition: HcalTopology.h:104
Exception
Definition: hltDiff.cc:246
HcalTriggerTower
Definition: HcalAssistant.h:37
HcalTopology::lastHBRing_
int lastHBRing_
Definition: HcalTopology.h:193
HcalDDDRecConstants::getTriggerMode
int getTriggerMode() const
Definition: HcalDDDRecConstants.h:107
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
HcalDDDRecConstants::getDepth
std::vector< int > getDepth(const int &det, const int &phi, const int &zside, const unsigned int &eta) const
Definition: HcalDDDRecConstants.cc:52
HcalTopology::ncells
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
Definition: HcalTopology.cc:1686
HcalTopology::mPhiCalibHB_
static constexpr unsigned int mPhiCalibHB_
Definition: HcalTopology.h:251
HcalTopology::lastHFRing
int lastHFRing() const
Definition: HcalTopology.h:97
HcalTopology::kchanCalibHF2_
static constexpr unsigned int kchanCalibHF2_
Definition: HcalTopology.h:289
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcalDDDRecConstants::getDepthEta29
int getDepthEta29(const int &iphi, const int &zside, const int &type) const
Definition: HcalDDDRecConstants.h:69
HcalTopology::etaCalibHBX_
static constexpr int etaCalibHBX_
Definition: HcalTopology.h:300
HcalTopology::excludeHF_
bool excludeHF_
Definition: HcalTopology.h:188
HcalTopologyMode::TriggerMode
TriggerMode
Definition: HcalTopologyMode.h:28
HcalTopology::nchanCalibHB_
static constexpr unsigned int nchanCalibHB_
Definition: HcalTopology.h:250
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcalTopology::kCALIBhalf
Definition: HcalTopology.h:235
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
sd
double sd
Definition: CascadeWrapper.h:113
HcalTopology::phiCalibHOX3_
static constexpr int phiCalibHOX3_
Definition: HcalTopology.h:297
HcalTopology::HESize_
unsigned int HESize_
Definition: HcalTopology.h:209
HcalTopology::nPhiBins
int nPhiBins(int etaRing) const
how many phi segments in this ring
Definition: HcalTopology.cc:955
HcalTopology::maxPhi_
static constexpr unsigned int maxPhi_
Definition: HcalTopology.h:248
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalTopology::topoVersion_
int topoVersion_
Definition: HcalTopology.h:220
HcalTopology::kPhiCalibHO1_
static constexpr unsigned int kPhiCalibHO1_
Definition: HcalTopology.h:278
HcalDDDRecConstants::idFront
HcalDetId idFront(const HcalDetId &id) const
Definition: HcalDDDRecConstants.cc:655
HcalTopology::maxDepthHF_
int maxDepthHF_
Definition: HcalTopology.h:204
HcalCalibDetId::CalibrationBox
Definition: HcalCalibDetId.h:49
HcalDDDRecConstants::getNoff
int getNoff(const int &i) const
Definition: HcalDDDRecConstants.h:92
HcalTopology::kOffCalibHF2_
static constexpr unsigned int kOffCalibHF2_
Definition: HcalTopology.h:287
HcalTopology::firstHEDoublePhiRing_
int firstHEDoublePhiRing_
Definition: HcalTopology.h:201
HcalTopology::isExcluded
bool isExcluded(const HcalDetId &id) const
Definition: HcalTopology.cc:348
HcalTopology::maxEta_
int maxEta_
Definition: HcalTopology.h:206
HcalDDDRecConstants::isPlan1ToBeMergedId
bool isPlan1ToBeMergedId(const HcalDetId &id) const
Definition: HcalDDDRecConstants.h:124
HcalDDDRecConstants::getPhiZOne
int getPhiZOne(std::vector< std::pair< int, int >> &phiz) const
Definition: HcalDDDRecConstants.cc:397
HcalTopology::nPhiCalibHOX_
static constexpr unsigned int nPhiCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:295
HcalTopology::chanCalibHF2_
static constexpr int chanCalibHF2_
Definition: HcalTopology.h:288
HcalTopology::dPhiTable
std::vector< double > dPhiTable
Definition: HcalTopology.h:216
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
edm::Log
Definition: MessageLogger.h:70
HcalTopologyMode::TriggerMode_2018legacy
Definition: HcalTopologyMode.h:31
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
cuy.ii
ii
Definition: cuy.py:590
HcalTopology::kOffCalibHF1_
static constexpr unsigned int kOffCalibHF1_
Definition: HcalTopology.h:263
HcalTopology::mPhiCalibHEX_
static constexpr unsigned int mPhiCalibHEX_
Definition: HcalTopology.h:304
HcalTopology::mPhiCalibHO0_
static constexpr unsigned int mPhiCalibHO0_
Definition: HcalTopology.h:276
HcalDDDRecConstants::unmergeDepthDetId
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
Definition: HcalDDDRecConstants.cc:671
HcalTopology::kOffCalibHBX_
static constexpr unsigned int kOffCalibHBX_
Definition: HcalTopology.h:298
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
HcalTopology::hcons_
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
HcalDDDRecConstants::idBack
HcalDetId idBack(const HcalDetId &id) const
Definition: HcalDDDRecConstants.cc:663
HcalTopology::kOffCalibHE2_
static constexpr unsigned int kOffCalibHE2_
Definition: HcalTopology.h:283
HcalTopology::excludeHO_
bool excludeHO_
Definition: HcalTopology.h:188
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
HcalTopology::lastHBRing
int lastHBRing() const
Definition: HcalTopology.h:92
HcalDDDRecConstants::isBH
bool isBH() const
Definition: HcalDDDRecConstants.h:109
HcalTopology::maxDepthHB
int maxDepthHB() const
Definition: HcalTopology.h:139
HcalTopology::kPhiCalibHEX_
static constexpr unsigned int kPhiCalibHEX_
Definition: HcalTopology.h:306
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14
HcalDDDRecConstants::getEtaTable
const std::vector< double > & getEtaTable() const
Definition: HcalDDDRecConstants.h:75
HcalTopology::HTSize_
unsigned int HTSize_
Definition: HcalTopology.h:212