CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | 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 (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
 

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

Member Enumeration Documentation

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

Definition at line 233 of file HcalTopology.h.

anonymous enum
private
Enumerator
kSizeForDenseIndexingPreLS1 

Definition at line 243 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHBSizePreLS1 

Definition at line 244 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHESizePreLS1 

Definition at line 245 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHOSizePreLS1 

Definition at line 246 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHFSizePreLS1 

Definition at line 247 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePreLS1 

Definition at line 248 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePhase1 

Definition at line 249 of file HcalTopology.h.

anonymous enum
private
Enumerator
kCALIBSizePreLS1 

Definition at line 250 of file HcalTopology.h.

Constructor & Destructor Documentation

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

Definition at line 16 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, M_PI, 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().

17  :
18  hcons_(hcons), mergePosition_(mergePosition),
19  excludeHB_(false), excludeHE_(false), excludeHO_(false), excludeHF_(false),
20  firstHBRing_(1),
21  firstHERing_(999), lastHERing_(0),
22  firstHFRing_(29), lastHFRing_(41),
23  firstHORing_(1), lastHORing_(15),
27 
38  for (auto & i : etaBinsHE_) {
39  if (firstHERing_ > i.ieta) firstHERing_ = i.ieta;
40  if (lastHERing_ < i.ieta) lastHERing_ = i.ieta;
41  int unit = (int)((i.dphi+0.01)/(5.0*CLHEP::deg));
42  if (unit == 2 && firstHEDoublePhiRing_ > i.ieta)
43  firstHEDoublePhiRing_ = i.ieta;
44  if (unit == 4 && firstHEQuadPhiRing_ > i.ieta)
45  firstHEQuadPhiRing_ = i.ieta;
46  if (i.layer.size() > 2 && firstHETripleDepthRing_ > i.ieta)
48  }
51  topoVersion_=0; //DL
52  HBSize_ = kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
53  HESize_ = kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
54  HOSize_ = kHOSizePreLS1; // ieta * iphi * 2
55  HFSize_ = kHFSizePreLS1; // ieta * iphi * depth * 2
56  numberOfShapes_ = 87;
57  } else if (mode_==HcalTopologyMode::SLHC) { // need to know more eventually
58  topoVersion_=10;
59  HBSize_ = nEtaHB_*IPHI_MAX*maxDepthHB_*2;
61  HOSize_ = (lastHORing_-firstHORing_+1)*IPHI_MAX*2; // ieta * iphi * 2
62  HFSize_ = (lastHFRing_-firstHFRing_+1)*IPHI_MAX*maxDepthHF_*2; // ieta * iphi * depth * 2
63  numberOfShapes_ = (maxPhiHE_ > 72) ? 1200 : 500;
64  }
68  } else {
70  }
71 
72 #ifdef EDM_ML_DEBUG
73  std::cout << "Topo sizes " << HBSize_ << ":" << HESize_ << ":" << HOSize_
74  << ":" << HFSize_ << ":" << HTSize_ << " for mode " << mode_
75  << ":" << triggerMode_ << std::endl;
76 #endif
77 
78  //The transition between HE/HF in eta
84  std::pair<int,int> ietaHF = hcons_->getEtaRange(2);
85  double eta = etaBinsHE_[etaBinsHE_.size()-1].etaMax;
87  for (unsigned int i=1; i<etaTableHF.size(); ++i) {
88  if (eta < etaTableHF[i]) {
89  etaHE2HF_ = ietaHF.first + i - 1;
90  break;
91  }
92  }
93  eta = etaTableHF[0];
95  for (auto & i : etaBinsHE_) {
96  if (eta < i.etaMax) {
97  etaHF2HE_ = i.ieta;
98  break;
99  }
100  }
101  const double fiveDegInRad = 2*M_PI/72;
102  for (double k : dPhiTable) {
103  int units = (int)(k/fiveDegInRad+0.5);
104  unitPhi.emplace_back(units);
105  }
106  for (double k : dPhiTableHF) {
107  int units = (int)(k/fiveDegInRad+0.5);
108  unitPhiHF.emplace_back(units);
109  }
110  int nEta = hcons_->getNEta();
111  for (int ring=1; ring<=nEta; ++ring) {
112  std::vector<int> segmentation = hcons_->getDepth(ring-1,false);
113  setDepthSegmentation(ring,segmentation,false);
114 #ifdef EDM_ML_DEBUG
115  std::cout << "Set segmentation for ring " << ring << " with "
116  << segmentation.size() << " elements:";
117  for (unsigned int k=0; k<segmentation.size(); ++k)
118  std::cout << " " << segmentation[k];
119  std::cout << std::endl;
120 #endif
121  segmentation = hcons_->getDepth(ring-1,true);
122  setDepthSegmentation(ring,segmentation,true);
123 #ifdef EDM_ML_DEBUG
124  std::cout << "Set Plan-1 segmentation for ring " << ring << " with "
125  << segmentation.size() << " elements:";
126  for (unsigned int k=0; k<segmentation.size(); ++k)
127  std::cout << " " << segmentation[k];
128  std::cout << std::endl;
129 #endif
130  }
131 
132 #ifdef EDM_ML_DEBUG
133  std::cout << "Constants in HcalTopology " << firstHBRing_ << ":"
134  << lastHBRing_ << " " << firstHERing_ << ":" << lastHERing_ << ":"
135  << firstHEDoublePhiRing_ << ":" << firstHEQuadPhiRing_ << ":"
136  << firstHETripleDepthRing_ << " " << firstHFRing_ << ":"
137  << lastHFRing_ << ":" << firstHFQuadPhiRing_ << " " << firstHORing_
138  << ":" << lastHORing_ << " " << maxDepthHB_ << ":" << maxDepthHE_
139  << " " << nEtaHB_ << ":" << nEtaHE_ << " " << etaHE2HF_ << ":"
140  << etaHF2HE_ << " " << maxPhiHE_ << std::endl;
141 #endif
142 }
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:224
unsigned int numberOfShapes_
Definition: HcalTopology.h:220
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:222
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:204
std::vector< int > unitPhi
Definition: HcalTopology.h:224
const std::vector< double > & getEtaTableHF() const
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:197
unsigned int HESize_
Definition: HcalTopology.h:215
unsigned int HTSize_
Definition: HcalTopology.h:218
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:204
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:217
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:196
unsigned int HBSize_
Definition: HcalTopology.h:214
std::vector< double > etaTableHF
Definition: HcalTopology.h:222
unsigned int HOSize_
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:222
#define M_PI
int k[5][pyjets_maxn]
int firstHEQuadPhiRing_
Definition: HcalTopology.h:207
bool mergePosition_
Definition: HcalTopology.h:192
std::vector< double > phioff
Definition: HcalTopology.h:223
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:222
TString units(TString variable, Char_t axis)
const std::vector< double > & getPhiTableHF() const
int firstHETripleDepthRing_
Definition: HcalTopology.h:208
void setDepthSegmentation(const unsigned ring, const std::vector< int > &readoutDepths, const bool flag)
int firstHEDoublePhiRing_
Definition: HcalTopology.h:207
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:191
static const int IPHI_MAX
Definition: HcalTopology.cc:12
int firstHFQuadPhiRing_
Definition: HcalTopology.h:207
int getNPhi(const int &type) const
HcalTopology::HcalTopology ( HcalTopologyMode::Mode  mode,
int  maxDepthHB,
int  maxDepthHE,
HcalTopologyMode::TriggerMode  tmode = HcalTopologyMode::TriggerMode_2009 
)

Definition at line 144 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.

