CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (void) const
 
int maxDepth (HcalSubdetector subdet) 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 (int etaRing) const
 how many phi segments in this ring More...
 
int nPhiBins (HcalSubdetector subdet, int etaRing) const
 
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::HcalEtaBin
etaBinsHB_
 
std::vector
< HcalDDDRecConstants::HcalEtaBin
etaBinsHE_
 
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

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

Definition at line 223 of file HcalTopology.h.

Member Enumeration Documentation

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

Definition at line 227 of file HcalTopology.h.

anonymous enum
private
Enumerator
kSizeForDenseIndexingPreLS1 

Definition at line 239 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHBSizePreLS1 

Definition at line 240 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHESizePreLS1 

Definition at line 241 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHOSizePreLS1 

Definition at line 242 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHFSizePreLS1 

Definition at line 243 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePreLS1 

Definition at line 244 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePhase1 

Definition at line 245 of file HcalTopology.h.

anonymous enum
private
Enumerator
kCALIBSizePreLS1 

Definition at line 246 of file HcalTopology.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file HcalTopology.cc.

References CALIBSize_, dPhiTable, dPhiTableHF, PVValHelper::eta, etaBinsHB_, etaBinsHE_, etaHE2HF_, etaHF2HE_, etaTable, etaTableHF, 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, IPHI_MAX, isotrackApplyRegressor::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().

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;
77  HBSize_ = nEtaHB_ * IPHI_MAX * maxDepthHB_ * 2;
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 }
Log< level::Info, true > LogVerbatim
std::vector< int > getDepth(const int &det, const int &phi, const int &zside, const unsigned int &eta) const
std::vector< int > unitPhiHF
Definition: HcalTopology.h:218
static constexpr unsigned int kOffCalibHFX_
Definition: HcalTopology.h:308
unsigned int numberOfShapes_
Definition: HcalTopology.h:214
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:216
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:198
std::vector< int > unitPhi
Definition: HcalTopology.h:218
const std::vector< double > & getEtaTableHF() const
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:191
unsigned int HESize_
Definition: HcalTopology.h:209
unsigned int HTSize_
Definition: HcalTopology.h:212
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:198
const std::vector< double > & getPhiOffs() const
U second(std::pair< T, U > const &p)
unsigned int CALIBSize_
Definition: HcalTopology.h:213
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
unsigned int HFSize_
Definition: HcalTopology.h:211
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
unsigned int HBSize_
Definition: HcalTopology.h:208
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
unsigned int HOSize_
Definition: HcalTopology.h:210
std::vector< double > etaTable
Definition: HcalTopology.h:216
int firstHEQuadPhiRing_
Definition: HcalTopology.h:201
bool mergePosition_
Definition: HcalTopology.h:186
std::vector< double > phioff
Definition: HcalTopology.h:217
const std::vector< double > & getPhiTable() const
int getMaxDepth(const int &type) const
const std::vector< double > & getEtaTable() const
std::vector< double > dPhiTable
Definition: HcalTopology.h:216
TString units(TString variable, Char_t axis)
const std::vector< double > & getPhiTableHF() const
int firstHETripleDepthRing_
Definition: HcalTopology.h:202
void setDepthSegmentation(const unsigned ring, const std::vector< int > &readoutDepths, const bool flag)
std::pair< int, int > getEtaRange(const int &i) const
int firstHEDoublePhiRing_
Definition: HcalTopology.h:201
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
static const int IPHI_MAX
Definition: HcalTopology.cc:13
int firstHFQuadPhiRing_
Definition: HcalTopology.h:201
Basic3DVector unit() const
int getNPhi(const int &type) const
HcalTopology::HcalTopology ( HcalTopologyMode::Mode  mode,
int  maxDepthHB,
int  maxDepthHE,
HcalTopologyMode::TriggerMode  tmode = HcalTopologyMode::TriggerMode_2009 
)

Definition at line 160 of file HcalTopology.cc.

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

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 }
static constexpr unsigned int kOffCalibHFX_
Definition: HcalTopology.h:308
unsigned int numberOfShapes_
Definition: HcalTopology.h:214
int maxDepthHE() const
Definition: HcalTopology.h:140
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:191
unsigned int HESize_
Definition: HcalTopology.h:209
unsigned int HTSize_
Definition: HcalTopology.h:212
HcalTopologyMode::Mode mode() const
Definition: HcalTopology.h:34
unsigned int CALIBSize_
Definition: HcalTopology.h:213
unsigned int HFSize_
Definition: HcalTopology.h:211
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
unsigned int HBSize_
Definition: HcalTopology.h:208
unsigned int HOSize_
Definition: HcalTopology.h:210
int firstHEQuadPhiRing_
Definition: HcalTopology.h:201
bool mergePosition_
Definition: HcalTopology.h:186
int maxDepthHB() const
Definition: HcalTopology.h:139
int firstHETripleDepthRing_
Definition: HcalTopology.h:202
Log< level::Warning, false > LogWarning
int firstHEDoublePhiRing_
Definition: HcalTopology.h:201
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
static const int IPHI_MAX
Definition: HcalTopology.cc:13
int firstHFQuadPhiRing_
Definition: HcalTopology.h:201

Member Function Documentation

const HcalDDDRecConstants* HcalTopology::dddConstants ( ) const
inline
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 770 of file HcalTopology.cc.

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

Referenced by decIEta(), and incIEta().

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

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

Definition at line 737 of file HcalTopology.cc.

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

Referenced by east().

737  {
738  if (id.zside() == 1)
739  return decAIEta(id, neighbors);
740  else
741  return incAIEta(id, neighbors);
742 }
int zside(DetId const &)
int decAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
int incAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
bool HcalTopology::decIPhi ( const HcalDetId id,
HcalDetId neighbor 
) const

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

Definition at line 679 of file HcalTopology.cc.

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

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

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

Get the detector in front of this one

Definition at line 911 of file HcalTopology.cc.

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

Referenced by down().

911  {
912  HcalSubdetector subdet = detId.subdet();
913  int ieta = detId.ieta();
914  int etaRing = detId.ietaAbs();
915  int depth = detId.depth();
916  int iphi = detId.iphi();
917  int zside = detId.zside();
918  int nDepthBins, startingBin;
919  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
920 
921  // see if the new depth bin exists
922  --depth;
923  if ((subdet == HcalOuter) || (subdet == HcalEndcap && etaRing == firstHERing())) {
924  subdet = HcalBarrel;
925  for (int i = 0; i < nEtaHB_; ++i) {
926  if (etaRing == etaBinsHB_[i].ieta) {
927  depth = etaBinsHB_[i].depthStart + etaBinsHB_[i].layer.size() - 1;
928  break;
929  }
930  }
931  } else if (subdet == HcalEndcap && etaRing == lastHERing() && depth == hcons_->getDepthEta29(iphi, zside, 0) &&
933  (ieta > 0) ? --ieta : ++ieta;
934  } else if (depth <= 0) {
935  if (subdet == HcalForward && etaRing == firstHFRing()) {
936  // overlap
937  subdet = HcalEndcap;
938  etaRing = etaHF2HE_;
939  ieta = (ieta > 0) ? etaRing : -etaRing;
940  for (const auto& i : etaBinsHE_) {
941  if (etaRing == i.ieta) {
942  depth = i.depthStart + i.layer.size() - 1;
943  break;
944  }
945  }
946  } else {
947  // no more chances
948  detId = HcalDetId();
949  return false;
950  }
951  }
952  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
953  return validRaw(detId);
954 }
int firstHFRing() const
Definition: HcalTopology.h:96
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:198
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:198
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
bool validRaw(const HcalDetId &id) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
HcalSubdetector
Definition: HcalAssistant.h:31
int getDepthEta29(const int &iphi, const int &zside, const int &type) const
int firstHERing() const
Definition: HcalTopology.h:93
int lastHERing() const
Definition: HcalTopology.h:94
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
DetId HcalTopology::denseId2detId ( unsigned int  denseid) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1562 of file HcalTopology.cc.

References TauDecayModes::dec, 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().

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

return a Calib DetId from linear packed id

Definition at line 1386 of file HcalTopology.cc.

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, gpuClustering::id, 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_.

