CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
HGCalTopology Class Reference

#include <HGCalTopology.h>

Inheritance diagram for HGCalTopology:
CaloSubdetectorTopology

Classes

struct  DecodedDetId
 

Public Member Functions

unsigned int allGeomModules () const
 
const HGCalDDDConstantsdddConstants () const
 
DecodedDetId decode (const DetId &id) const
 
DetId denseId2detId (uint32_t denseId) const override
 
bool detectorType () const
 
virtual uint32_t detId2denseGeomId (const DetId &id) const
 
uint32_t detId2denseId (const DetId &id) const override
 Dense indexing. More...
 
std::vector< DetIddown (const DetId &id) const override
 
std::vector< DetIdeast (const DetId &id) const override
 
DetId encode (const DecodedDetId &id_) const
 
DecodedDetId geomDenseId2decId (const uint32_t &hi) const
 
HGCalGeometryMode::GeometryMode geomMode () const
 Geometry mode. More...
 
DetId goEast (const DetId &id) const override
 move the Topology east (positive ix) More...
 
DetId goNorth (const DetId &id) const override
 move the Topology north (increment iy) More...
 
DetId goSouth (const DetId &id) const override
 move the Topology south (decrement iy) More...
 
DetId goWest (const DetId &id) const override
 move the Topology west (negative ix) More...
 
 HGCalTopology (const HGCalDDDConstants &hdcons, ForwardSubdetector subdet, bool halfChamber)
 create a new Topology More...
 
std::vector< DetIdnorth (const DetId &id) const override
 
DetId offsetBy (const DetId startId, int nrStepsX, int nrStepsY) const
 
std::vector< DetIdsouth (const DetId &id) const override
 
ForwardSubdetector subDetector () const
 
DetId switchZSide (const DetId startId) const
 
unsigned int totalGeomModules () const
 
unsigned int totalModules () const
 
std::vector< DetIdup (const DetId &id) const override
 
bool valid (const DetId &id) const override
 Is this a valid cell id. More...
 
bool validHashIndex (uint32_t ix) const
 
std::vector< DetIdwest (const DetId &id) const override
 
 ~HGCalTopology () 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 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 goUp (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...
 

Static Public Attributes

static const int subSectors_ = 2
 Use subSector in square mode as wafer type in hexagon mode. More...
 

Private Member Functions

DetId changeXY (const DetId &id, int nrStepsX, int nrStepsY) const
 move the nagivator along x, y More...
 
DetId changeZ (const DetId &id, int nrStepsZ) const
 move the nagivator along z More...
 

Private Attributes

int cells_
 
bool half_
 
const HGCalDDDConstantshdcons_
 
int kHGeomHalf_
 
int kHGhalf_
 
unsigned int kSizeForDenseIndexing
 
int layers_
 
std::vector< int > maxcells_
 
HGCalGeometryMode::GeometryMode mode_
 
int sectors_
 
ForwardSubdetector subdet_
 

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

Definition at line 12 of file HGCalTopology.h.

Constructor & Destructor Documentation

HGCalTopology::HGCalTopology ( const HGCalDDDConstants hdcons,
ForwardSubdetector  subdet,
bool  halfChamber 
)

create a new Topology

Definition at line 6 of file HGCalTopology.cc.

References cells_, gather_cfg::cout, HGCalDDDConstants::geomMode(), half_, hdcons_, createfilelist::int, kHGeomHalf_, kHGhalf_, kSizeForDenseIndexing, HGCalDDDConstants::layers(), layers_, HGCalDDDConstants::maxCells(), mode_, HGCalDDDConstants::sectors(), sectors_, HGCalGeometryMode::Square, subdet_, and subSectors_.

8  : hdcons_(hdcons), subdet_(subdet),
9  half_(half) {
11  layers_ = hdcons_.layers(true);
12  cells_ = hdcons_.maxCells(true);
17  } else {
20  }
21  kSizeForDenseIndexing = (unsigned int)(2*kHGhalf_);
22 #ifdef EDM_ML_DEBUG
23  std::cout << "HGCalTopology initialized for subdetector " << subdet_
24  << " having half-chamber flag " << half_ << " with " << sectors_
25  << " Sectors " << layers_ << " Layers " << cells_
26  << " cells and total channels " << kSizeForDenseIndexing << ":"
27  << (2*kHGeomHalf_) << std::endl;
28 #endif
29 }
HGCalGeometryMode::GeometryMode mode_
unsigned int layers(bool reco) const
static const int subSectors_
Use subSector in square mode as wafer type in hexagon mode.
HGCalGeometryMode::GeometryMode geomMode() const
int sectors() const
ForwardSubdetector subdet_
const HGCalDDDConstants & hdcons_
unsigned int kSizeForDenseIndexing
int maxCells(bool reco) const
HGCalTopology::~HGCalTopology ( )
inlineoverride

