CMS 3D CMS Logo

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_, hpstanc_transforms::max, nDoublePhi_, nEtaHE_, nQuadPhi_, and nSinglePhi_.

8  : hcaltopo(topology) {
9 
10  //get number of towers in each hcal subdet from hcaltopo
11  int nEtaHB, nEtaHO, nEtaHF;
12  nEtaHB = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1;
14  nEtaHO = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1;
15  nEtaHF = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1;
16 #ifdef DebugLog
17  std::cout << "CaloTowerTopology:(1) " << nEtaHB << ":" << nEtaHE_ << ":"
18  << nEtaHO << ":" << nEtaHF << ":" << hcaltopo->isBH() << std::endl;
19 #endif
20  if (hcaltopo->isBH()) 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  firstHFRing_ = lastHERing_ + 1; //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower
28  lastHFRing_ = firstHFRing_ + (nEtaHF - 1) - 1; //nEtaHF - 1 to account for no crossover
29  firstHORing_ = 1;
30  lastHORing_ = firstHORing_ + nEtaHO - 1;
31 #ifdef DebugLog
32  std::cout << "CaloTowerTopology: (2) " << firstHBRing_ << ":" << lastHBRing_
33  << ":" << firstHERing_ << ":" << lastHERing_ << ":" << firstHFRing_
34  << ":" << lastHFRing_ << ":" << firstHORing_ << ":" << lastHORing_
35  << std::endl;
36 #endif
37 
38  //translate phi segmentation boundaries into continuous ieta
43 
44  //number of etas per phi segmentation type
45  int nEtaSinglePhi_, nEtaDoublePhi_, nEtaQuadPhi_;
46  nEtaSinglePhi_ = firstHEDoublePhiRing_ - firstHBRing_;
47  nEtaDoublePhi_ = firstHFQuadPhiRing_ - firstHEDoublePhiRing_;
48  nEtaQuadPhi_ = lastHFRing_ - firstHFQuadPhiRing_ + 1; //include lastHFRing
49 
50  //total number of towers per phi segmentation type
51  nSinglePhi_ = nEtaSinglePhi_*72;
52  nDoublePhi_ = nEtaDoublePhi_*36;
53  nQuadPhi_ = nEtaQuadPhi_*18;
54 
55 #ifdef DebugLog
56  std::cout << "CaloTowerTopology: (3) " << nEtaSinglePhi_ << ":"
57  << nEtaDoublePhi_ << ":" << nEtaQuadPhi_ << ":" << nSinglePhi_
58  << ":" << nDoublePhi_ << ":" << nQuadPhi_ << std::endl;
59 #endif
60 
61  //calculate maximum dense index size
63 
64 }
int firstHFRing() const
Definition: HcalTopology.h:91
int firstHBRing() const
Definition: HcalTopology.h:87
int lastHBRing() const
Definition: HcalTopology.h:88
uint32_t kSizeForDenseIndexing
int lastHFRing() const
Definition: HcalTopology.h:92
int firstHORing() const
Definition: HcalTopology.h:93
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:96
const HcalTopology * hcaltopo
bool isBH() const
Definition: HcalTopology.h:159
int firstHERing() const
Definition: HcalTopology.h:89
int firstHFQuadPhiRing() const
Definition: HcalTopology.h:98
int firstHEQuadPhiRing() const
Definition: HcalTopology.h:97
int lastHORing() const
Definition: HcalTopology.h:94
int lastHERing() const
Definition: HcalTopology.h:90
CaloTowerTopology::~CaloTowerTopology ( )
inlineoverride

virtual destructor

Definition at line 18 of file CaloTowerTopology.h.

References down(), east(), north(), south(), up(), valid(), validDetId(), and west().

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(), firstHFQuadPhiRing(), CaloTowersCreationAlgo::hadShwrPos(), and CaloTowerHardcodeGeometryLoader::makeCell().

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

Definition at line 75 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(), firstHFQuadPhiRing(), and CaloTowerConstituentsMap::towerOf().

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

Definition at line 218 of file CaloTowerTopology.cc.

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