1386  {
1388  unsigned int hid0(hid);
1389  if (hid0 < kOffCalibHOX_) {
1390  HcalSubdetector subdet(HcalEmpty);
1391  int id0, keta, ieta, iphi, ichan, ctype;
1392  if (hid0 < kOffCalibHE1_) {
1393  id0 = static_cast<int>(hid0);
1394  subdet = HcalBarrel;
1395  iphi = hid0 % kPhiCalibHB_;
1396  keta = (hid0 < kchanCalibHB_) ? 0 : 1;
1397  ieta = etaCalibHB_[keta];
1398  ichan = (id0 - iphi - keta * kchanCalibHB_) / kPhiCalibHB_;
1399  iphi = mPhiCalibHB_ * (iphi + 1) - 1;
1400  ctype = chanCalibHB_[ichan];
1401  } else if (hid0 < kOffCalibHF1_) {
1402  hid0 -= kOffCalibHE1_;
1403  id0 = static_cast<int>(hid0);
1404  subdet = HcalEndcap;
1405  iphi = hid0 % kPhiCalibHE_;
1406  keta = (hid0 < kchanCalibHE1_) ? 0 : 1;
1407  ieta = etaCalibHE_[keta];
1408  ichan = (id0 - iphi - keta * kchanCalibHE1_) / kPhiCalibHE_;
1409  iphi = mPhiCalibHE_ * (iphi + 1) - 1;
1410  ctype = chanCalibHE1_[ichan];
1411  } else if (hid0 < kOffCalibHO1_) {
1412  hid0 -= kOffCalibHF1_;
1413  id0 = static_cast<int>(hid0);
1414  subdet = HcalForward;
1415  iphi = hid0 % kPhiCalibHF1_;
1416  keta = (hid0 < kchanCalibHF1_) ? 0 : 1;
1417  ieta = etaCalibHF_[keta];
1418  ichan = (id0 - iphi - keta * kchanCalibHF1_) / kPhiCalibHF1_;
1419  iphi = mPhiCalibHF1_ * iphi + 1;
1420  ctype = chanCalibHF1_[ichan];
1421  } else if (hid0 < kOffCalibHO2_) {
1422  hid0 -= kOffCalibHO1_;
1423  id0 = static_cast<int>(hid0);
1424  subdet = HcalOuter;
1425  unsigned int kphi = hid0 % kPhiCalibHO2_;
1426  if (kphi < 2 * kPhiCalibHO1_) {
1427  ieta = (kphi >= kPhiCalibHO1_) ? etaCalibHO_[1] : etaCalibHO_[0];
1428  iphi = kphi % kPhiCalibHO1_;
1429  ichan = (id0 - iphi - (ieta + 2) * kPhiCalibHO1_) / kPhiCalibHO2_;
1430  iphi = (iphi + 1) * mPhiCalibHO1_ - 1;
1431  } else if (kphi < (2 * kPhiCalibHO1_ + kPhiCalibHO0_)) {
1432  ieta = etaCalibHO_[2];
1433  iphi = kphi % kPhiCalibHO0_;
1434  ichan = (id0 - iphi - (ieta + 2) * kPhiCalibHO1_) / kPhiCalibHO2_;
1435  iphi = (iphi + 1) * mPhiCalibHO0_ - 1;
1436  } else {
1437  ieta = (kphi >= 3 * kPhiCalibHO1_ + kPhiCalibHO0_) ? etaCalibHO_[4] : etaCalibHO_[3];
1438  iphi = kphi % kPhiCalibHO1_;
1439  ichan = (id0 - iphi - (ieta + 1) * kPhiCalibHO1_ - kPhiCalibHO0_) / kPhiCalibHO2_;
1440  iphi = (iphi + 1) * mPhiCalibHO1_ - 1;
1441  }
1442  ctype = chanCalibHO_[ichan];
1443  } else if (hid0 < kOffCalibHE2_) {
1444  hid0 -= kOffCalibHO2_;
1445  subdet = HcalOuter;
1446  iphi = phiCalibHO_[hid0];
1447  ctype = static_cast<int>(chanCalibHOs_);
1448  ieta = etaCalibHO_[hid0];
1449  } else if (hid0 < kOffCalibHF2_) {
1450  hid0 -= kOffCalibHE2_;
1451  id0 = static_cast<int>(hid0);
1452  subdet = HcalEndcap;
1453  iphi = hid0 % kPhiCalibHE_;
1454  keta = (hid0 < kchanCalibHE2_) ? 0 : 1;
1455  ieta = etaCalibHE_[keta];
1456  iphi = mPhiCalibHE_ * (iphi + 1) - 1;
1457  ctype = chanCalibHE2_;
1458  } else {
1459  hid0 -= kOffCalibHF2_;
1460  id0 = static_cast<int>(hid0);
1461  subdet = HcalForward;
1462  keta = (hid0 < kchanCalibHF2_) ? 0 : 1;
1463  ieta = etaCalibHF_[keta];
1464  iphi = phiCalibHF2_;
1465  ctype = chanCalibHF2_;
1466  }
1467  id = HcalCalibDetId(subdet, ieta, iphi, ctype);
1468 #ifdef EDM_ML_DEBUG
1469  edm::LogVerbatim("HCalGeom") << "CalibrationBox: " << hid << " o/p " << ieta << ":" << iphi << ":" << ichan << ":"
1470  << ctype << " " << id;
1471 #endif
1472  } else if (hid < kOffCalibHBX_) {
1473  hid0 -= kOffCalibHOX_;
1474  int iphi, ieta;
1475  if (hid0 < nPhiCalibHOX_[1]) {
1476  iphi = static_cast<int>(hid0) + 1;
1477  ieta = -etaCalibHOX_[1];
1478  } else if (hid0 < (nPhiCalibHOX_[1] + nPhiCalibHOX_[0])) {
1479  hid0 -= nPhiCalibHOX_[1];
1480  iphi = ((hid0 + phiCalibHOX1_) % phiCalibHOX2_ < phiCalibHOX3_) ? 2 * hid0 + 1 : 2 * hid0 + 2;
1481  ieta = -etaCalibHOX_[0];
1482  } else if (hid0 < (nPhiCalibHOX_[1] + 2 * nPhiCalibHOX_[0])) {
1483  hid0 -= (nPhiCalibHOX_[1] + nPhiCalibHOX_[0]);
1484  iphi = ((hid0 + phiCalibHOX1_) % phiCalibHOX2_ < phiCalibHOX3_) ? 2 * hid0 + 1 : 2 * hid0 + 2;
1485  ieta = etaCalibHOX_[0];
1486  } else {
1487  hid0 -= (nPhiCalibHOX_[1] + 2 * nPhiCalibHOX_[0]);
1488  iphi = static_cast<int>(hid0) + 1;
1489  ieta = etaCalibHOX_[1];
1490  }
1491  id = HcalCalibDetId(HcalCalibDetId::HOCrosstalk, ieta, iphi);
1492 #ifdef EDM_ML_DEBUG
1493  edm::LogVerbatim("HCalGeom") << "HOCrossTalk: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " "
1494  << id;
1495 #endif
1496  } else if (hid < kOffCalibHEX_) {
1497  hid0 -= kOffCalibHBX_;
1498  int ieta = (hid0 >= kPhiCalibHBX_) ? etaCalibHBX_ : -etaCalibHBX_;
1499  int iphi = (hid0 % kPhiCalibHBX_) + 1;
1500  id = HcalCalibDetId(HcalCalibDetId::HBX, ieta, iphi);
1501 #ifdef EDM_ML_DEBUG
1502  edm::LogVerbatim("HCalGeom") << "HBX: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " " << id;
1503 #endif
1504  } else if (hid < kOffCalibHFX_) {
1505  hid0 -= kOffCalibHEX_;
1506  int iphi = 2 * (hid0 % kPhiCalibHEX_) + 1;
1507  int ieta = ((hid0 < kPhiCalibHEX_)
1508  ? -etaCalibHEX_[0]
1509  : ((hid0 < 2 * kPhiCalibHEX_) ? etaCalibHEX_[0]
1510  : ((hid0 < 3 * kPhiCalibHEX_) ? -etaCalibHEX_[1] : etaCalibHEX_[1])));
1511  id = HcalCalibDetId(HcalCalibDetId::HEX, ieta, iphi);
1512 #ifdef EDM_ML_DEBUG
1513  edm::LogVerbatim("HCalGeom") << "HEX: " << hid << ":" << hid0 << " o/p " << ieta << ":" << iphi << " " << id;
1514 #endif
1515  }
1516  return id;
1517 }
static constexpr int chanCalibHF2_
Definition: HcalTopology.h:288
Log< level::Info, true > LogVerbatim
static constexpr unsigned int kchanCalibHE1_
Definition: HcalTopology.h:261
static constexpr int etaCalibHE_[nEtaCalibHE_]
Definition: HcalTopology.h:260
static constexpr unsigned int kchanCalibHF1_
Definition: HcalTopology.h:268
static constexpr unsigned int kPhiCalibHBX_
Definition: HcalTopology.h:301
static constexpr int etaCalibHBX_
Definition: HcalTopology.h:300
static constexpr unsigned int kOffCalibHFX_
Definition: HcalTopology.h:308
uint16_t *__restrict__ id
static constexpr unsigned int kchanCalibHE2_
Definition: HcalTopology.h:285
static constexpr unsigned int kchanCalibHF2_
Definition: HcalTopology.h:289
static constexpr unsigned int kOffCalibHE1_
Definition: HcalTopology.h:256
static constexpr unsigned int kPhiCalibHO0_
Definition: HcalTopology.h:277
static constexpr int phiCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:275
static constexpr int etaCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:274
static constexpr int etaCalibHB_[nEtaCalibHB_]
Definition: HcalTopology.h:253
static constexpr unsigned int nPhiCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:295
static constexpr int chanCalibHE2_
Definition: HcalTopology.h:284
static constexpr int phiCalibHOX3_
Definition: HcalTopology.h:297
static constexpr unsigned int kPhiCalibHB_
Definition: HcalTopology.h:251
static constexpr int phiCalibHOX2_
Definition: HcalTopology.h:297
static constexpr int phiCalibHOX1_
Definition: HcalTopology.h:297
static constexpr unsigned int kOffCalibHEX_
Definition: HcalTopology.h:303
static constexpr int chanCalibHE1_[nchanCalibHE1_]
Definition: HcalTopology.h:259
HcalSubdetector
Definition: HcalAssistant.h:31
static constexpr int etaCalibHEX_[nEtaCalibHEX_]
Definition: HcalTopology.h:305
static constexpr unsigned int kPhiCalibHO2_
Definition: HcalTopology.h:279
static constexpr unsigned int kPhiCalibHO1_
Definition: HcalTopology.h:278
static constexpr unsigned int mPhiCalibHE_
Definition: HcalTopology.h:258
static constexpr int chanCalibHO_[nchanCalibHO_]
Definition: HcalTopology.h:273
static constexpr unsigned int mPhiCalibHO1_
Definition: HcalTopology.h:276
static constexpr unsigned int kOffCalibHOX_
Definition: HcalTopology.h:291
static constexpr unsigned int kPhiCalibHF1_
Definition: HcalTopology.h:265
static constexpr int etaCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:293
static constexpr int chanCalibHOs_
Definition: HcalTopology.h:272
static constexpr unsigned int kOffCalibHF1_
Definition: HcalTopology.h:263
static constexpr int chanCalibHF1_[nchanCalibHF1_]
Definition: HcalTopology.h:266
static constexpr unsigned int kOffCalibHE2_
Definition: HcalTopology.h:283
static constexpr unsigned int kOffCalibHBX_
Definition: HcalTopology.h:298
static constexpr int chanCalibHB_[nchanCalibHB_]
Definition: HcalTopology.h:252
static constexpr unsigned int mPhiCalibHO0_
Definition: HcalTopology.h:276
static constexpr unsigned int kOffCalibHO2_
Definition: HcalTopology.h:281
static constexpr int etaCalibHF_[nEtaCalibHF_]
Definition: HcalTopology.h:267
static constexpr unsigned int kPhiCalibHE_
Definition: HcalTopology.h:258
static constexpr unsigned int mPhiCalibHB_
Definition: HcalTopology.h:251
static constexpr unsigned int kchanCalibHB_
Definition: HcalTopology.h:254
static constexpr int phiCalibHF2_
Definition: HcalTopology.h:288
static constexpr unsigned int kOffCalibHO1_
Definition: HcalTopology.h:270
static constexpr unsigned int kPhiCalibHEX_
Definition: HcalTopology.h:306
static constexpr unsigned int mPhiCalibHF1_
Definition: HcalTopology.h:265
static constexpr unsigned int kOffCalibHF2_
Definition: HcalTopology.h:287
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 817 of file HcalTopology.cc.

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

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

