#include <HGCalTopology.h>
Classes | |
struct | DecodedDetId |
Public Member Functions | |
const HGCalDDDConstants & | dddConstants () const |
DecodedDetId | decode (const DetId &id) const |
virtual DetId | denseId2detId (uint32_t denseId) const |
bool | detectorType () const |
virtual uint32_t | detId2denseGeomId (const DetId &id) const |
virtual uint32_t | detId2denseId (const DetId &id) const |
Dense indexing. More... | |
virtual std::vector< DetId > | down (const DetId &id) const |
virtual std::vector< DetId > | east (const DetId &id) const |
DetId | encode (const DecodedDetId &id_) const |
DecodedDetId | geomDenseId2decId (const uint32_t &hi) const |
virtual DetId | goEast (const DetId &id) const |
move the Topology east (positive ix) More... | |
virtual DetId | goNorth (const DetId &id) const |
move the Topology north (increment iy) More... | |
virtual DetId | goSouth (const DetId &id) const |
move the Topology south (decrement iy) More... | |
virtual DetId | goWest (const DetId &id) const |
move the Topology west (negative ix) More... | |
HGCalTopology (const HGCalDDDConstants &hdcons, ForwardSubdetector subdet, bool halfChamber) | |
create a new Topology More... | |
virtual std::vector< DetId > | north (const DetId &id) const |
DetId | offsetBy (const DetId startId, int nrStepsX, int nrStepsY) const |
virtual std::vector< DetId > | south (const DetId &id) const |
ForwardSubdetector | subDetector () const |
DetId | switchZSide (const DetId startId) const |
unsigned int | totalGeomModules () const |
unsigned int | totalModules () const |
virtual std::vector< DetId > | up (const DetId &id) const |
virtual bool | valid (const DetId &id) const |
Is this a valid cell id. More... | |
bool | validHashIndex (uint32_t ix) const |
virtual std::vector< DetId > | west (const DetId &id) const |
virtual | ~HGCalTopology () |
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< DetId > | getAllNeighbours (const DetId &id) const |
virtual std::vector< DetId > | getNeighbours (const DetId &id, const CaloDirection &dir) const |
virtual std::vector< DetId > | getWindow (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 |
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 HGCalDDDConstants & | hdcons_ |
int | kHGeomHalf_ |
int | kHGhalf_ |
unsigned int | kSizeForDenseIndexing |
int | layers_ |
std::vector< int > | maxcells_ |
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 |
Definition at line 12 of file HGCalTopology.h.
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, half_, hdcons_, kHGeomHalf_, kHGhalf_, kSizeForDenseIndexing, HGCalDDDConstants::layers(), layers_, HGCalDDDConstants::maxCells(), HGCalDDDConstants::sectors(), sectors_, subdet_, and subSectors_.
|
inlinevirtual |
move the nagivator along x, y
Definition at line 141 of file HGCalTopology.cc.
References decode(), encode(), half_, hdcons_, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, HGCalDDDConstants::newCell(), and valid().
Referenced by goEast(), goNorth(), goSouth(), goWest(), and offsetBy().
move the nagivator along z
Definition at line 157 of file HGCalTopology.cc.
References decode(), encode(), half_, hdcons_, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSubSec, HGCalDDDConstants::newCell(), and valid().
Referenced by down(), and up().
|
inline |
Definition at line 97 of file HGCalTopology.h.
References hdcons_.
Referenced by HGCDigitizer::accumulate(), HGCalGeometryLoader::build(), HGCalGeometry::getClosestCell(), HGCalGeometry::getCorners(), HGCalGeometry::getPosition(), and HGCalGeometry::newCell().
HGCalTopology::DecodedDetId HGCalTopology::decode | ( | const DetId & | id | ) | const |
Definition at line 106 of file HGCalTopology.cc.
References HGCEE, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, HGCalTopology::DecodedDetId::subdet, subdet_, and HGCalTopology::DecodedDetId::zside.
Referenced by changeXY(), changeZ(), detId2denseGeomId(), detId2denseId(), HGCalGeometry::getClosestCell(), HGCalGeometry::getCorners(), HGCalGeometry::getPosition(), HGCalGeometry::newCell(), switchZSide(), and valid().
|
virtual |
Definition at line 35 of file HGCalTopology.cc.
References encode(), HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGhalf_, layers_, sectors_, subSectors_, validHashIndex(), and HGCalTopology::DecodedDetId::zside.
|
inline |
Definition at line 117 of file HGCalTopology.h.
References half_.
Referenced by HGCDigitizer::accumulate(), HGCalGeometryLoader::build(), and HGCalGeometry::HGCalGeometry().
|
virtual |
Definition at line 52 of file HGCalTopology.cc.
References decode(), half_, customizeTrackingMonitorSeedNumber::idx, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGeomHalf_, layers_, sectors_, and HGCalTopology::DecodedDetId::zside.
Referenced by HGCalGeometry::indexFor().
|
virtual |
Dense indexing.
Reimplemented from CaloSubdetectorTopology.
Definition at line 25 of file HGCalTopology.cc.
References decode(), HGCalTopology::DecodedDetId::iCell, customizeTrackingMonitorSeedNumber::idx, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGhalf_, layers_, sectors_, subSectors_, and HGCalTopology::DecodedDetId::zside.
Get the neighbors of the given cell in down direction (inward)
Implements CaloSubdetectorTopology.
Definition at line 77 of file HGCalTopology.h.
References changeZ(), and DetId::rawId().
Get the neighbors of the given cell in east direction
Implements CaloSubdetectorTopology.
Definition at line 49 of file HGCalTopology.h.
References goEast(), and DetId::rawId().
DetId HGCalTopology::encode | ( | const DecodedDetId & | id_ | ) | const |
Definition at line 129 of file HGCalTopology.cc.
References HGCEE, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, DetId::rawId(), subdet_, and HGCalTopology::DecodedDetId::zside.
Referenced by changeXY(), changeZ(), denseId2detId(), HGCalGeometry::getClosestCell(), HGCalGeometry::newCell(), and switchZSide().
HGCalTopology::DecodedDetId HGCalTopology::geomDenseId2decId | ( | const uint32_t & | hi | ) | const |
Definition at line 92 of file HGCalTopology.cc.
References HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, HGCalTopology::DecodedDetId::iSubSec, kHGeomHalf_, layers_, sectors_, subSectors_, totalGeomModules(), and HGCalTopology::DecodedDetId::zside.
move the Topology east (positive ix)
Reimplemented from CaloSubdetectorTopology.
Definition at line 46 of file HGCalTopology.h.
References changeXY().
Referenced by east().
move the Topology north (increment iy)
Reimplemented from CaloSubdetectorTopology.
Definition at line 22 of file HGCalTopology.h.
References changeXY().
Referenced by north().
move the Topology south (decrement iy)
Reimplemented from CaloSubdetectorTopology.
Definition at line 34 of file HGCalTopology.h.
References changeXY().
Referenced by south().
move the Topology west (negative ix)
Reimplemented from CaloSubdetectorTopology.
Definition at line 58 of file HGCalTopology.h.
References changeXY().
Referenced by west().
Get the neighbors of the given cell in north direction
Implements CaloSubdetectorTopology.
Definition at line 25 of file HGCalTopology.h.
References goNorth(), and DetId::rawId().
returns a new DetId offset by nrStepsX and nrStepsY (can be negative), returns DetId(0) if invalid
Definition at line 71 of file HGCalTopology.cc.
References changeXY(), DetId::det(), DetId::Forward, subdet_, DetId::subdetId(), and valid().
Get the neighbors of the given cell in south direction
Implements CaloSubdetectorTopology.
Definition at line 37 of file HGCalTopology.h.
References goSouth(), and DetId::rawId().
|
inline |
Definition at line 116 of file HGCalTopology.h.
References subdet_.
Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::HGCalGeometry().
Definition at line 81 of file HGCalTopology.cc.
References decode(), DetId::det(), encode(), DetId::Forward, subdet_, DetId::subdetId(), valid(), and HGCalTopology::DecodedDetId::zside.
|
inline |
Definition at line 95 of file HGCalTopology.h.
References kHGeomHalf_.
Referenced by HGCalGeometryLoader::build(), geomDenseId2decId(), HGCalGeometry::HGCalGeometry(), and HGCalGeometry::sizeForDenseIndex().
|
inline |
Definition at line 94 of file HGCalTopology.h.
References kSizeForDenseIndexing.
Get the neighbors of the given cell in up direction (outward)
Implements CaloSubdetectorTopology.
Definition at line 69 of file HGCalTopology.h.
References changeZ(), and DetId::rawId().
|
virtual |
Is this a valid cell id.
Reimplemented from CaloSubdetectorTopology.
Definition at line 62 of file HGCalTopology.cc.
References cells_, decode(), DetId::Forward, HGCalTopology::DecodedDetId::iCell, HGCalTopology::DecodedDetId::iLay, HGCalTopology::DecodedDetId::iSec, layers_, sectors_, and subdet_.
Referenced by changeXY(), changeZ(), offsetBy(), and switchZSide().
|
inline |
Definition at line 92 of file HGCalTopology.h.
References kSizeForDenseIndexing.
Referenced by denseId2detId().
Get the neighbors of the given cell in west direction
Implements CaloSubdetectorTopology.
Definition at line 61 of file HGCalTopology.h.
References goWest(), and DetId::rawId().
|
private |
Definition at line 129 of file HGCalTopology.h.
Referenced by HGCalTopology(), and valid().
|
private |
Definition at line 128 of file HGCalTopology.h.
Referenced by changeXY(), changeZ(), detectorType(), detId2denseGeomId(), and HGCalTopology().
|
private |
Definition at line 126 of file HGCalTopology.h.
Referenced by changeXY(), changeZ(), dddConstants(), and HGCalTopology().
|
private |
Definition at line 129 of file HGCalTopology.h.
Referenced by detId2denseGeomId(), geomDenseId2decId(), HGCalTopology(), and totalGeomModules().
|
private |
Definition at line 129 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseId(), and HGCalTopology().
|
private |
Definition at line 131 of file HGCalTopology.h.
Referenced by HGCalTopology(), totalModules(), and validHashIndex().
|
private |
Definition at line 129 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and valid().
|
private |
Definition at line 130 of file HGCalTopology.h.
|
private |
Definition at line 129 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and valid().
|
private |
Definition at line 127 of file HGCalTopology.h.
Referenced by decode(), encode(), HGCalTopology(), offsetBy(), subDetector(), switchZSide(), and valid().
|
static |
Definition at line 104 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().