144  :
145  hcons_(nullptr), mergePosition_(false),
146  excludeHB_(false), excludeHE_(false), excludeHO_(false), excludeHF_(false),
147  mode_(mode), triggerMode_(tmode),
148  firstHBRing_(1), lastHBRing_(16),
149  firstHERing_(16), lastHERing_(29),
150  firstHFRing_(29), lastHFRing_(41),
151  firstHORing_(1), lastHORing_(15),
163  numberOfShapes_(( mode==HcalTopologyMode::SLHC ) ? 500 : 87 ) {
164 
166  topoVersion_=0; //DL
167  HBSize_= kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal
168  HESize_= kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal
169  HOSize_= kHOSizePreLS1; // ieta * iphi * 2
170  HFSize_= kHFSizePreLS1; // phi * eta * depth * pm
171  } else if (mode_==HcalTopologyMode::SLHC) { // need to know more eventually
173  HESize_= maxDepthHE*(29-16+1)*maxPhiHE_*2;
174  HOSize_= 15*IPHI_MAX*2; // ieta * iphi * 2
175  HFSize_= IPHI_MAX*13*maxDepthHF_*2; // phi * eta * depth * pm
176  topoVersion_=10;
177  }
182  } else {
184  }
185 
186  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";
187 }
unsigned int numberOfShapes_
Definition: HcalTopology.h:220
int maxDepthHE() const
Definition: HcalTopology.h:146
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:197
unsigned int HESize_
Definition: HcalTopology.h:215
unsigned int HTSize_
Definition: HcalTopology.h:218
HcalTopologyMode::Mode mode() const
Definition: HcalTopology.h:31
unsigned int HFSize_
Definition: HcalTopology.h:217
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:196
unsigned int HBSize_
Definition: HcalTopology.h:214
unsigned int HOSize_
Definition: HcalTopology.h:216
int firstHEQuadPhiRing_
Definition: HcalTopology.h:207
bool mergePosition_
Definition: HcalTopology.h:192
int maxDepthHB() const
Definition: HcalTopology.h:145
int firstHETripleDepthRing_
Definition: HcalTopology.h:208
int firstHEDoublePhiRing_
Definition: HcalTopology.h:207
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:191
static const int IPHI_MAX
Definition: HcalTopology.cc:12
int firstHFQuadPhiRing_
Definition: HcalTopology.h:207

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

618  {
619  int n=1;
620  int aieta=id.ietaAbs();
621 
622  if (aieta==firstHEDoublePhiRing()) {
623  n=2;
624  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
625  neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+1,id.depth());
626  } else if (aieta==firstHFQuadPhiRing()) {
627  n=2;
628  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
629  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
630  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
631  } else if (aieta==firstHEQuadPhiRing()) {
632  n=2;
633  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
634  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
635  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
636  } else if (aieta==1) {
637  neighbors[0]=HcalDetId(id.subdet(),-aieta*id.zside(),id.iphi(),id.depth());
638  } else if (aieta==firstHERing()) {
639  neighbors[0]=HcalDetId(HcalBarrel,(aieta-1)*id.zside(),id.iphi(),1);
640  } else if (aieta==firstHFRing()) {
641  neighbors[0]=HcalDetId(HcalEndcap,etaHF2HE_*id.zside(),id.iphi(),1);
642  } else
643  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
644 
645  if (!valid(neighbors[0]) && n==2) {
646  if (!valid(neighbors[1])) n=0;
647  else {
648  n=1;
649  neighbors[0]=neighbors[1];
650  }
651  }
652  if (n==2 && !valid(neighbors[1])) n=1;
653  if (n==1 && !valid(neighbors[0])) n=0;
654 
655  return n;
656 }
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:12
int HcalTopology::decIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

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

Definition at line 590 of file HcalTopology.cc.

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

Referenced by east(), and producerTag().

590  {
591  if (id.zside()==1) return decAIEta(id,neighbors);
592  else return incAIEta(id,neighbors);
593 }
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 548 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(), and south().

548  {
549  bool ok=valid(id);
550  if (ok) {
551  switch (id.subdet()) {
552  case (HcalBarrel):
553  case (HcalOuter):
554  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX,id.depth());
555  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
556  break;
557  case (HcalEndcap):
558  if (id.ietaAbs()>=firstHEQuadPhiRing()) {
559  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
560  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
561  } else if (id.ietaAbs()>=firstHEDoublePhiRing()) {
562  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
563  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
564  } else {
565  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),maxPhiHE_,id.depth());
566  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
567  }
568  break;
569  case (HcalForward):
570  if (id.ietaAbs()>=firstHFQuadPhiRing()) {
571  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
572  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
573  } else {
574  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
575  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
576  }
577  if (!validRaw(neighbor)) ok = false;
578  break;
579  default: ok=false;
580  }
581  }
582  return ok;
583 }
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:12
bool HcalTopology::decrementDepth ( HcalDetId id) const

Get the detector in front of this one

Definition at line 758 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().

758  {
759  HcalSubdetector subdet = detId.subdet();
760  int ieta = detId.ieta();
761  int etaRing = detId.ietaAbs();
762  int depth = detId.depth();
763  int iphi = detId.iphi();
764  int zside = detId.zside();
765  int nDepthBins, startingBin;
766  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
767 
768  // see if the new depth bin exists
769  --depth;
770  if ((subdet == HcalOuter) ||
771  (subdet == HcalEndcap && etaRing == firstHERing())) {
772  subdet = HcalBarrel;
773  for (int i=0; i<nEtaHB_; ++i) {
774  if (etaRing == etaBinsHB_[i].ieta) {
775  depth = etaBinsHB_[i].depthStart+etaBinsHB_[i].layer.size()-1;
776  break;
777  }
778  }
779  } else if (subdet == HcalEndcap && etaRing == lastHERing() &&
780  depth == hcons_->getDepthEta29(iphi,zside,0) &&
782  (ieta > 0) ? --ieta : ++ieta;
783  } else if (depth <= 0) {
784  if (subdet == HcalForward && etaRing == firstHFRing()) {
785  // overlap
786  subdet = HcalEndcap;
787  etaRing= etaHF2HE_;
788  ieta = (ieta > 0) ? etaRing : -etaRing;
789  for (const auto & i : etaBinsHE_) {
790  if (etaRing == i.ieta) {
791  depth = i.depthStart+i.layer.size()-1;
792  break;
793  }
794  }
795  } else {
796  // no more chances
797  detId = HcalDetId();
798  return false;
799  }
800  }
801  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
802  return validRaw(detId);
803 }
int firstHFRing() const
Definition: HcalTopology.h:91
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:204
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:204
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:196
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:191
DetId HcalTopology::denseId2detId ( unsigned int  denseid) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1189 of file HcalTopology.cc.

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

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

