CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
CaloTowerTopology Class Referencefinal

#include <CaloTowerTopology.h>

Inheritance diagram for CaloTowerTopology:
CaloSubdetectorTopology

Public Member Functions

 CaloTowerTopology (const HcalTopology *topology)
 standard constructor More...
 
int convertCTtoHcal (int ct_ieta) const
 
int convertHcaltoCT (int hcal_ieta, HcalSubdetector subdet) const
 
uint32_t denseIndex (const DetId &id) const
 
CaloTowerDetId detIdFromDenseIndex (uint32_t din) const
 
std::vector< DetIddown (const DetId &id) const override
 
std::vector< DetIdeast (const DetId &id) const override
 
int firstHBRing () const
 
int firstHEDoublePhiRing () const
 
int firstHEQuadPhiRing () const
 
int firstHERing () const
 
int firstHFQuadPhiRing () const
 
int firstHFRing () const
 
int firstHORing () const
 
int lastHBRing () const
 
int lastHERing () const
 
int lastHFRing () const
 
int lastHORing () const
 
std::vector< DetIdnorth (const DetId &id) const override
 
uint32_t sizeForDenseIndexing () const
 
std::vector< DetIdsouth (const DetId &id) const override
 
std::vector< DetIdup (const DetId &id) const override
 
bool valid (const DetId &id) const override
 is this detid present in the Topology? More...
 
bool validDenseIndex (uint32_t din) const
 
virtual bool validDetId (const CaloTowerDetId &id) const
 
std::vector< DetIdwest (const DetId &id) const override
 
 ~CaloTowerTopology () override
 virtual destructor More...
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor More...
 
virtual DetId denseId2detId (unsigned int) const
 return a linear packed id More...
 
virtual bool denseIdConsistent (int topoVer) const
 return whether this topology is consistent with the numbering in the given topology More...
 
virtual unsigned int detId2denseId (const DetId &) const
 return a linear packed id 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 unsigned int ncells () const
 return a count of valid cells (for dense indexing use) More...
 
virtual int topoVersion () const
 return a version which identifies the given topology More...
 
virtual ~CaloSubdetectorTopology ()
 virtual destructor More...
 

Private Attributes

int firstHBRing_
 
int firstHEDoublePhiRing_
 
int firstHEQuadPhiRing_
 
int firstHERing_
 
int firstHFQuadPhiRing_
 
int firstHFRing_
 
int firstHORing_
 
const HcalTopologyhcaltopo
 
uint32_t kSizeForDenseIndexing
 
int lastHBRing_
 
int lastHERing_
 
int lastHFRing_
 
int lastHORing_
 
int nDoublePhi_
 
int nEtaHE_
 
int nQuadPhi_
 
int nSinglePhi_
 

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

Author
J. Mans - Minnesota

Definition at line 13 of file CaloTowerTopology.h.

Constructor & Destructor Documentation

CaloTowerTopology::CaloTowerTopology ( const HcalTopology topology)

standard constructor

Definition at line 8 of file CaloTowerTopology.cc.

References gather_cfg::cout, HcalTopology::firstHBRing(), firstHBRing_, HcalTopology::firstHEDoublePhiRing(), firstHEDoublePhiRing_, HcalTopology::firstHEQuadPhiRing(), firstHEQuadPhiRing_, HcalTopology::firstHERing(), firstHERing_, HcalTopology::firstHFQuadPhiRing(), firstHFQuadPhiRing_, HcalTopology::firstHFRing(), firstHFRing_, HcalTopology::firstHORing(), firstHORing_, hcaltopo, HcalTopology::isBH(), kSizeForDenseIndexing, HcalTopology::lastHBRing(), lastHBRing_, HcalTopology::lastHERing(), lastHERing_, HcalTopology::lastHFRing(), lastHFRing_, HcalTopology::lastHORing(), lastHORing_, SiStripPI::max, nDoublePhi_, nEtaHE_, nQuadPhi_, and nSinglePhi_.