virtual destructor

Definition at line 19 of file HGCalTopology.h.

19 { }

Member Function Documentation

unsigned int HGCalTopology::allGeomModules ( ) const

Definition at line 31 of file HGCalTopology.cc.

References hdcons_, kHGeomHalf_, mode_, gen::n, HGCalGeometryMode::Square, and HGCalDDDConstants::wafers().

Referenced by HGCalGeometryLoader::build(), and totalGeomModules().

31  {
32  int n = (mode_ == HGCalGeometryMode::Square) ?
33  (2*kHGeomHalf_) : (2*hdcons_.wafers());
34  return (unsigned int)(n);
35 }
HGCalGeometryMode::GeometryMode mode_
const HGCalDDDConstants & hdcons_
DetId HGCalTopology::changeXY ( const DetId id,
int  nrStepsX,
int  nrStepsY 
) const
private

move the nagivator along x, y

Definition at line 178 of file HGCalTopology.cc.

Referenced by detectorType(), goEast(), goNorth(), goSouth(), goWest(), and offsetBy().

179  {
180 
181  return DetId();
182 }
Definition: DetId.h:18
DetId HGCalTopology::changeZ ( const DetId id,
int  nrStepsZ 
) const
private

move the nagivator along z

Definition at line 185 of file HGCalTopology.cc.

Referenced by detectorType(), down(), and up().

185  {
186 
187  return DetId();
188 }
Definition: DetId.h:18
const HGCalDDDConstants& HGCalTopology::dddConstants ( ) const
inline
HGCalTopology::DecodedDetId HGCalTopology::decode ( const DetId id) const

Definition at line 151 of file HGCalTopology.cc.

References HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, HGCalTopology::DecodedDetId::iCell, triggerObjects_cff::id, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, mode_, HGCalTopology::DecodedDetId::subdet, and HGCalTopology::DecodedDetId::zside.

Referenced by detId2denseGeomId(), detId2denseId(), HGCalGeometry::getClosestCell(), HGCalGeometry::getCorners(), HGCalGeometry::getPosition(), HGCalGeometry::newCell(), switchZSide(), and valid().

151  {
152 
154  if ((mode_ == HGCalGeometryMode::Hexagon) ||
156  HGCalDetId id(startId);
157  id_.iCell = id.cell();
158  id_.iLay = id.layer();
159  id_.iSec = id.wafer();
160  id_.iSubSec= id.waferType();
161  id_.zside = id.zside();
162  id_.subdet = id.subdetId();
163  }
164  return id_;
165 }
HGCalGeometryMode::GeometryMode mode_
DetId HGCalTopology::denseId2detId ( uint32_t  denseId) const
override

Definition at line 54 of file HGCalTopology.cc.

References encode(), HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, createfilelist::int, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGhalf_, layers_, mode_, sectors_, HGCalGeometryMode::Square, subSectors_, validHashIndex(), and HGCalTopology::DecodedDetId::zside.

Referenced by geomMode().