1189  {
1190 
1192  int ie ( 0 ) ;
1193  int ip ( 0 ) ;
1194  int dp ( 0 ) ;
1195  int in ( denseid ) ;
1196  int iz ( 1 ) ;
1197  if (topoVersion_==0) { //DL// pre-LS1
1198  if (denseid < kSizeForDenseIndexingPreLS1) {
1199  if ( in > 2*( kHBhalf + kHEhalf + kHOhalf ) - 1 ) { // HF
1200  sd = HcalForward ;
1201  in -= 2*( kHBhalf + kHEhalf + kHOhalf ) ;
1202  iz = ( in<kHFhalf ? 1 : -1 ) ;
1203  in %= kHFhalf ;
1204  ip = 4*( in/48 ) ;
1205  in %= 48 ;
1206  ip += 1 + ( in>21 ? 2 : 0 ) ;
1207  if( 3 == ip%4 ) in -= 22 ;
1208  ie = 29 + in/2 ;
1209  dp = 1 + in%2 ;
1210  } else if ( in > 2*( kHBhalf + kHEhalf ) - 1 ) { // HO
1211  sd = HcalOuter ;
1212  in -= 2*( kHBhalf + kHEhalf ) ;
1213  iz = ( in<kHOhalf ? 1 : -1 ) ;
1214  in %= kHOhalf ;
1215  dp = 4 ;
1216  ip = 1 + in/15 ;
1217  ie = 1 + ( in - 15*( ip - 1 ) ) ;
1218  } else if ( in > 2*kHBhalf - 1 ) { // Endcap
1219  sd = HcalEndcap ;
1220  in -= 2*kHBhalf ;
1221  iz = ( in<kHEhalf ? 1 : -1 ) ;
1222  in %= kHEhalf ;
1223  ip = 2*( in/36 ) ;
1224  in %= 36 ;
1225  ip += 1 + in/28 ;
1226  if( 0 == ip%2 ) in %= 28 ;
1227  ie = 15 + ( in<2 ? 1 + in : 2 +
1228  ( in<20 ? 1 + ( in - 2 )/2 : 9 +
1229  ( in<26 ? 1 + ( in - 20 )/3 : 3 ) ) ) ;
1230  dp = ( in<1 ? 3 :
1231  ( in<2 ? 1 :
1232  ( in<20 ? 1 + ( in - 2 )%2 :
1233  ( in<26 ? 1 + ( in - 20 )%3 :
1234  ( 1 + ( in - 26 )%2 ) ) ) ) ) ;
1235  } else { // barrel
1236  iz = ( in<kHBhalf ? 1 : -1 ) ;
1237  in %= kHBhalf ;
1238  ip = in/18 + 1 ;
1239  in %= 18 ;
1240  if ( in < 14 ) {
1241  dp = 1 ;
1242  ie = in + 1 ;
1243  } else {
1244  in %= 14 ;
1245  dp = 1 + in%2 ;
1246  ie = 15 + in/2 ;
1247  }
1248  }
1249  }
1250  } else if (topoVersion_==10) {
1251  if (denseid < ncells()) {
1252  if (denseid >= (HBSize_+HESize_+HOSize_)) {
1253  sd = HcalForward ;
1254  in -= (HBSize_+HESize_+HOSize_);
1255  dp = (in%maxDepthHF_) + 1;
1256  ip = (in - dp + 1)%(maxDepthHF_*IPHI_MAX);
1257  ip = (ip/maxDepthHF_) + 1;
1258  ie = (in - dp + 1 - maxDepthHF_*(ip -1))/(IPHI_MAX*maxDepthHF_);
1259  if (ie > 12) {ie = 54 -ie; iz = -1;}
1260  else {ie += 29; iz = 1;}
1261  } else if (denseid >= (HBSize_+HESize_)) {
1262  sd = HcalOuter ;
1263  in -= (HBSize_+HESize_);
1264  dp = 4;
1265  ip = (in%IPHI_MAX) + 1;
1266  ie = (in - ip + 1)/IPHI_MAX;
1267  if (ie > 14) {ie = 30 -ie; iz = -1;}
1268  else {ie += 1; iz = 1;}
1269  } else if (denseid >= (HBSize_)) {
1270  sd = HcalEndcap ;
1271  in -= (HBSize_);
1272  dp = (in%maxDepthHE_)+1;
1273  ip = (in - dp + 1)%(maxDepthHE_*maxPhiHE_);
1274  ip = (ip/maxDepthHE_) + 1;
1275  ie = (in - dp + 1 - maxDepthHE_*(ip-1))/(maxPhiHE_*maxDepthHE_);
1276  if (ie >= nEtaHE_) {ie = lastHERing()+nEtaHE_ - ie; iz = -1;}
1277  else {ie = firstHERing() + ie; iz = 1;}
1278  } else {
1279  sd = HcalBarrel ;
1280  dp = (in%maxDepthHB_)+1;
1281  ip = (in - dp + 1)%(maxDepthHB_*IPHI_MAX);
1282  ip = (ip/maxDepthHB_) + 1;
1283  ie = (in - dp + 1 - maxDepthHB_*(ip-1))/(IPHI_MAX*maxDepthHB_);
1284  if (ie >= nEtaHB_) {ie = lastHBRing()+nEtaHB_ - ie; iz = -1;}
1285  else {ie = firstHBRing() + ie; iz = 1;}
1286  }
1287  }
1288  }
1289  HcalDetId hid(sd, iz*int(ie), ip, dp);
1290 #ifdef EDM_ML_DEBUG
1291  std::cout << "Dens2Det " << topoVersion_ << " i/p " << std::hex << denseid
1292  << " : " << hid.rawId() << std::dec << " | " << hid << std::endl;
1293 #endif
1294  return hid;
1295 }
int firstHBRing() const
Definition: HcalTopology.h:87
unsigned int HESize_
Definition: HcalTopology.h:215
int lastHBRing() const
Definition: HcalTopology.h:88
HcalSubdetector
Definition: HcalAssistant.h:31
unsigned int HBSize_
Definition: HcalTopology.h:214
unsigned int HOSize_
Definition: HcalTopology.h:216
auto dp
Definition: deltaR.h:22
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:12
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 659 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().

661  {
662 
663  if(subdet == HcalBarrel) {
665  startingBin = hcons_->getMinDepth(0,etaRing,iphi,zside);
666  if (etaRing==lastHBRing()) {
667  nDepthBins = hcons_->getDepthEta16(1,iphi,zside)-startingBin+1;
668  } else {
669  nDepthBins = hcons_->getMaxDepth(0,etaRing,iphi,zside)-startingBin+1;
670  }
671  } else {
672  if (etaRing<=14) {
673  nDepthBins = 1;
674  startingBin = 1;
675  } else {
676  nDepthBins = 2;
677  startingBin = 1;
678  }
679  }
680  } else if(subdet == HcalEndcap) {
682  if (etaRing==firstHERing()) {
683  startingBin = hcons_->getDepthEta16(2,iphi,zside);
684  } else {
685  startingBin = hcons_->getMinDepth(1,etaRing,iphi,zside);
686  }
687  nDepthBins = hcons_->getMaxDepth(1,etaRing,iphi,zside)-startingBin+1;
688  } else {
689  if (etaRing==firstHERing()) {
690  nDepthBins = 1;
691  startingBin = 3;
692  } else if (etaRing==17) {
693  nDepthBins = 1;
694  startingBin = 1;
695  } else if (etaRing==lastHERing()) {
696  nDepthBins = 2;
697  startingBin = 1;
698  } else {
699  nDepthBins = (etaRing >= firstHETripleDepthRing()) ? 3 : 2;
700  startingBin = 1;
701  }
702  }
703  } else if(subdet == HcalForward) {
704  nDepthBins = maxDepthHF_;
705  startingBin = 1;
706  } else if(subdet == HcalOuter) {
707  nDepthBins = 1;
708  startingBin = 4;
709  } else {
710  std::cerr << "Bad HCAL subdetector " << subdet << std::endl;
711  }
712 }
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:196
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:191
unsigned int HcalTopology::detId2denseId ( const DetId id) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1153 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().

1153  {
1154  unsigned int retval(0);
1155  if (topoVersion_==0) { // pre-LS1
1156  retval = detId2denseIdPreLS1(id);
1157  } else if (topoVersion_==10) {
1158  HcalDetId hid(id);
1159  if (hid.subdet()==HcalBarrel) {
1160  retval = (hid.depth()-1)+maxDepthHB_*(hid.iphi()-1);
1161  if (hid.ieta()>0) retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()-firstHBRing());
1162  else retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()+lastHBRing()+nEtaHB_);
1163  } else if (hid.subdet()==HcalEndcap) {
1164  retval = HBSize_;
1165  retval+= (hid.depth()-1)+maxDepthHE_*(hid.iphi()-1);
1166  if (hid.ieta()>0) retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()-firstHERing());
1167  else retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()+lastHERing()+nEtaHE_);
1168  } else if (hid.subdet()==HcalOuter) {
1169  retval = HBSize_+HESize_;
1170  if (hid.ieta()>0) retval+=(hid.iphi()-1)+IPHI_MAX*(hid.ieta()-1);
1171  else retval+=(hid.iphi()-1)+IPHI_MAX*(30+hid.ieta());
1172  } else if (hid.subdet()==HcalForward) {
1173  retval = HBSize_+HESize_+HOSize_;
1174  retval+= (hid.depth()-1)+maxDepthHF_*(hid.iphi()-1);
1175  if (hid.ieta()>0) retval+=maxDepthHF_*IPHI_MAX*(hid.ieta()-29);
1176  else retval+=maxDepthHF_*IPHI_MAX*((41+13)+hid.ieta());
1177  } else {
1178  return 0xFFFFFFFu;
1179  }
1180  }
1181 #ifdef EDM_ML_DEBUG
1182  std::cout << "DetId2Dense " << topoVersion_ << " ID " << std::hex
1183  << id.rawId() << std::dec << " | " << HcalDetId(id) << " : "
1184  << std::hex << retval << std::dec << std::endl;
1185 #endif
1186  return retval;
1187 }
unsigned int detId2denseIdPreLS1(const DetId &id) const
int firstHBRing() const
Definition: HcalTopology.h:87
unsigned int HESize_
Definition: HcalTopology.h:215
int lastHBRing() const
Definition: HcalTopology.h:88
unsigned int HBSize_
Definition: HcalTopology.h:214
unsigned int HOSize_
Definition: HcalTopology.h:216
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
static const int IPHI_MAX
Definition: HcalTopology.cc:12
unsigned int HcalTopology::detId2denseIdCALIB ( const DetId id) const

return a linear packed id from CALIB

Definition at line 1095 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().

