CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
HGCalTBTopology Class Reference

#include <HGCalTBTopology.h>

Inheritance diagram for HGCalTBTopology:
CaloSubdetectorTopology

Classes

struct  DecodedDetId
 

Public Member Functions

unsigned int allGeomModules () const
 
const HGCalTBDDDConstantsdddConstants () const
 
DecodedDetId decode (const DetId &id) const
 
DetId denseId2detId (uint32_t denseId) const override
 Dense indexing. More...
 
DetId::Detector detector () const
 
bool detectorType () const
 
virtual uint32_t detId2denseGeomId (const DetId &id) const
 
uint32_t detId2denseId (const DetId &id) const override
 return a linear packed id 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...
 
 HGCalTBTopology (const HGCalTBDDDConstants *hdcons, int subdet)
 create a new Topology More...
 
std::vector< DetIdneighbors (DetId id) const
 
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
 
 ~HGCalTBTopology () override
 default 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_
 
DetId::Detector det_
 
int firstLay_
 
const HGCalTBDDDConstantshdcons_
 
int kHGeomHalf_
 
int kHGhalf_
 
int kHGhalfType_
 
unsigned int kSizeForDenseIndexing
 
int layers_
 
HGCalGeometryMode::GeometryMode mode_
 
int sectors_
 
ForwardSubdetector subdet_
 
int types_
 

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 HGCalTBTopology.h.

Constructor & Destructor Documentation

◆ HGCalTBTopology()

HGCalTBTopology::HGCalTBTopology ( const HGCalTBDDDConstants hdcons,
int  subdet 
)

create a new Topology

Definition at line 8 of file HGCalTBTopology.cc.

References cells_, det_, firstLay_, HGCalTBDDDConstants::firstLayer(), DetId::Forward, HGCalTBDDDConstants::geomMode(), hdcons_, kHGeomHalf_, kHGhalf_, kHGhalfType_, kSizeForDenseIndexing, HGCalTBDDDConstants::layers(), layers_, HGCalTBDDDConstants::maxCells(), mode_, HGCalTBDDDConstants::sectors(), sectors_, subdet_, and types_.

8  : hdcons_(hdcons) {
10  layers_ = hdcons_->layers(true);
11  cells_ = hdcons_->maxCells(true);
12  mode_ = hdcons_->geomMode();
16  subdet_ = static_cast<ForwardSubdetector>(det);
18  types_ = 2;
20  kSizeForDenseIndexing = static_cast<unsigned int>(2 * kHGhalf_);
21 #ifdef EDM_ML_DEBUG
22  edm::LogVerbatim("HGCalGeom") << "HGCalTBTopology initialized for detector " << det << ":" << det_ << ":" << subdet_
23  << " having " << sectors_ << " Sectors, " << layers_ << " Layers from " << firstLay_
24  << ", " << cells_ << " cells and total channels " << kSizeForDenseIndexing << ":"
25  << (2 * kHGeomHalf_);
26 #endif
27 }
Log< level::Info, true > LogVerbatim
unsigned int kSizeForDenseIndexing
DetId::Detector det_
ForwardSubdetector
const HGCalTBDDDConstants * hdcons_
ForwardSubdetector subdet_
HGCalGeometryMode::GeometryMode mode_
unsigned int layers(bool reco) const
HGCalGeometryMode::GeometryMode geomMode() const
int maxCells(bool reco) const

◆ ~HGCalTBTopology()

HGCalTBTopology::~HGCalTBTopology ( )
override

default destructor

Definition at line 29 of file HGCalTBTopology.cc.

29 {}

Member Function Documentation

◆ allGeomModules()

unsigned int HGCalTBTopology::allGeomModules ( ) const

Definition at line 42 of file HGCalTBTopology.cc.

References hdcons_, and HGCalTBDDDConstants::wafers().

Referenced by HGCalTBGeometryLoader::build().

42 { return (static_cast<unsigned int>(2 * hdcons_->wafers())); }
const HGCalTBDDDConstants * hdcons_

◆ changeXY()

DetId HGCalTBTopology::changeXY ( const DetId id,
int  nrStepsX,
int  nrStepsY 
) const
private

move the nagivator along x, y

Definition at line 158 of file HGCalTBTopology.cc.

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

158 { return DetId(); }
Definition: DetId.h:17

◆ changeZ()

DetId HGCalTBTopology::changeZ ( const DetId id,
int  nrStepsZ 
) const
private

move the nagivator along z

Definition at line 160 of file HGCalTBTopology.cc.

Referenced by down(), and up().

160 { return DetId(); }
Definition: DetId.h:17