818  {
819  if (subdet == HcalBarrel) {
821  startingBin = hcons_->getMinDepth(0, etaRing, iphi, zside);
822  if (etaRing == lastHBRing()) {
823  nDepthBins = hcons_->getDepthEta16(1, iphi, zside) - startingBin + 1;
824  } else {
825  nDepthBins = hcons_->getMaxDepth(0, etaRing, iphi, zside) - startingBin + 1;
826  }
827  } else {
828  if (etaRing <= 14) {
829  nDepthBins = 1;
830  startingBin = 1;
831  } else {
832  nDepthBins = 2;
833  startingBin = 1;
834  }
835  }
836  } else if (subdet == HcalEndcap) {
838  if (etaRing == firstHERing()) {
839  startingBin = hcons_->getDepthEta16(2, iphi, zside);
840  } else {
841  startingBin = hcons_->getMinDepth(1, etaRing, iphi, zside);
842  }
843  nDepthBins = hcons_->getMaxDepth(1, etaRing, iphi, zside) - startingBin + 1;
844  } else {
845  if (etaRing == firstHERing()) {
846  nDepthBins = 1;
847  startingBin = 3;
848  } else if (etaRing == 17) {
849  nDepthBins = 1;
850  startingBin = 1;
851  } else if (etaRing == lastHERing()) {
852  nDepthBins = 2;
853  startingBin = 1;
854  } else {
855  nDepthBins = (etaRing >= firstHETripleDepthRing()) ? 3 : 2;
856  startingBin = 1;
857  }
858  }
859  } else if (subdet == HcalForward) {
860  nDepthBins = maxDepthHF_;
861  startingBin = 1;
862  } else if (subdet == HcalOuter) {
863  nDepthBins = 1;
864  startingBin = 4;
865  } else {
866  edm::LogWarning("HCalGeom") << "Bad HCAL subdetector " << subdet;
867  }
868 }
int lastHBRing() const
Definition: HcalTopology.h:92
int zside(DetId const &)
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int firstHETripleDepthRing() const
Definition: HcalTopology.h:104
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
int getMaxDepth(const int &type) const
int firstHERing() const
Definition: HcalTopology.h:93
Log< level::Warning, false > LogWarning
int lastHERing() const
Definition: HcalTopology.h:94
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
unsigned int HcalTopology::detId2denseId ( const DetId id) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1519 of file HcalTopology.cc.

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 HcalGeometry::getGeometry(), HcalGeometry::getGeometryBase(), HcalGeometry::indexFor(), HcalDDDGeometry::newCellImpl(), HcalGeometry::newCellImpl(), and HBHEPhase1Reconstructor::processData().

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

return a linear packed id from CALIB

Definition at line 1279 of file HcalTopology.cc.

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, HcalCalibDetId::ieta(), 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().

1279  {
1280  HcalCalibDetId tid(id);
1281  int channel = tid.cboxChannel();
1282  int ieta = tid.ieta();
1283  int iphi = tid.iphi();
1284  int zside = tid.zside();
1285  unsigned int index = 0xFFFFFFFFu;
1286 
1287  if (tid.calibFlavor() == HcalCalibDetId::CalibrationBox) {
1288  HcalSubdetector subDet = tid.hcalSubdet();
1289 
1290  if (subDet == HcalBarrel) {
1291  //std::cout<<"CALIB_HB: ";
1292  //dphi = 4 (18 phi values), 3 channel types (0,1,2), eta = -1 or 1
1293  //total of 18*3*2=108 channels
1294  auto indx = std::find(etaCalibHB_, etaCalibHB_ + nEtaCalibHB_, ieta);
1295  auto kndx = std::find(chanCalibHB_, chanCalibHB_ + nchanCalibHB_, channel);
1296  if (indx != etaCalibHB_ + nEtaCalibHB_ && kndx != chanCalibHB_ + nchanCalibHB_) {
1297  int keta = static_cast<int>(indx - etaCalibHB_);
1298  int kchn = static_cast<int>(kndx - chanCalibHB_);
1299  index = ((iphi + 1) / mPhiCalibHB_ - 1) + kPhiCalibHB_ * kchn + keta * kchanCalibHB_ + kOffCalibHB_;
1300  }
1301  } else if (subDet == HcalEndcap) {
1302  //std::cout<<"CALIB_HE: ";
1303  //dphi = 4 (18 phi values), 7 channel types (0,1,2,3,4,5,6), eta = -1/+1
1304  //total of 18*7*2=252 channels
1305  // if (channel > 2) channel -= 1;
1306  auto indx = std::find(etaCalibHE_, etaCalibHE_ + nEtaCalibHE_, ieta);
1307  if (indx != etaCalibHE_ + nEtaCalibHE_) {
1308  int keta = static_cast<int>(indx - etaCalibHE_);
1309  auto kndx = std::find(chanCalibHE1_, chanCalibHE1_ + nchanCalibHE1_, channel);
1310  if (kndx != chanCalibHE1_ + nchanCalibHE1_) {
1311  int kchn = static_cast<int>(kndx - chanCalibHE1_);
1312  index = ((iphi + 1) / mPhiCalibHE_ - 1) + kPhiCalibHE_ * kchn + keta * kchanCalibHE1_ + kOffCalibHE1_;
1313  } else if (channel == chanCalibHE2_) {
1314  index = ((iphi + 1) / mPhiCalibHE_ - 1) + keta * kchanCalibHE2_ + kOffCalibHE2_;
1315  }
1316  }
1317  } else if (subDet == HcalForward) {
1318  //std::cout<<"CALIB_HF: ";
1319  //dphi = 18 (4 phi values), 3 channel types (0,1,8), eta = -1 or +1
1320  // or iphi = 1; channel = 9, eta = -1 or +1
1321  //total channels 4*3*2=24 + 2
1322  auto indx = std::find(etaCalibHF_, etaCalibHF_ + nEtaCalibHF_, ieta);
1323  if (indx != etaCalibHF_ + nEtaCalibHF_) {
1324  int keta = static_cast<int>(indx - etaCalibHF_);
1325  auto kndx = std::find(chanCalibHF1_, chanCalibHF1_ + nchanCalibHF1_, channel);
1326  if (kndx != chanCalibHF1_ + nchanCalibHF1_) {
1327  int kchn = static_cast<int>(kndx - chanCalibHF1_);
1328  index = ((iphi - 1) / mPhiCalibHF1_) + kPhiCalibHF1_ * kchn + keta * kchanCalibHF1_ + kOffCalibHF1_;
1329  } else if (channel == chanCalibHF2_) {
1330  index = keta * kchanCalibHF2_ + kOffCalibHF2_;
1331  }
1332  }
1333  } else if (subDet == HcalOuter) {
1334  //std::cout<<"CALIB_HO: ";
1335  auto indx = std::find(etaCalibHO_, etaCalibHO_ + nEtaCalibHO_, ieta);
1336  if (indx != etaCalibHO_ + nEtaCalibHO_) {
1337  int keta = static_cast<int>(indx - etaCalibHO_);
1338  auto kndx = std::find(chanCalibHO_, chanCalibHO_ + nchanCalibHO_, channel);
1339  //there are 5 special calib crosstalk channels, one in each ring
1340  if (channel == chanCalibHOs_) {
1341  index = keta + kOffCalibHO2_;
1342  } else if (kndx != chanCalibHO_ + nchanCalibHO_) {
1343  //for HOM/HOP dphi = 6 (12 phi values), 2 channel types (0,1), eta = -2,-1 or 1,2
1344  //for HO0/YB0 dphi = 12 (6 phi values), 2 channel types (0,1), eta = 0
1345  int kchn = static_cast<int>(kndx - chanCalibHO_);
1346  int kphi = (ieta == 0) ? ((iphi + 1) / mPhiCalibHO0_ - 1) : ((iphi + 1) / mPhiCalibHO1_ - 1);
1347  if (ieta < 0) {
1348  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * keta + kOffCalibHO1_;
1349  } else if (ieta > 0) {
1350  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * (keta - 1) + kPhiCalibHO0_ + kOffCalibHO1_;
1351  } else {
1352  index = kphi + kPhiCalibHO2_ * kchn + kPhiCalibHO1_ * keta + kOffCalibHO1_;
1353  }
1354  }
1355  }
1356  } else {
1357  edm::LogWarning("HGCalGeom") << "HCAL Det Id not valid!";
1358  }
1359  } else if (tid.calibFlavor() == HcalCalibDetId::HOCrosstalk) {
1360  //std::cout<<"HX: ";
1361  //for YB0/HO0 phi is grouped in 6 groups of 6 with dphi=2 but the transitions are 1 or 3
1362  // in such a way that the %36 operation yeilds unique values for every iphi
1363  //ieta = 0 for HO2M/HO1M ieta=2 for HO1P/HO2P;
1364  //ieta = 1 YB0/HO0;
1365  int kphi = ((std::abs(ieta) == etaCalibHOX_[0]) ? ((iphi % 2 == 0) ? (iphi / 2 - 1) : (iphi - 1) / 2) : (iphi - 1));
1366  if (std::abs(ieta) == etaCalibHOX_[0]) {
1367  index = kphi + (((zside + 1) * nPhiCalibHOX_[0]) / 2) + nPhiCalibHOX_[1] + kOffCalibHOX_;
1368  } else if (std::abs(ieta) == etaCalibHOX_[1]) {
1369  index = kphi + ((zside + 1) * nPhiCalibHOX_[1]) + kOffCalibHOX_;
1370  }
1371  } else if (tid.calibFlavor() == HcalCalibDetId::HBX) {
1372  if (std::abs(ieta) == etaCalibHBX_) {
1373  index = kOffCalibHBX_ + (iphi - 1) + (zside + 1) * kPhiCalibHBX_ / 2;
1374  }
1375  } else if (tid.calibFlavor() == HcalCalibDetId::HEX) {
1376  if (std::abs(ieta) == etaCalibHEX_[0]) {
1377  index = kOffCalibHEX_ + (iphi - 1) / mPhiCalibHEX_ + (zside + 1) * kPhiCalibHEX_ / 2;
1378  } else if (std::abs(ieta) == etaCalibHEX_[1]) {
1379  index = kOffCalibHEX_ + (iphi - 1) / mPhiCalibHEX_ + (zside + 1) * kPhiCalibHEX_ / 2 + 2 * kPhiCalibHEX_;
1380  }
1381  }
1382  //std::cout << " " << ieta << " " << zside << " " << iphi << " " << depth << " " << index << std::endl;
1383  return index;
1384 }
static constexpr int chanCalibHF2_
Definition: HcalTopology.h:288
static constexpr unsigned int kchanCalibHE1_
Definition: HcalTopology.h:261
static constexpr int etaCalibHE_[nEtaCalibHE_]
Definition: HcalTopology.h:260
static constexpr unsigned int kchanCalibHF1_
Definition: HcalTopology.h:268
static constexpr unsigned int kPhiCalibHBX_
Definition: HcalTopology.h:301
static constexpr int etaCalibHBX_
Definition: HcalTopology.h:300
static constexpr unsigned int kchanCalibHE2_
Definition: HcalTopology.h:285
static constexpr unsigned int kchanCalibHF2_
Definition: HcalTopology.h:289
static constexpr unsigned int kOffCalibHE1_
Definition: HcalTopology.h:256
static constexpr unsigned int nEtaCalibHO_
Definition: HcalTopology.h:271
static constexpr unsigned int kPhiCalibHO0_
Definition: HcalTopology.h:277
int zside(DetId const &)
static constexpr int etaCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:274
static constexpr unsigned int nEtaCalibHF_
Definition: HcalTopology.h:264
static constexpr unsigned int nchanCalibHO_
Definition: HcalTopology.h:271
static constexpr int etaCalibHB_[nEtaCalibHB_]
Definition: HcalTopology.h:253
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
static constexpr unsigned int nPhiCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:295
static constexpr int chanCalibHE2_
Definition: HcalTopology.h:284
static constexpr unsigned int nEtaCalibHB_
Definition: HcalTopology.h:250
static constexpr unsigned int kPhiCalibHB_
Definition: HcalTopology.h:251
static constexpr unsigned int nEtaCalibHE_
Definition: HcalTopology.h:257
static constexpr unsigned int nchanCalibHB_
Definition: HcalTopology.h:250
static constexpr unsigned int kOffCalibHEX_
Definition: HcalTopology.h:303
static constexpr unsigned int mPhiCalibHEX_
Definition: HcalTopology.h:304
static constexpr int chanCalibHE1_[nchanCalibHE1_]
Definition: HcalTopology.h:259
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr int etaCalibHEX_[nEtaCalibHEX_]
Definition: HcalTopology.h:305
static constexpr unsigned int kPhiCalibHO2_
Definition: HcalTopology.h:279
static constexpr unsigned int kPhiCalibHO1_
Definition: HcalTopology.h:278
static constexpr unsigned int mPhiCalibHE_
Definition: HcalTopology.h:258
static constexpr unsigned int kOffCalibHB_
Definition: HcalTopology.h:249
static constexpr unsigned int nchanCalibHF1_
Definition: HcalTopology.h:264
static constexpr int chanCalibHO_[nchanCalibHO_]
Definition: HcalTopology.h:273
static constexpr unsigned int nchanCalibHE1_
Definition: HcalTopology.h:257
static constexpr unsigned int mPhiCalibHO1_
Definition: HcalTopology.h:276
static constexpr unsigned int kOffCalibHOX_
Definition: HcalTopology.h:291
static constexpr unsigned int kPhiCalibHF1_
Definition: HcalTopology.h:265
static constexpr int etaCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:293
static constexpr int chanCalibHOs_
Definition: HcalTopology.h:272
static constexpr unsigned int kOffCalibHF1_
Definition: HcalTopology.h:263
static constexpr int chanCalibHF1_[nchanCalibHF1_]
Definition: HcalTopology.h:266
static constexpr unsigned int kOffCalibHE2_
Definition: HcalTopology.h:283
static constexpr unsigned int kOffCalibHBX_
Definition: HcalTopology.h:298
static constexpr int chanCalibHB_[nchanCalibHB_]
Definition: HcalTopology.h:252
static constexpr unsigned int mPhiCalibHO0_
Definition: HcalTopology.h:276
static constexpr unsigned int kOffCalibHO2_
Definition: HcalTopology.h:281
static constexpr int etaCalibHF_[nEtaCalibHF_]
Definition: HcalTopology.h:267
static constexpr unsigned int kPhiCalibHE_
Definition: HcalTopology.h:258
static constexpr unsigned int mPhiCalibHB_
Definition: HcalTopology.h:251
static constexpr unsigned int kchanCalibHB_
Definition: HcalTopology.h:254
Log< level::Warning, false > LogWarning
static constexpr unsigned int kOffCalibHO1_
Definition: HcalTopology.h:270
static constexpr unsigned int kPhiCalibHEX_
Definition: HcalTopology.h:306
static constexpr unsigned int mPhiCalibHF1_
Definition: HcalTopology.h:265
static constexpr unsigned int kOffCalibHF2_
Definition: HcalTopology.h:287
unsigned int HcalTopology::detId2denseIdHB ( const DetId id) const