1095  {
1096  HcalCalibDetId tid(id);
1097  int channel = tid.cboxChannel();
1098  int ieta = tid.ieta();
1099  int iphi = tid.iphi();
1100  int zside = tid.zside();
1101  unsigned int index=0xFFFFFFFFu;
1102 
1103  if (tid.calibFlavor()==HcalCalibDetId::CalibrationBox) {
1104 
1105  HcalSubdetector subDet = tid.hcalSubdet();
1106 
1107  if (subDet==HcalBarrel) {
1108  //std::cout<<"CALIB_HB: ";
1109  //dphi = 4 (18 phi values), 3 channel types (0,1,2), eta = -1 or 1
1110  //total of 18*3*2=108 channels
1111  index = ((iphi+1)/4-1) + 18*channel + 27*(ieta+1);
1112  } else if (subDet==HcalEndcap) {
1113  //std::cout<<"CALIB_HE: ";
1114  //dphi = 4 (18 phi values), 6 channel types (0,1,3,4,5,6), eta = -1 or 1
1115  //total of 18*6*2=216 channels
1116  if (channel>2) channel-=1;
1117  index = ((iphi+1)/4-1) + 18*channel + 54*(ieta+1) + 108;
1118  } else if (subDet==HcalForward) {
1119  //std::cout<<"CALIB_HF: ";
1120  //dphi = 18 (4 phi values), 3 channel types (0,1,8), eta = -1 or 1
1121  if (channel==8) channel = 2;
1122  //total channels 4*3*2=24
1123  index = (iphi-1)/18 + 4*channel + 6*(ieta+1) + 324;
1124  } else if (subDet==HcalOuter) {
1125  //std::cout<<"CALIB_HO: ";
1126  //there are 5 special calib crosstalk channels, one in each ring
1127  if (channel==7) {
1128  index = (ieta+2) + 420;
1129  //for HOM/HOP dphi = 6 (12 phi values), 2 channel types (0,1), eta = -2,-1 or 1,2
1130  //for HO0/YB0 dphi = 12 (6 phi values), 2 channel types (0,1), eta = 0
1131  } else{
1132  if (ieta<0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 348;
1133  else if (ieta>0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 6 + 348;
1134  else index = ((iphi+1)/6-1) + 36*channel + 6*(ieta+2) + 348;
1135  }
1136  } else {
1137  edm::LogWarning("CaloTopology") << "HCAL Det Id not valid!";
1138  index = 0;
1139  }
1140 
1141  } else if (tid.calibFlavor()==HcalCalibDetId::HOCrosstalk) {
1142  //std::cout<<"HX: ";
1143  //for YB0/HO0 phi is grouped in 6 groups of 6 with dphi=2 but the transitions are 1 or 3
1144  // in such a way that the %36 operation yeilds unique values for every iphi
1145  if (abs(ieta)==4) index = ((iphi-1)%36) + (((zside+1)*36)/2) + 72 + 425; //ieta = 1 YB0/HO0;
1146  else index = (iphi-1) + (36*(zside+1)*2) + 425; //ieta = 0 for HO2M/HO1M ieta=2 for HO1P/HO2P;
1147  }
1148  //std::cout << " " << ieta << " " << zside << " " << iphi << " " << depth << " " << index << std::endl;
1149  return index;
1150 }
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 1000 of file HcalTopology.cc.

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

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

1000  {
1001  HcalDetId hid(id);
1002  const int ip (hid.iphi() ) ;
1003  const int ie (hid.ietaAbs() ) ;
1004  const int dp (hid.depth() ) ;
1005  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1006  unsigned int retval = 0xFFFFFFFFu;
1007  if (topoVersion_==0) {
1008  retval=( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf;
1009  } else if (topoVersion_==10) {
1010  retval=(dp-1)+maxDepthHB_*(ip-1);
1011  if (hid.ieta()>0) retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()-firstHBRing());
1012  else retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()+lastHBRing()+nEtaHB_);
1013  }
1014  return retval;
1015 }
int firstHBRing() const
Definition: HcalTopology.h:87
int lastHBRing() const
Definition: HcalTopology.h:88
auto dp
Definition: deltaR.h:22
static const int IPHI_MAX
Definition: HcalTopology.cc:12
unsigned int HcalTopology::detId2denseIdHE ( const DetId id) const

return a linear packed id from HE

Definition at line 1017 of file HcalTopology.cc.

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

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

1017  {
1018  HcalDetId hid(id);
1019  const int ip (hid.iphi() ) ;
1020  const int ie (hid.ietaAbs() ) ;
1021  const int dp (hid.depth() ) ;
1022  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1023  unsigned int retval = 0xFFFFFFFFu;
1024  if (topoVersion_==0) {
1025  retval=( ip - 1 )*8 + ( ip/2 )*20 +
1026  ( ( ie==16 || ie==17 ) ? ie - 16 :
1027  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
1028  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
1029  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
1030  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf;
1031  } else if (topoVersion_==10) {
1032  retval=(dp-1)+maxDepthHE_*(ip-1);
1033  if (hid.ieta()>0) retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()-firstHERing());
1034  else retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()+lastHERing()+nEtaHE_);
1035  }
1036  return retval;
1037 }
auto dp
Definition: deltaR.h:22
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 1055 of file HcalTopology.cc.

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

1055  {
1056  HcalDetId hid(id);
1057  const int ip (hid.iphi() ) ;
1058  const int ie (hid.ietaAbs() ) ;
1059  const int dp (hid.depth() ) ;
1060  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1061 
1062  unsigned int retval = 0xFFFFFFFFu;
1063  if (topoVersion_==0) {
1064  retval = ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
1065  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf;
1066  } else if (topoVersion_==10) {
1067  retval=dp-1+2*(ip-1);
1068  if (hid.ieta()>0) retval+=maxDepthHF_*IPHI_MAX*(hid.ieta()-29);
1069  else retval+=maxDepthHF_*IPHI_MAX*((41+13)+hid.ieta());
1070  }
1071  return retval;
1072 }
auto dp
Definition: deltaR.h:22
static const int IPHI_MAX
Definition: HcalTopology.cc:12
unsigned int HcalTopology::detId2denseIdHO ( const DetId id) const

return a linear packed id from HO

Definition at line 1039 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().

