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
 
virtual DetId denseId2detId (unsigned int) const
 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...
 
virtual unsigned int detId2denseId (const DetId &id) const
 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
 
virtual std::vector< DetIddown (const DetId &id) const
 
virtual std::vector< DetIdeast (const DetId &id) const
 
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
 
HcalDetId mergedDepthDetId (const HcalDetId &id) const
 
HcalTopologyMode::Mode mode () const
 
virtual unsigned int ncells () const
 return a count of valid cells (for dense indexing use) More...
 
virtual std::vector< DetIdnorth (const DetId &id) const
 
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
 
virtual std::vector< DetIdsouth (const DetId &id) const
 
virtual int topoVersion () const
 return a version which identifies the given topology More...
 
HcalTopologyMode::TriggerMode triggerMode () const
 
void unmergeDepthDetId (const HcalDetId &id, std::vector< HcalDetId > &ids) const
 
virtual std::vector< DetIdup (const DetId &id) const
 
virtual bool valid (const DetId &id) const
 
bool validDetId (HcalSubdetector subdet, int ieta, int iphi, int depth) const
 
bool validHcal (const HcalDetId &id) const
 
bool validHcal (const HcalDetId &id, const unsigned int flag) const
 
bool validHT (const HcalTrigTowerDetId &id) const
 
virtual std::vector< DetIdwest (const DetId &id) const
 
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 223 of file HcalTopology.h.

Member Enumeration Documentation

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

Definition at line 227 of file HcalTopology.h.

anonymous enum
private
Enumerator
kSizeForDenseIndexingPreLS1 

Definition at line 237 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHBSizePreLS1 

Definition at line 238 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHESizePreLS1 

Definition at line 239 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHOSizePreLS1 

Definition at line 240 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHFSizePreLS1 

Definition at line 241 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePreLS1 

Definition at line 242 of file HcalTopology.h.

anonymous enum
private
Enumerator
kHTSizePhase1 

Definition at line 243 of file HcalTopology.h.

anonymous enum
private
Enumerator
kCALIBSizePreLS1 

Definition at line 244 of file HcalTopology.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file HcalTopology.cc.

References gather_cfg::cout, dPhiTable, dPhiTableHF, stringResolutionProvider_cfi::eta, etaBinsHB_, etaBinsHE_, etaHE2HF_, etaHF2HE_, etaMax(), 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().

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

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

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

Member Function Documentation

const HcalDDDRecConstants* HcalTopology::dddConstants ( ) const
inline

Definition at line 161 of file HcalTopology.h.

References hcons_.

Referenced by CaloTruthAccumulator::beginLuminosityBlock(), HcalGeometry::getClosestCell(), CaloTPGTranscoderULUT::setup(), and HcaluLUTTPGCoder::update().

161 {return hcons_;}
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
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 617 of file HcalTopology.cc.

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

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

617  {
618  int n=1;
619  int aieta=id.ietaAbs();
620 
621  if (aieta==firstHEDoublePhiRing()) {
622  n=2;
623  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
624  neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+1,id.depth());
625  } else if (aieta==firstHFQuadPhiRing()) {
626  n=2;
627  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
628  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
629  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
630  } else if (aieta==firstHEQuadPhiRing()) {
631  n=2;
632  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
633  if (id.iphi()==IPHI_MAX-1) neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),1,id.depth());
634  else neighbors[1]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi()+2,id.depth());
635  } else if (aieta==1) {
636  neighbors[0]=HcalDetId(id.subdet(),-aieta*id.zside(),id.iphi(),id.depth());
637  } else if (aieta==firstHERing()) {
638  neighbors[0]=HcalDetId(HcalBarrel,(aieta-1)*id.zside(),id.iphi(),1);
639  } else if (aieta==firstHFRing()) {
640  neighbors[0]=HcalDetId(HcalEndcap,etaHF2HE_*id.zside(),id.iphi(),1);
641  } else
642  neighbors[0]=HcalDetId(id.subdet(),(aieta-1)*id.zside(),id.iphi(),id.depth());
643 
644  if (!valid(neighbors[0]) && n==2) {
645  if (!valid(neighbors[1])) n=0;
646  else {
647  n=1;
648  neighbors[0]=neighbors[1];
649  }
650  }
651  if (n==2 && !valid(neighbors[1])) n=1;
652  if (n==1 && !valid(neighbors[0])) n=0;
653 
654  return n;
655 }
int firstHFRing() const
Definition: HcalTopology.h:91
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
int firstHERing() const
Definition: HcalTopology.h:89
virtual bool valid(const DetId &id) const
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
static const int IPHI_MAX
Definition: HcalTopology.cc:13
int HcalTopology::decIEta ( const HcalDetId id,
HcalDetId  neighbors[2] 
) const

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

Definition at line 589 of file HcalTopology.cc.

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

Referenced by east(), and producerTag().

589  {
590  if (id.zside()==1) return decAIEta(id,neighbors);
591  else return incAIEta(id,neighbors);
592 }
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 547 of file HcalTopology.cc.

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

Referenced by producerTag(), and south().