return a linear packed id from HB

Definition at line 1170 of file HcalTopology.cc.

References HcalDetId::depth(), 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().

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

return a linear packed id from HE

Definition at line 1189 of file HcalTopology.cc.

References HcalDetId::depth(), 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().

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

return a linear packed id from HF

Definition at line 1234 of file HcalTopology.cc.

References HcalDetId::depth(), 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().

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

return a linear packed id from HO

Definition at line 1216 of file HcalTopology.cc.

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().

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

return a linear packed id from HT

Definition at line 1254 of file HcalTopology.cc.

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

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

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

Definition at line 1141 of file HcalTopology.cc.

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

Referenced by detId2denseId().

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

Definition at line 106 of file HcalTopology.h.

References doublePhiBins_.

106 { return doublePhiBins_; }
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 458 of file HcalTopology.cc.

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

458  {
459  HcalDetId neighbor = id;
460  std::vector<DetId> vNeighborsDetId;
461  if (decrementDepth(neighbor)) {
462  if (neighbor.oldFormat())
463  neighbor.changeForm();
464  vNeighborsDetId.emplace_back(neighbor);
465  }
466  return vNeighborsDetId;
467 }
uint16_t *__restrict__ id
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
bool decrementDepth(HcalDetId &id) const
constexpr void changeForm()
Definition: HcalDetId.h:198
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 403 of file HcalTopology.cc.

References decIEta(), and mps_fire::i.

Referenced by spr::newHCALIdEW().

403  {
404  std::vector<DetId> vNeighborsDetId;
405  HcalDetId neighbors[2];
406  for (int i = 0; i < decIEta(HcalDetId(id), neighbors); i++) {
407  if (neighbors[i].oldFormat())
408  neighbors[i].changeForm();
409  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
410  }
411  return vNeighborsDetId;
412 }
int decIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:17
double HcalTopology::etaMax ( HcalSubdetector  subdet) const

Definition at line 1101 of file HcalTopology.cc.

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

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

