#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 |
DetId::Detector | detector () const |
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, int subdet) | |
create a new Topology More... | |
bool | isHFNose () const |
bool | maskCell (const DetId &id, int corners=3) const |
std::vector< DetId > | neighbors (const DetId &id) const |
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 |
bool | tileTrapezoid () 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 | valid (const DetId &id, int cornerMin) const |
bool | validHashIndex (uint32_t ix) const |
bool | validModule (const DetId &id, int cornerMin) const |
bool | waferHexagon6 () const |
bool | waferHexagon8 () const |
std::vector< DetId > | west (const DetId &id) const override |
~HGCalTopology () override=default | |
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 | |
void | addHGCSCintillatorId (std::vector< DetId > &ids, int zside, int type, int lay, int iradius, int iphi) const |
add DetId of Scintillator and Silicon type if valid More... | |
void | addHGCSiliconId (std::vector< DetId > &ids, int det, int zside, int type, int lay, int waferU, int waferV, int cellU, int cellV) const |
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 | cellMax_ |
int | cells_ |
DetId::Detector | det_ |
int | firstLay_ |
const HGCalDDDConstants & | hdcons_ |
int | kHGeomHalf_ |
int | kHGhalf_ |
int | kHGhalfType_ |
unsigned int | kSizeForDenseIndexing |
int | layers_ |
HGCalGeometryMode::GeometryMode | mode_ |
int | sectors_ |
ForwardSubdetector | subdet_ |
int | types_ |
int | waferMax_ |
int | waferOff_ |
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, |
int | subdet | ||
) |
create a new Topology
Definition at line 14 of file HGCalTopology.cc.
References cellMax_, cells_, det_, firstLay_, HGCalDDDConstants::firstLayer(), DetId::Forward, ForwardEmpty, HGCalDDDConstants::geomMode(), hdcons_, HFNose, kHGeomHalf_, kHGhalf_, kHGhalfType_, kSizeForDenseIndexing, HGCalDDDConstants::layers(), layers_, HGCalDDDConstants::maxCells(), HGCalDDDConstants::maxCellUV(), mode_, HGCalDDDConstants::sectors(), sectors_, subdet_, tileTrapezoid(), types_, waferHexagon6(), waferMax_, waferOff_, and HGCalDDDConstants::waferUVMax().
|
overridedefault |
virtual destructor
|
private |
add DetId of Scintillator and Silicon type if valid
Definition at line 566 of file HGCalTopology.cc.
References hdcons_, l1ctLayer2EG_cff::id, hcalRecHitTable_cff::iphi, HGCalDDDConstants::isValidTrap(), and ecaldqm::zside().
Referenced by neighbors().
|
private |
Definition at line 578 of file HGCalTopology.cc.
References DetId::Forward, hdcons_, HFNose, l1ctLayer2EG_cff::id, HGCalDDDConstants::isValidHex8(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and ecaldqm::zside().
Referenced by neighbors().
unsigned int HGCalTopology::allGeomModules | ( | ) | const |
Definition at line 55 of file HGCalTopology.cc.
References hdcons_, HGCalDDDConstants::numberCells(), tileTrapezoid(), and HGCalDDDConstants::wafers().
move the nagivator along x, y
Definition at line 670 of file HGCalTopology.cc.
Referenced by goEast(), goNorth(), goSouth(), goWest(), and offsetBy().
move the nagivator along z
Definition at line 672 of file HGCalTopology.cc.
Referenced by down(), and up().
|
inline |
Definition at line 98 of file HGCalTopology.h.
References hdcons_.
Referenced by PFRecHitQTestThresholdInThicknessNormalizedMIPs::beginEvent(), HGCDigitizer::checkPosition(), HGCalTriggerGeometryV9Imp2::detIdWaferType(), HGCalTriggerGeometryV9Imp3::detIdWaferType(), CaloParticleDebugger::fillSimHits(), HGCalGeometry::get8Corners(), HGCalGeometry::getClosestCell(), HGCalGeometry::getClosestCellHex(), HGCalGeometry::getCorners(), HGCalTriggerTools::getLayerZ(), HGCalTriggerGeometryV9Imp2::getModuleFromTriggerCell(), HGCalGeometry::getNewCorners(), HGCalGeometry::getPosition(), HGCalGeometry::getSummary(), HGCalTriggerGeometryV9Imp2::getTriggerCellsFromModule(), HGCalTriggerGeometryV9Imp2::initialize(), HGCalTriggerGeometryV9Imp3::initialize(), CaloTruthAccumulator::initializeEvent(), hgcal::RecHitTools::maskCell(), maskCell(), HGCalGeometry::neighborZ(), HGCalGeometry::newCell(), HGCalRecHitWorkerSimple::set(), HGCalRadiationMap::setGeometry(), HGCalTriggerTools::setGeometry(), HGCalUncalibRecHitRecWeightsAlgo< HGCDataFrame >::setGeometry(), and HGCalTriggerTools::simToReco().
HGCalTopology::DecodedDetId HGCalTopology::decode | ( | const DetId & | id | ) | const |
Definition at line 596 of file HGCalTopology.cc.
References det_, DetId::Forward, HFNose, l1ctLayer2EG_cff::id, heavyIonCSV_trainingSettings::idx, subdet_, tileTrapezoid(), and waferHexagon6().
Referenced by detId2denseGeomId(), detId2denseId(), HGCalGeometry::get8Corners(), HGCalGeometry::getClosestCell(), HGCalGeometry::getClosestCellHex(), HGCalGeometry::getCorners(), HGCalGeometry::getNewCorners(), HGCalGeometry::getPosition(), neighbors(), HGCalGeometry::neighborZ(), HGCalGeometry::newCell(), switchZSide(), valid(), and validModule().
|
override |
Definition at line 390 of file HGCalTopology.cc.
References cellMax_, encode(), firstLay_, l1ctLayer2EG_cff::id, kHGhalfType_, layers_, sectors_, tileTrapezoid(), types_, validHashIndex(), waferHexagon6(), waferMax_, and waferOff_.
|
inline |
Definition at line 117 of file HGCalTopology.h.
References det_.
Referenced by HGCalGeometry::getClosestCell(), and HGCalGeometry::getClosestCellHex().
|
inline |
Definition at line 119 of file HGCalTopology.h.
|
virtual |
Definition at line 436 of file HGCalTopology.cc.
References cellMax_, decode(), firstLay_, heavyIonCSV_trainingSettings::idx, kHGeomHalf_, layers_, sectors_, tileTrapezoid(), waferHexagon6(), waferMax_, and waferOff_.
Referenced by HGCalGeometry::getGeometry(), HGCalGeometry::getSummary(), HGCalGeometry::indexFor(), HGCalGeometry::newCell(), and HGCalGeometry::present().
|
overridevirtual |
Dense indexing.
Reimplemented from CaloSubdetectorTopology.
Definition at line 351 of file HGCalTopology.cc.
References cellMax_, decode(), firstLay_, heavyIonCSV_trainingSettings::idx, kHGeomHalf_, kHGhalfType_, layers_, sectors_, tileTrapezoid(), types_, waferHexagon6(), waferMax_, and waferOff_.
Get the neighbors of the given cell in down direction (inward)
Implements CaloSubdetectorTopology.
Definition at line 68 of file HGCalTopology.h.
References changeZ().
Get the neighbors of the given cell in east direction
Implements CaloSubdetectorTopology.
Definition at line 42 of file HGCalTopology.h.
References goEast().
DetId HGCalTopology::encode | ( | const DecodedDetId & | id_ | ) | const |
Definition at line 642 of file HGCalTopology.cc.
References det_, DetId::Forward, hdcons_, HFNose, l1ctLayer2EG_cff::id, heavyIonCSV_trainingSettings::idx, HGCScintillatorDetId::layer(), DetId::rawId(), HGCScintillatorDetId::ring(), HGCScintillatorDetId::setSiPM(), HGCScintillatorDetId::setType(), subdet_, tileTrapezoid(), HGCalDDDConstants::tileType(), and waferHexagon6().
Referenced by denseId2detId(), HGCalGeometry::getClosestCell(), HGCalGeometry::getClosestCellHex(), HGCalGeometry::newCell(), and switchZSide().
HGCalTopology::DecodedDetId HGCalTopology::geomDenseId2decId | ( | const uint32_t & | hi | ) | const |
Definition at line 525 of file HGCalTopology.cc.
References cellMax_, firstLay_, l1ctLayer2EG_cff::id, kHGeomHalf_, layers_, sectors_, tileTrapezoid(), totalGeomModules(), waferHexagon6(), waferMax_, and waferOff_.
|
inline |
move the Topology east (positive ix)
Reimplemented from CaloSubdetectorTopology.
Definition at line 41 of file HGCalTopology.h.
References changeXY().
Referenced by east().
move the Topology north (increment iy)
Reimplemented from CaloSubdetectorTopology.
Definition at line 21 of file HGCalTopology.h.
References changeXY().
Referenced by north().
move the Topology south (decrement iy)
Reimplemented from CaloSubdetectorTopology.
Definition at line 31 of file HGCalTopology.h.
References changeXY().
Referenced by south().
move the Topology west (negative ix)
Reimplemented from CaloSubdetectorTopology.
Definition at line 51 of file HGCalTopology.h.
References changeXY().
Referenced by west().
|
inline |
Definition at line 120 of file HGCalTopology.h.
References det_, DetId::Forward, HFNose, and subdet_.
Referenced by HGCalGeometry::getGeometryDetId(), HGCalGeometry::getSummary(), and HGCalGeometry::newCell().
|
inline |
Definition at line 96 of file HGCalTopology.h.
References dddConstants(), and HGCalDDDConstants::maskCell().
Definition at line 59 of file HGCalTopology.cc.
References addHGCSCintillatorId(), addHGCSiliconId(), HGCalCell::bottomCorner, HGCalCell::bottomLeftCorner, HGCalCell::bottomLeftEdge, HGCalCell::bottomRightCorner, HGCalCell::bottomRightEdge, HGCalDDDConstants::cellType(), HGCalCell::centralCell, decode(), HGCalDDDConstants::getTypeHex(), HGCalDDDConstants::getUVMax(), hdcons_, HGCalCell::leftEdge, HGCalDDDConstants::modifyUV(), N, HGCalCell::rightEdge, RandomServiceHelper::t1, RandomServiceHelper::t2, tileTrapezoid(), HGCalCell::topCorner, HGCalCell::topLeftCorner, HGCalCell::topLeftEdge, HGCalCell::topRightCorner, HGCalCell::topRightEdge, testProducerWithPsetDescEmpty_cfi::u1, MetAnalyzer::u2, and waferHexagon8().
Get the neighbors of the given cell in north direction
Implements CaloSubdetectorTopology.
Definition at line 22 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 506 of file HGCalTopology.cc.
References changeXY(), DetId::det(), DetId::Forward, l1ctLayer2EG_cff::id, subdet_, DetId::subdetId(), and valid().
Get the neighbors of the given cell in south direction
Implements CaloSubdetectorTopology.
Definition at line 32 of file HGCalTopology.h.
References goSouth().
|
inline |
Definition at line 515 of file HGCalTopology.cc.
References decode(), encode(), l1ctLayer2EG_cff::id, valid(), and HGCalTopology::DecodedDetId::zSide.
|
inline |
Definition at line 124 of file HGCalTopology.h.
References hdcons_, and HGCalDDDConstants::tileTrapezoid().
Referenced by allGeomModules(), decode(), denseId2detId(), detId2denseGeomId(), detId2denseId(), encode(), geomDenseId2decId(), HGCalGeometry::getClosestCell(), HGCalGeometry::getGeometryDetId(), HGCalGeometry::getPosition(), HGCalGeometry::getSummary(), HGCalGeometry::getWaferPosition(), HGCalTopology(), neighbors(), HGCalGeometry::newCell(), and valid().
|
inline |
Definition at line 93 of file HGCalTopology.h.
References kHGeomHalf_.
Referenced by geomDenseId2decId(), HGCalGeometry::getSummary(), HGCalGeometry::HGCalGeometry(), and HGCalGeometry::sizeForDenseIndex().
|
inline |
Definition at line 92 of file HGCalTopology.h.
References kSizeForDenseIndexing.
Referenced by HGCalGeometry::HGCalGeometry().
Get the neighbors of the given cell in up direction (outward)
Implements CaloSubdetectorTopology.
Definition at line 60 of file HGCalTopology.h.
References changeZ().
|
overridevirtual |
Is this a valid cell id.
Reimplemented from CaloSubdetectorTopology.
Definition at line 466 of file HGCalTopology.cc.
References decode(), DetId::det(), det_, RemoveAddSevLevel::flag, hdcons_, HGCalDDDConstants::isValidHex(), HGCalDDDConstants::isValidHex8(), HGCalDDDConstants::isValidTrap(), sectors_, subdet_, DetId::subdetId(), tileTrapezoid(), and waferHexagon6().
Referenced by HGCDigitizer::checkPosition(), HGCalGeometry::newCell(), offsetBy(), switchZSide(), valid(), HGCalTriggerGeometryV9Imp2::validCell(), HGCalTriggerGeometryV9Imp3::validCell(), HGCalTriggerGeometryV9Imp2::validCellId(), HGCalTriggerGeometryV9Imp3::validCellId(), and validModule().
bool HGCalTopology::valid | ( | const DetId & | id, |
int | cornerMin | ||
) | const |
Definition at line 482 of file HGCalTopology.cc.
References decode(), DetId::det(), det_, RemoveAddSevLevel::flag, hdcons_, HGCalDDDConstants::isValidHex8(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, HGCalDDDConstants::maskCell(), valid(), HGCalTypes::WaferCornerMin, and waferHexagon8().
|
inline |
Definition at line 89 of file HGCalTopology.h.
References ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), and kSizeForDenseIndexing.
Referenced by denseId2detId().
bool HGCalTopology::validModule | ( | const DetId & | id, |
int | cornerMin | ||
) | const |
Definition at line 495 of file HGCalTopology.cc.
References decode(), DetId::det(), det_, hdcons_, DetId::HGCalEE, DetId::HGCalHSi, HGCalDDDConstants::isValidHex8(), valid(), and HGCalTypes::WaferCornerMin.
|
inline |
Definition at line 125 of file HGCalTopology.h.
References hdcons_, and HGCalDDDConstants::waferHexagon6().
Referenced by decode(), denseId2detId(), detId2denseGeomId(), detId2denseId(), encode(), geomDenseId2decId(), HGCalGeometry::get8Corners(), HGCalGeometry::getClosestCell(), HGCalGeometry::getCorners(), HGCalGeometry::getGeometryDetId(), HGCalGeometry::getNewCorners(), HGCalGeometry::getPosition(), HGCalGeometry::getSummary(), HGCalTopology(), HGCalGeometry::newCell(), and valid().
|
inline |
Definition at line 126 of file HGCalTopology.h.
References hdcons_, and HGCalDDDConstants::waferHexagon8().
Referenced by HGCalGeometry::getClosestCellHex(), neighbors(), and valid().
Get the neighbors of the given cell in west direction
Implements CaloSubdetectorTopology.
Definition at line 52 of file HGCalTopology.h.
References goWest().
|
private |
Definition at line 147 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().
|
private |
Definition at line 146 of file HGCalTopology.h.
Referenced by HGCalTopology().
|
private |
Definition at line 144 of file HGCalTopology.h.
Referenced by decode(), detector(), encode(), HGCalTopology(), isHFNose(), valid(), and validModule().
|
private |
Definition at line 147 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().
|
private |
Definition at line 141 of file HGCalTopology.h.
Referenced by addHGCSCintillatorId(), addHGCSiliconId(), allGeomModules(), dddConstants(), encode(), HGCalTopology(), neighbors(), tileTrapezoid(), valid(), validModule(), waferHexagon6(), and waferHexagon8().
|
private |
Definition at line 148 of file HGCalTopology.h.
Referenced by detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and totalGeomModules().
|
private |
Definition at line 148 of file HGCalTopology.h.
Referenced by HGCalTopology().
|
private |
Definition at line 148 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseId(), and HGCalTopology().
|
private |
Definition at line 149 of file HGCalTopology.h.
Referenced by HGCalTopology(), totalModules(), and validHashIndex().
|
private |
Definition at line 146 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().
|
private |
Definition at line 142 of file HGCalTopology.h.
Referenced by geomMode(), and HGCalTopology().
|
private |
Definition at line 146 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), HGCalTopology(), and valid().
|
private |
Definition at line 145 of file HGCalTopology.h.
Referenced by decode(), encode(), HGCalTopology(), isHFNose(), offsetBy(), subDetector(), and valid().
|
static |
Use subSector in square mode as wafer type in hexagon mode.
Definition at line 106 of file HGCalTopology.h.
|
private |
Definition at line 146 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseId(), and HGCalTopology().
|
private |
Definition at line 147 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().
|
private |
Definition at line 147 of file HGCalTopology.h.
Referenced by denseId2detId(), detId2denseGeomId(), detId2denseId(), geomDenseId2decId(), and HGCalTopology().