547  {
548  bool ok=valid(id);
549  if (ok) {
550  switch (id.subdet()) {
551  case (HcalBarrel):
552  case (HcalOuter):
553  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX,id.depth());
554  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
555  break;
556  case (HcalEndcap):
557  if (id.ietaAbs()>=firstHEQuadPhiRing()) {
558  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
559  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
560  } else if (id.ietaAbs()>=firstHEDoublePhiRing()) {
561  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
562  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
563  } else {
564  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),maxPhiHE_,id.depth());
565  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-1,id.depth());
566  }
567  break;
568  case (HcalForward):
569  if (id.ietaAbs()>=firstHFQuadPhiRing()) {
570  if (id.iphi()==3) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
571  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-4,id.depth());
572  } else {
573  if (id.iphi()==1) neighbor=HcalDetId(id.subdet(),id.ieta(),IPHI_MAX-1,id.depth());
574  else neighbor=HcalDetId(id.subdet(),id.ieta(),id.iphi()-2,id.depth());
575  }
576  if (!validRaw(neighbor)) ok = false;
577  break;
578  default: ok=false;
579  }
580  }
581  return ok;
582 }
bool validRaw(const HcalDetId &id) const
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
virtual bool valid(const DetId &id) const
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
static const int IPHI_MAX
Definition: HcalTopology.cc:13
bool HcalTopology::decrementDepth ( HcalDetId id) const

Get the detector in front of this one

Definition at line 753 of file HcalTopology.cc.

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

Referenced by down(), and producerTag().

753  {
754  HcalSubdetector subdet = detId.subdet();
755  int ieta = detId.ieta();
756  int etaRing = detId.ietaAbs();
757  int depth = detId.depth();
758  int nDepthBins, startingBin;
759  depthBinInformation(subdet, etaRing, detId.iphi(), detId.zside(), nDepthBins, startingBin);
760 
761  // see if the new depth bin exists
762  --depth;
763  if ((subdet == HcalOuter) ||
764  (subdet == HcalEndcap && etaRing == firstHERing())) {
765  subdet = HcalBarrel;
766  for (int i=0; i<nEtaHB_; ++i) {
767  if (etaRing == etaBinsHB_[i].ieta) {
768  depth = etaBinsHB_[i].depthStart+etaBinsHB_[i].layer.size()-1;
769  break;
770  }
771  }
772  } else if (subdet == HcalEndcap && etaRing == lastHERing() && depth == 2 &&
774  (ieta > 0) ? --ieta : ++ieta;
775  } else if (depth <= 0) {
776  if (subdet == HcalForward && etaRing == firstHFRing()) {
777  // overlap
778  subdet = HcalEndcap;
779  etaRing= etaHF2HE_;
780  ieta = (ieta > 0) ? etaRing : -etaRing;
781  for (unsigned int i=0; i<etaBinsHE_.size(); ++i) {
782  if (etaRing == etaBinsHE_[i].ieta) {
783  depth = etaBinsHE_[i].depthStart+etaBinsHE_[i].layer.size()-1;
784  break;
785  }
786  }
787  } else {
788  // no more chances
789  detId = HcalDetId();
790  return false;
791  }
792  }
793  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
794  return validRaw(detId);
795 }
int firstHFRing() const
Definition: HcalTopology.h:91
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHB_
Definition: HcalTopology.h:198
std::vector< HcalDDDRecConstants::HcalEtaBin > etaBinsHE_
Definition: HcalTopology.h:198
void depthBinInformation(HcalSubdetector subdet, int etaRing, int iphi, int zside, int &nDepthBins, int &startingBin) const
finds the number of depth bins and which is the number to start with
bool validRaw(const HcalDetId &id) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
HcalSubdetector
Definition: HcalAssistant.h:31
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
DetId HcalTopology::denseId2detId ( unsigned int  denseid) const
virtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

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

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

660  {
661 
662  if(subdet == HcalBarrel) {
664  startingBin = hcons_->getMinDepth(0,etaRing,iphi,zside);
665  if (etaRing==lastHBRing()) {
666  nDepthBins = hcons_->getDepthEta16(1,iphi,zside)-startingBin+1;
667  } else {
668  nDepthBins = hcons_->getMaxDepth(0,etaRing,iphi,zside)-startingBin+1;
669  }
670  } else {
671  if (etaRing<=14) {
672  nDepthBins = 1;
673  startingBin = 1;
674  } else {
675  nDepthBins = 2;
676  startingBin = 1;
677  }
678  }
679  } else if(subdet == HcalEndcap) {
681  if (etaRing==firstHERing()) {
682  startingBin = hcons_->getDepthEta16(2,iphi,zside);
683  } else {
684  startingBin = hcons_->getMinDepth(1,etaRing,iphi,zside);
685  }
686  nDepthBins = hcons_->getMaxDepth(1,etaRing,iphi,zside)-startingBin+1;
687  } else {
688  if (etaRing==firstHERing()) {
689  nDepthBins = 1;
690  startingBin = 3;
691  } else if (etaRing==17) {
692  nDepthBins = 1;
693  startingBin = 1;
694  } else if (etaRing==lastHERing()) {
695  nDepthBins = 2;
696  startingBin = 1;
697  } else {
698  nDepthBins = (etaRing >= firstHETripleDepthRing()) ? 3 : 2;
699  startingBin = 1;
700  }
701  }
702  } else if(subdet == HcalForward) {
703  nDepthBins = maxDepthHF_;
704  startingBin = 1;
705  } else if(subdet == HcalOuter) {
706  nDepthBins = 1;
707  startingBin = 4;
708  } else {
709  std::cerr << "Bad HCAL subdetector " << subdet << std::endl;
710  }
711 }
int lastHBRing() const
Definition: HcalTopology.h:88
int getMaxDepth(const int type) const
int getDepthEta16(const int det, const int iphi, const int zside) const
int getMinDepth(const int itype, const int ieta, const int iphi, const int zside) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
int firstHETripleDepthRing() const
Definition: HcalTopology.h:99
int firstHERing() const
Definition: HcalTopology.h:89
int lastHERing() const
Definition: HcalTopology.h:90
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
unsigned int HcalTopology::detId2denseId ( const DetId id) const
virtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 1145 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::indexFor(), HcalDDDGeometry::newCellImpl(), HcalGeometry::newCellImpl(), CaloGeometryDBEP< T, U >::produceAligned(), and producerTag().

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