1101  {
1102  double eta(0);
1103  switch (subdet) {
1104  case (HcalBarrel):
1105  if (lastHBRing_ < (int)(etaTable.size()))
1107  break;
1108  case (HcalEndcap):
1109  if (lastHERing_ < (int)(etaTable.size()) && nEtaHE_ > 0)
1111  break;
1112  case (HcalOuter):
1113  if (lastHORing_ < (int)(etaTable.size()))
1115  break;
1116  case (HcalForward):
1117  if (!etaTableHF.empty())
1118  eta = etaTableHF[etaTableHF.size() - 1];
1119  break;
1120  default:
1121  eta = 0;
1122  }
1123  return eta;
1124 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
std::pair< double, double > HcalTopology::etaRange ( HcalSubdetector  subdet,
int  ieta 
) const

Definition at line 1125 of file HcalTopology.cc.

References etaTable, etaTableHF, firstHFRing_, HcalForward, cuy::ii, lastHERing_, HcalTopologyMode::LHC, and mode_.

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

1125  {
1126  int ieta = (keta > 0) ? keta : -keta;
1127  if (subdet == HcalForward) {
1128  if (ieta >= firstHFRing_) {
1129  unsigned int ii = (unsigned int)(ieta - firstHFRing_);
1130  if (ii + 1 < etaTableHF.size())
1131  return std::pair<double, double>(etaTableHF[ii], etaTableHF[ii + 1]);
1132  }
1133  } else {
1134  int ietal = (mode_ == HcalTopologyMode::LHC && ieta == lastHERing_ - 1) ? (ieta + 1) : ieta;
1135  if ((ietal < (int)(etaTable.size())) && (ieta > 0))
1136  return std::pair<double, double>(etaTable[ieta - 1], etaTable[ietal]);
1137  }
1138  return std::pair<double, double>(0, 0);
1139 }
int ii
Definition: cuy.py:589
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
int HcalTopology::etaRing ( HcalSubdetector  subdet,
double  eta 
) const

eta and phi index from eta, phi values

Definition at line 998 of file HcalTopology.cc.

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

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

998  {
999  int etaring = firstHBRing_;
1000  if (bc == HcalForward) {
1001  etaring = firstHFRing_;
1002  for (unsigned int k = 0; k < etaTableHF.size() - 1; ++k) {
1003  if (abseta < etaTableHF[k + 1]) {
1004  etaring += k;
1005  break;
1006  }
1007  }
1008  } else {
1009  for (unsigned int k = 0; k < etaTable.size() - 1; ++k) {
1010  if (abseta < etaTable[k + 1]) {
1011  etaring += k;
1012  break;
1013  }
1014  }
1015  if (abseta >= etaTable[etaTable.size() - 1])
1016  etaring = lastHERing_;
1017  }
1018  return etaring;
1019 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
void HcalTopology::exclude ( const HcalDetId id)

Add a cell to exclusion list

Definition at line 377 of file HcalTopology.cc.

References exclusionList_, mps_fire::i, gpuClustering::id, and cuda_std::lower_bound().

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

377  {
378  std::vector<HcalDetId>::iterator i = std::lower_bound(exclusionList_.begin(), exclusionList_.end(), id);
379  if (i == exclusionList_.end() || *i != id) {
380  exclusionList_.insert(i, id);
381  }
382 }
uint16_t *__restrict__ id
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:187
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 469 of file HcalTopology.cc.

References HLT_FULL_cff::depth, exclude(), excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, gpuClustering::id, SiStripPI::max, SiStripPI::min, dqmiodumpmetadata::n, and validRaw().

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

Exclude an entire subdetector

Definition at line 384 of file HcalTopology.cc.

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

Referenced by HcalTopologyRestrictionParser::parse().

384  {
385  switch (subdet) {
386  case (HcalBarrel):
387  excludeHB_ = true;
388  break;
389  case (HcalEndcap):
390  excludeHE_ = true;
391  break;
392  case (HcalOuter):
393  excludeHO_ = true;
394  break;
395  case (HcalForward):
396  excludeHF_ = true;
397  break;
398  default:
399  break;
400  }
401 }
int HcalTopology::firstHBRing ( ) const
inline
int HcalTopology::firstHEDoublePhiRing ( ) const
inline
int HcalTopology::firstHEQuadPhiRing ( ) const
inline
int HcalTopology::firstHERing ( ) const
inline
int HcalTopology::firstHETripleDepthRing ( ) const
inline

Definition at line 104 of file HcalTopology.h.

References firstHETripleDepthRing_.

Referenced by depthBinInformation(), and HcalHardcodeGeometryLoader::makeHECells().

104 { return firstHETripleDepthRing_; }
int firstHETripleDepthRing_
Definition: HcalTopology.h:202
int HcalTopology::firstHFQuadPhiRing ( ) const
inline
int HcalTopology::firstHFRing ( ) const
inline
int HcalTopology::firstHORing ( ) const
inline

Definition at line 98 of file HcalTopology.h.

References firstHORing_.

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

98 { return firstHORing_; }
unsigned int HcalTopology::getCALIBSize ( ) const
inline

Definition at line 137 of file HcalTopology.h.

References CALIBSize_.

Referenced by HcalCondObjectContainerBase::sizeFor().

137 { return CALIBSize_; }
unsigned int CALIBSize_
Definition: HcalTopology.h:213
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 1065 of file HcalTopology.cc.

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

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

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

Definition at line 132 of file HcalTopology.h.

References HBSize_.

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

132 { return HBSize_; }
unsigned int HBSize_
Definition: HcalTopology.h:208
unsigned int HcalTopology::getHESize ( ) const
inline

Definition at line 133 of file HcalTopology.h.

References HESize_.

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

133 { return HESize_; }
unsigned int HESize_
Definition: HcalTopology.h:209
unsigned int HcalTopology::getHFSize ( ) const
inline
unsigned int HcalTopology::getHOSize ( ) const
inline

Definition at line 134 of file HcalTopology.h.

References HOSize_.

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

134 { return HOSize_; }
unsigned int HOSize_
Definition: HcalTopology.h:210
unsigned int HcalTopology::getHTSize ( ) const
inline

Definition at line 136 of file HcalTopology.h.

References HTSize_.

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

136 { return HTSize_; }
unsigned int HTSize_
Definition: HcalTopology.h:212
bool HcalTopology::getMergePositionFlag ( ) const
inline
unsigned int HcalTopology::getNumberOfShapes ( ) const
inline

Definition at line 161 of file HcalTopology.h.

References numberOfShapes_.

Referenced by HcalGeometry::numberOfShapes().

161 { return numberOfShapes_; }
unsigned int numberOfShapes_
Definition: HcalTopology.h:214
int HcalTopology::getPhiZOne ( std::vector< std::pair< int, int > > &  phiz) const
inline

Definition at line 130 of file HcalTopology.h.

References HcalDDDRecConstants::getPhiZOne(), and hcons_.

130 { return hcons_->getPhiZOne(phiz); }
int getPhiZOne(std::vector< std::pair< int, int >> &phiz) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
HcalDetId HcalTopology::idBack ( const HcalDetId id) const
inline

Definition at line 171 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::idBack().

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

171 { return hcons_->idBack(id); }
HcalDetId idBack(const HcalDetId &id) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
HcalDetId HcalTopology::idFront ( const HcalDetId id) const
inline
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 745 of file HcalTopology.cc.

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

Referenced by decIEta(), and incIEta().

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

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

Definition at line 730 of file HcalTopology.cc.

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

Referenced by west().

730  {
731  if (id.zside() == 1)
732  return incAIEta(id, neighbors);
733  else
734  return decAIEta(id, neighbors);
735 }
int zside(DetId const &)
int decAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
int incAIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
bool HcalTopology::incIPhi ( const HcalDetId id,
HcalDetId neighbor 
) const

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

Definition at line 627 of file HcalTopology.cc.

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

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

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

Get the detector behind this one

Definition at line 870 of file HcalTopology.cc.

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

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

870  {
871  HcalSubdetector subdet = detId.subdet();
872  int ieta = detId.ieta();
873  int etaRing = detId.ietaAbs();
874  int depth = detId.depth();
875  int iphi = detId.iphi();
876  int zside = detId.zside();
877  int nDepthBins(0), startingBin(0);
878  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
879 
880  // see if the new depth bin exists
881  ++depth;
882  if (depth >= (startingBin + nDepthBins)) {
883  // handle on a case-by-case basis
884  if (subdet == HcalBarrel && etaRing < lastHORing()) {
885  // HO
886  subdet = HcalOuter;
887  depth = 4;
888  } else if (subdet == HcalBarrel && etaRing == lastHBRing()) {
889  // overlap
890  subdet = HcalEndcap;
892  depth = hcons_->getDepthEta16(2, iphi, zside);
893  } else if (subdet == HcalEndcap && etaRing == lastHERing() - 1 && mode_ != HcalTopologyMode::SLHC) {
894  // guard ring HF29 is behind HE 28
895  subdet = HcalForward;
896  (ieta > 0) ? ++ieta : --ieta;
897  depth = 1;
898  } else if (subdet == HcalEndcap && etaRing == lastHERing() && mode_ != HcalTopologyMode::SLHC) {
899  // split cells go to bigger granularity. Ring 29 -> 28
900  (ieta > 0) ? --ieta : ++ieta;
901  } else {
902  // no more chances
903  detId = HcalDetId();
904  return false;
905  }
906  }
907  detId = HcalDetId(subdet, ieta, iphi, depth);
908  return validRaw(detId);
909 }
int lastHBRing() const
Definition: HcalTopology.h:92
int zside(DetId const &)
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
bool validRaw(const HcalDetId &id) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
HcalSubdetector
Definition: HcalAssistant.h:31
int lastHORing() const
Definition: HcalTopology.h:99
int lastHERing() const
Definition: HcalTopology.h:94
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
bool HcalTopology::isBH ( ) const
inline

Definition at line 162 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::isBH().

Referenced by CaloTowerTopology::CaloTowerTopology().

162 { return ((hcons_ == nullptr) ? false : hcons_->isBH()); }
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
bool HcalTopology::isExcluded ( const HcalDetId id) const
private

Definition at line 349 of file HcalTopology.cc.

References excludeHB_, excludeHE_, excludeHF_, excludeHO_, exclusionList_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, gpuClustering::id, and cuda_std::lower_bound().

Referenced by validHcal().

349  {
350  bool exed = false;
351  // first, check the full detector exclusions... (fast)
352  switch (id.subdet()) {
353  case (HcalBarrel):
354  exed = excludeHB_;
355  break;
356  case (HcalEndcap):
357  exed = excludeHE_;
358  break;
359  case (HcalOuter):
360  exed = excludeHO_;
361  break;
362  case (HcalForward):
363  exed = excludeHF_;
364  break;
365  default:
366  exed = false;
367  }
368  // next, check the list (slower)
369  if (!exed && !exclusionList_.empty()) {
370  std::vector<HcalDetId>::const_iterator i = std::lower_bound(exclusionList_.begin(), exclusionList_.end(), id);
371  if (i != exclusionList_.end() && *i == id)
372  exed = true;
373  }
374  return exed;
375 }
uint16_t *__restrict__ id
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:187
int HcalTopology::lastHBHERing ( ) const
inline
int HcalTopology::lastHBRing ( ) const
inline
int HcalTopology::lastHERing ( ) const
inline
int HcalTopology::lastHFRing ( ) const
inline
int HcalTopology::lastHORing ( ) const
inline
int HcalTopology::maxDepth ( void  ) const

Definition at line 981 of file HcalTopology.cc.

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

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

981  {
982  int maxd1 = std::max(maxDepthHB_, maxDepthHE_);
983  int maxd2 = std::max(maxDepthHF_, minMaxDepth_);
984  return std::max(maxd1, maxd2);
985 }
static constexpr int minMaxDepth_
Definition: HcalTopology.h:247
int HcalTopology::maxDepth ( HcalSubdetector  subdet) const

Definition at line 987 of file HcalTopology.cc.

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

987  {
988  if (bc == HcalBarrel)
989  return maxDepthHB_;
990  else if (bc == HcalEndcap)
991  return maxDepthHE_;
992  else if (bc == HcalForward)
993  return maxDepthHF_;
994  else
995  return 4;
996 }
int HcalTopology::maxDepthHB ( ) const
inline

Definition at line 139 of file HcalTopology.h.

References maxDepthHB_.

Referenced by RecAnalyzerMinbias::beginRun().

139 { return maxDepthHB_; }
int HcalTopology::maxDepthHE ( ) const
inline

Definition at line 140 of file HcalTopology.h.

References maxDepthHE_.

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

140 { return maxDepthHE_; }
bool HcalTopology::mergedDepth29 ( HcalDetId  id) const
inline

Definition at line 111 of file HcalTopology.h.

References HLT_FULL_cff::depth, hcons_, and HcalDDDRecConstants::mergedDepthList29().

Referenced by CaloTowersCreationAlgo::assignHitHcal(), and CaloTowersCreationAlgo::makeHcalDropChMap().

111 { return hcons_->mergedDepthList29(id.ieta(), id.iphi(), id.depth()); }
bool mergedDepthList29(int ieta, int iphi, int depth) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
HcalDetId HcalTopology::mergedDepthDetId ( const HcalDetId id) const
inline
std::vector<int> HcalTopology::mergedDepthList29 ( HcalDetId  id) const
inline

Definition at line 112 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::mergedDepthList29().

112 { return hcons_->mergedDepthList29(id.ieta(), id.iphi()); }
bool mergedDepthList29(int ieta, int iphi, int depth) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
HcalTopologyMode::Mode HcalTopology::mode ( void  ) const
inline
unsigned int HcalTopology::ncells ( ) const
overridevirtual

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

Reimplemented from CaloSubdetectorTopology.

Definition at line 1687 of file HcalTopology.cc.

References HBSize_, HESize_, HFSize_, and HOSize_.

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

1687 { return HBSize_ + HESize_ + HOSize_ + HFSize_; }
unsigned int HESize_
Definition: HcalTopology.h:209
unsigned int HFSize_
Definition: HcalTopology.h:211
unsigned int HBSize_
Definition: HcalTopology.h:208
unsigned int HOSize_
Definition: HcalTopology.h:210
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 425 of file HcalTopology.cc.

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

Referenced by spr::newHCALIdNS().

425  {
426  std::vector<DetId> vNeighborsDetId;
427  HcalDetId neighbor;
428  if (incIPhi(HcalDetId(id), neighbor)) {
429  if (neighbor.oldFormat())
430  neighbor.changeForm();
431  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
432  }
433  return vNeighborsDetId;
434 }
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr void changeForm()
Definition: HcalDetId.h:198
bool incIPhi(const HcalDetId &id, HcalDetId &neighbor) const
Definition: DetId.h:17
int HcalTopology::nPhiBins ( int  etaRing) const

how many phi segments in this ring

Definition at line 956 of file HcalTopology.cc.

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

Referenced by CaloTowerHardcodeGeometryLoader::makeCell().

956  {
957  int lastPhiBin = singlePhiBins_;
959  lastPhiBin = doublePhiBins_ / 2;
960  else if (etaRing >= firstHEDoublePhiRing())
961  lastPhiBin = doublePhiBins_;
962  if (hcons_ && etaRing >= hcons_->getEtaRange(1).first && etaRing <= hcons_->getEtaRange(1).second) {
963  return nPhiBins(HcalBarrel, etaRing);
964  }
965  return lastPhiBin;
966 }
int nPhiBins(int etaRing) const
how many phi segments in this ring
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:101
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:103
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:102
std::pair< int, int > getEtaRange(const int &i) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
int HcalTopology::nPhiBins ( HcalSubdetector  subdet,
int  etaRing 
) const

Definition at line 968 of file HcalTopology.cc.

References dPhiTable, dPhiTableHF, firstHBRing_, firstHFRing_, and HcalForward.

968  {
969  double phiTableVal;
970  if (bc == HcalForward) {
971  phiTableVal = dPhiTableHF[etaRing - firstHFRing_];
972  } else {
973  phiTableVal = dPhiTable[etaRing - firstHBRing_];
974  }
975  int lastPhiBin = 0;
976  if (phiTableVal != 0.0)
977  lastPhiBin = static_cast<int>((2._pi / phiTableVal) + 0.001);
978  return lastPhiBin;
979 }
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:216
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
std::vector< double > dPhiTable
Definition: HcalTopology.h:216
int HcalTopology::phiBin ( HcalSubdetector  subdet,
int  etaRing,
double  phi 
) const

Definition at line 1021 of file HcalTopology.cc.

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

Referenced by HcalGeometry::phiBin().

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

Definition at line 43 of file HcalTopology.h.

43 { return "HCAL"; }
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 1093 of file HcalTopology.cc.

References d1, HLT_FULL_cff::depth, getDepthSegmentation(), cuda_std::lower_bound(), and cuda_std::upper_bound().

1093  {
1094  std::vector<int> readoutDepths;
1095  getDepthSegmentation(ring, readoutDepths, one);
1096  int d1 = std::lower_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
1097  int d2 = std::upper_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
1098  return std::pair<int, int>(d1, d2);
1099 }
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
__host__ __device__ constexpr RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
static constexpr float d1
void HcalTopology::setDepthSegmentation ( const unsigned  ring,
const std::vector< int > &  readoutDepths,
const bool  flag 
)

Definition at line 1085 of file HcalTopology.cc.

References depthSegmentation_, depthSegmentationOne_, and relativeConstraints::ring.

Referenced by HcalTopology().

1085  {
1086  if (one) {
1087  depthSegmentationOne_[ring] = readoutDepths;
1088  } else {
1089  depthSegmentation_[ring] = readoutDepths;
1090  }
1091 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:224
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:225
int HcalTopology::singlePhiBins ( ) const
inline

Definition at line 105 of file HcalTopology.h.

References singlePhiBins_.

105 { return singlePhiBins_; }
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 436 of file HcalTopology.cc.

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

Referenced by spr::newHCALIdNS().

436  {
437  std::vector<DetId> vNeighborsDetId;
438  HcalDetId neighbor;
439  if (decIPhi(HcalDetId(id), neighbor)) {
440  if (neighbor.oldFormat())
441  neighbor.changeForm();
442  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
443  }
444  return vNeighborsDetId;
445 }
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool decIPhi(const HcalDetId &id, HcalDetId &neighbor) const
constexpr void changeForm()
Definition: HcalDetId.h:198
Definition: DetId.h:17
int HcalTopology::topoVersion ( ) const
overridevirtual

return a version which identifies the given topology

Reimplemented from CaloSubdetectorTopology.

Definition at line 1689 of file HcalTopology.cc.

References topoVersion_.

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

1689 { return topoVersion_; }
HcalTopologyMode::TriggerMode HcalTopology::triggerMode ( ) const
inline
void HcalTopology::unmergeDepthDetId ( const HcalDetId id,
std::vector< HcalDetId > &  ids 
) const
inline

Definition at line 168 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::unmergeDepthDetId().

Referenced by HcalCollapseAnalyzer::analyze(), HcalGeometry::getBackPosition(), and HcalGeometry::getCorners().

168 { hcons_->unmergeDepthDetId(id, ids); }
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
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 447 of file HcalTopology.cc.

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

Referenced by spr::matrixHCALIdsDepth().

447  {
448  HcalDetId neighbor = id;
449  std::vector<DetId> vNeighborsDetId;
450  if (incrementDepth(neighbor)) {
451  if (neighbor.oldFormat())
452  neighbor.changeForm();
453  vNeighborsDetId.emplace_back(neighbor);
454  }
455  return vNeighborsDetId;
456 }
uint16_t *__restrict__ id
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
constexpr void changeForm()
Definition: HcalDetId.h:198
bool incrementDepth(HcalDetId &id) const
bool HcalTopology::valid ( const DetId id) const
overridevirtual
bool HcalTopology::validCalib ( const HcalCalibDetId id) const

Definition at line 277 of file HcalTopology.cc.

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, HcalCalibDetId::ieta(), HcalCalibDetId::iphi(), HcalCalibDetId::LASERMON, maxPhi_, minPhi_, nchanCalibHB_, nchanCalibHE1_, nchanCalibHF1_, nchanCalibHO_, nEtaCalibHB_, nEtaCalibHE_, nEtaCalibHEX_, nEtaCalibHF_, nEtaCalibHO_, nEtaCalibHOX_, convertSQLiteXML::ok, and HcalCalibDetId::uMNqie.

Referenced by validRaw().

277  {
278  bool ok(false);
279  if (tid.calibFlavor() == HcalCalibDetId::CalibrationBox) {
280  HcalSubdetector subdet = tid.hcalSubdet();
281  int ieta = tid.ieta();
282  int chan = tid.cboxChannel();
283  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
284  if (subdet == HcalBarrel) {
287  (iphi >= minPhi_) && (iphi <= maxPhi_))
288  ok = true;
289  } else if (subdet == HcalEndcap) {
292  (chan == chanCalibHE2_)) &&
293  (iphi >= minPhi_) && (iphi <= maxPhi_))
294  ok = true;
295  } else if (subdet == HcalForward) {
298  (chan == chanCalibHF2_)) &&
299  (iphi >= minPhi_) && (iphi <= maxPhi_))
300  ok = true;
301  } else if (subdet == HcalOuter) {
304  (chan == chanCalibHOs_)) &&
305  (iphi >= minPhi_) && (iphi <= maxPhi_))
306  ok = true;
307  }
308  } else if (tid.calibFlavor() == HcalCalibDetId::HOCrosstalk) {
309  int ieta = std::abs(tid.ieta());
310  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
312  (iphi >= minPhi_) && (iphi <= maxPhi_))
313  ok = true;
314  } else if (tid.calibFlavor() == HcalCalibDetId::HBX) {
315  int ieta = std::abs(tid.ieta());
316  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
317  if ((ieta == etaCalibHBX_) && (iphi >= minPhi_) && (iphi <= maxPhi_))
318  ok = true;
319  } else if (tid.calibFlavor() == HcalCalibDetId::HEX) {
320  int ieta = std::abs(tid.ieta());
321  unsigned int iphi = static_cast<unsigned int>(tid.iphi());
323  (iphi >= minPhi_) && (iphi <= maxPhi_))
324  ok = true;
325  } else if ((tid.calibFlavor() == HcalCalibDetId::uMNqie) || (tid.calibFlavor() == HcalCalibDetId::LASERMON) ||
326  (tid.calibFlavor() == HcalCalibDetId::CastorRadFacility)) {
327  ok = true;
328  }
329  return ok;
330 }
static constexpr int chanCalibHF2_
Definition: HcalTopology.h:288
static constexpr int etaCalibHE_[nEtaCalibHE_]
Definition: HcalTopology.h:260
static constexpr int etaCalibHBX_
Definition: HcalTopology.h:300
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, &quot;NDC&quot;) lumi.SetBorderSize( 0 ) lumi...
static constexpr unsigned int nEtaCalibHO_
Definition: HcalTopology.h:271
static constexpr int etaCalibHO_[nEtaCalibHO_]
Definition: HcalTopology.h:274
static constexpr unsigned int nEtaCalibHF_
Definition: HcalTopology.h:264
static constexpr unsigned int nchanCalibHO_
Definition: HcalTopology.h:271
static constexpr int etaCalibHB_[nEtaCalibHB_]
Definition: HcalTopology.h:253
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
static constexpr int chanCalibHE2_
Definition: HcalTopology.h:284
static constexpr unsigned int nEtaCalibHB_
Definition: HcalTopology.h:250
static constexpr unsigned int nEtaCalibHE_
Definition: HcalTopology.h:257
static constexpr unsigned int maxPhi_
Definition: HcalTopology.h:248
static constexpr unsigned int nchanCalibHB_
Definition: HcalTopology.h:250
static constexpr int chanCalibHE1_[nchanCalibHE1_]
Definition: HcalTopology.h:259
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr int etaCalibHEX_[nEtaCalibHEX_]
Definition: HcalTopology.h:305
static constexpr unsigned int nchanCalibHF1_
Definition: HcalTopology.h:264
static constexpr int chanCalibHO_[nchanCalibHO_]
Definition: HcalTopology.h:273
static constexpr unsigned int nchanCalibHE1_
Definition: HcalTopology.h:257
static constexpr int etaCalibHOX_[nEtaCalibHOX_]
Definition: HcalTopology.h:293
static constexpr int chanCalibHOs_
Definition: HcalTopology.h:272
static constexpr unsigned int nEtaCalibHOX_
Definition: HcalTopology.h:292
static constexpr int chanCalibHF1_[nchanCalibHF1_]
Definition: HcalTopology.h:266
static constexpr int chanCalibHB_[nchanCalibHB_]
Definition: HcalTopology.h:252
static constexpr unsigned int minPhi_
Definition: HcalTopology.h:248
static constexpr int etaCalibHF_[nEtaCalibHF_]
Definition: HcalTopology.h:267
static constexpr unsigned int nEtaCalibHEX_
Definition: HcalTopology.h:304
bool HcalTopology::validDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 235 of file HcalTopology.cc.