1039  {
1040  HcalDetId hid(id);
1041  const int ip (hid.iphi() ) ;
1042  const int ie (hid.ietaAbs() ) ;
1043  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1044 
1045  unsigned int retval = 0xFFFFFFFFu;
1046  if (topoVersion_==0) {
1047  retval=( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf;
1048  } else if (topoVersion_==10) {
1049  if (hid.ieta()>0) retval=(ip-1)+IPHI_MAX*(hid.ieta()-1);
1050  else retval=(ip-1)+IPHI_MAX*(30+hid.ieta());
1051  }
1052  return retval;
1053 }
static const int IPHI_MAX
Definition: HcalTopology.cc:12
unsigned int HcalTopology::detId2denseIdHT ( const DetId id) const

return a linear packed id from HT

Definition at line 1074 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().

1074  {
1075  HcalTrigTowerDetId tid(id);
1076  int zside = tid.zside();
1077  unsigned int ietaAbs = tid.ietaAbs();
1078  unsigned int iphi = tid.iphi();
1079  unsigned int ivers = tid.version();
1080 
1081  unsigned int index;
1082  if (ivers == 0) {
1083  if ((iphi-1)%4==0) index = (iphi-1)*32 + (ietaAbs-1) - (12*((iphi-1)/4));
1084  else index = (iphi-1)*28 + (ietaAbs-1) + (4*(((iphi-1)/4)+1));
1085  if (zside == -1) index += kHThalf;
1086  } else {
1087  index = kHTSizePreLS1;
1088  if (zside == -1) index += ((kHTSizePhase1-kHTSizePreLS1)/2);
1089  index += (36 * (ietaAbs - 30) + ((iphi - 1)/2));
1090  }
1091 
1092  return index;
1093 }
int zside(DetId const &)
unsigned int HcalTopology::detId2denseIdPreLS1 ( const DetId id) const
private

Definition at line 973 of file HcalTopology.cc.

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

Referenced by detId2denseId(), and idBack().

973  {
974 
975  HcalDetId hid(id);
976  const HcalSubdetector sd (hid.subdet() ) ;
977  const int ip (hid.iphi() ) ;
978  const int ie (hid.ietaAbs() ) ;
979  const int dp (hid.depth() ) ;
980  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
981  unsigned int retval = ( ( sd == HcalBarrel ) ?
982  ( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf :
983  ( ( sd == HcalEndcap ) ?
984  2*kHBhalf + ( ip - 1 )*8 + ( ip/2 )*20 +
985  ( ( ie==16 || ie==17 ) ? ie - 16 :
986  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
987  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
988  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
989  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf :
990  ( ( sd == HcalOuter ) ?
991  2*kHBhalf + 2*kHEhalf + ( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf :
992  ( ( sd == HcalForward ) ?
993  2*kHBhalf + 2*kHEhalf + 2*kHOhalf +
994  ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
995  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf : 0xFFFFFFFFu ) ) ) ) ;
996  return retval;
997 }
HcalSubdetector
Definition: HcalAssistant.h:31
auto dp
Definition: deltaR.h:22
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 329 of file HcalTopology.cc.

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

Referenced by producerTag().

329  {
330  HcalDetId neighbor = id;
331  std::vector<DetId> vNeighborsDetId;
332  if (decrementDepth(neighbor)) {
333  if (neighbor.oldFormat()) neighbor.changeForm();
334  vNeighborsDetId.emplace_back(neighbor);
335  }
336  return vNeighborsDetId;
337 }
bool decrementDepth(HcalDetId &id) const
bool oldFormat() const
Definition: HcalDetId.h:50
void changeForm()
Definition: HcalDetId.cc:138
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 279 of file HcalTopology.cc.

References decIEta(), and mps_fire::i.

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

279  {
280  std::vector<DetId> vNeighborsDetId;
281  HcalDetId neighbors[2];
282  for (int i=0;i<decIEta(HcalDetId(id),neighbors);i++) {
283  if (neighbors[i].oldFormat()) neighbors[i].changeForm();
284  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
285  }
286  return vNeighborsDetId;
287 }
int decIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:18
double HcalTopology::etaMax ( HcalSubdetector  subdet) const

Definition at line 937 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().

937  {
938  double eta(0);
939  switch (subdet) {
940  case(HcalBarrel):
941  if (lastHBRing_ < (int)(etaTable.size())) eta=etaTable[lastHBRing_];
942  break;
943  case(HcalEndcap):
944  if (lastHERing_ < (int)(etaTable.size()) && nEtaHE_ > 0) eta=etaTable[lastHERing_];
945  break;
946  case(HcalOuter):
947  if (lastHORing_ < (int)(etaTable.size())) eta=etaTable[lastHORing_];
948  break;
949  case(HcalForward):
950  if (!etaTableHF.empty()) eta=etaTableHF[etaTableHF.size()-1];
951  break;
952  default: eta=0;
953  }
954  return eta;
955 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:222
std::vector< double > etaTable
Definition: HcalTopology.h:222
std::pair< double, double > HcalTopology::etaRange ( HcalSubdetector  subdet,
int  ieta 
) const

Definition at line 956 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().

957  {
958  int ieta = (keta > 0) ? keta : -keta;
959  if (subdet == HcalForward) {
960  if (ieta >= firstHFRing_) {
961  unsigned int ii = (unsigned int)(ieta-firstHFRing_);
962  if (ii+1 < etaTableHF.size())
963  return std::pair<double,double>(etaTableHF[ii],etaTableHF[ii+1]);
964  }
965  } else {
966  int ietal = (mode_==HcalTopologyMode::LHC && ieta == lastHERing_-1) ? (ieta+1) : ieta;
967  if ((ietal < (int)(etaTable.size())) && (ieta > 0))
968  return std::pair<double,double>(etaTable[ieta-1],etaTable[ietal]);
969  }
970  return std::pair<double,double>(0,0);
971 }
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:196
std::vector< double > etaTableHF
Definition: HcalTopology.h:222
std::vector< double > etaTable
Definition: HcalTopology.h:222
ii
Definition: cuy.py:588
int HcalTopology::etaRing ( HcalSubdetector  subdet,
double  eta 
) const

eta and phi index from eta, phi values

Definition at line 836 of file HcalTopology.cc.

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

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

836  {
837  int etaring = firstHBRing_;
838  if (bc == HcalForward) {
839  etaring = firstHFRing_;
840  for (unsigned int k=0; k<etaTableHF.size()-1; ++k) {
841  if (abseta < etaTableHF[k+1]) {
842  etaring += k;
843  break;
844  }
845  }
846  } else {
847  for (unsigned int k=0; k<etaTable.size()-1; ++k) {
848  if (abseta < etaTable[k+1]) {
849  etaring += k;
850  break;
851  }
852  }
853  if (abseta >= etaTable[etaTable.size()-1]) etaring = lastHERing_;
854  }
855  return etaring;
856 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:222
std::vector< double > etaTable
Definition: HcalTopology.h:222
int k[5][pyjets_maxn]
void HcalTopology::exclude ( const HcalDetId id)

Add a cell to exclusion list

Definition at line 262 of file HcalTopology.cc.

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

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

262  {
263  std::vector<HcalDetId>::iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
264  if (i==exclusionList_.end() || *i!=id) {
265  exclusionList_.insert(i,id);
266  }
267 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:193
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 339 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().

339  {
340 
341  bool exed=false;
342  // first, check the full detector exclusions... (fast)
343  switch (subdet) {
344  case(HcalBarrel): exed=excludeHB_; break;
345  case(HcalEndcap): exed=excludeHE_; break;
346  case(HcalOuter): exed=excludeHO_; break;
347  case(HcalForward): exed=excludeHF_; break;
348  default: exed=false;
349  }
350  if (exed) return 0; // if the whole detector is excluded...
351 
352  int ieta_l=std::min(ieta1,ieta2);
353  int ieta_h=std::max(ieta1,ieta2);
354  int iphi_l=std::min(iphi1,iphi2);
355  int iphi_h=std::max(iphi1,iphi2);
356  int depth_l=std::min(depth1,depth2);
357  int depth_h=std::max(depth1,depth2);
358 
359  int n=0;
360  for (int ieta=ieta_l; ieta<=ieta_h; ieta++)
361  for (int iphi=iphi_l; iphi<=iphi_h; iphi++)
362  for (int depth=depth_l; depth<=depth_h; depth++) {
363  HcalDetId id(subdet,ieta,iphi,depth);
364  if (validRaw(id)) { // use 'validRaw' to include check validity in "uncut" detector
365  exclude(id);
366  n++;
367  }
368  }
369  return n;
370 }
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 269 of file HcalTopology.cc.

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

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

269  {
270  switch (subdet) {
271  case(HcalBarrel): excludeHB_=true; break;
272  case(HcalEndcap): excludeHE_=true; break;
273  case(HcalOuter): excludeHO_=true; break;
274  case(HcalForward): excludeHF_=true; break;
275  default: break;
276  }
277 }
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:219
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 895 of file HcalTopology.cc.

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

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

897  {
898  // if it doesn't exist, return the first entry with a lower index. So if we only
899  // have entries for 1 and 17, any input from 1-16 should return the entry for ring 1
900  SegmentationMap::const_iterator pos;
901  if (!one) {
902  pos = depthSegmentation_.upper_bound(ring);
903  if (pos == depthSegmentation_.begin()) {
904  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
905  }
906  } else {
907  pos = depthSegmentationOne_.upper_bound(ring);
908  if (pos == depthSegmentationOne_.begin()) {
909  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
910  }
911  }
912  --pos;
913  // pos now refers to the last element with key <= ring.
914  readoutDepths = pos->second;
915 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:230
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:231
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:214
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:215
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:216
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:218
bool HcalTopology::getMergePositionFlag ( ) const
inline
unsigned int HcalTopology::getNumberOfShapes ( ) const
inline

Definition at line 164 of file HcalTopology.h.

References numberOfShapes_.

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

164 { return numberOfShapes_; }
unsigned int numberOfShapes_
Definition: HcalTopology.h:220
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:191
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 596 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().

596  {
597  int n=1;
598  int aieta=id.ietaAbs();
599 
600  if (aieta==firstHEDoublePhiRing()-1 && (id.iphi()%2)==0)
601  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),id.iphi()-1,id.depth());
602  else if (aieta==firstHFQuadPhiRing()-1 && ((id.iphi()+1)%4)!=0)
603  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),((id.iphi()==1)?(71):(id.iphi()-2)),id.depth());
604  else if (aieta==firstHEQuadPhiRing()-1 && ((id.iphi()+1)%4)!=0)
605  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),((id.iphi()==1)?(71):(id.iphi()-2)),id.depth());
606  else if (aieta==lastHBRing())
607  neighbors[0]=HcalDetId(HcalEndcap,(aieta+1)*id.zside(),id.iphi(),1);
608  else if (aieta==lastHERing())
609  neighbors[0]=HcalDetId(HcalForward,etaHE2HF_*id.zside(),id.iphi(),1);
610  else
611  neighbors[0]=HcalDetId(id.subdet(),(aieta+1)*id.zside(),id.iphi(),id.depth());
612 
613  if (!valid(neighbors[0])) n=0;
614  return n;
615 }
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 585 of file HcalTopology.cc.

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

Referenced by producerTag(), and west().

585  {
586  if (id.zside()==1) return incAIEta(id,neighbors);
587  else return decAIEta(id,neighbors);
588 }
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 510 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(), and producerTag().

510  {
511  bool ok=valid(id);
512  if (ok) {
513  switch (id.subdet()) {
514  case (HcalBarrel):
515  case (HcalOuter):
516  if (id.iphi()==IPHI_MAX) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
517  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+1,id.depth());
518  break;
519  case (HcalEndcap):
520  if (id.ietaAbs()>=firstHEQuadPhiRing()) {
521  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),3,id.depth());
522  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+4,id.depth());
523  } else if (id.ietaAbs()>=firstHEDoublePhiRing()) {
524  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
525  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+2,id.depth());
526  } else {
527  if (id.iphi()==maxPhiHE_) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
528  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+1,id.depth());
529  }
530  break;
531  case (HcalForward):
532  if (id.ietaAbs()>=firstHFQuadPhiRing()) {
533  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),3,id.depth());
534  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+4,id.depth());
535  } else {
536  if (id.iphi()==IPHI_MAX-1) neighbor=HcalDetId(id.subdet(),id.ieta(),1,id.depth());
537  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()+2,id.depth());
538  }
539  if (!validRaw(neighbor)) ok = false;
540  break;
541  default: ok=false;
542  }
543  }
544  return ok;
545 }
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:12
bool HcalTopology::incrementDepth ( HcalDetId id) const