8  : hcaltopo(topology) {
9  //get number of towers in each hcal subdet from hcaltopo
10  int nEtaHB, nEtaHO, nEtaHF;
11  nEtaHB = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1;
13  nEtaHO = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1;
14  nEtaHF = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1;
15 #ifdef DebugLog
16  std::cout << "CaloTowerTopology:(1) " << nEtaHB << ":" << nEtaHE_ << ":" << nEtaHO << ":" << nEtaHF << ":"
17  << hcaltopo->isBH() << std::endl;
18 #endif
19  if (hcaltopo->isBH())
20  nEtaHE_ = 0;
21 
22  //setup continuous ieta
23  firstHBRing_ = 1;
24  lastHBRing_ = firstHBRing_ + nEtaHB - 1;
25  firstHERing_ = lastHBRing_; //crossover
26  lastHERing_ = firstHERing_ + std::max(nEtaHE_ - 1, 0); //max = protection for case with no HE
27  //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower
29  lastHFRing_ = firstHFRing_ + (nEtaHF - 1) - 1; //nEtaHF - 1 to account for no crossover
30  firstHORing_ = 1;
31  lastHORing_ = firstHORing_ + nEtaHO - 1;
32 #ifdef DebugLog
33  std::cout << "CaloTowerTopology: (2) " << firstHBRing_ << ":" << lastHBRing_ << ":" << firstHERing_ << ":"
34  << lastHERing_ << ":" << firstHFRing_ << ":" << lastHFRing_ << ":" << firstHORing_ << ":" << lastHORing_
35  << std::endl;
36 #endif
37 
38  //translate phi segmentation boundaries into continuous ieta
39  if (hcaltopo->firstHEDoublePhiRing() == 999 || nEtaHE_ == 0)
41  else
45 
46  //number of etas per phi segmentation type
47  int nEtaSinglePhi_, nEtaDoublePhi_, nEtaQuadPhi_;
48  nEtaSinglePhi_ = firstHEDoublePhiRing_ - firstHBRing_;
49  nEtaDoublePhi_ = firstHFQuadPhiRing_ - firstHEDoublePhiRing_;
50  nEtaQuadPhi_ = lastHFRing_ - firstHFQuadPhiRing_ + 1; //include lastHFRing
51 
52  //total number of towers per phi segmentation type
53  nSinglePhi_ = nEtaSinglePhi_ * 72;
54  nDoublePhi_ = nEtaDoublePhi_ * 36;
55  nQuadPhi_ = nEtaQuadPhi_ * 18;
56 
57 #ifdef DebugLog
58  std::cout << "CaloTowerTopology: (3) " << nEtaSinglePhi_ << ":" << nEtaDoublePhi_ << ":" << nEtaQuadPhi_ << ":"
59  << nSinglePhi_ << ":" << nDoublePhi_ << ":" << nQuadPhi_ << std::endl;
60 #endif
61 
62  //calculate maximum dense index size
64 }
int firstHFRing() const
Definition: HcalTopology.h:96
int firstHBRing() const
Definition: HcalTopology.h:91
int lastHBRing() const
Definition: HcalTopology.h:92
uint32_t kSizeForDenseIndexing
int lastHFRing() const
Definition: HcalTopology.h:97
int firstHORing() const
Definition: HcalTopology.h:98
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:101
const HcalTopology * hcaltopo
bool isBH() const
Definition: HcalTopology.h:162
int firstHERing() const
Definition: HcalTopology.h:93
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:103
tuple cout
Definition: gather_cfg.py:144
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:102
int lastHORing() const
Definition: HcalTopology.h:99
int lastHERing() const
Definition: HcalTopology.h:94
CaloTowerTopology::~CaloTowerTopology ( )
inlineoverride

virtual destructor

Definition at line 18 of file CaloTowerTopology.h.

18 {}

Member Function Documentation

int CaloTowerTopology::convertCTtoHcal ( int  ct_ieta) const

Definition at line 67 of file CaloTowerTopology.cc.

References HcalTopology::firstHBRing(), firstHBRing_, HcalTopology::firstHERing(), firstHERing_, HcalTopology::firstHFRing(), firstHFRing_, hcaltopo, lastHBRing_, lastHERing_, and lastHFRing_.

Referenced by CaloTowerConstituentsMap::constituentsOf(), CaloTowersCreationAlgo::hadShwrPos(), and CaloTowerHardcodeGeometryLoader::makeCell().

