CMS 3D CMS Logo

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

#include <HcalTopology.h>

Inheritance diagram for HcalTopology:
CaloSubdetectorTopology

Public Member Functions

const HcalDDDRecConstantsdddConstants () const
 
int decIEta (const HcalDetId &id, HcalDetId neighbors[2]) const
 
bool decIPhi (const HcalDetId &id, HcalDetId &neighbor) const
 
bool decrementDepth (HcalDetId &id) const
 
DetId denseId2detId (unsigned int) const override
 return a linear packed id More...
 
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 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 validDetId (HcalSubdetector subdet, int ieta, int iphi, int depth) const
 
bool validHcal (const HcalDetId &id) const
 
bool validHcal (const HcalDetId &id, const unsigned int flag) const
 
bool validHT (const HcalTrigTowerDetId &id) const
 
std::vector< DetIdwest (const DetId &id) const override
 
bool withSpecialRBXHBHE () const
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor More...
 
virtual bool denseIdConsistent (int topoVer) const
 return whether this topology is consistent with the numbering in the given topology More...
 
virtual std::vector< DetIdgetAllNeighbours (const DetId &id) const
 
virtual std::vector< DetIdgetNeighbours (const DetId &id, const CaloDirection &dir) const
 
virtual std::vector< DetIdgetWindow (const DetId &id, const int &northSouthSize, const int &eastWestSize) const
 
virtual DetId goDown (const DetId &id) const
 
virtual DetId goEast (const DetId &id) const
 
virtual DetId goNorth (const DetId &id) const
 
virtual DetId goSouth (const DetId &id) const
 
virtual DetId goUp (const DetId &id) const
 
virtual DetId goWest (const DetId &id) const
 
virtual ~CaloSubdetectorTopology ()
 virtual destructor More...
 

Static Public Member Functions

static std::string producerTag ()
 

Private Types

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

static const int minMaxDepth_ = 4
 

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 25 of file HcalTopology.h.

Member Typedef Documentation

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

Definition at line 231 of file HcalTopology.h.

Member Enumeration Documentation

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

Definition at line 235 of file HcalTopology.h.

anonymous enum
private
Enumerator
kSizeForDenseIndexingPreLS1 

Definition at line 245 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHBSizePreLS1 

Definition at line 246 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHESizePreLS1 

Definition at line 247 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHOSizePreLS1 

Definition at line 248 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHFSizePreLS1 

Definition at line 249 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePreLS1 

Definition at line 250 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePhase1 

Definition at line 251 of file HcalTopology.h.

anonymous enum
private
Enumerator
kCALIBSizePreLS1 

Definition at line 252 of file HcalTopology.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file HcalTopology.cc.

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

Referenced by HcalTopologyIdealEP::produce().

20  :
21  hcons_(hcons), mergePosition_(mergePosition),
22  excludeHB_(false), excludeHE_(false), excludeHO_(false), excludeHF_(false),
23  firstHBRing_(1),
24  firstHERing_(999), lastHERing_(0),
25  firstHFRing_(29), lastHFRing_(41),
26  firstHORing_(1), lastHORing_(15),
30 
41  for (auto & i : etaBinsHE_) {
42  if (firstHERing_ > i.ieta) firstHERing_ = i.ieta;
43  if (lastHERing_ < i.ieta) lastHERing_ = i.ieta;
44  int unit = static_cast<int>((i.dphi / 5.0_deg) + 0.01);
45  if (unit == 2 && firstHEDoublePhiRing_ > i.ieta)
46  firstHEDoublePhiRing_ = i.ieta;
47  if (unit == 4 && firstHEQuadPhiRing_ > i.ieta)
48  firstHEQuadPhiRing_ = i.ieta;
49  if (i.layer.size() > 2 && firstHETripleDepthRing_ > i.ieta)
51  }
52  if (firstHERing_ > lastHERing_) {
55  } else {
57  }
59  topoVersion_=0; //DL
60  HBSize_ = kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
61  HESize_ = kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
62  HOSize_ = kHOSizePreLS1; // ieta * iphi * 2
63  HFSize_ = kHFSizePreLS1; // ieta * iphi * depth * 2
64  numberOfShapes_ = 87;
65  } else if (mode_==HcalTopologyMode::SLHC) { // need to know more eventually
66  topoVersion_=10;
67  HBSize_ = nEtaHB_*IPHI_MAX*maxDepthHB_*2;
69  HOSize_ = (lastHORing_-firstHORing_+1)*IPHI_MAX*2; // ieta * iphi * 2
70  HFSize_ = (lastHFRing_-firstHFRing_+1)*IPHI_MAX*maxDepthHF_*2; // ieta * iphi * depth * 2
71  numberOfShapes_ = (maxPhiHE_ > 72) ? 1200 : 500;
72  }
76  } else {
78  }
79 
80 #ifdef EDM_ML_DEBUG
81  std::cout << "Topo sizes " << HBSize_ << ":" << HESize_ << ":" << HOSize_
82  << ":" << HFSize_ << ":" << HTSize_ << " for mode " << mode_
83  << ":" << triggerMode_ << std::endl;
84 #endif
85 
86  //The transition between HE/HF in eta
92  std::pair<int,int> ietaHF = hcons_->getEtaRange(2);
95  if (etaBinsHE_.size() > 1) {
96  double eta = etaBinsHE_[etaBinsHE_.size()-1].etaMax;
97  for (unsigned int i=1; i<etaTableHF.size(); ++i) {
98  if (eta < etaTableHF[i]) {
99  etaHE2HF_ = ietaHF.first + i - 1;
100  break;
101  }
102  }
103  eta = etaTableHF[0];
104  for (auto & i : etaBinsHE_) {
105  if (eta < i.etaMax) {
106  etaHF2HE_ = i.ieta;
107  break;
108  }
109  }
110  }
111  const double fiveDegInRad = 5.0_deg;
112  for (double k : dPhiTable) {
113  int units = (int)(k/fiveDegInRad+0.5);
114  unitPhi.emplace_back(units);
115  }
116  for (double k : dPhiTableHF) {
117  int units = (int)(k/fiveDegInRad+0.5);
118  unitPhiHF.emplace_back(units);
119  }
120  int nEta = hcons_->getNEta();
121  for (int ring=1; ring<=nEta; ++ring) {
122  std::vector<int> segmentation = hcons_->getDepth(ring-1,false);
123  setDepthSegmentation(ring,segmentation,false);
124 #ifdef EDM_ML_DEBUG
125  std::cout << "Set segmentation for ring " << ring << " with "
126  << segmentation.size() << " elements:";
127  for (unsigned int k=0; k<segmentation.size(); ++k)
128  std::cout << " " << segmentation[k];
129  std::cout << std::endl;
130 #endif
131  segmentation = hcons_->getDepth(ring-1,true);
132  setDepthSegmentation(ring,segmentation,true);
133 #ifdef EDM_ML_DEBUG
134  std::cout << "Set Plan-1 segmentation for ring " << ring << " with "
135  << segmentation.size() << " elements:";
136  for (unsigned int k=0; k<segmentation.size(); ++k)
137  std::cout << " " << segmentation[k];
138  std::cout << std::endl;
139 #endif
140  }
141 
142 #ifdef EDM_ML_DEBUG
143  std::cout << "Constants in HcalTopology " << firstHBRing_ << ":"
144  << lastHBRing_ << " " << firstHERing_ << ":" << lastHERing_ << ":"
145  << firstHEDoublePhiRing_ << ":" << firstHEQuadPhiRing_ << ":"
146  << firstHETripleDepthRing_ << " " << firstHFRing_ << ":"
147  << lastHFRing_ << ":" << firstHFQuadPhiRing_ << " " << firstHORing_
148  << ":" << lastHORing_ << " " << maxDepthHB_ << ":" << maxDepthHE_
149  << " " << nEtaHB_ << ":" << nEtaHE_ << " " << etaHE2HF_ << ":"
150  << etaHF2HE_ << " " << maxPhiHE_ << std::endl;
151 #endif
152 }
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:226
unsigned int numberOfShapes_
Definition: HcalTopology.h:222
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:224
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:205
std::vector< int > unitPhi
Definition: HcalTopology.h:226
const std::vector< double > & getEtaTableHF() const
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:198
unsigned int HESize_
Definition: HcalTopology.h:217
unsigned int HTSize_
Definition: HcalTopology.h:220
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:205
const std::vector< double > & getPhiOffs() const
std::pair< int, int > getEtaRange(const int &i) const
U second(std::pair< T, U > const &p)
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
unsigned int HFSize_
Definition: HcalTopology.h:219
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:197
unsigned int HBSize_
Definition: HcalTopology.h:216
std::vector< double > etaTableHF
Definition: HcalTopology.h:224
unsigned int HOSize_
Definition: HcalTopology.h:218
std::vector< double > etaTable
Definition: HcalTopology.h:224
int k[5][pyjets_maxn]
int firstHEQuadPhiRing_
Definition: HcalTopology.h:208
bool mergePosition_
Definition: HcalTopology.h:193
std::vector< double > phioff
Definition: HcalTopology.h:225
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:224
TString units(TString variable, Char_t axis)
const std::vector< double > & getPhiTableHF() const
int firstHETripleDepthRing_
Definition: HcalTopology.h:209
void setDepthSegmentation(const unsigned ring, const std::vector< int > &readoutDepths, const bool flag)
int firstHEDoublePhiRing_
Definition: HcalTopology.h:208
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
static const int IPHI_MAX
Definition: HcalTopology.cc:15
int firstHFQuadPhiRing_
Definition: HcalTopology.h:208
int getNPhi(const int &type) const
HcalTopology::HcalTopology ( HcalTopologyMode::Mode  mode,
int  maxDepthHB,
int  maxDepthHE,
HcalTopologyMode::TriggerMode  tmode = HcalTopologyMode::TriggerMode_2009 
)