◆ dddConstants()

const HGCalTBDDDConstants& HGCalTBTopology::dddConstants ( ) const
inline

◆ decode()

HGCalTBTopology::DecodedDetId HGCalTBTopology::decode ( const DetId id) const

Definition at line 133 of file HGCalTBTopology.cc.

References l1ctLayer2EG_cff::id, and heavyIonCSV_trainingSettings::idx.

Referenced by detId2denseGeomId(), detId2denseId(), HGCalTBGeometry::get8Corners(), HGCalTBGeometry::getClosestCell(), HGCalTBGeometry::getCorners(), HGCalTBGeometry::getNewCorners(), HGCalTBGeometry::getPosition(), HGCalTBGeometry::neighborZ(), HGCalTBGeometry::newCell(), switchZSide(), and valid().

133  {
135  HGCalDetId id(startId);
136  idx.iCell1 = id.cell();
137  idx.iCell2 = 0;
138  idx.iLay = id.layer();
139  idx.iSec1 = id.wafer();
140  idx.iSec2 = 0;
141  idx.iType = id.waferType();
142  idx.zSide = id.zside();
143  idx.det = id.subdetId();
144  return idx;
145 }

◆ denseId2detId()

DetId HGCalTBTopology::denseId2detId ( uint32_t  denseId) const
override

Dense indexing.

Definition at line 44 of file HGCalTBTopology.cc.

References encode(), l1ctLayer2EG_cff::id, createfilelist::int, kHGhalfType_, layers_, sectors_, types_, and validHashIndex().

44  {
46  if (validHashIndex(hi)) {
47  id.zSide = ((int)(hi) < kHGhalfType_ ? -1 : 1);
48  int di = ((int)(hi) % kHGhalfType_);
49  int type = (di % types_);
50  id.iType = (type == 0 ? -1 : 1);
51  id.iSec1 = (((di - type) / types_) % sectors_);
52  id.iLay = (((((di - type) / types_) - id.iSec1 + 1) / sectors_) % layers_ + 1);
53  id.iCell1 = (((((di - type) / types_) - id.iSec1 + 1) / sectors_ - id.iLay + 1) / layers_ + 1);
54 #ifdef EDM_ML_DEBUG
55  edm::LogVerbatim("HGCalGeom") << "Input Hex " << hi << " o/p " << id.zSide << ":" << id.iLay << ":" << id.iType
56  << ":" << id.iSec1 << ":" << id.iCell1;
57 #endif
58  }
59  return encode(id);
60 }
Log< level::Info, true > LogVerbatim
DetId encode(const DecodedDetId &id_) const
Definition: EPCuts.h:4
bool validHashIndex(uint32_t ix) const

◆ detector()

DetId::Detector HGCalTBTopology::detector ( ) const
inline

Definition at line 113 of file HGCalTBTopology.h.

References det_.

Referenced by HGCalTBGeometry::getClosestCell().

113 { return det_; }
DetId::Detector det_

◆ detectorType()

bool HGCalTBTopology::detectorType ( ) const
inline

Definition at line 115 of file HGCalTBTopology.h.

115 { return false; }

◆ detId2denseGeomId()

uint32_t HGCalTBTopology::detId2denseGeomId ( const DetId id) const
virtual

Definition at line 76 of file HGCalTBTopology.cc.

References decode(), heavyIonCSV_trainingSettings::idx, kHGeomHalf_, layers_, and sectors_.

Referenced by HGCalTBGeometry::getGeometry(), HGCalTBGeometry::getSummary(), HGCalTBGeometry::indexFor(), HGCalTBGeometry::newCell(), and HGCalTBGeometry::present().

76  {
78  uint32_t idx;
79  idx = (uint32_t)(((id.zSide > 0) ? kHGeomHalf_ : 0) + (id.iLay - 1) * sectors_ + id.iSec1);
80 #ifdef EDM_ML_DEBUG
81  edm::LogVerbatim("HGCalGeom") << "Geom Hex I/P " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iType
82  << " Constants " << kHGeomHalf_ << ":" << layers_ << ":" << sectors_ << " o/p " << idx;
83 #endif
84  return idx;
85 }
Log< level::Info, true > LogVerbatim
DecodedDetId decode(const DetId &id) const

◆ detId2denseId()

uint32_t HGCalTBTopology::detId2denseId ( const DetId ) const
overridevirtual

return a linear packed id

Reimplemented from CaloSubdetectorTopology.

Definition at line 62 of file HGCalTBTopology.cc.

References decode(), heavyIonCSV_trainingSettings::idx, kHGeomHalf_, kHGhalfType_, layers_, sectors_, and types_.