Referenced by CaloTowersCreationAlgo::convert(), CaloTowersCreationAlgo::find(), firstHFQuadPhiRing(), CaloTowerGeometry::getGeometry(), CaloTowerGeometry::indexFor(), CaloTowerGeometry::newCell(), HLTHcalTowerNoiseCleaner::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), and CaloGeometryDBEP< T, U >::produceAligned().

218  {
219  CaloTowerDetId tid(id);
220  const int ie ( tid.ietaAbs() );
221  const int ip ( tid.iphi() - 1 ) ;
222 
223  return ( ( 0 > tid.zside() ? 0 : kSizeForDenseIndexing/2 ) +
224  ( ( firstHEDoublePhiRing_ > ie ? ( ie - 1 )*72 + ip :
225  ( firstHFQuadPhiRing_ > ie ? nSinglePhi_ + ( ie - firstHEDoublePhiRing_ )*36 + ip/2 :
226  nSinglePhi_ + nDoublePhi_ + ( ie - firstHFQuadPhiRing_ )*18 + ip/4 ) ) ) );
227 }
uint32_t kSizeForDenseIndexing
CaloTowerDetId CaloTowerTopology::detIdFromDenseIndex ( uint32_t  din) const

Definition at line 229 of file CaloTowerTopology.cc.

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

Referenced by firstHFQuadPhiRing(), CaloTowerHardcodeGeometryLoader::makeCell(), CaloTowersCreationAlgo::makeEcalBadChs(), and CaloGeometryDBEP< T, U >::produceAligned().

229  {
230  const int iz ( din < kSizeForDenseIndexing/2 ? -1 : 1 ) ;
232  const int ie ( nSinglePhi_ + nDoublePhi_ - 1 < (int)(din) ?
234  ( nSinglePhi_ - 1 < (int)din ?
236  din/72 + 1 ) ) ;
237 
238  const int ip ( nSinglePhi_ + nDoublePhi_ - 1 < (int)(din) ?
239  ( ( din - nSinglePhi_ - nDoublePhi_ )%18 )*4 + 3 :
240  ( nSinglePhi_ - 1 < (int)(din) ?
241  ( ( din - nSinglePhi_ )%36 )*2 + 1 :
242  din%72 + 1 ) ) ;
243 
244  return ( validDenseIndex( din ) ? CaloTowerDetId( iz*ie, ip ) : CaloTowerDetId() ) ;
245 }
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 214 of file CaloTowerTopology.cc.

Referenced by ~CaloTowerTopology().

214  {
215  return std::vector<DetId>();
216 }
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 110 of file CaloTowerTopology.cc.

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

Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(), and ~CaloTowerTopology().

110  {
111  std::vector<DetId> dd;
112  CaloTowerDetId tid(id);
113  int ieta=tid.ieta();
114  int iphi=tid.iphi();
115 
116  if (ieta==1) { //no ieta=0
117  ieta=-1;
118  } else if (ieta==firstHEDoublePhiRing_) { //currently double phi, going to single phi (positive eta) -> extra neighbor
119  ieta--;
120  dd.emplace_back(CaloTowerDetId(ieta,iphi+1));
121  } else if (ieta-1==-firstHEDoublePhiRing_) { //currently single phi, going to double phi (negative eta) -> change numbering
122  if ((iphi%2)==0) iphi--;
123  ieta--;
124  } else if (ieta==firstHFQuadPhiRing_) { //currently quad phi, going to double phi (positive eta) -> extra neighbor
125  ieta--;
126  dd.emplace_back(CaloTowerDetId(ieta,((iphi+1)%72)+1));
127  } else if (ieta-1==-firstHFQuadPhiRing_) { //currently double phi, going to quad phi (negative eta) -> change numbering
128  if (((iphi-1)%4)==0) {
129  if (iphi==1) iphi=71;
130  else iphi-=2;
131  }
132  ieta--;
133  } else { //general case
134  ieta--;
135  }
136 
137  if (ieta>=-lastHFRing_) dd.emplace_back(CaloTowerDetId(ieta,iphi));
138  return dd;
139 }
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_.

int CaloTowerTopology::firstHERing ( ) const
inline
int CaloTowerTopology::firstHFQuadPhiRing ( ) const
inline
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 176 of file CaloTowerTopology.cc.

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

Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(), and ~CaloTowerTopology().