return a linear packed id from CALIB

Definition at line 1087 of file HcalTopology.cc.

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

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

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

992  {
993  HcalDetId hid(id);
994  const int ip (hid.iphi() ) ;
995  const int ie (hid.ietaAbs() ) ;
996  const int dp (hid.depth() ) ;
997  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
998  unsigned int retval = 0xFFFFFFFFu;
999  if (topoVersion_==0) {
1000  retval=( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf;
1001  } else if (topoVersion_==10) {
1002  retval=(dp-1)+maxDepthHB_*(ip-1);
1003  if (hid.ieta()>0) retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()-firstHBRing());
1004  else retval+=maxDepthHB_*IPHI_MAX*(hid.ieta()+lastHBRing()+nEtaHB_);
1005  }
1006  return retval;
1007 }
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:13
unsigned int HcalTopology::detId2denseIdHE ( const DetId id) const

return a linear packed id from HE

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

1009  {
1010  HcalDetId hid(id);
1011  const int ip (hid.iphi() ) ;
1012  const int ie (hid.ietaAbs() ) ;
1013  const int dp (hid.depth() ) ;
1014  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1015  unsigned int retval = 0xFFFFFFFFu;
1016  if (topoVersion_==0) {
1017  retval=( ip - 1 )*8 + ( ip/2 )*20 +
1018  ( ( ie==16 || ie==17 ) ? ie - 16 :
1019  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
1020  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
1021  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
1022  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf;
1023  } else if (topoVersion_==10) {
1024  retval=(dp-1)+maxDepthHE_*(ip-1);
1025  if (hid.ieta()>0) retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()-firstHERing());
1026  else retval+=maxDepthHE_*maxPhiHE_*(hid.ieta()+lastHERing()+nEtaHE_);
1027  }
1028  return retval;
1029 }
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 1047 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().

1047  {
1048  HcalDetId hid(id);
1049  const int ip (hid.iphi() ) ;
1050  const int ie (hid.ietaAbs() ) ;
1051  const int dp (hid.depth() ) ;
1052  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1053 
1054  unsigned int retval = 0xFFFFFFFFu;
1055  if (topoVersion_==0) {
1056  retval = ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
1057  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf;
1058  } else if (topoVersion_==10) {
1059  retval=dp-1+2*(ip-1);
1060  if (hid.ieta()>0) retval+=maxDepthHF_*IPHI_MAX*(hid.ieta()-29);
1061  else retval+=maxDepthHF_*IPHI_MAX*((41+13)+hid.ieta());
1062  }
1063  return retval;
1064 }
auto dp
Definition: deltaR.h:22
static const int IPHI_MAX
Definition: HcalTopology.cc:13
unsigned int HcalTopology::detId2denseIdHO ( const DetId id) const

return a linear packed id from HO

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