62  {
64  int type = (id.iType > 0) ? 1 : 0;
65  uint32_t idx =
66  static_cast<uint32_t>(((id.zSide > 0) ? kHGhalfType_ : 0) +
67  ((((id.iCell1 - 1) * layers_ + id.iLay - 1) * sectors_ + id.iSec1) * types_ + type));
68 #ifdef EDM_ML_DEBUG
69  edm::LogVerbatim("HGCalGeom") << "Input Hex " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iCell1
70  << ":" << id.iType << " Constants " << kHGeomHalf_ << ":" << layers_ << ":" << sectors_
71  << ":" << types_ << " o/p " << idx;
72 #endif
73  return idx;
74 }
Log< level::Info, true > LogVerbatim
DecodedDetId decode(const DetId &id) const

◆ down()

std::vector<DetId> HGCalTBTopology::down ( const DetId id) const
inlineoverridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 68 of file HGCalTBTopology.h.

References changeZ().

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

◆ east()

std::vector<DetId> HGCalTBTopology::east ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 42 of file HGCalTBTopology.h.

References goEast().

Referenced by neighbors().

42  {
43  DetId nextId = goEast(id);
44  std::vector<DetId> vNeighborsDetId;
45  if (!(nextId == DetId(0)))
46  vNeighborsDetId.emplace_back(nextId);
47  return vNeighborsDetId;
48  }
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
Definition: DetId.h:17

◆ encode()

DetId HGCalTBTopology::encode ( const DecodedDetId id_) const

Definition at line 147 of file HGCalTBTopology.cc.

References l1ctLayer2EG_cff::id, heavyIonCSV_trainingSettings::idx, and DetId::rawId().

Referenced by denseId2detId(), HGCalTBGeometry::getClosestCell(), HGCalTBGeometry::newCell(), and switchZSide().

147  {
148  DetId id;
149 #ifdef EDM_ML_DEBUG
150  edm::LogVerbatim("HGCalGeomX") << "Encode " << idx.det << ":" << idx.zSide << ":" << idx.iType << ":" << idx.iLay
151  << ":" << idx.iSec1 << ":" << idx.iSec2 << ":" << idx.iCell1 << ":" << idx.iCell2;
152 #endif
153  id = HGCalDetId((ForwardSubdetector)(idx.det), idx.zSide, idx.iLay, ((idx.iType > 0) ? 1 : 0), idx.iSec1, idx.iCell1)
154  .rawId();
155  return id;
156 }
Log< level::Info, true > LogVerbatim
ForwardSubdetector
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ geomDenseId2decId()

HGCalTBTopology::DecodedDetId HGCalTBTopology::geomDenseId2decId ( const uint32_t &  hi) const

Definition at line 116 of file HGCalTBTopology.cc.

References l1ctLayer2EG_cff::id, createfilelist::int, kHGeomHalf_, layers_, sectors_, and totalGeomModules().

116  {
118  if (hi < totalGeomModules()) {
119  id.zSide = ((int)(hi) < kHGeomHalf_ ? -1 : 1);
120  int di = ((int)(hi) % kHGeomHalf_);
121  id.iSec1 = (di % sectors_);
122  di = (di - id.iSec1) / sectors_;
123  id.iLay = (di % layers_) + 1;
124  id.iType = ((di - id.iLay + 1) / layers_ == 0) ? -1 : 1;
125 #ifdef EDM_ML_DEBUG
126  edm::LogVerbatim("HGCalGeom") << "Geom Hex I/P " << hi << " O/P " << id.zSide << ":" << id.iType << ":" << id.iLay
127  << ":" << id.iSec1;
128 #endif
129  }
130  return id;
131 }
unsigned int totalGeomModules() const
Log< level::Info, true > LogVerbatim
Definition: EPCuts.h:4

◆ geomMode()

HGCalGeometryMode::GeometryMode HGCalTBTopology::geomMode ( ) const
inline

Geometry mode.

Definition at line 79 of file HGCalTBTopology.h.

References mode_.

79 { return mode_; }
HGCalGeometryMode::GeometryMode mode_

◆ goEast()

DetId HGCalTBTopology::goEast ( const DetId id) const
inlineoverridevirtual