67  {
68  if (ct_ieta <= lastHBRing_)
69  return ct_ieta - firstHBRing_ + hcaltopo->firstHBRing();
70  else if (ct_ieta <= lastHERing_)
71  return ct_ieta - firstHERing_ + hcaltopo->firstHERing();
72  else if (ct_ieta <= lastHFRing_)
73  return ct_ieta - firstHFRing_ + hcaltopo->firstHFRing() + 1; //account for no HF crossover
74  else
75  return 0; //if ct_ieta outside range
76 }
int firstHFRing() const
Definition: HcalTopology.h:96
int firstHBRing() const
Definition: HcalTopology.h:91
const HcalTopology * hcaltopo
int firstHERing() const
Definition: HcalTopology.h:93
int CaloTowerTopology::convertHcaltoCT ( int  hcal_ieta,
HcalSubdetector  subdet 
) const

Definition at line 79 of file CaloTowerTopology.cc.

References HcalTopology::firstHBRing(), firstHBRing_, HcalTopology::firstHERing(), firstHERing_, HcalTopology::firstHFRing(), firstHFRing_, HcalTopology::firstHORing(), firstHORing_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcaltopo, HcalTopology::lastHBRing(), HcalTopology::lastHERing(), HcalTopology::lastHFRing(), HcalTopology::lastHORing(), and nEtaHE_.

Referenced by CaloTowerConstituentsMapBuilder::assignEEtoHE(), and CaloTowerConstituentsMap::towerOf().

79  {
80  if (subdet == HcalBarrel && hcal_ieta >= hcaltopo->firstHBRing() && hcal_ieta <= hcaltopo->lastHBRing()) {
81  return hcal_ieta - hcaltopo->firstHBRing() + firstHBRing_;
82  } else if (subdet == HcalEndcap && hcal_ieta >= hcaltopo->firstHERing() && hcal_ieta <= hcaltopo->lastHERing()) {
83  return ((nEtaHE_ == 0) ? 0 : (hcal_ieta - hcaltopo->firstHERing() + firstHERing_));
84  } else if (subdet == HcalForward && hcal_ieta >= hcaltopo->firstHFRing() && hcal_ieta <= hcaltopo->lastHFRing()) {
85  if (hcal_ieta == hcaltopo->firstHFRing())
86  hcal_ieta++; //account for no HF crossover
87  return hcal_ieta - hcaltopo->firstHFRing() + firstHFRing_ - 1;
88  } else if (subdet == HcalOuter && hcal_ieta >= hcaltopo->firstHORing() && hcal_ieta <= hcaltopo->lastHORing()) {
89  return hcal_ieta - hcaltopo->firstHORing() + firstHORing_;
90  } else
91  return 0; //if hcal_ieta outside range, or unknown subdet
92 }
int firstHFRing() const
Definition: HcalTopology.h:96
int firstHBRing() const
Definition: HcalTopology.h:91
int lastHBRing() const
Definition: HcalTopology.h:92
int lastHFRing() const
Definition: HcalTopology.h:97
int firstHORing() const
Definition: HcalTopology.h:98
const HcalTopology * hcaltopo
int firstHERing() const
Definition: HcalTopology.h:93
int lastHORing() const
Definition: HcalTopology.h:99
int lastHERing() const
Definition: HcalTopology.h:94
uint32_t CaloTowerTopology::denseIndex ( const DetId id) const

Definition at line 235 of file CaloTowerTopology.cc.

References firstHEDoublePhiRing_, firstHFQuadPhiRing_, CaloTowerDetId::ietaAbs(), CaloTowerDetId::iphi(), kSizeForDenseIndexing, nDoublePhi_, nSinglePhi_, and CaloTowerDetId::zside().

Referenced by CaloTowersCreationAlgo::convert(), CaloTowersCreationAlgo::find(), CaloTowerGeometry::getGeometry(), CaloTowerGeometry::indexFor(), and CaloTowerGeometry::newCell().

235  {
236  CaloTowerDetId tid(id);
237  const int ie(tid.ietaAbs());
238  const int ip(tid.iphi() - 1);
239 
240  return ((0 > tid.zside() ? 0 : kSizeForDenseIndexing / 2) +
241  ((firstHEDoublePhiRing_ > ie
242  ? (ie - 1) * 72 + ip
243  : (firstHFQuadPhiRing_ > ie ? nSinglePhi_ + (ie - firstHEDoublePhiRing_) * 36 + ip / 2
244  : nSinglePhi_ + nDoublePhi_ + (ie - firstHFQuadPhiRing_) * 18 + ip / 4))));
245 }
uint32_t kSizeForDenseIndexing
CaloTowerDetId CaloTowerTopology::detIdFromDenseIndex ( uint32_t  din) const