Definition at line 154 of file HcalTopology.cc.

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

154  :
155  hcons_(nullptr), mergePosition_(false),
156  excludeHB_(false), excludeHE_(false), excludeHO_(false), excludeHF_(false),
157  mode_(mode), triggerMode_(tmode),
158  firstHBRing_(1), lastHBRing_(16),
159  firstHERing_(16), lastHERing_(29),
160  firstHFRing_(29), lastHFRing_(41),
161  firstHORing_(1), lastHORing_(15),
173  numberOfShapes_(( mode==HcalTopologyMode::SLHC ) ? 500 : 87 ) {
174 
176  topoVersion_=0; //DL
177  HBSize_= kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
178  HESize_= kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
179  HOSize_= kHOSizePreLS1; // ieta * iphi * 2
180  HFSize_= kHFSizePreLS1; // phi * eta * depth * pm
181  } else if (mode_==HcalTopologyMode::SLHC) { // need to know more eventually
183  HESize_= maxDepthHE*(29-16+1)*maxPhiHE_*2;
184  HOSize_= 15*IPHI_MAX*2; // ieta * iphi * 2
185  HFSize_= IPHI_MAX*13*maxDepthHF_*2; // phi * eta * depth * pm
186  topoVersion_=10;
187  }
192  } else {
194  }
195 
196  edm::LogWarning("CaloTopology") << "This is an incomplete constructor of HcalTopology - be warned that many functionalities will not be there - revert from this - get from EventSetup";
197 }
unsigned int numberOfShapes_
Definition: HcalTopology.h:222
int maxDepthHE() const
Definition: HcalTopology.h:146
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:198
unsigned int HESize_
Definition: HcalTopology.h:217
unsigned int HTSize_
Definition: HcalTopology.h:220
HcalTopologyMode::Mode mode() const
Definition: HcalTopology.h:31
unsigned int HFSize_
Definition: HcalTopology.h:219
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:197
unsigned int HBSize_
Definition: HcalTopology.h:216
unsigned int HOSize_
Definition: HcalTopology.h:218
int firstHEQuadPhiRing_
Definition: HcalTopology.h:208
bool mergePosition_
Definition: HcalTopology.h:193
int maxDepthHB() const
Definition: HcalTopology.h:145
int firstHETripleDepthRing_
Definition: HcalTopology.h:209
int firstHEDoublePhiRing_
Definition: HcalTopology.h:208
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
static const int IPHI_MAX
Definition: HcalTopology.cc:15
int firstHFQuadPhiRing_
Definition: HcalTopology.h:208

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 be two neighbors of 40 and 21

Definition at line 631 of file HcalTopology.cc.

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

Referenced by decIEta(), idBack(), and incIEta().

631  {
632  int n=1;
633  int aieta=id.ietaAbs();
634 
635  if (aieta==firstHEDoublePhiRing()) {
636  n=2;
637  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
638  neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+1,id.depth());
639  } else if (aieta==firstHFQuadPhiRing()) {
640  n=2;
641  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
642  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
643  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
644  } else if (aieta==firstHEQuadPhiRing()) {
645  n=2;
646  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
647  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
648  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
649  } else if (aieta==1) {
650  neighbors[0]=HcalDetId(id.subdet(),-aieta*id.zside(),id.iphi(),id.depth());
651  } else if (aieta==firstHERing()) {
652  neighbors[0]=HcalDetId(HcalBarrel,(aieta-1)*id.zside(),id.iphi(),1);
653  } else if (aieta==firstHFRing()) {
654  neighbors[0]=HcalDetId(HcalEndcap,etaHF2HE_*id.zside(),id.iphi(),1);
655  } else
656  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
657 
658  if (!valid(neighbors[0]) && n==2) {
659  if (!valid(neighbors[1])) n=0;
660  else {
661  n=1;
662  neighbors[0]=neighbors[1];
663  }
664  }
665  if (n==2 && !valid(neighbors[1])) n=1;
666  if (n==1 && !valid(neighbors[0])) n=0;
667 
668  return n;
669 }
int firstHFRing() const
Definition: HcalTopology.h:91
bool valid(const DetId &id) const override
int zside(DetId const &)
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHERing() const
Definition: HcalTopology.h:89
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
static const int IPHI_MAX
Definition: HcalTopology.cc:15
int HcalTopology::decIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

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

Definition at line 603 of file HcalTopology.cc.

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

Referenced by east(), and producerTag().

603  {
604  if (id.zside()==1) return decAIEta(id,neighbors);
605  else return incAIEta(id,neighbors);
606 }
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 561 of file HcalTopology.cc.

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

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

561  {
562  bool ok=valid(id);
563  if (ok) {
564  switch (id.subdet()) {
565  case (HcalBarrel):
566  case (HcalOuter):
567  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX,id.depth());
568  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
569  break;
570  case (HcalEndcap):
571  if (id.ietaAbs()>=firstHEQuadPhiRing()) {
572  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
573  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
574  } else if (id.ietaAbs()>=firstHEDoublePhiRing()) {
575  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
576  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
577  } else {
578  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),maxPhiHE_,id.depth());
579  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
580  }
581  break;
582  case (HcalForward):
583  if (id.ietaAbs()>=firstHFQuadPhiRing()) {
584  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
585  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
586  } else {
587  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
588  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
589  }
590  if (!validRaw(neighbor)) ok = false;
591  break;
592  default: ok=false;
593  }
594  }
595  return ok;
596 }
bool valid(const DetId &id) const override
bool validRaw(const HcalDetId &id) const
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
static const int IPHI_MAX
Definition: HcalTopology.cc:15
bool HcalTopology::decrementDepth ( HcalDetId id) const

Get the detector in front of this one

Definition at line 771 of file HcalTopology.cc.

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

771  {
772  HcalSubdetector subdet = detId.subdet();
773  int ieta = detId.ieta();
774  int etaRing = detId.ietaAbs();
775  int depth = detId.depth();
776  int iphi = detId.iphi();
777  int zside = detId.zside();
778  int nDepthBins, startingBin;
779  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
780 
781  // see if the new depth bin exists
782  --depth;
783  if ((subdet == HcalOuter) ||
784  (subdet == HcalEndcap && etaRing == firstHERing())) {
785  subdet = HcalBarrel;
786  for (int i=0; i<nEtaHB_; ++i) {
787  if (etaRing == etaBinsHB_[i].ieta) {
788  depth = etaBinsHB_[i].depthStart+etaBinsHB_[i].layer.size()-1;
789  break;
790  }
791  }
792  } else if (subdet == HcalEndcap && etaRing == lastHERing() &&
793  depth == hcons_->getDepthEta29(iphi,zside,0) &&
795  (ieta > 0) ? --ieta : ++ieta;
796  } else if (depth <= 0) {
797  if (subdet == HcalForward && etaRing == firstHFRing()) {
798  // overlap
799  subdet = HcalEndcap;
800  etaRing= etaHF2HE_;
801  ieta = (ieta > 0) ? etaRing : -etaRing;
802  for (const auto & i : etaBinsHE_) {
803  if (etaRing == i.ieta) {
804  depth = i.depthStart+i.layer.size()-1;
805  break;
806  }
807  }
808  } else {
809  // no more chances
810  detId = HcalDetId();
811  return false;
812  }
813  }
814  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
815  return validRaw(detId);
816 }
int firstHFRing() const
Definition: HcalTopology.h:91
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:205
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:205
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:197
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:89
int lastHERing() const
Definition: HcalTopology.h:90
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
DetId HcalTopology::denseId2detId ( unsigned int  denseid) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1209 of file HcalTopology.cc.

References gather_cfg::cout, 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(), CaloGeometryDBEP< T, U >::produceAligned(), and producerTag().