move the Topology east (positive ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 41 of file HGCalTBTopology.h.

References changeXY().

Referenced by east().

41 { return changeXY(id, +1, 0); }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y

◆ goNorth()

DetId HGCalTBTopology::goNorth ( const DetId id) const
inlineoverridevirtual

move the Topology north (increment iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 21 of file HGCalTBTopology.h.

References changeXY().

Referenced by north().

21 { return changeXY(id, 0, +1); }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y

◆ goSouth()

DetId HGCalTBTopology::goSouth ( const DetId id) const
inlineoverridevirtual

move the Topology south (decrement iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 31 of file HGCalTBTopology.h.

References changeXY().

Referenced by south().

31 { return changeXY(id, 0, -1); }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y

◆ goWest()

DetId HGCalTBTopology::goWest ( const DetId id) const
inlineoverridevirtual

move the Topology west (negative ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 51 of file HGCalTBTopology.h.

References changeXY().

Referenced by west().

51 { return changeXY(id, -1, 0); }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y

◆ neighbors()

std::vector< DetId > HGCalTBTopology::neighbors ( DetId  id) const

Definition at line 31 of file HGCalTBTopology.cc.

References east(), north(), south(), and west().

31  {
32  std::vector<DetId> ids = north(idin);
33  for (const auto& id : south(idin))
34  ids.emplace_back(id);
35  for (const auto& id : east(idin))
36  ids.emplace_back(id);
37  for (const auto& id : west(idin))
38  ids.emplace_back(id);
39  return ids;
40 }
std::vector< DetId > north(const DetId &id) const override
std::vector< DetId > west(const DetId &id) const override
std::vector< DetId > east(const DetId &id) const override
std::vector< DetId > south(const DetId &id) const override

◆ north()

std::vector<DetId> HGCalTBTopology::north ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 22 of file HGCalTBTopology.h.

References goNorth().

Referenced by neighbors().

22  {
23  DetId nextId = goNorth(id);
24  std::vector<DetId> vNeighborsDetId;
25  if (!(nextId == DetId(0)))
26  vNeighborsDetId.emplace_back(nextId);
27  return vNeighborsDetId;
28  }
Definition: DetId.h:17
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)

◆ offsetBy()

DetId HGCalTBTopology::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 97 of file HGCalTBTopology.cc.

References changeXY(), DetId::det(), DetId::Forward, l1ctLayer2EG_cff::id, subdet_, DetId::subdetId(), and valid().

97  {
98  if (startId.det() == DetId::Forward && startId.subdetId() == static_cast<int>(subdet_)) {
99  DetId id = changeXY(startId, nrStepsX, nrStepsY);
100  if (valid(id))
101  return id;
102  }
103  return DetId(0);
104 }
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
ForwardSubdetector subdet_
bool valid(const DetId &id) const override
Is this a valid cell id.

◆ south()

std::vector<DetId> HGCalTBTopology::south ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 32 of file HGCalTBTopology.h.

References goSouth().

Referenced by neighbors().

32  {
33  DetId nextId = goSouth(id);
34  std::vector<DetId> vNeighborsDetId;
35  if (!(nextId == DetId(0)))
36  vNeighborsDetId.emplace_back(nextId);
37  return vNeighborsDetId;
38  }
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: DetId.h:17

◆ subDetector()

ForwardSubdetector HGCalTBTopology::subDetector ( ) const
inline

Definition at line 114 of file HGCalTBTopology.h.

References subdet_.

Referenced by HGCalTBGeometryLoader::build().

114 { return subdet_; }
ForwardSubdetector subdet_

◆ switchZSide()

DetId HGCalTBTopology::switchZSide ( const DetId  startId) const

Definition at line 106 of file HGCalTBTopology.cc.

References decode(), encode(), l1ctLayer2EG_cff::id, valid(), and HGCalTBTopology::DecodedDetId::zSide.

106  {
107  HGCalTBTopology::DecodedDetId id_ = decode(startId);
108  id_.zSide = -id_.zSide;
109  DetId id = encode(id_);
110  if (valid(id))
111  return id;
112  else
113  return DetId(0);
114 }
DetId encode(const DecodedDetId &id_) const
Definition: DetId.h:17
DecodedDetId decode(const DetId &id) const
bool valid(const DetId &id) const override
Is this a valid cell id.

◆ totalGeomModules()

unsigned int HGCalTBTopology::totalGeomModules ( ) const
inline

◆ totalModules()

unsigned int HGCalTBTopology::totalModules ( ) const
inline

Definition at line 81 of file HGCalTBTopology.h.

References kSizeForDenseIndexing.

Referenced by HGCalTBGeometry::HGCalTBGeometry().

81 { return kSizeForDenseIndexing; }
unsigned int kSizeForDenseIndexing

◆ up()

std::vector<DetId> HGCalTBTopology::up ( const DetId id) const
inlineoverridevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 60 of file HGCalTBTopology.h.

References changeZ().

60  {
61  DetId nextId = changeZ(id, +1);
62  std::vector<DetId> vNeighborsDetId;
63  if (!(nextId == DetId(0)))
64  vNeighborsDetId.emplace_back(nextId);
65  return vNeighborsDetId;
66  }
Definition: DetId.h:17
DetId changeZ(const DetId &id, int nrStepsZ) const
move the nagivator along z

◆ valid()

bool HGCalTBTopology::valid ( const DetId id) const
overridevirtual

Is this a valid cell id.

Reimplemented from CaloSubdetectorTopology.

Definition at line 87 of file HGCalTBTopology.cc.

References cells_, decode(), DetId::det(), det_, RemoveAddSevLevel::flag, hdcons_, createfilelist::int, HGCalTBDDDConstants::isValidHex(), layers_, sectors_, subdet_, and DetId::subdetId().

Referenced by HGCalTBGeometry::newCell(), offsetBy(), and switchZSide().

87  {
89  bool flag;
90  flag = (idin.det() == det_ && idin.subdetId() == (int)(subdet_) && id.iCell1 >= 0 && id.iCell1 < cells_ &&
91  id.iLay > 0 && id.iLay <= layers_ && id.iSec1 >= 0 && id.iSec1 <= sectors_);
92  if (flag)
93  flag = hdcons_->isValidHex(id.iLay, id.iSec1, id.iCell1, true);
94  return flag;
95 }
DetId::Detector det_
const HGCalTBDDDConstants * hdcons_
DecodedDetId decode(const DetId &id) const
ForwardSubdetector subdet_
bool isValidHex(int lay, int mod, int cell, bool reco) const

◆ validHashIndex()

bool HGCalTBTopology::validHashIndex ( uint32_t  ix) const
inline

Definition at line 92 of file HGCalTBTopology.h.

References kSizeForDenseIndexing.

Referenced by denseId2detId().

92 { return (ix < kSizeForDenseIndexing); }
unsigned int kSizeForDenseIndexing

◆ west()

std::vector<DetId> HGCalTBTopology::west ( const DetId id) const
inlineoverridevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 52 of file HGCalTBTopology.h.

References goWest().

Referenced by neighbors().

52  {
53  DetId nextId = goWest(id);
54  std::vector<DetId> vNeighborsDetId;
55  if (!(nextId == DetId(0)))
56  vNeighborsDetId.emplace_back(nextId);
57  return vNeighborsDetId;
58  }
Definition: DetId.h:17
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)

Member Data Documentation

◆ cells_

int HGCalTBTopology::cells_
private

Definition at line 129 of file HGCalTBTopology.h.

Referenced by HGCalTBTopology(), and valid().

◆ det_

DetId::Detector HGCalTBTopology::det_
private

Definition at line 127 of file HGCalTBTopology.h.

Referenced by detector(), HGCalTBTopology(), and valid().

◆ firstLay_

int HGCalTBTopology::firstLay_
private

Definition at line 129 of file HGCalTBTopology.h.

Referenced by HGCalTBTopology().

◆ hdcons_

const HGCalTBDDDConstants* HGCalTBTopology::hdcons_
private

Definition at line 124 of file HGCalTBTopology.h.

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

◆ kHGeomHalf_

int HGCalTBTopology::kHGeomHalf_
private

◆ kHGhalf_

int HGCalTBTopology::kHGhalf_
private

Definition at line 130 of file HGCalTBTopology.h.

Referenced by HGCalTBTopology().

◆ kHGhalfType_

int HGCalTBTopology::kHGhalfType_
private

Definition at line 130 of file HGCalTBTopology.h.

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

◆ kSizeForDenseIndexing

unsigned int HGCalTBTopology::kSizeForDenseIndexing
private

Definition at line 131 of file HGCalTBTopology.h.

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

◆ layers_

int HGCalTBTopology::layers_
private

◆ mode_

HGCalGeometryMode::GeometryMode HGCalTBTopology::mode_
private

Definition at line 125 of file HGCalTBTopology.h.

Referenced by geomMode(), and HGCalTBTopology().

◆ sectors_

int HGCalTBTopology::sectors_
private

◆ subdet_

ForwardSubdetector HGCalTBTopology::subdet_
private

Definition at line 128 of file HGCalTBTopology.h.

Referenced by HGCalTBTopology(), offsetBy(), subDetector(), and valid().

◆ subSectors_

const int HGCalTBTopology::subSectors_ = 2
static

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

Definition at line 102 of file HGCalTBTopology.h.

◆ types_

int HGCalTBTopology::types_
private

Definition at line 129 of file HGCalTBTopology.h.

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