Definition at line 247 of file CaloTowerTopology.cc.

References firstHEDoublePhiRing_, firstHFQuadPhiRing_, kSizeForDenseIndexing, nDoublePhi_, nSinglePhi_, and validDenseIndex().

Referenced by CaloTowerHardcodeGeometryLoader::makeCell(), and CaloTowersCreationAlgo::makeEcalBadChs().

247  {
248  const int iz(din < kSizeForDenseIndexing / 2 ? -1 : 1);
249  din %= kSizeForDenseIndexing / 2;
250  const int ie(nSinglePhi_ + nDoublePhi_ - 1 < (int)(din)
252  : (nSinglePhi_ - 1 < (int)din ? firstHEDoublePhiRing_ + (din - nSinglePhi_) / 36 : din / 72 + 1));
253 
254  const int ip(nSinglePhi_ + nDoublePhi_ - 1 < (int)(din)
255  ? ((din - nSinglePhi_ - nDoublePhi_) % 18) * 4 + 3
256  : (nSinglePhi_ - 1 < (int)(din) ? ((din - nSinglePhi_) % 36) * 2 + 1 : din % 72 + 1));
257 
258  return (validDenseIndex(din) ? CaloTowerDetId(iz * ie, ip) : CaloTowerDetId());
259 }
uint32_t kSizeForDenseIndexing
bool validDenseIndex(uint32_t din) const
std::vector< DetId > CaloTowerTopology::down ( const DetId id) const
overridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 233 of file CaloTowerTopology.cc.

233 { return std::vector<DetId>(); }
std::vector< DetId > CaloTowerTopology::east ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 112 of file CaloTowerTopology.cc.

References createTree::dd, firstHEDoublePhiRing_, firstHFQuadPhiRing_, CaloTowerDetId::ieta(), CaloTowerDetId::iphi(), and lastHFRing_.

112  {
113  std::vector<DetId> dd;
114  CaloTowerDetId tid(id);
115  int ieta = tid.ieta();
116  int iphi = tid.iphi();
117 
118  if (ieta == 1) { //no ieta=0
119  ieta = -1;
120  } else if (ieta == firstHEDoublePhiRing_) {
121  //currently double phi, going to single phi (positive eta) -> extra neighbor
122  ieta--;
123  dd.emplace_back(CaloTowerDetId(ieta, iphi + 1));
124  } else if (ieta - 1 == -firstHEDoublePhiRing_) {
125  //currently single phi, going to double phi (negative eta) -> change numbering
126  if ((iphi % 2) == 0)
127  iphi--;
128  ieta--;
129  } else if (ieta == firstHFQuadPhiRing_) { //currently quad phi, going to double phi (positive eta) -> extra neighbor
130  ieta--;
131  dd.emplace_back(CaloTowerDetId(ieta, ((iphi + 1) % 72) + 1));
132  } else if (ieta - 1 == -firstHFQuadPhiRing_) {
133  //currently double phi, going to quad phi (negative eta) -> change numbering
134  if (((iphi - 1) % 4) == 0) {
135  if (iphi == 1)
136  iphi = 71;
137  else
138  iphi -= 2;
139  }
140  ieta--;
141  } else { //general case
142  ieta--;
143  }
144 
145  if (ieta >= -lastHFRing_)
146  dd.emplace_back(CaloTowerDetId(ieta, iphi));
147  return dd;
148 }
int CaloTowerTopology::firstHBRing ( ) const
inline

Definition at line 36 of file CaloTowerTopology.h.

References firstHBRing_.

36 { return firstHBRing_; }
int CaloTowerTopology::firstHEDoublePhiRing ( ) const
inline
int CaloTowerTopology::firstHEQuadPhiRing ( ) const
inline

Definition at line 45 of file CaloTowerTopology.h.

References firstHEQuadPhiRing_.

45 { return firstHEQuadPhiRing_; }
int CaloTowerTopology::firstHERing ( ) const
inline
int CaloTowerTopology::firstHFQuadPhiRing ( ) const
inline