1209  {
1210 
1212  int ie ( 0 ) ;
1213  int ip ( 0 ) ;
1214  int dp ( 0 ) ;
1215  int in ( denseid ) ;
1216  int iz ( 1 ) ;
1217  if (topoVersion_==0) { //DL// pre-LS1
1218  if (denseid < kSizeForDenseIndexingPreLS1) {
1219  if ( in > 2*( kHBhalf + kHEhalf + kHOhalf ) - 1 ) { // HF
1220  sd = HcalForward ;
1221  in -= 2*( kHBhalf + kHEhalf + kHOhalf ) ;
1222  iz = ( in<kHFhalf ? 1 : -1 ) ;
1223  in %= kHFhalf ;
1224  ip = 4*( in/48 ) ;
1225  in %= 48 ;
1226  ip += 1 + ( in>21 ? 2 : 0 ) ;
1227  if( 3 == ip%4 ) in -= 22 ;
1228  ie = 29 + in/2 ;
1229  dp = 1 + in%2 ;
1230  } else if ( in > 2*( kHBhalf + kHEhalf ) - 1 ) { // HO
1231  sd = HcalOuter ;
1232  in -= 2*( kHBhalf + kHEhalf ) ;
1233  iz = ( in<kHOhalf ? 1 : -1 ) ;
1234  in %= kHOhalf ;
1235  dp = 4 ;
1236  ip = 1 + in/15 ;
1237  ie = 1 + ( in - 15*( ip - 1 ) ) ;
1238  } else if ( in > 2*kHBhalf - 1 ) { // Endcap
1239  sd = HcalEndcap ;
1240  in -= 2*kHBhalf ;
1241  iz = ( in<kHEhalf ? 1 : -1 ) ;
1242  in %= kHEhalf ;
1243  ip = 2*( in/36 ) ;
1244  in %= 36 ;
1245  ip += 1 + in/28 ;
1246  if( 0 == ip%2 ) in %= 28 ;
1247  ie = 15 + ( in<2 ? 1 + in : 2 +
1248  ( in<20 ? 1 + ( in - 2 )/2 : 9 +
1249  ( in<26 ? 1 + ( in - 20 )/3 : 3 ) ) ) ;
1250  dp = ( in<1 ? 3 :
1251  ( in<2 ? 1 :
1252  ( in<20 ? 1 + ( in - 2 )%2 :
1253  ( in<26 ? 1 + ( in - 20 )%3 :
1254  ( 1 + ( in - 26 )%2 ) ) ) ) ) ;
1255  } else { // barrel
1256  iz = ( in<kHBhalf ? 1 : -1 ) ;
1257  in %= kHBhalf ;
1258  ip = in/18 + 1 ;
1259  in %= 18 ;
1260  if ( in < 14 ) {
1261  dp = 1 ;
1262  ie = in + 1 ;
1263  } else {
1264  in %= 14 ;
1265  dp = 1 + in%2 ;
1266  ie = 15 + in/2 ;
1267  }
1268  }
1269  }
1270  } else if (topoVersion_==10) {
1271  if (denseid < ncells()) {
1272  if (denseid >= (HBSize_+HESize_+HOSize_)) {
1273  sd = HcalForward ;
1274  in -= (HBSize_+HESize_+HOSize_);
1275  dp = (in%maxDepthHF_) + 1;
1276  ip = (in - dp + 1)%(maxDepthHF_*IPHI_MAX);
1277  ip = (ip/maxDepthHF_) + 1;
1278  ie = (in - dp + 1 - maxDepthHF_*(ip -1))/(IPHI_MAX*maxDepthHF_);
1279  if (ie > 12) {ie = 54 -ie; iz = -1;}
1280  else {ie += 29; iz = 1;}
1281  } else if (denseid >= (HBSize_+HESize_)) {
1282  sd = HcalOuter ;
1283  in -= (HBSize_+HESize_);
1284  dp = 4;
1285  ip = (in%IPHI_MAX) + 1;
1286  ie = (in - ip + 1)/IPHI_MAX;
1287  if (ie > 14) {ie = 30 -ie; iz = -1;}
1288  else {ie += 1; iz = 1;}
1289  } else if (denseid >= (HBSize_)) {
1290  sd = HcalEndcap ;
1291  in -= (HBSize_);
1292  dp = (in%maxDepthHE_)+1;
1293  ip = (in - dp + 1)%(maxDepthHE_*maxPhiHE_);
1294  ip = (ip/maxDepthHE_) + 1;
1295  ie = (in - dp + 1 - maxDepthHE_*(ip-1))/(maxPhiHE_*maxDepthHE_);
1296  if (ie >= nEtaHE_) {ie = lastHERing()+nEtaHE_ - ie; iz = -1;}
1297  else {ie = firstHERing() + ie; iz = 1;}
1298  } else {
1299  sd = HcalBarrel ;
1300  dp = (in%maxDepthHB_)+1;
1301  ip = (in - dp + 1)%(maxDepthHB_*IPHI_MAX);
1302  ip = (ip/maxDepthHB_) + 1;
1303  ie = (in - dp + 1 - maxDepthHB_*(ip-1))/(IPHI_MAX*maxDepthHB_);
1304  if (ie >= nEtaHB_) {ie = lastHBRing()+nEtaHB_ - ie; iz = -1;}
1305  else {ie = firstHBRing() + ie; iz = 1;}
1306  }
1307  }
1308  }
1309  HcalDetId hid(sd, iz*int(ie), ip, dp);
1310 #ifdef EDM_ML_DEBUG
1311  std::cout << "Dens2Det " << topoVersion_ << " i/p " << std::hex << denseid
1312  << " : " << hid.rawId() << std::dec << " | " << hid << std::endl;
1313 #endif
1314  return hid;
1315 }
int firstHBRing() const
Definition: HcalTopology.h:87
unsigned int HESize_
Definition: HcalTopology.h:217
int lastHBRing() const
Definition: HcalTopology.h:88
HcalSubdetector
Definition: HcalAssistant.h:31
unsigned int HBSize_
Definition: HcalTopology.h:216
unsigned int HOSize_
Definition: HcalTopology.h:218
double sd
int firstHERing() const
Definition: HcalTopology.h:89
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
int lastHERing() const
Definition: HcalTopology.h:90
static const int IPHI_MAX
Definition: HcalTopology.cc:15
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 672 of file HcalTopology.cc.

References MessageLogger_cfi::cerr, 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(), doublePhiBins(), and incrementDepth().

674  {
675 
676  if(subdet == HcalBarrel) {
678  startingBin = hcons_->getMinDepth(0,etaRing,iphi,zside);
679  if (etaRing==lastHBRing()) {
680  nDepthBins = hcons_->getDepthEta16(1,iphi,zside)-startingBin+1;
681  } else {
682  nDepthBins = hcons_->getMaxDepth(0,etaRing,iphi,zside)-startingBin+1;
683  }
684  } else {
685  if (etaRing<=14) {
686  nDepthBins = 1;
687  startingBin = 1;
688  } else {
689  nDepthBins = 2;
690  startingBin = 1;
691  }
692  }
693  } else if(subdet == HcalEndcap) {
695  if (etaRing==firstHERing()) {
696  startingBin = hcons_->getDepthEta16(2,iphi,zside);
697  } else {
698  startingBin = hcons_->getMinDepth(1,etaRing,iphi,zside);
699  }
700  nDepthBins = hcons_->getMaxDepth(1,etaRing,iphi,zside)-startingBin+1;
701  } else {
702  if (etaRing==firstHERing()) {
703  nDepthBins = 1;
704  startingBin = 3;
705  } else if (etaRing==17) {
706  nDepthBins = 1;
707  startingBin = 1;
708  } else if (etaRing==lastHERing()) {
709  nDepthBins = 2;
710  startingBin = 1;
711  } else {
712  nDepthBins = (etaRing >= firstHETripleDepthRing()) ? 3 : 2;
713  startingBin = 1;
714  }
715  }
716  } else if(subdet == HcalForward) {
717  nDepthBins = maxDepthHF_;
718  startingBin = 1;
719  } else if(subdet == HcalOuter) {
720  nDepthBins = 1;
721  startingBin = 4;
722  } else {
723  std::cerr << "Bad HCAL subdetector " << subdet << std::endl;
724  }
725 }
int lastHBRing() const
Definition: HcalTopology.h:88
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:197
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int firstHETripleDepthRing() const
Definition: HcalTopology.h:99
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
int getMaxDepth(const int &type) const
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
unsigned int HcalTopology::detId2denseId ( const DetId id) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1173 of file HcalTopology.cc.

References gather_cfg::cout, 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(), CaloGeometryDBEP< T, U >::produceAligned(), and producerTag().

1173  {
1174  unsigned int retval(0);
1175  if (topoVersion_==0) { // pre-LS1
1176  retval = detId2denseIdPreLS1(id);
1177  } else if (topoVersion_==10) {
1178  HcalDetId hid(id);
1179  if (hid.subdet()==HcalBarrel) {
1180  retval = (hid.depth()-1)+maxDepthHB_*(hid.iphi()-1);
1181  if (hid.ieta()>0) retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()-firstHBRing());
1182  else retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()+lastHBRing()+nEtaHB_);
1183  } else if (hid.subdet()==HcalEndcap) {
1184  retval = HBSize_;
1185  retval+= (hid.depth()-1)+maxDepthHE_*(hid.iphi()-1);
1186  if (hid.ieta()>0) retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()-firstHERing());
1187  else retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()+lastHERing()+nEtaHE_);
1188  } else if (hid.subdet()==HcalOuter) {
1189  retval = HBSize_+HESize_;
1190  if (hid.ieta()>0) retval+=(hid.iphi()-1)+IPHI_MAX*(hid.ieta()-1);
1191  else retval+=(hid.iphi()-1)+IPHI_MAX*(30+hid.ieta());
1192  } else if (hid.subdet()==HcalForward) {
1193  retval = HBSize_+HESize_+HOSize_;
1194  retval+= (hid.depth()-1)+maxDepthHF_*(hid.iphi()-1);
1195  if (hid.ieta()>0) retval+=maxDepthHF_*IPHI_MAX*(hid.ieta()-29);
1196  else retval+=maxDepthHF_*IPHI_MAX*((41+13)+hid.ieta());
1197  } else {
1198  return 0xFFFFFFFu;
1199  }
1200  }
1201 #ifdef EDM_ML_DEBUG
1202  std::cout << "DetId2Dense " << topoVersion_ << " ID " << std::hex
1203  << id.rawId() << std::dec << " | " << HcalDetId(id) << " : "
1204  << std::hex << retval << std::dec << std::endl;
1205 #endif
1206  return retval;
1207 }
unsigned int detId2denseIdPreLS1(const DetId &id) const
int firstHBRing() const
Definition: HcalTopology.h:87
unsigned int HESize_
Definition: HcalTopology.h:217
int lastHBRing() const
Definition: HcalTopology.h:88
unsigned int HBSize_
Definition: HcalTopology.h:216
unsigned int HOSize_
Definition: HcalTopology.h:218
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
static const int IPHI_MAX
Definition: HcalTopology.cc:15
unsigned int HcalTopology::detId2denseIdCALIB ( const DetId id) const

return a linear packed id from CALIB

Definition at line 1115 of file HcalTopology.cc.