54  {
55 
56  if (validHashIndex(hi)) {
58  id_.zside = ((int)(hi)<kHGhalf_ ? -1 : 1);
59  int di = ((int)(hi)%kHGhalf_);
60  int iSubSec= (di%subSectors_);
61  id_.iSubSec= (iSubSec == 0 ? -1 : 1);
63  id_.iSec = (((di-iSubSec)/subSectors_)%sectors_+1);
64  } else {
65  id_.iSec = (((di-iSubSec)/subSectors_)%sectors_);
66  }
67  id_.iLay = (((((di-iSubSec)/subSectors_)-id_.iSec+1)/sectors_)%layers_+1);
68  id_.iCell = (((((di-iSubSec)/subSectors_)-id_.iSec+1)/sectors_-id_.iLay+1)/layers_+1);
69  return encode(id_);
70  } else {
71  return DetId(0);
72  }
73 }
bool validHashIndex(uint32_t ix) const
Definition: HGCalTopology.h:95
HGCalGeometryMode::GeometryMode mode_
DetId encode(const DecodedDetId &id_) const
static const int subSectors_
Use subSector in square mode as wafer type in hexagon mode.
Definition: DetId.h:18
bool HGCalTopology::detectorType ( ) const
inline
uint32_t HGCalTopology::detId2denseGeomId ( const DetId id) const
virtual

Definition at line 75 of file HGCalTopology.cc.

References gather_cfg::cout, decode(), half_, training_settings::idx, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGeomHalf_, layers_, mode_, sectors_, HGCalGeometryMode::Square, and HGCalTopology::DecodedDetId::zside.

Referenced by geomMode(), and HGCalGeometry::indexFor().

75  {
76 
78  int isubsec= (half_ && id_.iSubSec > 0) ? 1 : 0;
79  uint32_t idx;
81  idx = (uint32_t)(((id_.zside > 0) ? kHGeomHalf_ : 0) +
82  ((isubsec*layers_+id_.iLay-1)*sectors_+id_.iSec-1));
83  } else {
84  idx = (uint32_t)(((id_.zside > 0) ? kHGeomHalf_ : 0) +
85  ((isubsec*layers_+id_.iLay-1)*sectors_+id_.iSec));
86 #ifdef EDM_ML_DEBUG
87  std::cout << "I/P " << id_.zside << ":" << id_.iLay << ":" << id_.iSec
88  << ":" << isubsec << " Constants " << kHGeomHalf_ << ":"
89  << layers_ << ":" << sectors_ << " o/p " << idx << std::endl;
90 #endif
91  }
92  return idx;
93 }
HGCalGeometryMode::GeometryMode mode_
DecodedDetId decode(const DetId &id) const
uint32_t HGCalTopology::detId2denseId ( const DetId id) const
overridevirtual

Dense indexing.

Reimplemented from CaloSubdetectorTopology.

Definition at line 37 of file HGCalTopology.cc.

References decode(), HGCalTopology::DecodedDetId::iCell, training_settings::idx, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGhalf_, layers_, mode_, sectors_, HGCalGeometryMode::Square, subSectors_, and HGCalTopology::DecodedDetId::zside.

Referenced by geomMode().

37  {
38 
40  int isubsec= (id_.iSubSec > 0) ? 1 : 0;
41  uint32_t idx;
43  idx = (uint32_t)((((id_.zside > 0) ? kHGhalf_ : 0) +
44  ((((id_.iCell-1)*layers_+id_.iLay-1)*sectors_+
45  id_.iSec-1)*subSectors_+isubsec)));
46  } else {
47  idx = (uint32_t)((((id_.zside > 0) ? kHGhalf_ : 0) +
48  ((((id_.iCell-1)*layers_+id_.iLay-1)*sectors_+
49  id_.iSec)*subSectors_+isubsec)));
50  }
51  return idx;
52 }
HGCalGeometryMode::GeometryMode mode_
static const int subSectors_
Use subSector in square mode as wafer type in hexagon mode.
DecodedDetId decode(const DetId &id) const
std::vector<DetId> HGCalTopology::down ( const DetId id) const
inlineoverridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 77 of file HGCalTopology.h.