References validHcal().

235  {
236  return validHcal(HcalDetId(subdet, ieta, iphi, depth));
237 }
bool validHcal(const HcalDetId &id) const
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 537 of file HcalTopology.cc.

References HLT_FULL_cff::depth, firstHERing(), firstHFQuadPhiRing(), firstHFRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, IPHI_MAX, lastHFRing(), and sd.

537  {
538  const HcalSubdetector sd(id.subdet());
539  const int ie(id.ietaAbs());
540  const int ip(id.iphi());
541  const int dp(id.depth());
542 
543  return ((ip >= 1) && (ip <= IPHI_MAX) && (dp >= 1) && (ie >= 1) &&
544  (((sd == HcalBarrel) && (((ie <= 14) && (dp == 1)) || (((ie == 15) || (ie == 16)) && (dp <= 2)))) ||
545  ((sd == HcalEndcap) &&
546  (((ie == firstHERing()) && (dp == 3)) || ((ie == 17) && (dp == 1)) ||
547  ((ie >= 18) && (ie <= 20) && (dp <= 2)) || ((ie >= 21) && (ie <= 26) && (dp <= 2) && (ip % 2 == 1)) ||
548  ((ie >= 27) && (ie <= 28) && (dp <= 3) && (ip % 2 == 1)) || ((ie == 29) && (dp <= 2) && (ip % 2 == 1)))) ||
549  ((sd == HcalOuter) && (ie <= 15) && (dp == 4)) ||
550  ((sd == HcalForward) && (dp <= 2) &&
551  (((ie >= firstHFRing()) && (ie < firstHFQuadPhiRing()) && (ip % 2 == 1)) ||
552  ((ie >= firstHFQuadPhiRing()) && (ie <= lastHFRing()) && (ip % 4 == 3))))));
553 }
int firstHFRing() const
Definition: HcalTopology.h:96
int lastHFRing() const
Definition: HcalTopology.h:97
HcalSubdetector
Definition: HcalAssistant.h:31
double sd
int firstHERing() const
Definition: HcalTopology.h:93
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:103
static const int IPHI_MAX
Definition: HcalTopology.cc:13
bool HcalTopology::validHcal ( const HcalDetId id) const