References funct::abs(), HcalCalibDetId::calibFlavor(), HcalCalibDetId::CalibrationBox, HcalCalibDetId::cboxChannel(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalCalibDetId::hcalSubdet(), HcalCalibDetId::HOCrosstalk, HcalCalibDetId::ieta(), HcalCalibDetId::iphi(), HcalCalibDetId::zside(), and ecaldqm::zside().

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

1115  {
1116  HcalCalibDetId tid(id);
1117  int channel = tid.cboxChannel();
1118  int ieta = tid.ieta();
1119  int iphi = tid.iphi();
1120  int zside = tid.zside();
1121  unsigned int index=0xFFFFFFFFu;
1122 
1123  if (tid.calibFlavor()==HcalCalibDetId::CalibrationBox) {
1124 
1125  HcalSubdetector subDet = tid.hcalSubdet();
1126 
1127  if (subDet==HcalBarrel) {
1128  //std::cout<<"CALIB_HB: ";
1129  //dphi = 4 (18 phi values), 3 channel types (0,1,2), eta = -1 or 1
1130  //total of 18*3*2=108 channels
1131  index = ((iphi+1)/4-1) + 18*channel + 27*(ieta+1);
1132  } else if (subDet==HcalEndcap) {
1133  //std::cout<<"CALIB_HE: ";
1134  //dphi = 4 (18 phi values), 6 channel types (0,1,3,4,5,6), eta = -1 or 1
1135  //total of 18*6*2=216 channels
1136  if (channel>2) channel-=1;
1137  index = ((iphi+1)/4-1) + 18*channel + 54*(ieta+1) + 108;
1138  } else if (subDet==HcalForward) {
1139  //std::cout<<"CALIB_HF: ";
1140  //dphi = 18 (4 phi values), 3 channel types (0,1,8), eta = -1 or 1
1141  if (channel==8) channel = 2;
1142  //total channels 4*3*2=24
1143  index = (iphi-1)/18 + 4*channel + 6*(ieta+1) + 324;
1144  } else if (subDet==HcalOuter) {
1145  //std::cout<<"CALIB_HO: ";
1146  //there are 5 special calib crosstalk channels, one in each ring
1147  if (channel==7) {
1148  index = (ieta+2) + 420;
1149  //for HOM/HOP dphi = 6 (12 phi values), 2 channel types (0,1), eta = -2,-1 or 1,2
1150  //for HO0/YB0 dphi = 12 (6 phi values), 2 channel types (0,1), eta = 0
1151  } else{
1152  if (ieta<0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 348;
1153  else if (ieta>0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 6 + 348;
1154  else index = ((iphi+1)/6-1) + 36*channel + 6*(ieta+2) + 348;
1155  }
1156  } else {
1157  edm::LogWarning("CaloTopology") << "HCAL Det Id not valid!";
1158  index = 0;
1159  }
1160 
1161  } else if (tid.calibFlavor()==HcalCalibDetId::HOCrosstalk) {
1162  //std::cout<<"HX: ";
1163  //for YB0/HO0 phi is grouped in 6 groups of 6 with dphi=2 but the transitions are 1 or 3
1164  // in such a way that the %36 operation yeilds unique values for every iphi
1165  if (abs(ieta)==4) index = ((iphi-1)%36) + (((zside+1)*36)/2) + 72 + 425; //ieta = 1 YB0/HO0;
1166  else index = (iphi-1) + (36*(zside+1)*2) + 425; //ieta = 0 for HO2M/HO1M ieta=2 for HO1P/HO2P;
1167  }
1168  //std::cout << " " << ieta << " " << zside << " " << iphi << " " << depth << " " << index << std::endl;
1169  return index;
1170 }
int zside(DetId const &)
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int HcalTopology::detId2denseIdHB ( const DetId id) const

return a linear packed id from HB

Definition at line 1020 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(), HcalCondObjectContainerBase::indexFor(), and maxDepthHE().

1020  {
1021  HcalDetId hid(id);
1022  const int ip (hid.iphi() ) ;
1023  const int ie (hid.ietaAbs() ) ;
1024  const int dp (hid.depth() ) ;
1025  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1026  unsigned int retval = 0xFFFFFFFFu;
1027  if (topoVersion_==0) {
1028  retval=( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf;
1029  } else if (topoVersion_==10) {
1030  retval=(dp-1)+maxDepthHB_*(ip-1);
1031  if (hid.ieta()>0) retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()-firstHBRing());
1032  else retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()+lastHBRing()+nEtaHB_);
1033  }
1034  return retval;
1035 }
int firstHBRing() const
Definition: HcalTopology.h:87
int lastHBRing() const
Definition: HcalTopology.h:88
static const int IPHI_MAX
Definition: HcalTopology.cc:15
unsigned int HcalTopology::detId2denseIdHE ( const DetId id) const

return a linear packed id from HE

Definition at line 1037 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(), HcalCondObjectContainerBase::indexFor(), and maxDepthHE().

1037  {
1038  HcalDetId hid(id);
1039  const int ip (hid.iphi() ) ;
1040  const int ie (hid.ietaAbs() ) ;
1041  const int dp (hid.depth() ) ;
1042  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1043  unsigned int retval = 0xFFFFFFFFu;
1044  if (topoVersion_==0) {
1045  retval=( ip - 1 )*8 + ( ip/2 )*20 +
1046  ( ( ie==16 || ie==17 ) ? ie - 16 :
1047  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
1048  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
1049  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
1050  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf;
1051  } else if (topoVersion_==10) {
1052  retval=(dp-1)+maxDepthHE_*(ip-1);
1053  if (hid.ieta()>0) retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()-firstHERing());
1054  else retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()+lastHERing()+nEtaHE_);
1055  }
1056  return retval;
1057 }
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
unsigned int HcalTopology::detId2denseIdHF ( const DetId id) const

return a linear packed id from HF

Definition at line 1075 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(), HcalCondObjectContainerBase::indexFor(), and maxDepthHE().

1075  {
1076  HcalDetId hid(id);
1077  const int ip (hid.iphi() ) ;
1078  const int ie (hid.ietaAbs() ) ;
1079  const int dp (hid.depth() ) ;
1080  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1081 
1082  unsigned int retval = 0xFFFFFFFFu;
1083  if (topoVersion_==0) {
1084  retval = ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
1085  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf;
1086  } else if (topoVersion_==10) {
1087  retval=dp-1+2*(ip-1);
1088  if (hid.ieta()>0) retval+=maxDepthHF_*IPHI_MAX*(hid.ieta()-29);
1089  else retval+=maxDepthHF_*IPHI_MAX*((41+13)+hid.ieta());
1090  }
1091  return retval;
1092 }
static const int IPHI_MAX
Definition: HcalTopology.cc:15
unsigned int HcalTopology::detId2denseIdHO ( const DetId id) const

return a linear packed id from HO

Definition at line 1059 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(), HcalCondObjectContainerBase::indexFor(), and maxDepthHE().

1059  {
1060  HcalDetId hid(id);
1061  const int ip (hid.iphi() ) ;
1062  const int ie (hid.ietaAbs() ) ;
1063  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1064 
1065  unsigned int retval = 0xFFFFFFFFu;
1066  if (topoVersion_==0) {
1067  retval=( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf;
1068  } else if (topoVersion_==10) {
1069  if (hid.ieta()>0) retval=(ip-1)+IPHI_MAX*(hid.ieta()-1);
1070  else retval=(ip-1)+IPHI_MAX*(30+hid.ieta());
1071  }
1072  return retval;
1073 }
static const int IPHI_MAX
Definition: HcalTopology.cc:15
unsigned int HcalTopology::detId2denseIdHT ( const DetId id) const

return a linear packed id from HT

Definition at line 1094 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(), HcalCondObjectContainerBase::indexFor(), and maxDepthHE().

1094  {
1095  HcalTrigTowerDetId tid(id);
1096  int zside = tid.zside();
1097  unsigned int ietaAbs = tid.ietaAbs();
1098  unsigned int iphi = tid.iphi();
1099  unsigned int ivers = tid.version();
1100 
1101  unsigned int index;
1102  if (ivers == 0) {
1103  if ((iphi-1)%4==0) index = (iphi-1)*32 + (ietaAbs-1) - (12*((iphi-1)/4));
1104  else index = (iphi-1)*28 + (ietaAbs-1) + (4*(((iphi-1)/4)+1));
1105  if (zside == -1) index += kHThalf;
1106  } else {
1107  index = kHTSizePreLS1;
1108  if (zside == -1) index += ((kHTSizePhase1-kHTSizePreLS1)/2);
1109  index += (36 * (ietaAbs - 30) + ((iphi - 1)/2));
1110  }
1111 
1112  return index;
1113 }
int zside(DetId const &)
unsigned int HcalTopology::detId2denseIdPreLS1 ( const DetId id) const
private

Definition at line 993 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(), and idBack().

993  {
994 
995  HcalDetId hid(id);
996  const HcalSubdetector sd (hid.subdet() ) ;
997  const int ip (hid.iphi() ) ;
998  const int ie (hid.ietaAbs() ) ;
999  const int dp (hid.depth() ) ;
1000  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1001  unsigned int retval = ( ( sd == HcalBarrel ) ?
1002  ( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf :
1003  ( ( sd == HcalEndcap ) ?
1004  2*kHBhalf + ( ip - 1 )*8 + ( ip/2 )*20 +
1005  ( ( ie==16 || ie==17 ) ? ie - 16 :
1006  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
1007  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
1008  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
1009  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf :
1010  ( ( sd == HcalOuter ) ?
1011  2*kHBhalf + 2*kHEhalf + ( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf :
1012  ( ( sd == HcalForward ) ?
1013  2*kHBhalf + 2*kHEhalf + 2*kHOhalf +
1014  ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
1015  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf : 0xFFFFFFFFu ) ) ) ) ;
1016  return retval;
1017 }
HcalSubdetector
Definition: HcalAssistant.h:31
double sd
int HcalTopology::doublePhiBins ( ) const
inline

Definition at line 101 of file HcalTopology.h.

References depthBinInformation(), doublePhiBins_, etaRing(), and ecaldqm::zside().

101 {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 342 of file HcalTopology.cc.

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

Referenced by producerTag().

342  {
343  HcalDetId neighbor = id;
344  std::vector<DetId> vNeighborsDetId;
345  if (decrementDepth(neighbor)) {
346  if (neighbor.oldFormat()) neighbor.changeForm();
347  vNeighborsDetId.emplace_back(neighbor);
348  }
349  return vNeighborsDetId;
350 }
bool decrementDepth(HcalDetId &id) const
bool oldFormat() const
Definition: HcalDetId.h:147
void changeForm()
Definition: HcalDetId.h:195
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 292 of file HcalTopology.cc.

References decIEta(), and mps_fire::i.

Referenced by spr::newHCALIdEW(), and producerTag().

292  {
293  std::vector<DetId> vNeighborsDetId;
294  HcalDetId neighbors[2];
295  for (int i=0;i<decIEta(HcalDetId(id),neighbors);i++) {
296  if (neighbors[i].oldFormat()) neighbors[i].changeForm();
297  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
298  }
299  return vNeighborsDetId;
300 }
int decIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:18
double HcalTopology::etaMax ( HcalSubdetector  subdet) const

Definition at line 957 of file HcalTopology.cc.

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

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

957  {
958  double eta(0);
959  switch (subdet) {
960  case(HcalBarrel):
961  if (lastHBRing_ < (int)(etaTable.size())) eta=etaTable[lastHBRing_];
962  break;
963  case(HcalEndcap):
964  if (lastHERing_ < (int)(etaTable.size()) && nEtaHE_ > 0) eta=etaTable[lastHERing_];
965  break;
966  case(HcalOuter):
967  if (lastHORing_ < (int)(etaTable.size())) eta=etaTable[lastHORing_];
968  break;
969  case(HcalForward):
970  if (!etaTableHF.empty()) eta=etaTableHF[etaTableHF.size()-1];
971  break;
972  default: eta=0;
973  }
974  return eta;
975 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:224
std::vector< double > etaTable
Definition: HcalTopology.h:224
std::pair< double, double > HcalTopology::etaRange ( HcalSubdetector  subdet,
int  ieta 
) const

Definition at line 976 of file HcalTopology.cc.

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

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

977  {
978  int ieta = (keta > 0) ? keta : -keta;
979  if (subdet == HcalForward) {
980  if (ieta >= firstHFRing_) {
981  unsigned int ii = (unsigned int)(ieta-firstHFRing_);
982  if (ii+1 < etaTableHF.size())
983  return std::pair<double,double>(etaTableHF[ii],etaTableHF[ii+1]);
984  }
985  } else {
986  int ietal = (mode_==HcalTopologyMode::LHC && ieta == lastHERing_-1) ? (ieta+1) : ieta;
987  if ((ietal < (int)(etaTable.size())) && (ieta > 0))
988  return std::pair<double,double>(etaTable[ieta-1],etaTable[ietal]);
989  }
990  return std::pair<double,double>(0,0);
991 }
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:197
std::vector< double > etaTableHF
Definition: HcalTopology.h:224
std::vector< double > etaTable
Definition: HcalTopology.h:224
ii
Definition: cuy.py:590
int HcalTopology::etaRing ( HcalSubdetector  subdet,
double  eta 
) const

eta and phi index from eta, phi values

Definition at line 855 of file HcalTopology.cc.

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

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

855  {
856  int etaring = firstHBRing_;
857  if (bc == HcalForward) {
858  etaring = firstHFRing_;
859  for (unsigned int k=0; k<etaTableHF.size()-1; ++k) {
860  if (abseta < etaTableHF[k+1]) {
861  etaring += k;
862  break;
863  }
864  }
865  } else {
866  for (unsigned int k=0; k<etaTable.size()-1; ++k) {
867  if (abseta < etaTable[k+1]) {
868  etaring += k;
869  break;
870  }
871  }
872  if (abseta >= etaTable[etaTable.size()-1]) etaring = lastHERing_;
873  }
874  return etaring;
875 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:224
std::vector< double > etaTable
Definition: HcalTopology.h:224
int k[5][pyjets_maxn]
void HcalTopology::exclude ( const HcalDetId id)

Add a cell to exclusion list

Definition at line 275 of file HcalTopology.cc.

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

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

275  {
276  std::vector<HcalDetId>::iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
277  if (i==exclusionList_.end() || *i!=id) {
278  exclusionList_.insert(i,id);
279  }
280 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:194
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 352 of file HcalTopology.cc.

References egammaForCoreTracking_cff::depth, exclude(), excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, triggerObjects_cff::id, SiStripPI::max, min(), gen::n, and validRaw().

352  {
353 
354  bool exed=false;
355  // first, check the full detector exclusions... (fast)
356  switch (subdet) {
357  case(HcalBarrel): exed=excludeHB_; break;
358  case(HcalEndcap): exed=excludeHE_; break;
359  case(HcalOuter): exed=excludeHO_; break;
360  case(HcalForward): exed=excludeHF_; break;
361  default: exed=false;
362  }
363  if (exed) return 0; // if the whole detector is excluded...
364 
365  int ieta_l=std::min(ieta1,ieta2);
366  int ieta_h=std::max(ieta1,ieta2);
367  int iphi_l=std::min(iphi1,iphi2);
368  int iphi_h=std::max(iphi1,iphi2);
369  int depth_l=std::min(depth1,depth2);
370  int depth_h=std::max(depth1,depth2);
371 
372  int n=0;
373  for (int ieta=ieta_l; ieta<=ieta_h; ieta++)
374  for (int iphi=iphi_l; iphi<=iphi_h; iphi++)
375  for (int depth=depth_l; depth<=depth_h; depth++) {
376  HcalDetId id(subdet,ieta,iphi,depth);
377  if (validRaw(id)) { // use 'validRaw' to include check validity in "uncut" detector
378  exclude(id);
379  n++;
380  }
381  }
382  return n;
383 }
void exclude(const HcalDetId &id)
bool validRaw(const HcalDetId &id) const
T min(T a, T b)
Definition: MathUtil.h:58
void HcalTopology::excludeSubdetector ( HcalSubdetector  subdet)

Exclude an entire subdetector

Definition at line 282 of file HcalTopology.cc.

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

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

282  {
283  switch (subdet) {
284  case(HcalBarrel): excludeHB_=true; break;
285  case(HcalEndcap): excludeHE_=true; break;
286  case(HcalOuter): excludeHO_=true; break;
287  case(HcalForward): excludeHF_=true; break;
288  default: break;
289  }
290 }
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
int HcalTopology::firstHFQuadPhiRing ( ) const
inline
int HcalTopology::firstHFRing ( ) const
inline
int HcalTopology::firstHORing ( ) const
inline

Definition at line 93 of file HcalTopology.h.

References firstHORing_.

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

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

Definition at line 143 of file HcalTopology.h.

References CALIBSize_.

Referenced by HcalCondObjectContainerBase::sizeFor().

143 {return CALIBSize_;}
unsigned int CALIBSize_
Definition: HcalTopology.h:221
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 915 of file HcalTopology.cc.

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

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

917  {
918  // if it doesn't exist, return the first entry with a lower index. So if we only
919  // have entries for 1 and 17, any input from 1-16 should return the entry for ring 1
920  SegmentationMap::const_iterator pos;
921  if (!one) {
922  pos = depthSegmentation_.upper_bound(ring);
923  if (pos == depthSegmentation_.begin()) {
924  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
925  }
926  } else {
927  pos = depthSegmentationOne_.upper_bound(ring);
928  if (pos == depthSegmentationOne_.begin()) {
929  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
930  }
931  }
932  --pos;
933  // pos now refers to the last element with key <= ring.
934  readoutDepths = pos->second;
935 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:232
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:233
unsigned int HcalTopology::getHBSize ( ) const
inline

Definition at line 138 of file HcalTopology.h.

References HBSize_.

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

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

Definition at line 139 of file HcalTopology.h.

References HESize_.

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

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

Definition at line 140 of file HcalTopology.h.

References HOSize_.

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

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

Definition at line 142 of file HcalTopology.h.

References HTSize_.

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

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

Definition at line 165 of file HcalTopology.h.

References numberOfShapes_.

Referenced by HcalGeometry::numberOfShapes(), and CaloGeometryDBEP< T, U >::produceAligned().

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

Definition at line 136 of file HcalTopology.h.

References HcalDDDRecConstants::getPhiZOne(), and hcons_.

136 {return hcons_->getPhiZOne(phiz);}
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
int getPhiZOne(std::vector< std::pair< int, int > > &phiz) const
HcalDetId HcalTopology::idBack ( const HcalDetId id) const
inline
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 609 of file HcalTopology.cc.

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

Referenced by decIEta(), idBack(), and incIEta().

609  {
610  int n=1;
611  int aieta=id.ietaAbs();
612 
613  if (aieta==firstHEDoublePhiRing()-1 && (id.iphi()%2)==0)
614  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),id.iphi()-1,id.depth());
615  else if (aieta==firstHFQuadPhiRing()-1 && ((id.iphi()+1)%4)!=0)
616  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),((id.iphi()==1)?(71):(id.iphi()-2)),id.depth());
617  else if (aieta==firstHEQuadPhiRing()-1 && ((id.iphi()+1)%4)!=0)
618  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),((id.iphi()==1)?(71):(id.iphi()-2)),id.depth());
619  else if (aieta==lastHBRing())
620  neighbors[0]=HcalDetId(HcalEndcap,(aieta+1)*id.zside(),id.iphi(),1);
621  else if (aieta==lastHERing())
622  neighbors[0]=HcalDetId(HcalForward,etaHE2HF_*id.zside(),id.iphi(),1);
623  else
624  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),id.iphi(),id.depth());
625 
626  if (!valid(neighbors[0])) n=0;
627  return n;
628 }
bool valid(const DetId &id) const override
int lastHBRing() const
Definition: HcalTopology.h:88
int zside(DetId const &)
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
int lastHERing() const
Definition: HcalTopology.h:90
int HcalTopology::incIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

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

Definition at line 598 of file HcalTopology.cc.

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

Referenced by producerTag(), and west().

598  {
599  if (id.zside()==1) return incAIEta(id,neighbors);
600  else return decAIEta(id,neighbors);
601 }
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 523 of file HcalTopology.cc.

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

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

523  {
524  bool ok=valid(id);
525  if (ok) {
526  switch (id.subdet()) {
527  case (HcalBarrel):
528  case (HcalOuter):
529  if (id.iphi()==IPHI_MAX) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
530  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+1,id.depth());
531  break;
532  case (HcalEndcap):
533  if (id.ietaAbs()>=firstHEQuadPhiRing()) {
534  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),3,id.depth());
535  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+4,id.depth());
536  } else if (id.ietaAbs()>=firstHEDoublePhiRing()) {
537  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
538  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+2,id.depth());
539  } else {
540  if (id.iphi()==maxPhiHE_) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
541  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+1,id.depth());
542  }
543  break;
544  case (HcalForward):
545  if (id.ietaAbs()>=firstHFQuadPhiRing()) {
546  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),3,id.depth());
547  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+4,id.depth());
548  } else {
549  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
550  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+2,id.depth());
551  }
552  if (!validRaw(neighbor)) ok = false;
553  break;
554  default: ok=false;
555  }
556  }
557  return ok;
558 }
bool valid(const DetId &id) const override
bool validRaw(const HcalDetId &id) const
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
static const int IPHI_MAX
Definition: HcalTopology.cc:15
bool HcalTopology::incrementDepth ( HcalDetId id) const