1031  {
1032  HcalDetId hid(id);
1033  const int ip (hid.iphi() ) ;
1034  const int ie (hid.ietaAbs() ) ;
1035  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
1036 
1037  unsigned int retval = 0xFFFFFFFFu;
1038  if (topoVersion_==0) {
1039  retval=( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf;
1040  } else if (topoVersion_==10) {
1041  if (hid.ieta()>0) retval=(ip-1)+IPHI_MAX*(hid.ieta()-1);
1042  else retval=(ip-1)+IPHI_MAX*(30+hid.ieta());
1043  }
1044  return retval;
1045 }
static const int IPHI_MAX
Definition: HcalTopology.cc:13
unsigned int HcalTopology::detId2denseIdHT ( const DetId id) const

return a linear packed id from HT

Definition at line 1066 of file HcalTopology.cc.

References HcalTrigTowerDetId::ietaAbs(), diffTreeTool::index, HcalTrigTowerDetId::iphi(), kHThalf, kHTSizePhase1, kHTSizePreLS1, HcalTrigTowerDetId::version(), HcalDigiParam_cfi::zside, and HcalTrigTowerDetId::zside().

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

1066  {
1067  HcalTrigTowerDetId tid(id);
1068  int zside = tid.zside();
1069  unsigned int ietaAbs = tid.ietaAbs();
1070  unsigned int iphi = tid.iphi();
1071  unsigned int ivers = tid.version();
1072 
1073  unsigned int index;
1074  if (ivers == 0) {
1075  if ((iphi-1)%4==0) index = (iphi-1)*32 + (ietaAbs-1) - (12*((iphi-1)/4));
1076  else index = (iphi-1)*28 + (ietaAbs-1) + (4*(((iphi-1)/4)+1));
1077  if (zside == -1) index += kHThalf;
1078  } else {
1079  index = kHTSizePreLS1;
1080  if (zside == -1) index += ((kHTSizePhase1-kHTSizePreLS1)/2);
1081  index += (36 * (ietaAbs - 30) + ((iphi - 1)/2));
1082  }
1083 
1084  return index;
1085 }
unsigned int HcalTopology::detId2denseIdPreLS1 ( const DetId id) const
private

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

965  {
966 
967  HcalDetId hid(id);
968  const HcalSubdetector sd (hid.subdet() ) ;
969  const int ip (hid.iphi() ) ;
970  const int ie (hid.ietaAbs() ) ;
971  const int dp (hid.depth() ) ;
972  const int zn (hid.zside() < 0 ? 1 : 0 ) ;
973  unsigned int retval = ( ( sd == HcalBarrel ) ?
974  ( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf :
975  ( ( sd == HcalEndcap ) ?
976  2*kHBhalf + ( ip - 1 )*8 + ( ip/2 )*20 +
977  ( ( ie==16 || ie==17 ) ? ie - 16 :
978  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
979  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
980  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
981  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf :
982  ( ( sd == HcalOuter ) ?
983  2*kHBhalf + 2*kHEhalf + ( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf :
984  ( ( sd == HcalForward ) ?
985  2*kHBhalf + 2*kHEhalf + 2*kHOhalf +
986  ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
987  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf : 0xFFFFFFFFu ) ) ) ) ;
988  return retval;
989 }
HcalSubdetector
Definition: HcalAssistant.h:31
auto dp
Definition: deltaR.h:22
double sd
int HcalTopology::doublePhiBins ( ) const
inline
std::vector< DetId > HcalTopology::down ( const DetId id) const
virtual

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

Implements CaloSubdetectorTopology.

Definition at line 328 of file HcalTopology.cc.

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

Referenced by producerTag().

328  {
330  std::vector<DetId> vNeighborsDetId;
331  if (decrementDepth(neighbor)) {
332  if (neighbor.oldFormat()) neighbor.changeForm();
333  vNeighborsDetId.push_back(neighbor);
334  }
335  return vNeighborsDetId;
336 }
bool decrementDepth(HcalDetId &id) const
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
bool oldFormat() const
Definition: HcalDetId.h:50
void changeForm()
Definition: HcalDetId.cc:138
std::vector< DetId > HcalTopology::east ( const DetId id) const
virtual

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 278 of file HcalTopology.cc.

References decIEta(), and mps_fire::i.

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

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

Definition at line 929 of file HcalTopology.cc.

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

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

929  {
930  double eta(0);
931  switch (subdet) {
932  case(HcalBarrel):
933  if (lastHBRing_ < (int)(etaTable.size())) eta=etaTable[lastHBRing_];
934  break;
935  case(HcalEndcap):
936  if (lastHERing_ < (int)(etaTable.size()) && nEtaHE_ > 0) eta=etaTable[lastHERing_];
937  break;
938  case(HcalOuter):
939  if (lastHORing_ < (int)(etaTable.size())) eta=etaTable[lastHORing_];
940  break;
941  case(HcalForward):
942  if (etaTableHF.size() > 0) eta=etaTableHF[etaTableHF.size()-1];
943  break;
944  default: eta=0;
945  }
946  return eta;
947 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
std::pair< double, double > HcalTopology::etaRange ( HcalSubdetector  subdet,
int  ieta 
) const

Definition at line 948 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(), maxDepthHE(), HcalTrigTowerGeometry::towerEtaBounds(), and HcaluLUTTPGCoder::update().

949  {
950  int ieta = (keta > 0) ? keta : -keta;
951  if (subdet == HcalForward) {
952  if (ieta >= firstHFRing_) {
953  unsigned int ii = (unsigned int)(ieta-firstHFRing_);
954  if (ii+1 < etaTableHF.size())
955  return std::pair<double,double>(etaTableHF[ii],etaTableHF[ii+1]);
956  }
957  } else {
958  int ietal = (mode_==HcalTopologyMode::LHC && ieta == lastHERing_-1) ? (ieta+1) : ieta;
959  if ((ietal < (int)(etaTable.size())) && (ieta > 0))
960  return std::pair<double,double>(etaTable[ieta-1],etaTable[ietal]);
961  }
962  return std::pair<double,double>(0,0);
963 }
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
ii
Definition: cuy.py:588
int HcalTopology::etaRing ( HcalSubdetector  subdet,
double  eta 
) const

eta and phi index from eta, phi values

Definition at line 828 of file HcalTopology.cc.

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

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

828  {
829  int etaring = firstHBRing_;
830  if (bc == HcalForward) {
831  etaring = firstHFRing_;
832  for (unsigned int k=0; k<etaTableHF.size()-1; ++k) {
833  if (abseta < etaTableHF[k+1]) {
834  etaring += k;
835  break;
836  }
837  }
838  } else {
839  for (unsigned int k=0; k<etaTable.size()-1; ++k) {
840  if (abseta < etaTable[k+1]) {
841  etaring += k;
842  break;
843  }
844  }
845  if (abseta > etaTable[etaTable.size()-1]) etaring = lastHERing_;
846  }
847  return etaring;
848 }
std::vector< double > etaTableHF
Definition: HcalTopology.h:216
std::vector< double > etaTable
Definition: HcalTopology.h:216
int k[5][pyjets_maxn]
void HcalTopology::exclude ( const HcalDetId id)

Add a cell to exclusion list

Definition at line 261 of file HcalTopology.cc.

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

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

261  {
262  std::vector<HcalDetId>::iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
263  if (i==exclusionList_.end() || *i!=id) {
264  exclusionList_.insert(i,id);
265  }
266 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:187
int HcalTopology::exclude ( HcalSubdetector  subdet,
int  ieta1,
int  ieta2,
int  iphi1,
int  iphi2,
int  depth1 = 1,
int  depth2 = 4 
)

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

Definition at line 338 of file HcalTopology.cc.

References particleFlowClusterECALTimeSelected_cfi::depth, exclude(), excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcalTTPDigis_cfi::id, hpstanc_transforms::max, min(), gen::n, and validRaw().

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

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

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

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

References CALIBSize_.

Referenced by HcalCondObjectContainerBase::sizeFor().

137 {return CALIBSize_;}
unsigned int CALIBSize_
Definition: HcalTopology.h:213
void HcalTopology::getDepthSegmentation ( const unsigned  ring,
std::vector< int > &  readoutDepths,
const bool  flag = false 
) const

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

Definition at line 887 of file HcalTopology.cc.

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

Referenced by doublePhiBins(), HcalDbHardcode::getLayersInDepth(), HcalHardcodeGeometryLoader::load(), HcalHardcodeCalibrations::produceRespCorrs(), segmentBoundaries(), and CaloTowersCreationAlgo::setGeometry().

889  {
890  // if it doesn't exist, return the first entry with a lower index. So if we only
891  // have entries for 1 and 17, any input from 1-16 should return the entry for ring 1
892  SegmentationMap::const_iterator pos;
893  if (!one) {
894  pos = depthSegmentation_.upper_bound(ring);
895  if (pos == depthSegmentation_.begin()) {
896  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
897  }
898  } else {
899  pos = depthSegmentationOne_.upper_bound(ring);
900  if (pos == depthSegmentationOne_.begin()) {
901  throw cms::Exception("HcalTopology") << "No depth segmentation found for ring" << ring;
902  }
903  }
904  --pos;
905  // pos now refers to the last element with key <= ring.
906  readoutDepths = pos->second;
907 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:224
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:225
unsigned int HcalTopology::getHBSize ( ) const
inline

Definition at line 132 of file HcalTopology.h.

References HBSize_.

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

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

Definition at line 133 of file HcalTopology.h.

References HESize_.

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

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

Definition at line 134 of file HcalTopology.h.

References HOSize_.

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

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

Definition at line 136 of file HcalTopology.h.

References HTSize_.

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

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

Definition at line 164 of file HcalTopology.h.

References mergePosition_.

164 {return mergePosition_;}
bool mergePosition_
Definition: HcalTopology.h:186
unsigned int HcalTopology::getNumberOfShapes ( ) const
inline

Definition at line 158 of file HcalTopology.h.

References numberOfShapes_.

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

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

Definition at line 130 of file HcalTopology.h.

References HcalDDDRecConstants::getPhiZOne(), and hcons_.

Referenced by CaloTowersCreationAlgo::setGeometry().

130 {return hcons_->getPhiZOne(phiz);}
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
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 595 of file HcalTopology.cc.

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

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

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

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

Referenced by producerTag(), and west().

584  {
585  if (id.zside()==1) return incAIEta(id,neighbors);
586  else return decAIEta(id,neighbors);
587 }
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 509 of file HcalTopology.cc.

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

Referenced by north(), and producerTag().

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

Get the detector behind this one

Definition at line 713 of file HcalTopology.cc.

References particleFlowClusterECALTimeSelected_cfi::depth, HcalDetId::depth(), depthBinInformation(), etaRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), lastHBRing(), lastHERing(), lastHORing(), mode_, HcalTopologyMode::SLHC, HcalDetId::subdet(), validRaw(), and HcalDetId::zside().

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

713  {
714 
715  HcalSubdetector subdet = detId.subdet();
716  int ieta = detId.ieta();
717  int etaRing = detId.ietaAbs();
718  int depth = detId.depth();
719  int nDepthBins, startingBin;
720  depthBinInformation(subdet, etaRing, detId.iphi(), detId.zside(), nDepthBins, startingBin);
721 
722  // see if the new depth bin exists
723  ++depth;
724  if (depth > nDepthBins) {
725  // handle on a case-by-case basis
726  if (subdet == HcalBarrel && etaRing < lastHORing()) {
727  // HO
728  subdet = HcalOuter;
729  depth = 4;
730  } else if (subdet == HcalBarrel && etaRing == lastHBRing()) {
731  // overlap
732  subdet = HcalEndcap;
733  } else if (subdet == HcalEndcap && etaRing == lastHERing()-1 &&
735  // guard ring HF29 is behind HE 28
736  subdet = HcalForward;
737  (ieta > 0) ? ++ieta : --ieta;
738  depth = 1;
739  } else if (subdet == HcalEndcap && etaRing == lastHERing() &&
741  // split cells go to bigger granularity. Ring 29 -> 28
742  (ieta > 0) ? --ieta : ++ieta;
743  } else {
744  // no more chances
745  detId = HcalDetId();
746  return false;
747  }
748  }
749  detId = HcalDetId(subdet, ieta, detId.iphi(), depth);
750  return validRaw(detId);
751 }
int lastHBRing() const
Definition: HcalTopology.h:88
void depthBinInformation(HcalSubdetector subdet, int etaRing, int iphi, int zside, int &nDepthBins, int &startingBin) const
finds the number of depth bins and which is the number to start with
bool validRaw(const HcalDetId &id) const
HcalTopologyMode::Mode mode_
Definition: HcalTopology.h:190
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
HcalSubdetector
Definition: HcalAssistant.h:31
int lastHORing() const
Definition: HcalTopology.h:94
int lastHERing() const
Definition: HcalTopology.h:90
bool HcalTopology::isBH ( ) const
inline

Definition at line 159 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::isBH().

Referenced by CaloTowerTopology::CaloTowerTopology().

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

Definition at line 243 of file HcalTopology.cc.

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

Referenced by idBack(), and validHcal().

243  {
244  bool exed=false;
245  // first, check the full detector exclusions... (fast)
246  switch (id.subdet()) {
247  case(HcalBarrel): exed=excludeHB_; break;
248  case(HcalEndcap): exed=excludeHE_; break;
249  case(HcalOuter): exed=excludeHO_; break;
250  case(HcalForward): exed=excludeHF_; break;
251  default: exed=false;
252  }
253  // next, check the list (slower)
254  if (!exed && !exclusionList_.empty()) {
255  std::vector<HcalDetId>::const_iterator i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
256  if (i!=exclusionList_.end() && *i==id) exed=true;
257  }
258  return exed;
259 }
std::vector< HcalDetId > exclusionList_
Definition: HcalTopology.h:187
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 821 of file HcalTopology.cc.

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

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

821  {
822  if (bc == HcalBarrel) return maxDepthHB_;
823  else if (bc == HcalEndcap) return maxDepthHE_;
824  else if (bc == HcalForward) return maxDepthHF_;
825  else return 4;
826 }
int HcalTopology::maxDepthHB ( ) const
inline

Definition at line 139 of file HcalTopology.h.

References maxDepthHB_.

139 { return maxDepthHB_;}
int HcalTopology::maxDepthHE ( ) const
inline
HcalDetId HcalTopology::mergedDepthDetId ( const HcalDetId id) const
inline
HcalTopologyMode::Mode HcalTopology::mode ( void  ) const
inline
unsigned int HcalTopology::ncells ( ) const
virtual

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

Reimplemented from CaloSubdetectorTopology.

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

1289  {
1290  return HBSize_+HESize_+HOSize_+HFSize_;
1291 }
unsigned int HESize_
Definition: HcalTopology.h:209
unsigned int HFSize_
Definition: HcalTopology.h:211
unsigned int HBSize_
Definition: HcalTopology.h:208
unsigned int HOSize_
Definition: HcalTopology.h:210
std::vector< DetId > HcalTopology::north ( const DetId id) const
virtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 298 of file HcalTopology.cc.

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

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

298  {
299  std::vector<DetId> vNeighborsDetId;
301  if (incIPhi(HcalDetId(id),neighbor)) {
302  if (neighbor.oldFormat()) neighbor.changeForm();
303  vNeighborsDetId.push_back(DetId(neighbor.rawId()));
304  }
305  return vNeighborsDetId;
306 }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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 797 of file HcalTopology.cc.

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

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

797  {
798  int lastPhiBin=singlePhiBins_;
799  if (etaRing>= firstHFQuadPhiRing()) lastPhiBin=doublePhiBins_/2;
800  else if (etaRing>= firstHEQuadPhiRing()) lastPhiBin=doublePhiBins_/2;
801  else if (etaRing>= firstHEDoublePhiRing()) lastPhiBin=doublePhiBins_;
802  if (hcons_) {
803  if (etaRing>=hcons_->getEtaRange(1).first &&
804  etaRing<=hcons_->getEtaRange(1).second)
805  lastPhiBin = (int)((2*M_PI+0.001)/dPhiTable[etaRing-firstHBRing_]);
806  }
807  return lastPhiBin;
808 }
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
std::pair< int, int > getEtaRange(const int i) const
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
std::vector< double > dPhiTable
Definition: HcalTopology.h:216
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
int HcalTopology::nPhiBins ( HcalSubdetector  subdet,
int  etaRing 
) const

Definition at line 810 of file HcalTopology.cc.

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

810  {
811  static const double twopi = M_PI+M_PI;
812  int lastPhiBin;
813  if (bc == HcalForward) {
814  lastPhiBin = (int)((twopi+0.001)/dPhiTableHF[etaRing-firstHFRing_]);
815  } else {
816  lastPhiBin = (int)((twopi+0.001)/dPhiTable[etaRing-firstHBRing_]);
817  }
818  return lastPhiBin;
819 }
std::vector< double > dPhiTableHF
Definition: HcalTopology.h:216
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:216
int HcalTopology::phiBin ( HcalSubdetector  subdet,
int  etaRing,
double  phi 
) const

Definition at line 850 of file HcalTopology.cc.

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

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

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

References particleFlowClusterECALTimeSelected_cfi::depth, and getDepthSegmentation().

Referenced by doublePhiBins().

921  {
922  std::vector<int> readoutDepths;
923  getDepthSegmentation(ring, readoutDepths, one);
924  int d1 = std::lower_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
925  int d2 = std::upper_bound(readoutDepths.begin(), readoutDepths.end(), depth) - readoutDepths.begin();
926  return std::pair<int, int>(d1, d2);
927 }
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 909 of file HcalTopology.cc.

References depthSegmentation_, depthSegmentationOne_, and relativeConstraints::ring.

Referenced by doublePhiBins(), and HcalTopology().

911  {
912  if (one) {
913  depthSegmentationOne_[ring] = readoutDepths;
914  } else {
915  depthSegmentation_[ring] = readoutDepths;
916  }
917 }
SegmentationMap depthSegmentation_
Definition: HcalTopology.h:224
SegmentationMap depthSegmentationOne_
Definition: HcalTopology.h:225
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
virtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 308 of file HcalTopology.cc.

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

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

308  {
309  std::vector<DetId> vNeighborsDetId;
311  if (decIPhi(HcalDetId(id),neighbor)) {
312  if (neighbor.oldFormat()) neighbor.changeForm();
313  vNeighborsDetId.push_back(DetId(neighbor.rawId()));
314  }
315  return vNeighborsDetId;
316 }
bool decIPhi(const HcalDetId &id, HcalDetId &neighbor) const
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
bool oldFormat() const
Definition: HcalDetId.h:50
Definition: DetId.h:18
void changeForm()
Definition: HcalDetId.cc:138
int HcalTopology::topoVersion ( ) const
virtual

return a version which identifies the given topology

Reimplemented from CaloSubdetectorTopology.

Definition at line 1293 of file HcalTopology.cc.

References topoVersion_.

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

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

Definition at line 165 of file HcalTopology.h.

References hcons_, and HcalDDDRecConstants::unmergeDepthDetId().

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

166  {
167  hcons_->unmergeDepthDetId(id, ids);
168  }
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
std::vector< DetId > HcalTopology::up ( const DetId id) const
virtual

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

Implements CaloSubdetectorTopology.

Definition at line 318 of file HcalTopology.cc.

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

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

318  {
320  std::vector<DetId> vNeighborsDetId;
321  if (incrementDepth(neighbor)) {
322  if (neighbor.oldFormat()) neighbor.changeForm();
323  vNeighborsDetId.push_back(neighbor);
324  }
325  return vNeighborsDetId;
326 }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
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
virtual

Is this a valid cell id?

Reimplemented from CaloSubdetectorTopology.

Definition at line 190 of file HcalTopology.cc.

References DetId::Hcal, and validHcal().

Referenced by decAIEta(), decIPhi(), HcalGeometry::getCells(), incAIEta(), incIPhi(), CaloMiscalibMapHcal::prefillMap(), producerTag(), CaloTPGTranscoderULUT::setup(), HcaluLUTTPGCoder::update(), and HcaluLUTTPGCoder::updateXML().

190  {
191  assert(id.det()==DetId::Hcal);
192  return validHcal(id);
193 }
bool validHcal(const HcalDetId &id) const
bool HcalTopology::validDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 204 of file HcalTopology.cc.

References hcalTTPDigis_cfi::id, and validHcal().

Referenced by producerTag().

205  {
206  HcalDetId id(subdet,ieta,iphi,depth);
207  return validHcal(id);
208 }
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 397 of file HcalTopology.cc.

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

Referenced by idBack().

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

Is this a valid cell id?

Definition at line 195 of file HcalTopology.cc.

References isExcluded(), convertSQLiteXML::ok, and validRaw().

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

195  {
196  // check the raw rules
197  bool ok=validRaw(id);
198 
199  ok=ok && !isExcluded(id);
200 
201  return ok;
202 }
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 230 of file HcalTopology.cc.

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

230  {
231  // check the raw rules
232  bool ok = validHcal(id);
233  if (flag == 0) { // This is all what is needed
234  } else if (flag == 1) { // See if it is in the to be merged list and merged list
235  if (hcons_->isPlan1MergedId(id)) ok = true;
236  else if (hcons_->isPlan1ToBeMergedId(id)) ok = false;
237  } else if (!ok) {
238  ok = hcons_->isPlan1MergedId(id);
239  }
240  return ok;
241 }
bool validHcal(const HcalDetId &id) const
bool isPlan1MergedId(const HcalDetId &id) const
bool isPlan1ToBeMergedId(const HcalDetId &id) const
const HcalDDDRecConstants * hcons_
Definition: HcalTopology.h:185
bool HcalTopology::validHT ( const HcalTrigTowerDetId id) const

Definition at line 210 of file HcalTopology.cc.

References particleFlowClusterECALTimeSelected_cfi::depth, IPHI_MAX, triggerMode_, HcalTopologyMode::TriggerMode_2009, HcalTopologyMode::TriggerMode_2017, HcalTopologyMode::TriggerMode_2018legacy, and jetIDSelector_cfi::version.

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

210  {
211 
212  if (id.iphi()<1 || id.iphi()>IPHI_MAX || id.ieta()==0) return false;
213  if (id.depth() != 0) return false;
214  if (id.version()==0) {
215  if (id.ietaAbs() > 28) {
218  if ((id.iphi() % 4) != 1) return false;
219  if (id.ietaAbs() > 32) return false;
220  }
221  } else {
223  if (id.ietaAbs()<30 || id.ietaAbs()>41) return false;
224  if (id.ietaAbs()>29 && ((id.iphi()%2)==0)) return false;
225  if (id.ietaAbs()>39 && ((id.iphi()%4)!=3)) return false;
226  }
227  return true;
228 }
HcalTopologyMode::TriggerMode triggerMode_
Definition: HcalTopology.h:191
static const int IPHI_MAX
Definition: HcalTopology.cc:13
bool HcalTopology::validRaw ( const HcalDetId id) const
private

Is this a valid cell id?

Definition at line 445 of file HcalTopology.cc.

References particleFlowClusterECALTimeSelected_cfi::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(), MuonErrorMatrixAnalyzer_cfi::maxPhi, maxPhiHE_, mode_, convertSQLiteXML::ok, HcalTopologyMode::SLHC, validHT(), and HcalDigiParam_cfi::zside.

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

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

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 288 of file HcalTopology.cc.

References mps_fire::i, and incIEta().

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

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

Member Data Documentation

unsigned int HcalTopology::CALIBSize_
private

Definition at line 213 of file HcalTopology.h.

Referenced by getCALIBSize().

SegmentationMap HcalTopology::depthSegmentation_
private

Definition at line 224 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

SegmentationMap HcalTopology::depthSegmentationOne_
private

Definition at line 225 of file HcalTopology.h.

Referenced by getDepthSegmentation(), and setDepthSegmentation().

int HcalTopology::doublePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by doublePhiBins(), and nPhiBins().

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 198 of file HcalTopology.h.

Referenced by decrementDepth(), and HcalTopology().

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

Definition at line 198 of file HcalTopology.h.

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

int HcalTopology::etaHE2HF_
private

Definition at line 205 of file HcalTopology.h.

Referenced by HcalTopology(), and incAIEta().

int HcalTopology::etaHF2HE_
private

Definition at line 205 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

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

Definition at line 216 of file HcalTopology.h.

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

bool HcalTopology::excludeHB_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHE_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHF_
private

Definition at line 188 of file HcalTopology.h.

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

bool HcalTopology::excludeHO_
private

Definition at line 188 of file HcalTopology.h.

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

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

Definition at line 187 of file HcalTopology.h.

Referenced by exclude(), and isExcluded().

int HcalTopology::firstHBRing_
private

Definition at line 193 of file HcalTopology.h.

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

int HcalTopology::firstHEDoublePhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEDoublePhiRing(), and HcalTopology().

int HcalTopology::firstHEQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHEQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHERing_
private

Definition at line 194 of file HcalTopology.h.

Referenced by firstHERing(), and HcalTopology().

int HcalTopology::firstHETripleDepthRing_
private

Definition at line 202 of file HcalTopology.h.

Referenced by firstHETripleDepthRing(), and HcalTopology().

int HcalTopology::firstHFQuadPhiRing_
private

Definition at line 201 of file HcalTopology.h.

Referenced by firstHFQuadPhiRing(), and HcalTopology().

int HcalTopology::firstHFRing_
private

Definition at line 195 of file HcalTopology.h.

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

int HcalTopology::firstHORing_
private

Definition at line 196 of file HcalTopology.h.

Referenced by firstHORing(), and HcalTopology().

unsigned int HcalTopology::HBSize_
private

Definition at line 208 of file HcalTopology.h.

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

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

Definition at line 209 of file HcalTopology.h.

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

unsigned int HcalTopology::HFSize_
private

Definition at line 211 of file HcalTopology.h.

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

unsigned int HcalTopology::HOSize_
private

Definition at line 210 of file HcalTopology.h.

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

unsigned int HcalTopology::HTSize_
private

Definition at line 212 of file HcalTopology.h.

Referenced by getHTSize(), and HcalTopology().

int HcalTopology::lastHBRing_
private

Definition at line 193 of file HcalTopology.h.

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

int HcalTopology::lastHERing_
private

Definition at line 194 of file HcalTopology.h.

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

int HcalTopology::lastHFRing_
private

Definition at line 195 of file HcalTopology.h.

Referenced by HcalTopology(), and lastHFRing().

int HcalTopology::lastHORing_
private

Definition at line 196 of file HcalTopology.h.

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

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

Definition at line 206 of file HcalTopology.h.

Referenced by HcalTopology(), and validRaw().

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

Definition at line 186 of file HcalTopology.h.

Referenced by getMergePositionFlag().

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

Definition at line 199 of file HcalTopology.h.

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

unsigned int HcalTopology::numberOfShapes_
private

Definition at line 214 of file HcalTopology.h.

Referenced by getNumberOfShapes(), and HcalTopology().

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

Definition at line 217 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

int HcalTopology::singlePhiBins_
private

Definition at line 203 of file HcalTopology.h.

Referenced by nPhiBins(), and singlePhiBins().

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

Definition at line 191 of file HcalTopology.h.

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

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

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().

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

Definition at line 218 of file HcalTopology.h.

Referenced by HcalTopology(), and phiBin().