Is this a valid cell id?

Definition at line 230 of file HcalTopology.cc.

References isExcluded(), and validRaw().

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

230  {
231  // check the raw rules
232  return validRaw(id) && !isExcluded(id);
233 }
bool isExcluded(const HcalDetId &id) const
bool validRaw(const HcalDetId &id) const
bool HcalTopology::validHcal ( const HcalDetId id,
const unsigned int  flag 
) const

Is this a valid cell in context of Plan1

Definition at line 332 of file HcalTopology.cc.

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

332  {
333  /* original logic show here because condensed form below is rather terse
334  // check the raw rules
335  bool ok = validHcal(id);
336  if (flag == 0) { // This is all what is needed
337  } else if (flag == 1) { // See if it is in the to be merged list and merged list
338  if (hcons_->isPlan1MergedId(id)) ok = true;
339  else if (hcons_->isPlan1ToBeMergedId(id)) ok = false;
340  } else if (!ok) {
341  ok = hcons_->isPlan1MergedId(id);
342  }
343  return ok;
344  */
345  return (flag > 0 and hcons_->isPlan1MergedId(id)) or
346  ((flag != 1 or !hcons_->isPlan1ToBeMergedId(id)) and validHcal(id));
347 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool validHcal(const HcalDetId &id) const
bool isPlan1MergedId(const HcalDetId &id) const
bool isPlan1ToBeMergedId(const HcalDetId &id) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
bool HcalTopology::validHT ( const HcalTrigTowerDetId id) const

Definition at line 239 of file HcalTopology.cc.

References HLT_FULL_cff::depth, firstHFRing_, IPHI_MAX, lastHBRing_, maxDepthHE_, or, triggerMode_, HcalTopologyMode::TriggerMode_2009, HcalTopologyMode::TriggerMode_2017, HcalTopologyMode::TriggerMode_2018legacy, and relval_steps::version.

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

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  // Version 2 TPs should be for HBHE when using 1TS filter scheme
249  if (id.version() == 0 or id.version() == 2) {
250  if (id.ietaAbs() > 28) {
252  return false;
254  return false;
255  if ((id.iphi() % 4) != 1)
256  return false;
257  if (id.ietaAbs() > 32)
258  return false;
259  }
260  } else if (id.version() == 1) {
262  return false;
263  if (id.ietaAbs() < 30 || id.ietaAbs() > 41)
264  return false;
265  if (id.ietaAbs() > 29 && ((id.iphi() % 2) == 0))
266  return false;
267  if (id.ietaAbs() > 39 && ((id.iphi() % 4) != 3))
268  return false;
269  } else if (id.version() > 2) {
270  // only versions 0, 1, and 2 are supported
271  return false;
272  }
273 
274  return true;
275 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:191
static const int IPHI_MAX
Definition: HcalTopology.cc:13
bool HcalTopology::validRaw ( const HcalDetId id) const
private

Is this a valid cell id?

Definition at line 556 of file HcalTopology.cc.

References HLT_FULL_cff::depth, etaBinsHE_, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHERing(), firstHFQuadPhiRing(), firstHFRing(), HcalDDDRecConstants::getDepthEta16(), HcalDDDRecConstants::getMaxDepth(), HcalDDDRecConstants::getNoff(), HcalTopologyMode::H2, HcalTopologyMode::H2HE, HcalBarrel, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, hcons_, mps_fire::i, 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().

556  {
557  bool ok = true;
558  int ieta = id.ieta();
559  int aieta = id.ietaAbs();
560  int depth = id.depth();
561  int iphi = id.iphi();
562  int zside = id.zside();
563  HcalSubdetector subdet = id.subdet();
564  int maxPhi = (subdet == HcalEndcap) ? maxPhiHE_ : IPHI_MAX;
565  if ((ieta == 0 || iphi <= 0 || iphi > maxPhi) || aieta > maxEta_)
566  ok = false; // outer limits
567 
568  if (ok) {
569  if (subdet == HcalBarrel) {
571  if ((aieta > lastHBRing()) || (depth > hcons_->getMaxDepth(0, aieta, iphi, zside)) ||
572  (depth < hcons_->getMinDepth(0, aieta, iphi, zside)))
573  ok = false;
574  } else {
575  if (aieta > lastHBRing() || depth > 2 || (aieta <= 14 && depth > 1))
576  ok = false;
577  }
578  } else if (subdet == HcalEndcap) {
580  if ((depth > hcons_->getMaxDepth(1, aieta, iphi, zside)) ||
581  (depth < hcons_->getMinDepth(1, aieta, iphi, zside)) || (aieta < firstHERing()) || (aieta > lastHERing())) {
582  ok = false;
583  } else {
584  for (const auto& i : etaBinsHE_) {
585  if (aieta == i.ieta) {
586  if (aieta >= firstHEDoublePhiRing() && (iphi % 2) == 0)
587  ok = false;
588  if (aieta >= firstHEQuadPhiRing() && (iphi % 4) != 3)
589  ok = false;
590  if (aieta + 1 == hcons_->getNoff(1)) {
591  if (depth < 1)
592  ok = false;
593  } else {
594  if (depth < i.depthStart)
595  ok = false;
596  }
597  break;
598  }
599  }
600  }
601  } else {
602  if (depth > hcons_->getMaxDepth(1, aieta, iphi, zside) || aieta < firstHERing() || aieta > lastHERing() ||
603  (aieta == firstHERing() && depth != hcons_->getDepthEta16(2, iphi, zside)) ||
604  (aieta == 17 && depth != 1 && mode_ != HcalTopologyMode::H2) || // special case at H2
605  (((aieta >= 17 && aieta < firstHETripleDepthRing()) || aieta == lastHERing()) && depth > 2) ||
606  (aieta >= firstHEDoublePhiRing() && (iphi % 2) == 0))
607  ok = false;
608  }
609  } else if (subdet == HcalOuter) {
610  if (aieta > lastHORing() || iphi > IPHI_MAX || depth != 4)
611  ok = false;
612  } else if (subdet == HcalForward) {
613  if (aieta < firstHFRing() || aieta > lastHFRing() || ((iphi % 2) == 0) ||
614  (depth > hcons_->maxHFDepth(ieta, iphi)) || (aieta >= firstHFQuadPhiRing() && ((iphi + 1) % 4) != 0))
615  ok = false;
616  } else if (subdet == HcalTriggerTower) {
617  ok = validHT(HcalTrigTowerDetId(id.rawId()));
618  } else if (subdet == HcalOther) {
619  ok = validCalib(HcalCalibDetId(id.rawId()));
620  } else {
621  ok = false;
622  }
623  }
624  return ok;
625 }
int firstHFRing() const
Definition: HcalTopology.h:96
bool validCalib(const HcalCalibDetId &id) const
int lastHBRing() const
Definition: HcalTopology.h:92
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:198
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int lastHFRing() const
Definition: HcalTopology.h:97
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
HcalSubdetector
Definition: HcalAssistant.h:31
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:101
int getNoff(const int &i) const
int getMaxDepth(const int &type) const
int firstHERing() const
Definition: HcalTopology.h:93
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:103
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:102
int maxHFDepth(int ieta, int iphi) const
int lastHORing() const
Definition: HcalTopology.h:99
int lastHERing() const
Definition: HcalTopology.h:94
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
static const int IPHI_MAX
Definition: HcalTopology.cc:13
bool validHT(const HcalTrigTowerDetId &id) const
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 414 of file HcalTopology.cc.