Get the detector behind this one

Definition at line 727 of file HcalTopology.cc.

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

727  {
728 
729  HcalSubdetector subdet = detId.subdet();
730  int ieta = detId.ieta();
731  int etaRing = detId.ietaAbs();
732  int depth = detId.depth();
733  int iphi = detId.iphi();
734  int zside = detId.zside();
735  int nDepthBins(0), startingBin(0);
736  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
737 
738  // see if the new depth bin exists
739  ++depth;
740  if (depth >= (startingBin+nDepthBins)) {
741  // handle on a case-by-case basis
742  if (subdet == HcalBarrel && etaRing < lastHORing()) {
743  // HO
744  subdet = HcalOuter;
745  depth = 4;
746  } else if (subdet == HcalBarrel && etaRing == lastHBRing()) {
747  // overlap
748  subdet = HcalEndcap;
750  depth = hcons_->getDepthEta16(2,iphi,zside);
751  } else if (subdet == HcalEndcap && etaRing == lastHERing()-1 &&
753  // guard ring HF29 is behind HE 28
754  subdet = HcalForward;
755  (ieta > 0) ? ++ieta : --ieta;
756  depth = 1;
757  } else if (subdet == HcalEndcap && etaRing == lastHERing() &&
759  // split cells go to bigger granularity. Ring 29 -> 28
760  (ieta > 0) ? --ieta : ++ieta;
761  } else {
762  // no more chances
763  detId = HcalDetId();
764  return false;
765  }
766  }
767  detId = HcalDetId(subdet, ieta, iphi, depth);
768  return validRaw(detId);
769 }
int lastHBRing() const
Definition: HcalTopology.h:88
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:197
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:94
int lastHERing() const
Definition: HcalTopology.h:90
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
bool HcalTopology::isBH ( ) const
inline

