#include <HGCalTopology.h>
Classes | |
struct | DecodedDetId |
Public Member Functions | |
unsigned int | allGeomModules () const |
const HGCalDDDConstants & | dddConstants () 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< DetId > | down (const DetId &id) const override |
std::vector< DetId > | east (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< DetId > | north (const DetId &id) const override |
DetId | offsetBy (const DetId startId, int nrStepsX, int nrStepsY) const |
std::vector< DetId > | south (const DetId &id) const override |
ForwardSubdetector | subDetector () const |
DetId | switchZSide (const DetId startId) const |
unsigned int | totalGeomModules () const |
unsigned int | totalModules () const |
std::vector< DetId > | up (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< DetId > | west (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< 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 |
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 HGCalDDDConstants & | hdcons_ |
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 |
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, HGCalDDDConstants::geomMode(), half_, hdcons_, createfilelist::int, kHGeomHalf_, kHGhalf_, kSizeForDenseIndexing, HGCalDDDConstants::layers(), layers_, HGCalDDDConstants::maxCells(), mode_, HGCalDDDConstants::sectors(), sectors_, HGCalGeometryMode::Square, subdet_, and subSectors_.
|
inlineoverride |
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().
move the nagivator along x, y
Definition at line 178 of file HGCalTopology.cc.
Referenced by detectorType(), goEast(), goNorth(), goSouth(), goWest(), and offsetBy().
move the nagivator along z
Definition at line 185 of file HGCalTopology.cc.
Referenced by detectorType(), down(), and up().
|
inline |
Definition at line 101 of file HGCalTopology.h.
References hdcons_, offsetBy(), and switchZSide().
Referenced by PFRecHitQTestThresholdInThicknessNormalizedMIPs::beginEvent(), CaloTruthAccumulator::beginLuminosityBlock(), HGCalGeometryLoader::build(), HGCalTriggerGeometryHexImp2::detIdWaferType(), HGCalTriggerGeometryHexLayerBasedImp1::detIdWaferType(), HGCalTriggerTools::eventSetup(), HGCalTriggerNtupleHGCTriggerCells::fill(), HGCalTriggerGeometryHexImp2::fillInvalidTriggerCells(), HGCalTriggerGeometryHexLayerBasedImp1::fillInvalidTriggerCells(), HGCalTriggerGeometryHexImp1::fillMaps(), HGCalGeometry::getClosestCell(), HGCalGeometry::getCorners(), HGCalTriggerTools::getLayerZ(), HGCalGeometry::getPosition(), HGCalGeometry::getSummary(), HGCalTriggerGeometryHexLayerBasedImp1::initialize(), HGCalGeometry::newCell(), HGCalTriggerBackend::HGCalTriggerSimCluster< FECODEC, DATA >::run(), HGCalRecHitWorkerSimple::set(), HGCalUncalibRecHitRecWeightsAlgo< HGCDataFrame >::setGeometry(), HGCalTriggerNtupleHGCTriggerCells::simhits(), HGCalTriggerNtupleHGCDigis::simhits(), HGCalTriggerCellBestChoiceCodecImpl::triggerCellSums(), and HGCalTriggerCellThresholdCodecImpl::triggerCellSums().
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().
|
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().
|
inline |
Definition at line 122 of file HGCalTopology.h.
References changeXY(), changeZ(), and half_.
Referenced by HGCalHitValidation::analyzeHGCalSimHit(), HGCalTriggerBackend::HGCalTriggerSimCluster< FECODEC, DATA >::run(), HGCalTriggerNtupleHGCTriggerCells::simhits(), and HGCalTriggerNtupleHGCDigis::simhits().
|
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().
|
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().
Get the neighbors of the given cell in down direction (inward)
Implements CaloSubdetectorTopology.
Definition at line 77 of file HGCalTopology.h.
References changeZ().
Get the neighbors of the given cell in east direction
Implements CaloSubdetectorTopology.
Definition at line 49 of file HGCalTopology.h.
References goEast().
DetId HGCalTopology::encode | ( | const DecodedDetId & | id_ | ) | const |
Definition at line 167 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_, DetId::rawId(), subdet_, and HGCalTopology::DecodedDetId::zside.
Referenced by denseId2detId(), HGCalGeometry::getClosestCell(), HGCalGeometry::newCell(), CaloGeometryDBEP< T, U >::produceAligned(), and switchZSide().
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().
|
inline |
Geometry mode.
Definition at line 86 of file HGCalTopology.h.
References denseId2detId(), detId2denseGeomId(), detId2denseId(), mode_, and valid().
Referenced by HGCalGeometryLoader::build().
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().
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().
Get the neighbors of the given cell in south direction
Implements CaloSubdetectorTopology.
Definition at line 37 of file HGCalTopology.h.
References goSouth().
|
inline |
Definition at line 121 of file HGCalTopology.h.
References subdet_.
Referenced by HGCalGeometryLoader::build().
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().
|
inline |
Definition at line 98 of file HGCalTopology.h.
References allGeomModules(), and kHGeomHalf_.
Referenced by HGCalGeometryLoader::build(), geomDenseId2decId(), HGCalGeometry::getSummary(), HGCalGeometry::HGCalGeometry(), CaloGeometryDBEP< T, U >::produceAligned(), and HGCalGeometry::sizeForDenseIndex().
|
inline |
Definition at line 97 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().
|
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().
|
inline |
Definition at line 95 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().
|
private |
Definition at line 136 of file HGCalTopology.h.
Referenced by HGCalTopology(), and valid().
|
private |
Definition at line 135 of file HGCalTopology.h.
Referenced by detectorType(), detId2denseGeomId(), and HGCalTopology().
|
private |
Definition at line 131 of file HGCalTopology.h.
Referenced by allGeomModules(), dddConstants(), HGCalTopology(), and valid().
|
private |
Definition at line 137 of file HGCalTopology.h.
Referenced by allGeomModules(), detId2denseGeomId(), geomDenseId2decId(), HGCalTopology(), and totalGeomModules().
|
private |
Definition at line 137 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseId(), and HGCalTopology().
|
private |
Definition at line 139 of file HGCalTopology.h.
Referenced by HGCalTopology(), totalModules(), and validHashIndex().
|
private |
Definition at line 136 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and valid().
|
private |
Definition at line 138 of file HGCalTopology.h.
|
private |
Definition at line 132 of file HGCalTopology.h.
Referenced by allGeomModules(), decode(), denseId2detId(), detId2denseGeomId(), detId2denseId(), encode(), geomDenseId2decId(), geomMode(), HGCalTopology(), and valid().
|
private |
Definition at line 136 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and valid().
|
private |
Definition at line 134 of file HGCalTopology.h.
Referenced by encode(), HGCalTopology(), offsetBy(), subDetector(), switchZSide(), and valid().
|
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().