References mps_fire::i, and incIEta().

Referenced by spr::newHCALIdEW().

414  {
415  std::vector<DetId> vNeighborsDetId;
416  HcalDetId neighbors[2];
417  for (int i = 0; i < incIEta(HcalDetId(id), neighbors); i++) {
418  if (neighbors[i].oldFormat())
419  neighbors[i].changeForm();
420  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
421  }
422  return vNeighborsDetId;
423 }
int incIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:17
bool HcalTopology::withSpecialRBXHBHE ( ) const
inline

Definition at line 165 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::withSpecialRBXHBHE().

165 { return hcons_->withSpecialRBXHBHE(); }
bool withSpecialRBXHBHE() const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185

Member Data Documentation

unsigned int HcalTopology::CALIBSize_
private

Definition at line 213 of file HcalTopology.h.

Referenced by getCALIBSize(), and HcalTopology().

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

Definition at line 252 of file HcalTopology.h.

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

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

Definition at line 259 of file HcalTopology.h.

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

constexpr int HcalTopology::chanCalibHE2_ = 2
staticprivate

Definition at line 284 of file HcalTopology.h.

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

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

Definition at line 266 of file HcalTopology.h.

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

constexpr int HcalTopology::chanCalibHF2_ = 9
staticprivate

Definition at line 288 of file HcalTopology.h.

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

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

Definition at line 273 of file HcalTopology.h.

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

constexpr int HcalTopology::chanCalibHOs_ = 7
staticprivate

Definition at line 272 of file HcalTopology.h.

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

SegmentationMap HcalTopology::depthSegmentation_
private

Definition at line 224 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

SegmentationMap HcalTopology::depthSegmentationOne_
private

Definition at line 225 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

int HcalTopology::doublePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by doublePhiBins(), and nPhiBins().

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 198 of file HcalTopology.h.

Referenced by decrementDepth(), and HcalTopology().

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

Definition at line 198 of file HcalTopology.h.

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

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

Definition at line 253 of file HcalTopology.h.

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

constexpr int HcalTopology::etaCalibHBX_ = 16
staticprivate

Definition at line 300 of file HcalTopology.h.

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

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

Definition at line 260 of file HcalTopology.h.

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

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

Definition at line 305 of file HcalTopology.h.

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

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

Definition at line 267 of file HcalTopology.h.

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

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

Definition at line 274 of file HcalTopology.h.

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

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

Definition at line 293 of file HcalTopology.h.

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

int HcalTopology::etaHE2HF_
private

Definition at line 205 of file HcalTopology.h.

Referenced by HcalTopology(), and incAIEta().

int HcalTopology::etaHF2HE_
private

Definition at line 205 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

bool HcalTopology::excludeHB_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHE_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHF_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHO_
private

Definition at line 188 of file HcalTopology.h.

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

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

Definition at line 187 of file HcalTopology.h.

Referenced by exclude(), and isExcluded().

int HcalTopology::firstHBRing_
private

Definition at line 193 of file HcalTopology.h.

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

int HcalTopology::firstHEDoublePhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEDoublePhiRing(), and HcalTopology().

int HcalTopology::firstHEQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHERing_
private

Definition at line 194 of file HcalTopology.h.

Referenced by firstHERing(), and HcalTopology().

int HcalTopology::firstHETripleDepthRing_
private

Definition at line 202 of file HcalTopology.h.

Referenced by firstHETripleDepthRing(), and HcalTopology().

int HcalTopology::firstHFQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHFQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHFRing_
private

Definition at line 195 of file HcalTopology.h.

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

int HcalTopology::firstHORing_
private

Definition at line 196 of file HcalTopology.h.

Referenced by firstHORing(), and HcalTopology().

unsigned int HcalTopology::HBSize_
private

Definition at line 208 of file HcalTopology.h.

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

const HcalDDDRecConstants* HcalTopology::hcons_
private
unsigned int HcalTopology::HESize_
private

Definition at line 209 of file HcalTopology.h.

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

unsigned int HcalTopology::HFSize_
private

Definition at line 211 of file HcalTopology.h.

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

unsigned int HcalTopology::HOSize_
private

Definition at line 210 of file HcalTopology.h.

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

unsigned int HcalTopology::HTSize_
private

Definition at line 212 of file HcalTopology.h.

Referenced by getHTSize(), and HcalTopology().

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

Definition at line 254 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 261 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::kchanCalibHE2_ = kPhiCalibHE_
staticprivate

Definition at line 285 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 268 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::kchanCalibHF2_ = 1
staticprivate

Definition at line 289 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::kOffCalibHB_ = 0
staticprivate

Definition at line 249 of file HcalTopology.h.

Referenced by detId2denseIdCALIB().

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

Definition at line 298 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 256 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 283 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 303 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 263 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 287 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 308 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and HcalTopology().

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

Definition at line 270 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 281 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 291 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 251 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 301 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 258 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 306 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 265 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 277 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 278 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 279 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

int HcalTopology::lastHBRing_
private

Definition at line 193 of file HcalTopology.h.

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

int HcalTopology::lastHERing_
private

Definition at line 194 of file HcalTopology.h.

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

int HcalTopology::lastHFRing_
private

Definition at line 195 of file HcalTopology.h.

Referenced by HcalTopology(), and lastHFRing().

int HcalTopology::lastHORing_
private

Definition at line 196 of file HcalTopology.h.

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

int HcalTopology::maxDepthHB_
private
int HcalTopology::maxDepthHE_
private
int HcalTopology::maxDepthHF_
private
int HcalTopology::maxEta_
private

Definition at line 206 of file HcalTopology.h.

Referenced by HcalTopology(), and validRaw().

constexpr unsigned int HcalTopology::maxPhi_ = 72
staticprivate

Definition at line 248 of file HcalTopology.h.

Referenced by validCalib().

int HcalTopology::maxPhiHE_
private
bool HcalTopology::mergePosition_
private

Definition at line 186 of file HcalTopology.h.

Referenced by getMergePositionFlag().

constexpr int HcalTopology::minMaxDepth_ = 4
staticprivate

Definition at line 247 of file HcalTopology.h.

Referenced by maxDepth().

constexpr unsigned int HcalTopology::minPhi_ = 1
staticprivate

Definition at line 248 of file HcalTopology.h.

Referenced by validCalib().

HcalTopologyMode::Mode HcalTopology::mode_
private
constexpr unsigned int HcalTopology::mPhiCalibHB_ = 4
staticprivate

Definition at line 251 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::mPhiCalibHBX_ = 1
staticprivate

Definition at line 299 of file HcalTopology.h.

constexpr unsigned int HcalTopology::mPhiCalibHE_ = 4
staticprivate

Definition at line 258 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::mPhiCalibHEX_ = 2
staticprivate

Definition at line 304 of file HcalTopology.h.

Referenced by detId2denseIdCALIB().

constexpr unsigned int HcalTopology::mPhiCalibHF1_ = 18
staticprivate

Definition at line 265 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::mPhiCalibHO0_ = 6
staticprivate

Definition at line 276 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

constexpr unsigned int HcalTopology::mPhiCalibHO1_ = 12
staticprivate

Definition at line 276 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

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

Definition at line 294 of file HcalTopology.h.

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

Definition at line 255 of file HcalTopology.h.

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

Definition at line 302 of file HcalTopology.h.

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

Definition at line 262 of file HcalTopology.h.

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

Definition at line 286 of file HcalTopology.h.

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

Definition at line 307 of file HcalTopology.h.

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

Definition at line 269 of file HcalTopology.h.

constexpr unsigned int HcalTopology::nCalibHF2_ = nEtaCalibHF_
staticprivate

Definition at line 290 of file HcalTopology.h.

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

Definition at line 280 of file HcalTopology.h.

constexpr unsigned int HcalTopology::nCalibHO2_ = nEtaCalibHO_
staticprivate

Definition at line 282 of file HcalTopology.h.

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

Definition at line 296 of file HcalTopology.h.

constexpr unsigned int HcalTopology::nchanCalibHB_ = 3
staticprivate

Definition at line 250 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nchanCalibHE1_ = 6
staticprivate

Definition at line 257 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nchanCalibHF1_ = 3
staticprivate

Definition at line 264 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nchanCalibHO_ = 2
staticprivate

Definition at line 271 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHB_ = 2
staticprivate

Definition at line 250 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHBX_ = 1
staticprivate

Definition at line 299 of file HcalTopology.h.

constexpr unsigned int HcalTopology::nEtaCalibHE_ = 2
staticprivate

Definition at line 257 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHEX_ = 2
staticprivate

Definition at line 304 of file HcalTopology.h.

Referenced by validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHF_ = 2
staticprivate

Definition at line 264 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHO_ = 5
staticprivate

Definition at line 271 of file HcalTopology.h.

Referenced by detId2denseIdCALIB(), and validCalib().

constexpr unsigned int HcalTopology::nEtaCalibHOX_ = 2
staticprivate

Definition at line 292 of file HcalTopology.h.

Referenced by validCalib().

int HcalTopology::nEtaHB_
private
int HcalTopology::nEtaHE_
private

Definition at line 199 of file HcalTopology.h.

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

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

Definition at line 295 of file HcalTopology.h.

Referenced by denseId2detIdCALIB(), and detId2denseIdCALIB().

unsigned int HcalTopology::numberOfShapes_
private

Definition at line 214 of file HcalTopology.h.

Referenced by getNumberOfShapes(), and HcalTopology().

constexpr int HcalTopology::phiCalibHF2_ = 1
staticprivate

Definition at line 288 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

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

Definition at line 275 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

constexpr int HcalTopology::phiCalibHOX1_ = 4
staticprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

constexpr int HcalTopology::phiCalibHOX2_ = 12
staticprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

constexpr int HcalTopology::phiCalibHOX3_ = 6
staticprivate

Definition at line 297 of file HcalTopology.h.

Referenced by denseId2detIdCALIB().

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

Definition at line 217 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

int HcalTopology::singlePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by nPhiBins(), and singlePhiBins().

int HcalTopology::topoVersion_
private
HcalTopologyMode::TriggerMode HcalTopology::triggerMode_
private

Definition at line 191 of file HcalTopology.h.

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

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

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

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

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().