176  {
177  CaloTowerDetId tid(id);
178  int iphi_n=tid.iphi()+1;
179  if (iphi_n>72) iphi_n=1;
180  if (tid.ietaAbs()>=firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,...
181  iphi_n+=3;
182  if (iphi_n>72) iphi_n-=72;
183  } else if (tid.ietaAbs()>=firstHEDoublePhiRing_ && (iphi_n%2)==0) { //36 phi segments, numbered 1,3,...,33,35
184  iphi_n++;
185  if (iphi_n>72) iphi_n-=72;
186  }
187 
188  std::vector<DetId> dd;
189  dd.emplace_back(CaloTowerDetId(tid.ieta(),iphi_n));
190  return dd;
191 }
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 194 of file CaloTowerTopology.cc.

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

Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(), and ~CaloTowerTopology().

194  {
195  CaloTowerDetId tid(id);
196  int iphi_s=tid.iphi()-1;
197  if (iphi_s==0) iphi_s=72;
198  if (tid.ietaAbs()>=firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,...
199  iphi_s-=3;
200  if (iphi_s<=0) iphi_s+=72;
201  } else if (tid.ietaAbs()>=firstHEDoublePhiRing_ && (iphi_s%2)==0) { //36 phi segments, numbered 1,3,...,33,35
202  iphi_s--;
203  }
204 
205  std::vector<DetId> dd;
206  dd.emplace_back(CaloTowerDetId(tid.ieta(),iphi_s));
207  return dd;
208 }
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 210 of file CaloTowerTopology.cc.

Referenced by ~CaloTowerTopology().

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

is this detid present in the Topology?

Reimplemented from CaloSubdetectorTopology.

Definition at line 92 of file CaloTowerTopology.cc.

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

Referenced by ~CaloTowerTopology().

92  {
93  assert(id.det()==DetId::Calo && id.subdetId()==CaloTowerDetId::SubdetId);
94  return validDetId(id);
95 }
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 97 of file CaloTowerTopology.cc.

References firstHBRing_, firstHEDoublePhiRing_, firstHFQuadPhiRing_, and lastHFRing_.

Referenced by valid(), and ~CaloTowerTopology().

97  {
98  int ia = id.ietaAbs();
99  int ip = id.iphi();
100 
101  return ( (ia >= firstHBRing_) && (ia <= lastHFRing_) //eta range
102  && (ip >= 1) && (ip <= 72) //phi range
103  && ( (ia < firstHEDoublePhiRing_) //72 phi segments
104  || (ia < firstHFQuadPhiRing_ && (ip-1)%2 == 0) //36 phi segments, numbered 1,3,...,33,35
105  || (ia >= firstHFQuadPhiRing_ && (ip-3)%4 == 0) ) //18 phi segments, numbered 71,3,7,11,...
106  );
107 }
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 142 of file CaloTowerTopology.cc.

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

Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(), and ~CaloTowerTopology().

142  {
143  std::vector<DetId> dd;
144  CaloTowerDetId tid(id);
145 
146  int ieta=tid.ieta();
147  int iphi=tid.iphi();
148 
149  if (ieta==-1) { //no ieta=0
150  ieta=1;
151  } else if (ieta==-firstHEDoublePhiRing_) { //currently double phi, going to single phi (negative eta) -> extra neighbor
152  ieta++;
153  dd.emplace_back(CaloTowerDetId(ieta,iphi+1));
154  } else if (ieta+1==firstHEDoublePhiRing_) { //currently single phi, going to double phi (positive eta) -> change numbering
155  if ((iphi%2)==0) iphi--;
156  ieta++;
157  } else if (ieta==-firstHFQuadPhiRing_) { //currently quad phi, going to double phi (negative eta) -> extra neighbor
158  ieta++;
159  dd.emplace_back(CaloTowerDetId(ieta,((iphi+1)%72)+1));
160  } else if (ieta+1==firstHFQuadPhiRing_) { //currently double phi, going to quad phi (positive eta) -> change numbering
161  if (((iphi-1)%4)==0) {
162  if (iphi==1) iphi=71;
163  else iphi-=2;
164  }
165  ieta++;
166  } else {
167  ieta++;
168  }
169 
170  if (ieta<=lastHFRing_) dd.emplace_back(CaloTowerDetId(ieta,iphi));
171 
172  return dd;
173 }

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