Definition at line 166 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::isBH().

Referenced by CaloTowerTopology::CaloTowerTopology().

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

Definition at line 257 of file HcalTopology.cc.

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

Referenced by idBack(), and validHcal().

257  {
258  bool exed=false;
259  // first, check the full detector exclusions... (fast)
260  switch (id.subdet()) {
261  case(HcalBarrel): exed=excludeHB_; break;
262  case(HcalEndcap): exed=excludeHE_; break;
263  case(HcalOuter): exed=excludeHO_; break;
264  case(HcalForward): exed=excludeHF_; break;
265  default: exed=false;
266  }
267  // next, check the list (slower)
268  if (!exed && !exclusionList_.empty()) {
269  std::vector<HcalDetId>::const_iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
270  if (i!=exclusionList_.end() && *i==id) exed=true;
271  }
272  return exed;
273 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:194
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 842 of file HcalTopology.cc.

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

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

842  {
843  int maxd1 = std::max(maxDepthHB_,maxDepthHE_);
844  int maxd2 = std::max(maxDepthHF_,minMaxDepth_);
845  return std::max(maxd1,maxd2);
846 }
static const int minMaxDepth_
Definition: HcalTopology.h:214
int HcalTopology::maxDepth ( HcalSubdetector  subdet) const

Definition at line 848 of file HcalTopology.cc.

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

848  {
849  if (bc == HcalBarrel) return maxDepthHB_;
850  else if (bc == HcalEndcap) return maxDepthHE_;
851  else if (bc == HcalForward) return maxDepthHF_;
852  else return 4;
853 }
int HcalTopology::maxDepthHB ( ) const
inline

Definition at line 145 of file HcalTopology.h.

References maxDepthHB_.

Referenced by RecAnalyzerMinbias::beginRun().

145 { return maxDepthHB_;}
int HcalTopology::maxDepthHE ( ) const
inline
bool HcalTopology::mergedDepth29 ( HcalDetId  id) const
inline
HcalDetId HcalTopology::mergedDepthDetId ( const HcalDetId id) const
inline
std::vector<int> HcalTopology::mergedDepthList29 ( HcalDetId  id) const
inline

Definition at line 110 of file HcalTopology.h.

References PVValHelper::eta, etaRing(), getDepthSegmentation(), hcons_, HcalDDDRecConstants::mergedDepthList29(), nPhiBins(), phi, phiBin(), relativeConstraints::ring, segmentBoundaries(), and setDepthSegmentation().

110  {
111  return hcons_->mergedDepthList29(id.ieta(), id.iphi());
112  }
bool mergedDepthList29(int ieta, int iphi, int depth) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
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 1317 of file HcalTopology.cc.

References HBSize_, HESize_, HFSize_, and HOSize_.

Referenced by denseId2detId(), HcalGeometry::getSummary(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), CaloGeometryDBEP< T, U >::produceAligned(), producerTag(), and HcalGeometry::sizeForDenseIndex().

1317  {
1318  return HBSize_+HESize_+HOSize_+HFSize_;
1319 }
unsigned int HESize_
Definition: HcalTopology.h:217
unsigned int HFSize_
Definition: HcalTopology.h:219
unsigned int HBSize_
Definition: HcalTopology.h:216
unsigned int HOSize_
Definition: HcalTopology.h:218
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 312 of file HcalTopology.cc.

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

Referenced by spr::newHCALIdNS(), and producerTag().

312  {
313  std::vector<DetId> vNeighborsDetId;
314  HcalDetId neighbor;
315  if (incIPhi(HcalDetId(id),neighbor)) {
316  if (neighbor.oldFormat()) neighbor.changeForm();
317  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
318  }
319  return vNeighborsDetId;
320 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
bool incIPhi(const HcalDetId &id, HcalDetId &neighbor) const
bool oldFormat() const
Definition: HcalDetId.h:147
Definition: DetId.h:18
void changeForm()
Definition: HcalDetId.h:195
int HcalTopology::nPhiBins ( int  etaRing) const

how many phi segments in this ring

Definition at line 818 of file HcalTopology.cc.

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

Referenced by CaloTowerHardcodeGeometryLoader::makeCell(), and mergedDepthList29().

818  {
819  int lastPhiBin=singlePhiBins_;
820  if (etaRing >= firstHFQuadPhiRing() || etaRing >= firstHEQuadPhiRing()) lastPhiBin=doublePhiBins_/2;
821  else if (etaRing >= firstHEDoublePhiRing()) lastPhiBin=doublePhiBins_;
822  if (hcons_ && etaRing >= hcons_->getEtaRange(1).first &&
823  etaRing <= hcons_->getEtaRange(1).second) {
824  return nPhiBins(HcalBarrel, etaRing);
825  }
826  return lastPhiBin;
827 }
int nPhiBins(int etaRing) const
how many phi segments in this ring
std::pair< int, int > getEtaRange(const int &i) const
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
int HcalTopology::nPhiBins ( HcalSubdetector  subdet,
int  etaRing 
) const

Definition at line 829 of file HcalTopology.cc.

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

829  {
830  double phiTableVal;
831  if (bc == HcalForward) {
832  phiTableVal = dPhiTableHF[etaRing-firstHFRing_];
833  } else {
834  phiTableVal = dPhiTable[etaRing-firstHBRing_];
835  }
836  int lastPhiBin = 0;
837  if (phiTableVal != 0.0)
838  lastPhiBin = static_cast<int>((2._pi / phiTableVal) + 0.001);
839  return lastPhiBin;
840 }
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:224
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
std::vector< double > dPhiTable
Definition: HcalTopology.h:224
int HcalTopology::phiBin ( HcalSubdetector  subdet,
int  etaRing,
double  phi 
) const

Definition at line 877 of file HcalTopology.cc.

References dPhiTable, dPhiTableHF, firstHBRing_, firstHFRing_, HcalBarrel, HcalEndcap, HcalForward, phioff, csvLumiCalc::unit, unitPhi, and unitPhiHF.

Referenced by mergedDepthList29(), and HcalGeometry::phiBin().

877  {
878  //put phi in correct range (0->2pi)
879  int index(0);
880  if (bc == HcalBarrel) {
881  index = (etaring-firstHBRing_);
882  phi -= phioff[0];
883  } else if (bc == HcalEndcap) {
884  index = (etaring-firstHBRing_);
885  phi -= phioff[1];
886  } else if (bc == HcalForward) {
887  index = (etaring-firstHFRing_);
888  if (index < static_cast<int>(dPhiTableHF.size())) {
889  if (index >= 0 && unitPhiHF[index] > 2) phi -= phioff[4];
890  else phi -= phioff[2];
891  }
892  }
893  if (index < 0)
894  index = 0;
895  if (phi < 0.0) phi += 2._pi;
896  else if (phi > 2._pi) phi -= 2._pi;
897  int phibin(1), unit(1);
898  if (bc == HcalForward) {
899  if (index < (int)(dPhiTableHF.size())) {
900  unit = unitPhiHF[index];
901  phibin = static_cast<int>(phi/dPhiTableHF[index])+1;
902  }
903  } else {
904  if (index < (int)(dPhiTable.size())) {
905  phibin = static_cast<int>(phi/dPhiTable[index])+1;
906  unit = unitPhi[index];
907  }
908  }
909  int iphi(phibin);
910  if (unit == 2) iphi = (phibin-1)*2+1;
911  else if (unit == 4) iphi = (phibin-1)*4+3;
912  return iphi;
913 }
std::vector< int > unitPhiHF
Definition: HcalTopology.h:226
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:224
std::vector< int > unitPhi
Definition: HcalTopology.h:226
std::vector< double > phioff
Definition: HcalTopology.h:225
std::vector< double > dPhiTable
Definition: HcalTopology.h:224
static std::string HcalTopology::producerTag ( )
inlinestatic
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 947 of file HcalTopology.cc.

References egammaForCoreTracking_cff::depth, getDepthSegmentation(), pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.

Referenced by mergedDepthList29().

949  {
950  std::vector<int> readoutDepths;
951  getDepthSegmentation(ring, readoutDepths, one);
952  int d1 = std::lower_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
953  int d2 = std::upper_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
954  return std::pair<int, int>(d1, d2);
955 }
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
void HcalTopology::setDepthSegmentation ( const unsigned  ring,
const std::vector< int > &  readoutDepths,
const bool  flag 
)

Definition at line 937 of file HcalTopology.cc.

References depthSegmentation_, depthSegmentationOne_, and relativeConstraints::ring.

Referenced by HcalTopology(), and mergedDepthList29().

939  {
940  if (one) {
941  depthSegmentationOne_[ring] = readoutDepths;
942  } else {
943  depthSegmentation_[ring] = readoutDepths;
944  }
945 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:232
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:233
int HcalTopology::singlePhiBins ( ) const
inline

Definition at line 100 of file HcalTopology.h.

References singlePhiBins_.

100 {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 322 of file HcalTopology.cc.

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

Referenced by spr::newHCALIdNS(), and producerTag().

322  {
323  std::vector<DetId> vNeighborsDetId;
324  HcalDetId neighbor;
325  if (decIPhi(HcalDetId(id),neighbor)) {
326  if (neighbor.oldFormat()) neighbor.changeForm();
327  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
328  }
329  return vNeighborsDetId;
330 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
bool decIPhi(const HcalDetId &id, HcalDetId &neighbor) const
bool oldFormat() const
Definition: HcalDetId.h:147
Definition: DetId.h:18
void changeForm()
Definition: HcalDetId.h:195
int HcalTopology::topoVersion ( ) const
overridevirtual

return a version which identifies the given topology

Reimplemented from CaloSubdetectorTopology.

Definition at line 1321 of file HcalTopology.cc.

References topoVersion_.

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

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

Definition at line 172 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::unmergeDepthDetId().

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

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

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

Referenced by spr::matrixHCALIdsDepth(), and producerTag().

332  {
333  HcalDetId neighbor = id;
334  std::vector<DetId> vNeighborsDetId;
335  if (incrementDepth(neighbor)) {
336  if (neighbor.oldFormat()) neighbor.changeForm();
337  vNeighborsDetId.emplace_back(neighbor);
338  }
339  return vNeighborsDetId;
340 }
bool oldFormat() const
Definition: HcalDetId.h:147
bool incrementDepth(HcalDetId &id) const
void changeForm()
Definition: HcalDetId.h:195
bool HcalTopology::valid ( const DetId id) const
overridevirtual
bool HcalTopology::validDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 209 of file HcalTopology.cc.

References validHcal().

Referenced by producerTag().

210  {
211  return validHcal(HcalDetId(subdet,ieta,iphi,depth));
212 }
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 411 of file HcalTopology.cc.

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

Referenced by idBack().

411  {
412  const HcalSubdetector sd (id.subdet());
413  const int ie (id.ietaAbs());
414  const int ip (id.iphi());
415  const int dp (id.depth());
416 
417  return ( ( ip >= 1 ) &&
418  ( ip <= IPHI_MAX ) &&
419  ( dp >= 1 ) &&
420  ( ie >= 1 ) &&
421  ( ( ( sd == HcalBarrel ) &&
422  ( ( ( ie <= 14 ) &&
423  ( dp == 1 ) ) ||
424  ( ( ( ie == 15 ) || ( ie == 16 ) ) &&
425  ( dp <= 2 ) ) ) ) ||
426  ( ( sd == HcalEndcap ) &&
427  ( ( ( ie == firstHERing() ) &&
428  ( dp == 3 ) ) ||
429  ( ( ie == 17 ) &&
430  ( dp == 1 ) ) ||
431  ( ( ie >= 18 ) &&
432  ( ie <= 20 ) &&
433  ( dp <= 2 ) ) ||
434  ( ( ie >= 21 ) &&
435  ( ie <= 26 ) &&
436  ( dp <= 2 ) &&
437  ( ip%2 == 1 ) ) ||
438  ( ( ie >= 27 ) &&
439  ( ie <= 28 ) &&
440  ( dp <= 3 ) &&
441  ( ip%2 == 1 ) ) ||
442  ( ( ie == 29 ) &&
443  ( dp <= 2 ) &&
444  ( ip%2 == 1 ) ) ) ) ||
445  ( ( sd == HcalOuter ) &&
446  ( ie <= 15 ) &&
447  ( dp == 4 ) ) ||
448  ( ( sd == HcalForward ) &&
449  ( dp <= 2 ) &&
450  ( ( ( ie >= firstHFRing() ) &&
451  ( ie < firstHFQuadPhiRing() ) &&
452  ( ip%2 == 1 ) ) ||
453  ( ( ie >= firstHFQuadPhiRing() ) &&
454  ( ie <= lastHFRing() ) &&
455  ( ip%4 == 3 ) ) ) ) ) ) ;
456 }
int firstHFRing() const
Definition: HcalTopology.h:91
int lastHFRing() const
Definition: HcalTopology.h:92
HcalSubdetector
Definition: HcalAssistant.h:31
double sd
int firstHERing() const
Definition: HcalTopology.h:89
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
static const int IPHI_MAX
Definition: HcalTopology.cc:15
bool HcalTopology::validHcal ( const HcalDetId id) const

Is this a valid cell id?

Definition at line 204 of file HcalTopology.cc.

References isExcluded(), and validRaw().

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

204  {
205  // check the raw rules
206  return validRaw(id) && !isExcluded(id);
207 }
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 241 of file HcalTopology.cc.

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

241  {
242  /* original logic show here because condensed form below is rather terse
243  // check the raw rules
244  bool ok = validHcal(id);
245  if (flag == 0) { // This is all what is needed
246  } else if (flag == 1) { // See if it is in the to be merged list and merged list
247  if (hcons_->isPlan1MergedId(id)) ok = true;
248  else if (hcons_->isPlan1ToBeMergedId(id)) ok = false;
249  } else if (!ok) {
250  ok = hcons_->isPlan1MergedId(id);
251  }
252  return ok;
253  */
254  return (flag>0 and hcons_->isPlan1MergedId(id)) or ((flag!=1 or !hcons_->isPlan1ToBeMergedId(id)) and validHcal(id));
255 }
bool validHcal(const HcalDetId &id) const
bool isPlan1MergedId(const HcalDetId &id) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isPlan1ToBeMergedId(const HcalDetId &id) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
bool HcalTopology::validHT ( const HcalTrigTowerDetId id) const

Definition at line 214 of file HcalTopology.cc.

References egammaForCoreTracking_cff::depth, firstHFRing_, IPHI_MAX, lastHBRing_, maxDepthHE_, triggerMode_, HcalTopologyMode::TriggerMode_2009, HcalTopologyMode::TriggerMode_2017, HcalTopologyMode::TriggerMode_2018legacy, and jets_cff::version.

Referenced by HcalLutAnalyzer::analyze(), CaloTPGTranscoderULUT::HTvalid(), CaloTPGTranscoderULUT::loadHCALCompress(), producerTag(), and validRaw().

214  {
215 
216  if (id.iphi()<1 || id.iphi()>IPHI_MAX || id.ieta()==0) return false;
217  if (id.depth() != 0) return false;
218  if (maxDepthHE_ == 0) {
219  if (id.ietaAbs() > lastHBRing_ && id.ietaAbs() < firstHFRing_) return false;
220  }
221  if (id.version()==0) {
222  if (id.ietaAbs() > 28) {
225  if ((id.iphi() % 4) != 1) return false;
226  if (id.ietaAbs() > 32) return false;
227  }
228  } else if (id.version()==1) {
230  if (id.ietaAbs()<30 || id.ietaAbs()>41) return false;
231  if (id.ietaAbs()>29 && ((id.iphi()%2)==0)) return false;
232  if (id.ietaAbs()>39 && ((id.iphi()%4)!=3)) return false;
233  } else if (id.version()>1) {
234  // only versions 0 and 1 are supported
235  return false;
236  }
237 
238  return true;
239 }
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:198
static const int IPHI_MAX
Definition: HcalTopology.cc:15
bool HcalTopology::validRaw ( const HcalDetId id) const
private

Is this a valid cell id?

Definition at line 459 of file HcalTopology.cc.

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

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

459  {
460  bool ok=true;
461  int ieta=id.ieta();
462  int aieta=id.ietaAbs();
463  int depth=id.depth();
464  int iphi=id.iphi();
465  int zside=id.zside();
466  HcalSubdetector subdet=id.subdet();
467  int maxPhi = (subdet==HcalEndcap) ? maxPhiHE_ : IPHI_MAX;
468  if ((ieta==0 || iphi<=0 || iphi>maxPhi) || aieta>maxEta_) ok = false; // outer limits
469 
470  if (ok) {
471  if (subdet==HcalBarrel) {
473  if ((aieta>lastHBRing()) ||
474  (depth>hcons_->getMaxDepth(0,aieta,iphi,zside)) ||
475  (depth<hcons_->getMinDepth(0,aieta,iphi,zside))) ok=false;
476  } else {
477  if (aieta>lastHBRing() || depth>2 || (aieta<=14 && depth>1)) ok=false;
478  }
479  } else if (subdet==HcalEndcap) {
481  if ((depth>hcons_->getMaxDepth(1,aieta,iphi,zside)) ||
482  (depth<hcons_->getMinDepth(1,aieta,iphi,zside)) ||
483  (aieta<firstHERing()) || (aieta>lastHERing())) {
484  ok = false;
485  } else {
486  for (const auto & i : etaBinsHE_) {
487  if (aieta == i.ieta) {
488  if (aieta >= firstHEDoublePhiRing() && (iphi%2)==0) ok=false;
489  if (aieta >= firstHEQuadPhiRing() && (iphi%4)!=3) ok=false;
490  if (aieta+1 == hcons_->getNoff(1)) {
491  if (depth < 1) ok = false;
492  } else {
493  if (depth < i.depthStart) ok = false;
494  }
495  break;
496  }
497  }
498  }
499  } else {
500  if (depth>hcons_->getMaxDepth(1,aieta,iphi,zside) ||
501  aieta<firstHERing() || aieta>lastHERing() ||
502  (aieta==firstHERing() && depth!=hcons_->getDepthEta16(2,iphi,zside)) ||
503  (aieta==17 && depth!=1 && mode_!=HcalTopologyMode::H2) || // special case at H2
504  (((aieta>=17 && aieta<firstHETripleDepthRing()) ||
505  aieta==lastHERing()) && depth>2) ||
506  (aieta>=firstHEDoublePhiRing() && (iphi%2)==0)) ok=false;
507  }
508  } else if (subdet==HcalOuter) {
509  if (aieta>lastHORing() || iphi>IPHI_MAX || depth!=4) ok=false;
510  } else if (subdet==HcalForward) {
511  if (aieta<firstHFRing() || aieta>lastHFRing() || ((iphi%2)==0) ||
512  (depth>hcons_->maxHFDepth(ieta,iphi)) ||
513  (aieta>=firstHFQuadPhiRing() && ((iphi+1)%4)!=0)) ok=false;
514  } else if (subdet==HcalTriggerTower) {
515  ok=validHT(HcalTrigTowerDetId(id.rawId()));
516  } else {
517  ok=false;
518  }
519  }
520  return ok;
521 }
int firstHFRing() const
Definition: HcalTopology.h:91
int lastHBRing() const
Definition: HcalTopology.h:88
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:205
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:197
int firstHETripleDepthRing() const
Definition: HcalTopology.h:99
int lastHFRing() const
Definition: HcalTopology.h:92
int getDepthEta16(const int &det, const int &iphi, const int &zside) const
HcalSubdetector
Definition: HcalAssistant.h:31
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int getNoff(const int &i) const
int getMaxDepth(const int &type) const
int firstHERing() const
Definition: HcalTopology.h:89
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
int maxHFDepth(int ieta, int iphi) const
int lastHORing() const
Definition: HcalTopology.h:94
int lastHERing() const
Definition: HcalTopology.h:90
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:192
static const int IPHI_MAX
Definition: HcalTopology.cc:15
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 302 of file HcalTopology.cc.

References mps_fire::i, and incIEta().

Referenced by spr::newHCALIdEW(), and producerTag().

302  {
303  std::vector<DetId> vNeighborsDetId;
304  HcalDetId neighbors[2];
305  for (int i=0;i<incIEta(HcalDetId(id),neighbors);i++) {
306  if (neighbors[i].oldFormat()) neighbors[i].changeForm();
307  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
308  }
309  return vNeighborsDetId;
310 }
int incIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:18
bool HcalTopology::withSpecialRBXHBHE ( ) const
inline

Definition at line 169 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::withSpecialRBXHBHE().

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

Member Data Documentation

unsigned int HcalTopology::CALIBSize_
private

Definition at line 221 of file HcalTopology.h.

Referenced by getCALIBSize().

SegmentationMap HcalTopology::depthSegmentation_
private

Definition at line 232 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

SegmentationMap HcalTopology::depthSegmentationOne_
private

Definition at line 233 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

int HcalTopology::doublePhiBins_
private

Definition at line 210 of file HcalTopology.h.

Referenced by doublePhiBins(), and nPhiBins().

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

Definition at line 224 of file HcalTopology.h.

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

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

Definition at line 224 of file HcalTopology.h.

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

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

Definition at line 205 of file HcalTopology.h.

Referenced by decrementDepth(), and HcalTopology().

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

Definition at line 205 of file HcalTopology.h.

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

int HcalTopology::etaHE2HF_
private

Definition at line 212 of file HcalTopology.h.

Referenced by HcalTopology(), and incAIEta().

int HcalTopology::etaHF2HE_
private

Definition at line 212 of file HcalTopology.h.

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

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

Definition at line 224 of file HcalTopology.h.

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

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

Definition at line 224 of file HcalTopology.h.

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

bool HcalTopology::excludeHB_
private

Definition at line 195 of file HcalTopology.h.

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

bool HcalTopology::excludeHE_
private

Definition at line 195 of file HcalTopology.h.

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

bool HcalTopology::excludeHF_
private

Definition at line 195 of file HcalTopology.h.

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

bool HcalTopology::excludeHO_
private

Definition at line 195 of file HcalTopology.h.

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

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

Definition at line 194 of file HcalTopology.h.

Referenced by exclude(), and isExcluded().

int HcalTopology::firstHBRing_
private

Definition at line 200 of file HcalTopology.h.

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

int HcalTopology::firstHEDoublePhiRing_
private

Definition at line 208 of file HcalTopology.h.

Referenced by firstHEDoublePhiRing(), and HcalTopology().

int HcalTopology::firstHEQuadPhiRing_
private

Definition at line 208 of file HcalTopology.h.

Referenced by firstHEQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHERing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHERing(), and HcalTopology().

int HcalTopology::firstHETripleDepthRing_
private

Definition at line 209 of file HcalTopology.h.

Referenced by firstHETripleDepthRing(), and HcalTopology().

int HcalTopology::firstHFQuadPhiRing_
private

Definition at line 208 of file HcalTopology.h.

Referenced by firstHFQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHFRing_
private

Definition at line 202 of file HcalTopology.h.

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

int HcalTopology::firstHORing_
private

Definition at line 203 of file HcalTopology.h.

Referenced by firstHORing(), and HcalTopology().

unsigned int HcalTopology::HBSize_
private

Definition at line 216 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 217 of file HcalTopology.h.

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

unsigned int HcalTopology::HFSize_
private

Definition at line 219 of file HcalTopology.h.

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

unsigned int HcalTopology::HOSize_
private

Definition at line 218 of file HcalTopology.h.

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

unsigned int HcalTopology::HTSize_
private

Definition at line 220 of file HcalTopology.h.

Referenced by getHTSize(), and HcalTopology().

int HcalTopology::lastHBRing_
private

Definition at line 200 of file HcalTopology.h.

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

int HcalTopology::lastHERing_
private

Definition at line 201 of file HcalTopology.h.

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

int HcalTopology::lastHFRing_
private

Definition at line 202 of file HcalTopology.h.

Referenced by HcalTopology(), and lastHFRing().

int HcalTopology::lastHORing_
private

Definition at line 203 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 213 of file HcalTopology.h.

Referenced by HcalTopology(), and validRaw().

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

Definition at line 193 of file HcalTopology.h.

Referenced by getMergePositionFlag().

const int HcalTopology::minMaxDepth_ = 4
staticprivate

Definition at line 214 of file HcalTopology.h.

Referenced by maxDepth().

HcalTopologyMode::Mode HcalTopology::mode_
private
int HcalTopology::nEtaHB_
private
int HcalTopology::nEtaHE_
private

Definition at line 206 of file HcalTopology.h.

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

unsigned int HcalTopology::numberOfShapes_
private

Definition at line 222 of file HcalTopology.h.

Referenced by getNumberOfShapes(), and HcalTopology().

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

Definition at line 225 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

int HcalTopology::singlePhiBins_
private

Definition at line 210 of file HcalTopology.h.

Referenced by nPhiBins(), and singlePhiBins().

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

Definition at line 198 of file HcalTopology.h.

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

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

Definition at line 226 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

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

Definition at line 226 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().