References changeZ().

77  {
78  DetId nextId=changeZ(id,-1);
79  std::vector<DetId> vNeighborsDetId;
80  if (! (nextId==DetId(0)))
81  vNeighborsDetId.emplace_back(nextId);
82  return vNeighborsDetId;
83  }
DetId changeZ(const DetId &id, int nrStepsZ) const
move the nagivator along z
Definition: DetId.h:18
std::vector<DetId> HGCalTopology::east ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 49 of file HGCalTopology.h.

References goEast().

49  {
50  DetId nextId=goEast(id);
51  std::vector<DetId> vNeighborsDetId;
52  if (! (nextId==DetId(0)))
53  vNeighborsDetId.emplace_back(nextId);
54  return vNeighborsDetId;
55  }
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
Definition: HGCalTopology.h:46
Definition: DetId.h:18
DetId HGCalTopology::encode ( const DecodedDetId id_) const
HGCalTopology::DecodedDetId HGCalTopology::geomDenseId2decId ( const uint32_t &  hi) const

Definition at line 133 of file HGCalTopology.cc.

References HGCalTopology::DecodedDetId::iLay, createfilelist::int, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGeomHalf_, layers_, mode_, sectors_, HGCalGeometryMode::Square, subSectors_, totalGeomModules(), and HGCalTopology::DecodedDetId::zside.

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

133  {
134 
136  if (hi < totalGeomModules()) {
137  id_.zside = ((int)(hi)<kHGeomHalf_ ? -1 : 1);
138  int di = ((int)(hi)%kHGeomHalf_);
139  int iSubSec= (di%subSectors_);
140  id_.iSubSec= (iSubSec == 0 ? -1 : 1);
142  id_.iSec = (((di-iSubSec)/subSectors_)%sectors_+1);
143  } else {
144  id_.iSec = (((di-iSubSec)/subSectors_)%sectors_);
145  }
146  id_.iLay = (((((di-iSubSec)/subSectors_)-id_.iSec+1)/sectors_)%layers_+1);
147  }
148  return id_;
149 }
HGCalGeometryMode::GeometryMode mode_
unsigned int totalGeomModules() const
Definition: HGCalTopology.h:98
static const int subSectors_
Use subSector in square mode as wafer type in hexagon mode.
HGCalGeometryMode::GeometryMode HGCalTopology::geomMode ( ) const
inline

Geometry mode.

Definition at line 86 of file HGCalTopology.h.

References denseId2detId(), detId2denseGeomId(), detId2denseId(), mode_, and valid().

Referenced by HGCalGeometryLoader::build().

86 {return mode_;}
HGCalGeometryMode::GeometryMode mode_
DetId HGCalTopology::goEast ( const DetId id) const
inlineoverridevirtual