Definition at line 46 of file CaloTowerTopology.h.

References firstHFQuadPhiRing_.

Referenced by CaloTowerGeometry::alignmentTransformIndexLocal().

46 { return firstHFQuadPhiRing_; }
int CaloTowerTopology::firstHFRing ( ) const
inline
int CaloTowerTopology::firstHORing ( ) const
inline

Definition at line 42 of file CaloTowerTopology.h.

References firstHORing_.

42 { return firstHORing_; }
int CaloTowerTopology::lastHBRing ( ) const
inline
int CaloTowerTopology::lastHERing ( ) const
inline
int CaloTowerTopology::lastHFRing ( ) const
inline
int CaloTowerTopology::lastHORing ( ) const
inline
std::vector< DetId > CaloTowerTopology::north ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 192 of file CaloTowerTopology.cc.

References createTree::dd, firstHEDoublePhiRing_, firstHFQuadPhiRing_, CaloTowerDetId::ieta(), CaloTowerDetId::ietaAbs(), and CaloTowerDetId::iphi().

192  {
193  CaloTowerDetId tid(id);
194  int iphi_n = tid.iphi() + 1;
195  if (iphi_n > 72)
196  iphi_n = 1;
197  if (tid.ietaAbs() >= firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,...
198  iphi_n += 3;
199  if (iphi_n > 72)
200  iphi_n -= 72;
201  } else if (tid.ietaAbs() >= firstHEDoublePhiRing_ && (iphi_n % 2) == 0) { //36 phi segments, numbered 1,3,...,33,35
202  iphi_n++;
203  if (iphi_n > 72)
204  iphi_n -= 72;
205  }
206 
207  std::vector<DetId> dd;
208  dd.emplace_back(CaloTowerDetId(tid.ieta(), iphi_n));
209  return dd;
210 }
uint32_t CaloTowerTopology::sizeForDenseIndexing ( ) const
inline
std::vector< DetId > CaloTowerTopology::south ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 213 of file CaloTowerTopology.cc.

References createTree::dd, firstHEDoublePhiRing_, firstHFQuadPhiRing_, CaloTowerDetId::ieta(), CaloTowerDetId::ietaAbs(), and CaloTowerDetId::iphi().

213  {
214  CaloTowerDetId tid(id);
215  int iphi_s = tid.iphi() - 1;
216  if (iphi_s == 0)
217  iphi_s = 72;
218  if (tid.ietaAbs() >= firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,...
219  iphi_s -= 3;
220  if (iphi_s <= 0)
221  iphi_s += 72;
222  } else if (tid.ietaAbs() >= firstHEDoublePhiRing_ && (iphi_s % 2) == 0) { //36 phi segments, numbered 1,3,...,33,35
223  iphi_s--;
224  }
225 
226  std::vector<DetId> dd;
227  dd.emplace_back(CaloTowerDetId(tid.ieta(), iphi_s));
228  return dd;
229 }
std::vector< DetId > CaloTowerTopology::up ( const DetId id) const
overridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 231 of file CaloTowerTopology.cc.

231 { return std::vector<DetId>(); }
bool CaloTowerTopology::valid ( const DetId id) const
overridevirtual

is this detid present in the Topology?

Reimplemented from CaloSubdetectorTopology.

Definition at line 94 of file CaloTowerTopology.cc.

References cms::cuda::assert(), DetId::Calo, CaloTowerDetId::SubdetId, and validDetId().

94  {
95  assert(id.det() == DetId::Calo && id.subdetId() == CaloTowerDetId::SubdetId);
96  return validDetId(id);
97 }
assert(be >=bs)
static const int SubdetId
virtual bool validDetId(const CaloTowerDetId &id) const
bool CaloTowerTopology::validDenseIndex ( uint32_t  din) const
inline

Definition at line 55 of file CaloTowerTopology.h.

References kSizeForDenseIndexing.

Referenced by detIdFromDenseIndex().

55 { return (din < kSizeForDenseIndexing); }
uint32_t kSizeForDenseIndexing
bool CaloTowerTopology::validDetId ( const CaloTowerDetId id) const
virtual

Definition at line 99 of file CaloTowerTopology.cc.