Get the detector behind this one

Definition at line 714 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().

714  {
715 
716  HcalSubdetector subdet = detId.subdet();
717  int ieta = detId.ieta();
718  int etaRing = detId.ietaAbs();
719  int depth = detId.depth();
720  int iphi = detId.iphi();
721  int zside = detId.zside();
722  int nDepthBins, startingBin;
723  depthBinInformation(subdet, etaRing, iphi, zside, nDepthBins, startingBin);
724 
725  // see if the new depth bin exists
726  ++depth;
727  if (depth >= (startingBin+nDepthBins)) {
728  // handle on a case-by-case basis
729  if (subdet == HcalBarrel && etaRing < lastHORing()) {
730  // HO
731  subdet = HcalOuter;
732  depth = 4;
733  } else if (subdet == HcalBarrel && etaRing == lastHBRing()) {
734  // overlap
735  subdet = HcalEndcap;
737  depth = hcons_->getDepthEta16(2,iphi,zside);
738  } else if (subdet == HcalEndcap && etaRing == lastHERing()-1 &&
740  // guard ring HF29 is behind HE 28
741  subdet = HcalForward;
742  (ieta > 0) ? ++ieta : --ieta;
743  depth = 1;
744  } else if (subdet == HcalEndcap && etaRing == lastHERing() &&
746  // split cells go to bigger granularity. Ring 29 -> 28
747  (ieta > 0) ? --ieta : ++ieta;
748  } else {
749  // no more chances
750  detId = HcalDetId();
751  return false;
752  }
753  }
754  detId = HcalDetId(subdet, ieta, iphi, depth);
755  return validRaw(detId);
756 }
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:196
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:191
bool HcalTopology::isBH ( ) const
inline

Definition at line 165 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::isBH().

Referenced by CaloTowerTopology::CaloTowerTopology().

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

Definition at line 244 of file HcalTopology.cc.

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

Referenced by idBack(), and validHcal().

