#include <HcalTopology.h>
Public Member Functions | |
int | decIEta (const HcalDetId &id, HcalDetId neighbors[2]) const |
bool | decIPhi (const HcalDetId &id, HcalDetId &neighbor) const |
void | depthBinInformation (HcalSubdetector subdet, int etaRing, int &nDepthBins, int &startingBin) const |
finds the number of depth bins and which is the number to start with More... | |
int | doublePhiBins () const |
virtual std::vector< DetId > | down (const DetId &id) const |
virtual std::vector< DetId > | east (const DetId &id) const |
void | exclude (const HcalDetId &id) |
int | exclude (HcalSubdetector subdet, int ieta1, int ieta2, int iphi1, int iphi2, int depth1=1, int depth2=4) |
void | excludeSubdetector (HcalSubdetector subdet) |
int | firstHBRing () const |
int | firstHEDoublePhiRing () const |
int | firstHERing () const |
int | firstHETripleDepthRing () const |
int | firstHFQuadPhiRing () const |
int | firstHFRing () const |
int | firstHORing () const |
HcalTopology (bool h2_mode=false) | |
int | incIEta (const HcalDetId &id, HcalDetId neighbors[2]) const |
bool | incIPhi (const HcalDetId &id, HcalDetId &neighbor) const |
bool | incrementDepth (HcalDetId &id) const |
int | lastHBRing () const |
int | lastHERing () const |
int | lastHFRing () const |
int | lastHORing () const |
virtual std::vector< DetId > | north (const DetId &id) const |
int | nPhiBins (int etaRing) const |
how many phi segments in this ring More... | |
int | singlePhiBins () const |
virtual std::vector< DetId > | south (const DetId &id) const |
virtual std::vector< DetId > | up (const DetId &id) const |
virtual bool | valid (const HcalDetId &id) const |
virtual std::vector< DetId > | west (const DetId &id) const |
Public Member Functions inherited from CaloSubdetectorTopology | |
CaloSubdetectorTopology () | |
standard constructor 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 bool | valid (const DetId &) const |
is this detid present in the Topology? More... | |
virtual | ~CaloSubdetectorTopology () |
virtual destructor More... | |
Private Member Functions | |
int | decAIEta (const HcalDetId &id, HcalDetId neighbors[2]) const |
int | incAIEta (const HcalDetId &id, HcalDetId neighbors[2]) const |
bool | isExcluded (const HcalDetId &id) const |
bool | validRaw (const HcalDetId &id) const |
Private Attributes | |
const int | doublePhiBins_ |
bool | excludeHB_ |
bool | excludeHE_ |
bool | excludeHF_ |
bool | excludeHO_ |
std::vector< HcalDetId > | exclusionList_ |
const int | firstHBRing_ |
const int | firstHEDoublePhiRing_ |
const int | firstHERing_ |
const int | firstHETripleDepthRing_ |
const int | firstHFQuadPhiRing_ |
const int | firstHFRing_ |
const int | firstHORing_ |
bool | h2mode_ |
const int | lastHBRing_ |
const int | lastHERing_ |
const int | lastHFRing_ |
const int | lastHORing_ |
const int | singlePhiBins_ |
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 |
The HcalTopology class contains a set of hardcoded constants which represent the topology (tower relationship) of the CMS HCAL as built. These constants can be used to determine neighbor relationships and existence of cells.
For use with limited setups (testbeam, cosmic stands, etc), the topology can be limited by creating a rejection list – a list of cells which would normally exist in the full CMS HCAL, but are not present for the specified topology.
Definition at line 24 of file HcalTopology.h.
HcalTopology::HcalTopology | ( | bool | h2_mode = false | ) |
Definition at line 9 of file HcalTopology.cc.
Referenced by HcalTopologyIdealEP::produce().
Get the neighbors of the given cell with lower absolute ieta
Decreasing in |ieta|, there are be two neighbors of 40 and 21
Definition at line 317 of file HcalTopology.cc.
References firstHEDoublePhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, IPHI_MAX, lastHBRing(), lastHERing(), n, and valid().
Referenced by decIEta(), and incIEta().
Get the neighbors of the given cell with lower (signed) ieta
Definition at line 291 of file HcalTopology.cc.
References decAIEta(), and incAIEta().
Referenced by east().
Get the neighbor (if present) of the given cell with lower iphi
Definition at line 253 of file HcalTopology.cc.
References firstHEDoublePhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, IPHI_MAX, convertSQLiteXML::ok, and valid().
Referenced by south().
void HcalTopology::depthBinInformation | ( | HcalSubdetector | subdet, |
int | etaRing, | ||
int & | nDepthBins, | ||
int & | startingBin | ||
) | const |
finds the number of depth bins and which is the number to start with
Definition at line 353 of file HcalTopology.cc.
References dtNoiseDBValidation_cfg::cerr, firstHETripleDepthRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, and lastHERing().
Referenced by CaloTowerConstituentsMap::constituentsOf(), HcalTrigTowerGeometry::detIds(), HcalHardcodeGeometryLoader::fill(), incrementDepth(), and HcalHardcodeGeometryLoader::makeCell().
|
inline |
Get the neighbors of the given cell in down direction (inward)
Implements CaloSubdetectorTopology.
Definition at line 120 of file HcalTopology.cc.
References gather_cfg::cout.
Get the neighbors of the given cell in east direction
Implements CaloSubdetectorTopology.
Definition at line 76 of file HcalTopology.cc.
Referenced by spr::newHCALIdEW().
void HcalTopology::exclude | ( | const HcalDetId & | id | ) |
Add a cell to exclusion list
Definition at line 59 of file HcalTopology.cc.
References exclusionList_, i, and errorMatrix2Lands_multiChannel::id.
Referenced by exclude(), and HcalTopologyRestrictionParser::parse().
int HcalTopology::exclude | ( | HcalSubdetector | subdet, |
int | ieta1, | ||
int | ieta2, | ||
int | iphi1, | ||
int | iphi2, | ||
int | depth1 = 1 , |
||
int | depth2 = 4 |
||
) |
Exclude an eta/phi/depth range for a given subdetector
Definition at line 126 of file HcalTopology.cc.
References exclude(), excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, errorMatrix2Lands_multiChannel::id, max(), min, n, and validRaw().
void HcalTopology::excludeSubdetector | ( | HcalSubdetector | subdet | ) |
Exclude an entire subdetector
Definition at line 66 of file HcalTopology.cc.
References excludeHB_, excludeHE_, excludeHF_, excludeHO_, HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.
Referenced by HcalTopologyRestrictionParser::parse().
|
inline |
Definition at line 61 of file HcalTopology.h.
References firstHBRing_.
Referenced by HcalHardcodeGeometryLoader::load().
|
inline |
Definition at line 70 of file HcalTopology.h.
References firstHEDoublePhiRing_.
Referenced by CaloRecHitCandidateProducer::cellTresholdAndWeight(), decAIEta(), decIPhi(), HcalTrigTowerGeometry::detIds(), CaloTowersCreationAlgo::getThresholdAndWeight(), incAIEta(), incIPhi(), CaloTowerHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), nPhiBins(), HcalTrigTowerGeometry::towerIds(), and validRaw().
|
inline |
Definition at line 63 of file HcalTopology.h.
References firstHERing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), HcalTrigTowerGeometry::detIds(), and HcalHardcodeGeometryLoader::load().
|
inline |
Definition at line 72 of file HcalTopology.h.
References firstHETripleDepthRing_.
Referenced by depthBinInformation(), and validRaw().
|
inline |
Definition at line 71 of file HcalTopology.h.
References firstHFQuadPhiRing_.
Referenced by decAIEta(), decIPhi(), incAIEta(), incIPhi(), CaloTowerHardcodeGeometryLoader::load(), nPhiBins(), HcalGeometry::phiBin(), HcalTrigTowerGeometry::towerIds(), and validRaw().
|
inline |
Definition at line 65 of file HcalTopology.h.
References firstHFRing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), HcalTrigTowerGeometry::detIds(), HcalGeometry::etaRing(), HcalTrigTowerGeometry::firstHFRingInTower(), HcalGeometry::getCells(), HcalHardcodeGeometryLoader::load(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalHardcodeGeometryLoader::makeCell(), HcalTrigTowerGeometry::towerEtaBounds(), and validRaw().
|
inline |
Definition at line 67 of file HcalTopology.h.
References firstHORing_.
Referenced by HcalHardcodeGeometryLoader::load().
Get the neighbors of the given cell with higher absolute ieta
Increasing in |ieta|, there is always at most one neighbor
Definition at line 297 of file HcalTopology.cc.
References firstHEDoublePhiRing(), firstHFQuadPhiRing(), HcalEndcap, HcalForward, lastHBRing(), lastHERing(), n, and valid().
Referenced by decIEta(), and incIEta().
Get the neighbors of the given cell with higher (signed) ieta
Definition at line 286 of file HcalTopology.cc.
References decAIEta(), and incAIEta().
Referenced by west().
Get the neighbor (if present) of the given cell with higher iphi
Definition at line 219 of file HcalTopology.cc.
References firstHEDoublePhiRing(), firstHFQuadPhiRing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, IPHI_MAX, convertSQLiteXML::ok, and valid().
Referenced by north().
bool HcalTopology::incrementDepth | ( | HcalDetId & | id | ) | const |
Get the detector behind this one
Definition at line 396 of file HcalTopology.cc.
References HcalDetId::depth(), depthBinInformation(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), lastHBRing(), lastHERing(), lastHORing(), HcalDetId::subdet(), and validRaw().
Referenced by HcalGeometry::getClosestCell(), and up().
|
private |
Definition at line 41 of file HcalTopology.cc.
References excludeHB_, excludeHE_, excludeHF_, excludeHO_, exclusionList_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, and errorMatrix2Lands_multiChannel::id.
Referenced by valid().
|
inline |
Definition at line 62 of file HcalTopology.h.
References lastHBRing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), decAIEta(), HcalTrigTowerGeometry::detIds(), HcalGeometry::getClosestCell(), reco::hcalSubdetector(), incAIEta(), incrementDepth(), and HcalHardcodeGeometryLoader::load().
|
inline |
Definition at line 64 of file HcalTopology.h.
References lastHERing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), decAIEta(), depthBinInformation(), HcalTrigTowerGeometry::detIds(), HcalGeometry::etaRing(), HcalGeometry::getClosestCell(), reco::hcalSubdetector(), incAIEta(), incrementDepth(), HcalHardcodeGeometryLoader::load(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalTrigTowerGeometry::towerEtaBounds(), HcalTrigTowerGeometry::towerIds(), and validRaw().
|
inline |
Definition at line 66 of file HcalTopology.h.
References lastHFRing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), HcalGeometry::etaRing(), HcalGeometry::getCells(), HcalGeometry::getClosestCell(), reco::hcalSubdetector(), CaloTowerHardcodeGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), and validRaw().
|
inline |
Definition at line 68 of file HcalTopology.h.
References lastHORing_.
Referenced by CaloTowerConstituentsMap::constituentsOf(), HcalTrigTowerGeometry::detIds(), incrementDepth(), and HcalHardcodeGeometryLoader::load().
Get the neighbors of the given cell in north direction
Implements CaloSubdetectorTopology.
Definition at line 92 of file HcalTopology.cc.
References incIPhi(), and DetId::rawId().
Referenced by spr::newHCALIdNS().
int HcalTopology::nPhiBins | ( | int | etaRing | ) | const |
how many phi segments in this ring
Definition at line 448 of file HcalTopology.cc.
References doublePhiBins_, firstHEDoublePhiRing(), firstHFQuadPhiRing(), and singlePhiBins_.
Referenced by HcalHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalHardcodeGeometryLoader::makeCell(), and HcalGeometry::phiBin().
|
inline |
Get the neighbors of the given cell in south direction
Implements CaloSubdetectorTopology.
Definition at line 100 of file HcalTopology.cc.
References decIPhi(), and DetId::rawId().
Referenced by spr::newHCALIdNS().
Get the neighbors of the given cell in up direction (outward)
Implements CaloSubdetectorTopology.
Definition at line 108 of file HcalTopology.cc.
References errorMatrix2Lands_multiChannel::id, and incrementDepth().
Referenced by spr::matrixHCALIdsDepth().
|
virtual |
Is this a valid cell id?
Definition at line 32 of file HcalTopology.cc.
References isExcluded(), convertSQLiteXML::ok, and validRaw().
Referenced by decAIEta(), decIPhi(), HcalHardcodeGeometryLoader::fill(), fillDefaults(), incAIEta(), incIPhi(), HcalHPDRBXMap::isValid(), CaloMiscalibMapHcal::prefillMap(), undefinedCells(), and HcaluLUTTPGCoder::updateXML().
|
private |
Is this a valid cell id, ignoring the exclusion list
Basic rules used to derive this code:
HB has 72 towers in iphi. Ieta 1-14 have depth=1, Ieta 15-16 have depth=1 or 2.
HE ieta=16-20 have 72 towers in iphi ieta=21-29 have 36 towers in iphi ieta=16 is depth 3 only ieta=17 is depth 1 only ieta=18-26 & 29 have depth 1 and 2 ieta=27-28 has depth 1-3
HF ieta=29-39 have 36 in iphi ieta=40-41 have 18 in iphi (71,3,7,11...) all have two depths
HO has 15 towers in ieta and 72 in iphi and depth = 4 (one value)
At H2:
HE ieta 17 is two depths HE ieta 22- have 36 towers in iphi (starts one higher) HE ieta 24- has three depthsIs this a valid cell id?
Definition at line 186 of file HcalTopology.cc.
References firstHEDoublePhiRing(), firstHETripleDepthRing(), firstHFQuadPhiRing(), firstHFRing(), h2mode_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, IPHI_MAX, lastHERing(), lastHFRing(), and convertSQLiteXML::ok.
Referenced by exclude(), incrementDepth(), and valid().
Get the neighbors of the given cell in west direction
Implements CaloSubdetectorTopology.
Definition at line 84 of file HcalTopology.cc.
Referenced by spr::newHCALIdEW().
|
private |
Definition at line 111 of file HcalTopology.h.
Referenced by doublePhiBins(), and nPhiBins().
|
private |
Definition at line 93 of file HcalTopology.h.
Referenced by exclude(), excludeSubdetector(), and isExcluded().
|
private |
Definition at line 93 of file HcalTopology.h.
Referenced by exclude(), excludeSubdetector(), and isExcluded().
|
private |
Definition at line 93 of file HcalTopology.h.
Referenced by exclude(), excludeSubdetector(), and isExcluded().
|
private |
Definition at line 93 of file HcalTopology.h.
Referenced by exclude(), excludeSubdetector(), and isExcluded().
|
private |
Definition at line 92 of file HcalTopology.h.
Referenced by exclude(), and isExcluded().
|
private |
Definition at line 98 of file HcalTopology.h.
Referenced by firstHBRing().
|
private |
Definition at line 107 of file HcalTopology.h.
Referenced by firstHEDoublePhiRing().
|
private |
Definition at line 100 of file HcalTopology.h.
Referenced by firstHERing().
|
private |
Definition at line 109 of file HcalTopology.h.
Referenced by firstHETripleDepthRing().
|
private |
Definition at line 108 of file HcalTopology.h.
Referenced by firstHFQuadPhiRing().
|
private |
Definition at line 102 of file HcalTopology.h.
Referenced by firstHFRing().
|
private |
Definition at line 104 of file HcalTopology.h.
Referenced by firstHORing().
|
private |
Definition at line 95 of file HcalTopology.h.
Referenced by validRaw().
|
private |
Definition at line 99 of file HcalTopology.h.
Referenced by lastHBRing().
|
private |
Definition at line 101 of file HcalTopology.h.
Referenced by lastHERing().
|
private |
Definition at line 103 of file HcalTopology.h.
Referenced by lastHFRing().
|
private |
Definition at line 105 of file HcalTopology.h.
Referenced by lastHORing().
|
private |
Definition at line 110 of file HcalTopology.h.
Referenced by nPhiBins(), and singlePhiBins().