move the Topology east (positive ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 46 of file HGCalTopology.h.

References changeXY().

Referenced by east().

46  {
47  return changeXY(id,+1,0);
48  }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
DetId HGCalTopology::goNorth ( const DetId id) const
inlineoverridevirtual

move the Topology north (increment iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 22 of file HGCalTopology.h.

References changeXY().

Referenced by north().

22  {
23  return changeXY(id,0,+1);
24  }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
DetId HGCalTopology::goSouth ( const DetId id) const
inlineoverridevirtual

move the Topology south (decrement iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 34 of file HGCalTopology.h.

References changeXY().

Referenced by south().

34  {
35  return changeXY(id,0,-1);
36  }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
DetId HGCalTopology::goWest ( const DetId id) const
inlineoverridevirtual

move the Topology west (negative ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 58 of file HGCalTopology.h.

References changeXY().

Referenced by west().

58  {
59  return changeXY(id,-1,0);
60  }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
std::vector<DetId> HGCalTopology::north ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 25 of file HGCalTopology.h.

References goNorth().

25  {
26  DetId nextId= goNorth(id);
27  std::vector<DetId> vNeighborsDetId;
28  if (! (nextId==DetId(0)))
29  vNeighborsDetId.emplace_back(nextId);
30  return vNeighborsDetId;
31  }
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
Definition: HGCalTopology.h:22
Definition: DetId.h:18
DetId HGCalTopology::offsetBy ( const DetId  startId,
int  nrStepsX,
int  nrStepsY 
) const

returns a new DetId offset by nrStepsX and nrStepsY (can be negative), returns DetId(0) if invalid

Definition at line 112 of file HGCalTopology.cc.

References changeXY(), DetId::det(), DetId::Forward, triggerObjects_cff::id, createfilelist::int, subdet_, DetId::subdetId(), and valid().

Referenced by dddConstants().

113  {
114 
115  if (startId.det() == DetId::Forward && startId.subdetId() == (int)(subdet_)){
116  DetId id = changeXY(startId,nrStepsX,nrStepsY);
117  if (valid(id)) return id;
118  }
119  return DetId(0);
120 }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
ForwardSubdetector subdet_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
Definition: DetId.h:18
bool valid(const DetId &id) const override
Is this a valid cell id.
Detector det() const
get the detector field from this detid
Definition: DetId.h:36
std::vector<DetId> HGCalTopology::south ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 37 of file HGCalTopology.h.

References goSouth().

37  {
38  DetId nextId= goSouth(id);
39  std::vector<DetId> vNeighborsDetId;
40  if (! (nextId==DetId(0)))
41  vNeighborsDetId.emplace_back(nextId);
42  return vNeighborsDetId;
43  }
Definition: DetId.h:18
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: HGCalTopology.h:34
ForwardSubdetector HGCalTopology::subDetector ( ) const
inline

Definition at line 121 of file HGCalTopology.h.

References subdet_.

Referenced by HGCalGeometryLoader::build().

121 { return subdet_;}
ForwardSubdetector subdet_
DetId HGCalTopology::switchZSide ( const DetId  startId) const

Definition at line 122 of file HGCalTopology.cc.

References decode(), DetId::det(), encode(), DetId::Forward, triggerObjects_cff::id, createfilelist::int, subdet_, DetId::subdetId(), valid(), and HGCalTopology::DecodedDetId::zside.

Referenced by dddConstants().

122  {
123 
124  if (startId.det() == DetId::Forward && startId.subdetId() == (int)(subdet_)){
125  HGCalTopology::DecodedDetId id_ = decode(startId);
126  id_.zside =-id_.zside;
127  DetId id = encode(id_);
128  if (valid(id)) return id;
129  }
130  return DetId(0);
131 }
DetId encode(const DecodedDetId &id_) const
ForwardSubdetector subdet_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
DecodedDetId decode(const DetId &id) const
Definition: DetId.h:18
bool valid(const DetId &id) const override
Is this a valid cell id.
Detector det() const
get the detector field from this detid
Definition: DetId.h:36
unsigned int HGCalTopology::totalGeomModules ( ) const
inline
unsigned int HGCalTopology::totalModules ( ) const
inline

Definition at line 97 of file HGCalTopology.h.

References kSizeForDenseIndexing.

97 {return kSizeForDenseIndexing;}
unsigned int kSizeForDenseIndexing
std::vector<DetId> HGCalTopology::up ( const DetId id) const
inlineoverridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 69 of file HGCalTopology.h.

References changeZ().

69  {
70  DetId nextId=changeZ(id,+1);
71  std::vector<DetId> vNeighborsDetId;
72  if (! (nextId==DetId(0)))
73  vNeighborsDetId.emplace_back(nextId);
74  return vNeighborsDetId;
75  }
DetId changeZ(const DetId &id, int nrStepsZ) const
move the nagivator along z
Definition: DetId.h:18
bool HGCalTopology::valid ( const DetId id) const
overridevirtual

Is this a valid cell id.

Reimplemented from CaloSubdetectorTopology.

Definition at line 95 of file HGCalTopology.cc.

References cells_, decode(), RemoveAddSevLevel::flag, DetId::Forward, hdcons_, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, createfilelist::int, HGCalTopology::DecodedDetId::iSec, HGCalDDDConstants::isValid(), layers_, mode_, sectors_, HGCalGeometryMode::Square, and subdet_.

Referenced by geomMode(), offsetBy(), switchZSide(), HGCalTriggerGeometryHexImp2::validCellId(), and HGCalTriggerGeometryHexLayerBasedImp1::validCellId().

95  {
96 
98  bool flag;
100  flag = (id.det() == DetId::Forward && id.subdetId() == (int)(subdet_) &&
101  id_.iCell >= 0 && id_.iCell < cells_ && id_.iLay > 0 &&
102  id_.iLay <= layers_ && id_.iSec > 0 && id_.iSec <= sectors_);
103  } else {
104  flag = (id.det() == DetId::Forward && id.subdetId() == (int)(subdet_) &&
105  id_.iCell >= 0 && id_.iCell < cells_ && id_.iLay > 0 &&
106  id_.iLay <= layers_ && id_.iSec >= 0 && id_.iSec <= sectors_);
107  if (flag) flag = hdcons_.isValid(id_.iLay,id_.iSec,id_.iCell,true);
108  }
109  return flag;
110 }
bool isValid(int lay, int mod, int cell, bool reco) const
HGCalGeometryMode::GeometryMode mode_
ForwardSubdetector subdet_
const HGCalDDDConstants & hdcons_
DecodedDetId decode(const DetId &id) const
bool HGCalTopology::validHashIndex ( uint32_t  ix) const
inline

Definition at line 95 of file HGCalTopology.h.

References kSizeForDenseIndexing.

Referenced by denseId2detId().

95 {return (ix < kSizeForDenseIndexing);}
unsigned int kSizeForDenseIndexing
std::vector<DetId> HGCalTopology::west ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 61 of file HGCalTopology.h.

References goWest().

61  {
62  DetId nextId=goWest(id);
63  std::vector<DetId> vNeighborsDetId;
64  if (! (nextId==DetId(0)))
65  vNeighborsDetId.emplace_back(nextId);
66  return vNeighborsDetId;
67  }
Definition: DetId.h:18
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)
Definition: HGCalTopology.h:58

Member Data Documentation

int HGCalTopology::cells_
private

Definition at line 136 of file HGCalTopology.h.

Referenced by HGCalTopology(), and valid().

bool HGCalTopology::half_
private

Definition at line 135 of file HGCalTopology.h.

Referenced by detectorType(), detId2denseGeomId(), and HGCalTopology().

const HGCalDDDConstants& HGCalTopology::hdcons_
private

Definition at line 131 of file HGCalTopology.h.

Referenced by allGeomModules(), dddConstants(), HGCalTopology(), and valid().

int HGCalTopology::kHGeomHalf_
private
int HGCalTopology::kHGhalf_
private

Definition at line 137 of file HGCalTopology.h.

Referenced by denseId2detId(), detId2denseId(), and HGCalTopology().

unsigned int HGCalTopology::kSizeForDenseIndexing
private

Definition at line 139 of file HGCalTopology.h.

Referenced by HGCalTopology(), totalModules(), and validHashIndex().

int HGCalTopology::layers_
private
std::vector<int> HGCalTopology::maxcells_
private

Definition at line 138 of file HGCalTopology.h.

HGCalGeometryMode::GeometryMode HGCalTopology::mode_
private
int HGCalTopology::sectors_
private
ForwardSubdetector HGCalTopology::subdet_
private

Definition at line 134 of file HGCalTopology.h.

Referenced by encode(), HGCalTopology(), offsetBy(), subDetector(), switchZSide(), and valid().

const int HGCalTopology::subSectors_ = 2
static

Use subSector in square mode as wafer type in hexagon mode.

Definition at line 109 of file HGCalTopology.h.

Referenced by denseId2detId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().