244  {
245  bool exed=false;
246  // first, check the full detector exclusions... (fast)
247  switch (id.subdet()) {
248  case(HcalBarrel): exed=excludeHB_; break;
249  case(HcalEndcap): exed=excludeHE_; break;
250  case(HcalOuter): exed=excludeHO_; break;
251  case(HcalForward): exed=excludeHF_; break;
252  default: exed=false;
253  }
254  // next, check the list (slower)
255  if (!exed && !exclusionList_.empty()) {
256  std::vector<HcalDetId>::const_iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
257  if (i!=exclusionList_.end() && *i==id) exed=true;
258  }
259  return exed;
260 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:193
int HcalTopology::lastHBRing ( ) const
inline
int HcalTopology::lastHERing ( ) const
inline
int HcalTopology::lastHFRing ( ) const
inline
int HcalTopology::lastHORing ( ) const
inline
int HcalTopology::maxDepth ( HcalSubdetector  subdet) const

Definition at line 829 of file HcalTopology.cc.

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

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

829  {
830  if (bc == HcalBarrel) return maxDepthHB_;
831  else if (bc == HcalEndcap) return maxDepthHE_;
832  else if (bc == HcalForward) return maxDepthHF_;
833  else return 4;
834 }
int HcalTopology::maxDepthHB ( ) const
inline

Definition at line 145 of file HcalTopology.h.

References maxDepthHB_.

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:191
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 1297 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().

1297  {
1298  return HBSize_+HESize_+HOSize_+HFSize_;
1299 }
unsigned int HESize_
Definition: HcalTopology.h:215
unsigned int HFSize_
Definition: HcalTopology.h:217
unsigned int HBSize_
Definition: HcalTopology.h:214
unsigned int HOSize_
Definition: HcalTopology.h:216
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 299 of file HcalTopology.cc.

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

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

299  {
300  std::vector<DetId> vNeighborsDetId;
301  HcalDetId neighbor;
302  if (incIPhi(HcalDetId(id),neighbor)) {
303  if (neighbor.oldFormat()) neighbor.changeForm();
304  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
305  }
306  return vNeighborsDetId;
307 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
bool incIPhi(const HcalDetId &id, HcalDetId &neighbor) const
bool oldFormat() const
Definition: HcalDetId.h:50
Definition: DetId.h:18
void changeForm()
Definition: HcalDetId.cc:138
int HcalTopology::nPhiBins ( int  etaRing) const

how many phi segments in this ring

Definition at line 805 of file HcalTopology.cc.

References doublePhiBins_, dPhiTable, firstHBRing_, firstHEDoublePhiRing(), firstHEQuadPhiRing(), firstHFQuadPhiRing(), HcalDDDRecConstants::getEtaRange(), hcons_, M_PI, and singlePhiBins_.

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

805  {
806  int lastPhiBin=singlePhiBins_;
807  if (etaRing>= firstHFQuadPhiRing()) lastPhiBin=doublePhiBins_/2;
808  else if (etaRing>= firstHEQuadPhiRing()) lastPhiBin=doublePhiBins_/2;
809  else if (etaRing>= firstHEDoublePhiRing()) lastPhiBin=doublePhiBins_;
810  if (hcons_) {
811  if (etaRing>=hcons_->getEtaRange(1).first &&
812  etaRing<=hcons_->getEtaRange(1).second)
813  lastPhiBin = (int)((2*M_PI+0.001)/dPhiTable[etaRing-firstHBRing_]);
814  }
815  return lastPhiBin;
816 }
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
#define M_PI
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
std::vector< double > dPhiTable
Definition: HcalTopology.h:222
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:191
int HcalTopology::nPhiBins ( HcalSubdetector  subdet,
int  etaRing 
) const

Definition at line 818 of file HcalTopology.cc.

References dPhiTable, dPhiTableHF, firstHBRing_, firstHFRing_, HcalForward, createfilelist::int, and M_PI.

818  {
819  static const double twopi = M_PI+M_PI;
820  int lastPhiBin;
821  if (bc == HcalForward) {
822  lastPhiBin = (int)((twopi+0.001)/dPhiTableHF[etaRing-firstHFRing_]);
823  } else {
824  lastPhiBin = (int)((twopi+0.001)/dPhiTable[etaRing-firstHBRing_]);
825  }
826  return lastPhiBin;
827 }
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:222
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
#define M_PI
std::vector< double > dPhiTable
Definition: HcalTopology.h:222
int HcalTopology::phiBin ( HcalSubdetector  subdet,
int  etaRing,
double  phi 
) const

Definition at line 858 of file HcalTopology.cc.

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

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

858  {
859  static const double twopi = M_PI+M_PI;
860  //put phi in correct range (0->2pi)
861  int index(0);
862  if (bc == HcalBarrel) {
863  index = (etaring-firstHBRing_);
864  phi -= phioff[0];
865  } else if (bc == HcalEndcap) {
866  index = (etaring-firstHBRing_);
867  phi -= phioff[1];
868  } else if (bc == HcalForward) {
869  index = (etaring-firstHFRing_);
870  if (index < (int)(dPhiTableHF.size())) {
871  if (unitPhiHF[index] > 2) phi -= phioff[4];
872  else phi -= phioff[2];
873  }
874  }
875  if (phi<0.0) phi += twopi;
876  if (phi>twopi) phi -= twopi;
877  int phibin(1), unit(1);
878  if (bc == HcalForward) {
879  if (index < (int)(dPhiTableHF.size())) {
880  unit = unitPhiHF[index];
881  phibin = static_cast<int>(phi/dPhiTableHF[index])+1;
882  }
883  } else {
884  if (index < (int)(dPhiTable.size())) {
885  phibin = static_cast<int>(phi/dPhiTable[index])+1;
886  unit = unitPhi[index];
887  }
888  }
889  int iphi(phibin);
890  if (unit == 2) iphi = (phibin-1)*2+1;
891  else if (unit == 4) iphi = (phibin-1)*4+3;
892  return iphi;
893 }
std::vector< int > unitPhiHF
Definition: HcalTopology.h:224
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:222
std::vector< int > unitPhi
Definition: HcalTopology.h:224
#define M_PI
std::vector< double > phioff
Definition: HcalTopology.h:223
std::vector< double > dPhiTable
Definition: HcalTopology.h:222
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 927 of file HcalTopology.cc.

References egammaForCoreTracking_cff::depth, and getDepthSegmentation().

Referenced by mergedDepthList29().

929  {
930  std::vector<int> readoutDepths;
931  getDepthSegmentation(ring, readoutDepths, one);
932  int d1 = std::lower_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
933  int d2 = std::upper_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
934  return std::pair<int, int>(d1, d2);
935 }
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 917 of file HcalTopology.cc.

References depthSegmentation_, depthSegmentationOne_, and relativeConstraints::ring.

Referenced by HcalTopology(), and mergedDepthList29().

919  {
920  if (one) {
921  depthSegmentationOne_[ring] = readoutDepths;
922  } else {
923  depthSegmentation_[ring] = readoutDepths;
924  }
925 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:230
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:231
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 309 of file HcalTopology.cc.

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

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

309  {
310  std::vector<DetId> vNeighborsDetId;
311  HcalDetId neighbor;
312  if (decIPhi(HcalDetId(id),neighbor)) {
313  if (neighbor.oldFormat()) neighbor.changeForm();
314  vNeighborsDetId.emplace_back(DetId(neighbor.rawId()));
315  }
316  return vNeighborsDetId;
317 }
bool decIPhi(const HcalDetId &id, HcalDetId &neighbor) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
bool oldFormat() const
Definition: HcalDetId.h:50
Definition: DetId.h:18
void changeForm()
Definition: HcalDetId.cc:138
int HcalTopology::topoVersion ( ) const
overridevirtual

return a version which identifies the given topology

Reimplemented from CaloSubdetectorTopology.

Definition at line 1301 of file HcalTopology.cc.

References topoVersion_.

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

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

Definition at line 171 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::unmergeDepthDetId().

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

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

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

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

319  {
320  HcalDetId neighbor = id;
321  std::vector<DetId> vNeighborsDetId;
322  if (incrementDepth(neighbor)) {
323  if (neighbor.oldFormat()) neighbor.changeForm();
324  vNeighborsDetId.emplace_back(neighbor);
325  }
326  return vNeighborsDetId;
327 }
bool oldFormat() const
Definition: HcalDetId.h:50
bool incrementDepth(HcalDetId &id) const
void changeForm()
Definition: HcalDetId.cc:138
bool HcalTopology::valid ( const DetId id) const
overridevirtual
bool HcalTopology::validDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 199 of file HcalTopology.cc.

References validHcal().

Referenced by producerTag().

200  {
201  return validHcal(HcalDetId(subdet,ieta,iphi,depth));
202 }
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 398 of file HcalTopology.cc.

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

Referenced by idBack().

398  {
399  const HcalSubdetector sd (id.subdet());
400  const int ie (id.ietaAbs());
401  const int ip (id.iphi());
402  const int dp (id.depth());
403 
404  return ( ( ip >= 1 ) &&
405  ( ip <= IPHI_MAX ) &&
406  ( dp >= 1 ) &&
407  ( ie >= 1 ) &&
408  ( ( ( sd == HcalBarrel ) &&
409  ( ( ( ie <= 14 ) &&
410  ( dp == 1 ) ) ||
411  ( ( ( ie == 15 ) || ( ie == 16 ) ) &&
412  ( dp <= 2 ) ) ) ) ||
413  ( ( sd == HcalEndcap ) &&
414  ( ( ( ie == firstHERing() ) &&
415  ( dp == 3 ) ) ||
416  ( ( ie == 17 ) &&
417  ( dp == 1 ) ) ||
418  ( ( ie >= 18 ) &&
419  ( ie <= 20 ) &&
420  ( dp <= 2 ) ) ||
421  ( ( ie >= 21 ) &&
422  ( ie <= 26 ) &&
423  ( dp <= 2 ) &&
424  ( ip%2 == 1 ) ) ||
425  ( ( ie >= 27 ) &&
426  ( ie <= 28 ) &&
427  ( dp <= 3 ) &&
428  ( ip%2 == 1 ) ) ||
429  ( ( ie == 29 ) &&
430  ( dp <= 2 ) &&
431  ( ip%2 == 1 ) ) ) ) ||
432  ( ( sd == HcalOuter ) &&
433  ( ie <= 15 ) &&
434  ( dp == 4 ) ) ||
435  ( ( sd == HcalForward ) &&
436  ( dp <= 2 ) &&
437  ( ( ( ie >= firstHFRing() ) &&
438  ( ie < firstHFQuadPhiRing() ) &&
439  ( ip%2 == 1 ) ) ||
440  ( ( ie >= firstHFQuadPhiRing() ) &&
441  ( ie <= lastHFRing() ) &&
442  ( ip%4 == 3 ) ) ) ) ) ) ;
443 }
int firstHFRing() const
Definition: HcalTopology.h:91
int lastHFRing() const
Definition: HcalTopology.h:92
HcalSubdetector
Definition: HcalAssistant.h:31
auto dp
Definition: deltaR.h:22
double sd
int firstHERing() const
Definition: HcalTopology.h:89
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
static const int IPHI_MAX
Definition: HcalTopology.cc:12
bool HcalTopology::validHcal ( const HcalDetId id) const

Is this a valid cell id?

Definition at line 194 of file HcalTopology.cc.

References isExcluded(), and validRaw().

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

194  {
195  // check the raw rules
196  return validRaw(id) && !isExcluded(id);
197 }
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 228 of file HcalTopology.cc.

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

228  {
229  /* original logic show here because condensed form below is rather terse
230  // check the raw rules
231  bool ok = validHcal(id);
232  if (flag == 0) { // This is all what is needed
233  } else if (flag == 1) { // See if it is in the to be merged list and merged list
234  if (hcons_->isPlan1MergedId(id)) ok = true;
235  else if (hcons_->isPlan1ToBeMergedId(id)) ok = false;
236  } else if (!ok) {
237  ok = hcons_->isPlan1MergedId(id);
238  }
239  return ok;
240  */
241  return (flag>0 and hcons_->isPlan1MergedId(id)) or ((flag!=1 or !hcons_->isPlan1ToBeMergedId(id)) and validHcal(id));
242 }
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:191
bool HcalTopology::validHT ( const HcalTrigTowerDetId id) const

Definition at line 204 of file HcalTopology.cc.

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

204  {
205 
206  if (id.iphi()<1 || id.iphi()>IPHI_MAX || id.ieta()==0) return false;
207  if (id.depth() != 0) return false;
208  if (id.version()==0) {
209  if (id.ietaAbs() > 28) {
212  if ((id.iphi() % 4) != 1) return false;
213  if (id.ietaAbs() > 32) return false;
214  }
215  } else if (id.version()==1) {
217  if (id.ietaAbs()<30 || id.ietaAbs()>41) return false;
218  if (id.ietaAbs()>29 && ((id.iphi()%2)==0)) return false;
219  if (id.ietaAbs()>39 && ((id.iphi()%4)!=3)) return false;
220  } else if (id.version()>1) {
221  // only versions 0 and 1 are supported
222  return false;
223  }
224 
225  return true;
226 }
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:197
static const int IPHI_MAX
Definition: HcalTopology.cc:12
bool HcalTopology::validRaw ( const HcalDetId id) const
private

Is this a valid cell id?

Definition at line 446 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().

446  {
447  bool ok=true;
448  int ieta=id.ieta();
449  int aieta=id.ietaAbs();
450  int depth=id.depth();
451  int iphi=id.iphi();
452  int zside=id.zside();
453  HcalSubdetector subdet=id.subdet();
454  int maxPhi = (subdet==HcalEndcap) ? maxPhiHE_ : IPHI_MAX;
455  if ((ieta==0 || iphi<=0 || iphi>maxPhi) || aieta>maxEta_) ok = false; // outer limits
456 
457  if (ok) {
458  if (subdet==HcalBarrel) {
460  if ((aieta>lastHBRing()) ||
461  (depth>hcons_->getMaxDepth(0,aieta,iphi,zside)) ||
462  (depth<hcons_->getMinDepth(0,aieta,iphi,zside))) ok=false;
463  } else {
464  if (aieta>lastHBRing() || depth>2 || (aieta<=14 && depth>1)) ok=false;
465  }
466  } else if (subdet==HcalEndcap) {
468  if ((depth>hcons_->getMaxDepth(1,aieta,iphi,zside)) ||
469  (depth<hcons_->getMinDepth(1,aieta,iphi,zside)) ||
470  (aieta<firstHERing()) || (aieta>lastHERing())) {
471  ok = false;
472  } else {
473  for (const auto & i : etaBinsHE_) {
474  if (aieta == i.ieta) {
475  if (aieta >= firstHEDoublePhiRing() && (iphi%2)==0) ok=false;
476  if (aieta >= firstHEQuadPhiRing() && (iphi%4)!=3) ok=false;
477  if (aieta+1 == hcons_->getNoff(1)) {
478  if (depth < 1) ok = false;
479  } else {
480  if (depth < i.depthStart) ok = false;
481  }
482  break;
483  }
484  }
485  }
486  } else {
487  if (depth>hcons_->getMaxDepth(1,aieta,iphi,zside) ||
488  aieta<firstHERing() || aieta>lastHERing() ||
489  (aieta==firstHERing() && depth!=hcons_->getDepthEta16(2,iphi,zside)) ||
490  (aieta==17 && depth!=1 && mode_!=HcalTopologyMode::H2) || // special case at H2
491  (((aieta>=17 && aieta<firstHETripleDepthRing()) ||
492  aieta==lastHERing()) && depth>2) ||
493  (aieta>=firstHEDoublePhiRing() && (iphi%2)==0)) ok=false;
494  }
495  } else if (subdet==HcalOuter) {
496  if (aieta>lastHORing() || iphi>IPHI_MAX || depth!=4) ok=false;
497  } else if (subdet==HcalForward) {
498  if (aieta<firstHFRing() || aieta>lastHFRing() || ((iphi%2)==0) ||
499  (depth>hcons_->maxHFDepth(ieta,iphi)) ||
500  (aieta>=firstHFQuadPhiRing() && ((iphi+1)%4)!=0)) ok=false;
501  } else if (subdet==HcalTriggerTower) {
502  ok=validHT(HcalTrigTowerDetId(id.rawId()));
503  } else {
504  ok=false;
505  }
506  }
507  return ok;
508 }
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:204
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:196
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:191
static const int IPHI_MAX
Definition: HcalTopology.cc:12
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 289 of file HcalTopology.cc.

References mps_fire::i, and incIEta().

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

289  {
290  std::vector<DetId> vNeighborsDetId;
291  HcalDetId neighbors[2];
292  for (int i=0;i<incIEta(HcalDetId(id),neighbors);i++) {
293  if (neighbors[i].oldFormat()) neighbors[i].changeForm();
294  vNeighborsDetId.emplace_back(DetId(neighbors[i].rawId()));
295  }
296  return vNeighborsDetId;
297 }
int incIEta(const HcalDetId &id, HcalDetId neighbors[2]) const
Definition: DetId.h:18
bool HcalTopology::withSpecialRBXHBHE ( ) const
inline

Definition at line 168 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::withSpecialRBXHBHE().

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

Member Data Documentation

unsigned int HcalTopology::CALIBSize_
private

Definition at line 219 of file HcalTopology.h.

Referenced by getCALIBSize().

SegmentationMap HcalTopology::depthSegmentation_
private

Definition at line 230 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

SegmentationMap HcalTopology::depthSegmentationOne_
private

Definition at line 231 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

int HcalTopology::doublePhiBins_
private

Definition at line 209 of file HcalTopology.h.

Referenced by doublePhiBins(), and nPhiBins().

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

Definition at line 222 of file HcalTopology.h.

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

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

Definition at line 222 of file HcalTopology.h.

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

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

Definition at line 204 of file HcalTopology.h.

Referenced by decrementDepth(), and HcalTopology().

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

Definition at line 204 of file HcalTopology.h.

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

int HcalTopology::etaHE2HF_
private

Definition at line 211 of file HcalTopology.h.

Referenced by HcalTopology(), and incAIEta().

int HcalTopology::etaHF2HE_
private

Definition at line 211 of file HcalTopology.h.

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

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

Definition at line 222 of file HcalTopology.h.

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

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

Definition at line 222 of file HcalTopology.h.

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

bool HcalTopology::excludeHB_
private

Definition at line 194 of file HcalTopology.h.

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

bool HcalTopology::excludeHE_
private

Definition at line 194 of file HcalTopology.h.

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

bool HcalTopology::excludeHF_
private

Definition at line 194 of file HcalTopology.h.

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

bool HcalTopology::excludeHO_
private

Definition at line 194 of file HcalTopology.h.

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

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

Definition at line 193 of file HcalTopology.h.

Referenced by exclude(), and isExcluded().

int HcalTopology::firstHBRing_
private

Definition at line 199 of file HcalTopology.h.

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

int HcalTopology::firstHEDoublePhiRing_
private

Definition at line 207 of file HcalTopology.h.

Referenced by firstHEDoublePhiRing(), and HcalTopology().

int HcalTopology::firstHEQuadPhiRing_
private

Definition at line 207 of file HcalTopology.h.

Referenced by firstHEQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHERing_
private

Definition at line 200 of file HcalTopology.h.

Referenced by firstHERing(), and HcalTopology().

int HcalTopology::firstHETripleDepthRing_
private

Definition at line 208 of file HcalTopology.h.

Referenced by firstHETripleDepthRing(), and HcalTopology().

int HcalTopology::firstHFQuadPhiRing_
private

Definition at line 207 of file HcalTopology.h.

Referenced by firstHFQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHFRing_
private

Definition at line 201 of file HcalTopology.h.

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

int HcalTopology::firstHORing_
private

Definition at line 202 of file HcalTopology.h.

Referenced by firstHORing(), and HcalTopology().

unsigned int HcalTopology::HBSize_
private

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

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

unsigned int HcalTopology::HFSize_
private

Definition at line 217 of file HcalTopology.h.

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

unsigned int HcalTopology::HOSize_
private

Definition at line 216 of file HcalTopology.h.

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

unsigned int HcalTopology::HTSize_
private

Definition at line 218 of file HcalTopology.h.

Referenced by getHTSize(), and HcalTopology().

int HcalTopology::lastHBRing_
private

Definition at line 199 of file HcalTopology.h.

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

int HcalTopology::lastHERing_
private

Definition at line 200 of file HcalTopology.h.

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

int HcalTopology::lastHFRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by HcalTopology(), and lastHFRing().

int HcalTopology::lastHORing_
private

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

Referenced by HcalTopology(), and validRaw().

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

Definition at line 192 of file HcalTopology.h.

Referenced by getMergePositionFlag().

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

Definition at line 205 of file HcalTopology.h.

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

unsigned int HcalTopology::numberOfShapes_
private

Definition at line 220 of file HcalTopology.h.

Referenced by getNumberOfShapes(), and HcalTopology().

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

Definition at line 223 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

int HcalTopology::singlePhiBins_
private

Definition at line 209 of file HcalTopology.h.

Referenced by nPhiBins(), and singlePhiBins().

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

Definition at line 197 of file HcalTopology.h.

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

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

Definition at line 224 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

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

Definition at line 224 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().