References firstHBRing_, firstHEDoublePhiRing_, firstHFQuadPhiRing_, and lastHFRing_.

Referenced by valid().

99  {
100  int ia = id.ietaAbs();
101  int ip = id.iphi();
102 
103  return ((ia >= firstHBRing_) && (ia <= lastHFRing_) //eta range
104  && (ip >= 1) && (ip <= 72) //phi range
105  && ((ia < firstHEDoublePhiRing_) //72 phi segments
106  || (ia < firstHFQuadPhiRing_ && (ip - 1) % 2 == 0) //36 phi segments, numbered 1,3,...,33,35
107  || (ia >= firstHFQuadPhiRing_ && (ip - 3) % 4 == 0)) //18 phi segments, numbered 71,3,7,11,...
108  );
109 }
std::vector< DetId > CaloTowerTopology::west ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 151 of file CaloTowerTopology.cc.

References createTree::dd, firstHEDoublePhiRing_, firstHFQuadPhiRing_, CaloTowerDetId::ieta(), CaloTowerDetId::iphi(), and lastHFRing_.

151  {
152  std::vector<DetId> dd;
153  CaloTowerDetId tid(id);
154 
155  int ieta = tid.ieta();
156  int iphi = tid.iphi();
157 
158  if (ieta == -1) { //no ieta=0
159  ieta = 1;
160  } else if (ieta == -firstHEDoublePhiRing_) {
161  //currently double phi, going to single phi (negative eta) -> extra neighbor
162  ieta++;
163  dd.emplace_back(CaloTowerDetId(ieta, iphi + 1));
164  } else if (ieta + 1 == firstHEDoublePhiRing_) {
165  //currently single phi, going to double phi (positive eta) -> change numbering
166  if ((iphi % 2) == 0)
167  iphi--;
168  ieta++;
169  } else if (ieta == -firstHFQuadPhiRing_) { //currently quad phi, going to double phi (negative eta) -> extra neighbor
170  ieta++;
171  dd.emplace_back(CaloTowerDetId(ieta, ((iphi + 1) % 72) + 1));
172  } else if (ieta + 1 == firstHFQuadPhiRing_) {
173  //currently double phi, going to quad phi (positive eta) -> change numbering
174  if (((iphi - 1) % 4) == 0) {
175  if (iphi == 1)
176  iphi = 71;
177  else
178  iphi -= 2;
179  }
180  ieta++;
181  } else {
182  ieta++;
183  }
184 
185  if (ieta <= lastHFRing_)
186  dd.emplace_back(CaloTowerDetId(ieta, iphi));
187 
188  return dd;
189 }

Member Data Documentation

int CaloTowerTopology::firstHBRing_
private
int CaloTowerTopology::firstHEDoublePhiRing_
private
int CaloTowerTopology::firstHEQuadPhiRing_
private

Definition at line 65 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), and firstHEQuadPhiRing().

int CaloTowerTopology::firstHERing_
private
int CaloTowerTopology::firstHFQuadPhiRing_
private
int CaloTowerTopology::firstHFRing_
private
int CaloTowerTopology::firstHORing_
private

Definition at line 64 of file CaloTowerTopology.h.

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

const HcalTopology* CaloTowerTopology::hcaltopo
private

Definition at line 60 of file CaloTowerTopology.h.

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

uint32_t CaloTowerTopology::kSizeForDenseIndexing
private
int CaloTowerTopology::lastHBRing_
private

Definition at line 61 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), convertCTtoHcal(), and lastHBRing().

int CaloTowerTopology::lastHERing_
private

Definition at line 62 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), convertCTtoHcal(), and lastHERing().

int CaloTowerTopology::lastHFRing_
private
int CaloTowerTopology::lastHORing_
private

Definition at line 64 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), and lastHORing().

int CaloTowerTopology::nDoublePhi_
private

Definition at line 66 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), denseIndex(), and detIdFromDenseIndex().

int CaloTowerTopology::nEtaHE_
private

Definition at line 66 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), and convertHcaltoCT().

int CaloTowerTopology::nQuadPhi_
private

Definition at line 66 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology().

int CaloTowerTopology::nSinglePhi_
private

Definition at line 66 of file CaloTowerTopology.h.

Referenced by CaloTowerTopology(), denseIndex(), and detIdFromDenseIndex().