CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions
HcalDetId Class Reference

#include <HcalDetId.h>

Inheritance diagram for HcalDetId:
DetId

Public Member Functions

constexpr HcalDetId baseDetId () const
 
constexpr void changeForm ()
 
constexpr int crystal_ieta_high () const
 get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) More...
 
constexpr int crystal_ieta_low () const
 get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) More...
 
constexpr int crystal_iphi_high () const
 get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) More...
 
constexpr int crystal_iphi_low () const
 get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) More...
 
constexpr int depth () const
 get the tower depth More...
 
constexpr HcalDetId ()
 
constexpr HcalDetId (const DetId &gen)
 
constexpr HcalDetId (HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
 
constexpr HcalDetId (uint32_t rawid)
 
constexpr int hfdepth () const
 get full depth information for HF More...
 
constexpr int ieta () const
 get the cell ieta More...
 
constexpr int ietaAbs () const
 get the absolute value of the cell ieta More...
 
constexpr int iphi () const
 get the cell iphi More...
 
constexpr uint32_t maskDepth () const
 get the tower depth More...
 
constexpr uint32_t newForm () const
 
constexpr bool oldFormat () const
 
constexpr bool operator!= (DetId gen) const
 
constexpr bool operator< (DetId gen) const
 
constexpr HcalDetIdoperator= (const DetId &gen)
 
constexpr bool operator== (DetId gen) const
 
constexpr uint32_t otherForm () const
 change format More...
 
constexpr bool sameBaseDetId (const DetId &gen) const
 base detId for HF dual channels More...
 
constexpr HcalDetId secondAnodeId () const
 second PMT anode detId for HF dual channels More...
 
constexpr HcalSubdetector subdet () const
 get the subdetector More...
 
constexpr int zside () const
 get the z-side of the cell (1/-1) More...
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Member Functions

constexpr static int32_t newForm (const uint32_t &inpid)
 

Static Public Attributes

static constexpr uint32_t kHcalDepthMask1 = 0x1F
 
static constexpr uint32_t kHcalDepthMask2 = 0xF
 
static constexpr uint32_t kHcalDepthOffset1 = 14
 
static constexpr uint32_t kHcalDepthOffset2 = 20
 
static constexpr uint32_t kHcalDepthSet1 = 0x1C000
 
static constexpr uint32_t kHcalDepthSet2 = 0xF00000
 
static constexpr uint32_t kHcalEtaMask1 = 0x3F
 
static constexpr uint32_t kHcalEtaMask2 = 0x1FF
 
static constexpr uint32_t kHcalEtaOffset1 = 7
 
static constexpr uint32_t kHcalEtaOffset2 = 10
 
static constexpr uint32_t kHcalIdFormat2 = 0x1000000
 
static constexpr uint32_t kHcalIdMask = 0xFE000000
 
static constexpr uint32_t kHcalPhiMask1 = 0x7F
 
static constexpr uint32_t kHcalPhiMask2 = 0x3FF
 
static constexpr uint32_t kHcalZsideMask1 = 0x2000
 
static constexpr uint32_t kHcalZsideMask2 = 0x80000
 
static const HcalDetId Undefined
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 

Private Member Functions

constexpr void newFromOld (const uint32_t &rawid)
 

Static Private Member Functions

constexpr static void unpackId (const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker = 1, Muon = 2, Ecal = 3, Hcal = 4,
  Calo = 5, Forward = 6, VeryForward = 7, HGCalEE = 8,
  HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Cell identifier class for the HCAL subdetectors, precision readout cells only

Definition at line 12 of file HcalDetId.h.

Constructor & Destructor Documentation

◆ HcalDetId() [1/4]

constexpr HcalDetId::HcalDetId ( )
inlineconstexpr

Create a null cellid

Definition at line 33 of file HcalDetId.h.

33 : DetId() {}

Referenced by baseDetId(), and secondAnodeId().

◆ HcalDetId() [2/4]

constexpr HcalDetId::HcalDetId ( uint32_t  rawid)
inlineconstexpr

Create cellid from raw id (0=invalid tower id)

Definition at line 35 of file HcalDetId.h.

35  {
37  id_ = rawid;
38  } else {
40  if ((subdet == HcalBarrel) || (subdet == HcalEndcap) || (subdet == HcalOuter) || (subdet == HcalForward)) {
41  id_ = newForm(rawid);
42  } else {
43  id_ = rawid;
44  }
45  }
46  }

References DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, DetId::id_, DetId::kDetMask, DetId::kDetOffset, DetId::kSubdetMask, DetId::kSubdetOffset, newForm(), and subdet().

◆ HcalDetId() [3/4]

constexpr HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)
inlineconstexpr

Constructor from subdetector, signed tower ieta,iphi,and depth

Definition at line 49 of file HcalDetId.h.

49  : DetId(Hcal, subdet) {
50  // (no checking at this point!)
51  id_ |=
53  ((tower_ieta > 0) ? (kHcalZsideMask2 | (tower_ieta << kHcalEtaOffset2)) : ((-tower_ieta) << kHcalEtaOffset2)) |
54  (tower_iphi & kHcalPhiMask2);
55  }

References depth(), DetId::id_, kHcalDepthMask2, kHcalDepthOffset2, kHcalEtaOffset2, kHcalIdFormat2, kHcalPhiMask2, and kHcalZsideMask2.

◆ HcalDetId() [4/4]

constexpr HcalDetId::HcalDetId ( const DetId gen)
inlineconstexpr

Constructor from a generic cell id

Definition at line 57 of file HcalDetId.h.

57  {
58  if (!gen.null()) {
59  HcalSubdetector subdet = (HcalSubdetector(gen.subdetId()));
60  if (gen.det() != Hcal || (subdet != HcalBarrel && subdet != HcalEndcap && subdet != HcalOuter &&
62  throw cms::Exception("Invalid DetId")
63  << "Cannot initialize HcalDetId from " << std::hex << gen.rawId() << std::dec;
64  }
65  if ((subdet == HcalBarrel) || (subdet == HcalEndcap) || (subdet == HcalOuter) || (subdet == HcalForward)) {
66  id_ = newForm(gen.rawId());
67  } else {
68  id_ = gen.rawId();
69  }
70  } else {
71  id_ = gen.rawId();
72  }
73  }

References TauDecayModes::dec, Exception, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, DetId::id_, newForm(), and subdet().

Member Function Documentation

◆ baseDetId()

constexpr HcalDetId HcalDetId::baseDetId ( ) const
inlineconstexpr

Definition at line 226 of file HcalDetId.h.

226  {
227  if (subdet() != HcalForward || depth() <= 2) {
228  return HcalDetId(id_);
229  } else {
230  int zsid{0}, eta{0}, phi{0}, dep{0};
231  unpackId(id_, zsid, eta, phi, dep);
232  dep -= 2;
233  uint32_t rawid = id_ & kHcalIdMask;
234  rawid |= (kHcalIdFormat2) | ((dep & kHcalDepthMask2) << kHcalDepthOffset2) |
235  ((zsid > 0) ? (kHcalZsideMask2 | (eta << kHcalEtaOffset2)) : ((eta) << kHcalEtaOffset2)) |
236  (phi & kHcalPhiMask2);
237  return HcalDetId(rawid);
238  }
239  }

References depth(), PVValHelper::eta, HcalDetId(), HcalForward, DetId::id_, kHcalDepthMask2, kHcalDepthOffset2, kHcalEtaOffset2, kHcalIdFormat2, kHcalIdMask, kHcalPhiMask2, kHcalZsideMask2, phi, subdet(), and unpackId().

◆ changeForm()

constexpr void HcalDetId::changeForm ( )
inlineconstexpr

Definition at line 198 of file HcalDetId.h.

198 { id_ = otherForm(); }

References DetId::id_, and otherForm().

Referenced by HcalTopology::down(), HcalTopology::north(), HcalTopology::south(), and HcalTopology::up().

◆ crystal_ieta_high()

constexpr int HcalDetId::crystal_ieta_high ( ) const
inlineconstexpr

get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 259 of file HcalDetId.h.

259 { return ((ieta() - zside()) * 5) + 5 * zside(); }

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

◆ crystal_ieta_low()

constexpr int HcalDetId::crystal_ieta_low ( ) const
inlineconstexpr

get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 257 of file HcalDetId.h.

257 { return ((ieta() - zside()) * 5) + zside(); }

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

◆ crystal_iphi_high()

constexpr int HcalDetId::crystal_iphi_high ( ) const
inlineconstexpr

get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 267 of file HcalDetId.h.

267  {
268  int simple_iphi = ((iphi() - 1) * 5) + 5;
269  simple_iphi += 10;
270  return ((simple_iphi > 360) ? (simple_iphi - 360) : (simple_iphi));
271  }

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

◆ crystal_iphi_low()

constexpr int HcalDetId::crystal_iphi_low ( ) const
inlineconstexpr

get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 261 of file HcalDetId.h.

261  {
262  int simple_iphi = ((iphi() - 1) * 5) + 1;
263  simple_iphi += 10;
264  return ((simple_iphi > 360) ? (simple_iphi - 360) : (simple_iphi));
265  }

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

◆ depth()

constexpr int HcalDetId::depth ( ) const
inlineconstexpr

get the tower depth

Definition at line 164 of file HcalDetId.h.

164  {
165  if (oldFormat())
166  return (id_ >> kHcalDepthOffset1) & kHcalDepthMask1;
167  else
168  return (id_ >> kHcalDepthOffset2) & kHcalDepthMask2;
169  }

References DetId::id_, kHcalDepthMask1, kHcalDepthMask2, kHcalDepthOffset1, kHcalDepthOffset2, and oldFormat().

Referenced by LEDTask::_process(), CMTRawAnalyzer::analyze(), JetToDigiDump::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HCALRecHitAnalyzer::analyze(), HGCalRecHitValidation::analyze(), cms::Analyzer_minbias::analyze(), HGCalDigiValidation::analyze(), HGCalSimHitValidation::analyze(), HcalSimHitStudy::analyzeHits(), HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloSimHitAnalysis::analyzePassiveHits(), CaloTowersCreationAlgo::assignHitHcal(), baseDetId(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), reco::helper::JetIDHelper::classifyJetComponents(), convertHB(), HcalTopology::decrementDepth(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdPreLS1(), cms::MinBias::endJob(), ChannelPattern::Fill_by_hand(), CMTRawAnalyzer::fillDigiAmplitude(), CMTRawAnalyzer::fillDigiAmplitudeHF(), CMTRawAnalyzer::fillDigiAmplitudeHFQIE10(), CMTRawAnalyzer::fillDigiAmplitudeHO(), CMTRawAnalyzer::fillDigiAmplitudeQIE11(), CMTRawAnalyzer::fillDigiErrors(), CMTRawAnalyzer::fillDigiErrorsHF(), CMTRawAnalyzer::fillDigiErrorsHFQIE10(), CMTRawAnalyzer::fillDigiErrorsHO(), CMTRawAnalyzer::fillDigiErrorsQIE11(), HcalHardcodeGeometryLoader::fillHBHO(), CMTRawAnalyzer::fillMAP(), HcalObjRepresent::fillOneGain(), HcalObjRepresent::HcalDataContainer< Items, Item >::fillValConts(), hcaldqm::quantity::getBin_depth(), HcalChannelIterator::getDepth(), HcalDbHardcode::getGainIndex(), hgcal::RecHitTools::getLayer(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), HcalDbHardcode::getParameters(), CaloTowersCreationAlgo::getThresholdAndWeight(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), hcaldqm::quantity::getValue_depth(), CaloTowersCreationAlgo::hadShwrPos(), egamma::hasActiveHcal(), hcaldqm::hashfunctions::hash_depth(), hcaldqm::hashfunctions::hash_Subdetdepth(), HcalDetId(), hcalTransformedId(), hfdepth(), PFHBHERecHitCreator::importRecHits(), PFHcalRecHitCreator< Digi, Geometry, Layer, Detector >::importRecHits(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), HGCalTriggerTools::layer(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), CastorDbHardcode::makeGain(), HcalDbHardcode::makeHardcodeSiPMParameter(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_depth(), hcaldqm::hashfunctions::name_Subdetdepth(), HcalIsoTrkAnalyzer::newId(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), PulseShapeFitOOTPileupCorrection::phase1Apply(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalHardcodeCalibrations::produceChannelQuality(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), HFStripFilter::runFilter(), secondAnodeId(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), PFRecHitQTestHCALChannel::test(), PFRecHitQTestHCALTimeVsDepth::test(), PFRecHitQTestHCALThresholdVsDepth::test(), HcalTrigTowerGeometry::towerIds(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), HcaluLUTTPGCoder::update(), and CalorimetryManager::updateHCAL().

◆ hfdepth()

constexpr int HcalDetId::hfdepth ( ) const
inlineconstexpr

get full depth information for HF

Definition at line 171 of file HcalDetId.h.

171  {
172  int dep = depth();
173  if (subdet() == HcalForward) {
174  if (dep > 2)
175  dep -= 2;
176  }
177  return dep;
178  }

References depth(), HcalForward, and subdet().

Referenced by sameBaseDetId().

◆ ieta()

constexpr int HcalDetId::ieta ( ) const
inlineconstexpr

get the cell ieta

Definition at line 155 of file HcalDetId.h.

155 { return zside() * ietaAbs(); }

References ietaAbs(), and zside().

Referenced by LEDTask::_process(), RecHitTask::_process(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryForward(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), CMTRawAnalyzer::analyze(), JetToDigiDump::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HCALRecHitAnalyzer::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HCALGPUAnalyzer::analyze(), HcalTB06Analysis::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), IsoTrackCalibration::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), IsoTrackCalib::analyze(), IsolatedTracksHcalScale::analyze(), HOCalibAnalyzer::analyze(), RecAnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), HcalHBHEMuonHighEtaAnalyzer::analyzeTracks(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), HcalHaloAlgo::Calculate(), SpikeAndDoubleSpikeCleaner::clean(), convertHB(), crystal_ieta_high(), crystal_ieta_low(), HcalTopology::decrementDepth(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), spr::eHCALmatrix(), cms::MinBias::endJob(), spr::energyHCALCell(), CMTRawAnalyzer::fillDigiAmplitudeHFQIE10(), CMTRawAnalyzer::fillDigiAmplitudeQIE11(), CMTRawAnalyzer::fillDigiErrorsHFQIE10(), CMTRawAnalyzer::fillDigiErrorsQIE11(), HCALRecHitAnalyzer::FillGeometry(), HcalHardcodeGeometryLoader::fillHBHO(), AlCaHOCalibProducer::fillHOStore(), CMTRawAnalyzer::fillMAP(), HcalObjRepresent::fillOneGain(), HcalIsoTrkAnalyzer::fillTree(), HcalObjRepresent::HcalDataContainer< Items, Item >::fillValConts(), HLTHcalLaserMisfireFilter::filter(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), CaloGeometryHelper::getClosestCell(), hcalCalib::GetCoefFromMtrxInvOfAve(), HcalDbHardcode::getGainIndex(), spr::getHotCell(), HcalChannelIterator::getIeta(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HcalDbHardcode::getParameters(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_SubdetPM(), egamma::hasActiveHcal(), hcaldqm::hashfunctions::hash_HFPMiphi(), hcaldqm::hashfunctions::hash_ieta(), hcaldqm::hashfunctions::hash_Subdetieta(), hcaldqm::hashfunctions::hash_SubdetPM(), hcaldqm::hashfunctions::hash_SubdetPMiphi(), SimpleHBHEPhase1Algo::hbminusCorrectionFactor(), hcalTransformedId(), HBHERecHit::idFront(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeMCParam(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_HFPMiphi(), hcaldqm::hashfunctions::name_ieta(), hcaldqm::hashfunctions::name_Subdetieta(), hcaldqm::hashfunctions::name_SubdetPM(), hcaldqm::hashfunctions::name_SubdetPMiphi(), HcalIsoTrkAnalyzer::newId(), TrackDetMatchInfo::nXnEnergy(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), reco::CentralityProducer::produce(), HcalHardcodeCalibrations::produceChannelQuality(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), HFStripFilter::runFilter(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), ParametrizedSubtractor::setupGeometryMap(), PileUpSubtractor::setupGeometryMap(), HiPuRhoProducer::setupGeometryMap(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), IsoTrig::studyIsolation(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

◆ ietaAbs()

constexpr int HcalDetId::ietaAbs ( ) const
inlineconstexpr

get the absolute value of the cell ieta

Definition at line 148 of file HcalDetId.h.

148  {
149  if (oldFormat())
150  return (id_ >> kHcalEtaOffset1) & kHcalEtaMask1;
151  else
152  return (id_ >> kHcalEtaOffset2) & kHcalEtaMask2;
153  }

References DetId::id_, kHcalEtaMask1, kHcalEtaMask2, kHcalEtaOffset1, kHcalEtaOffset2, and oldFormat().

Referenced by HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloSimHitAnalysis::analyzePassiveHits(), HcalTriggerPrimitiveAlgo::analyzeQIE11(), CaloTowersCreationAlgo::assignHitHcal(), HcalTopology::decrementDepth(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), HcalTopology::detId2denseIdPreLS1(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), AlCaIsoTracksFilter::filter(), HCalSD::getEnergyDeposit(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), CaloTowersCreationAlgo::getThresholdAndWeight(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), ieta(), HcalTopology::incrementDepth(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeHardcodeSiPMParameter(), CaloTowersCreationAlgo::makeHcalDropChMap(), HcalIsoTrkAnalyzer::newId(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalHardcodeCalibrations::produceChannelQuality(), sameBaseDetId(), HcalSimParameters::samplingFactor(), AlCaIsoTracksProducer::select(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcaluLUTTPGCoder::update(), and CalorimetryManager::updateHCAL().

◆ iphi()

constexpr int HcalDetId::iphi ( ) const
inlineconstexpr

get the cell iphi

Definition at line 157 of file HcalDetId.h.

157  {
158  if (oldFormat())
159  return id_ & kHcalPhiMask1;
160  else
161  return id_ & kHcalPhiMask2;
162  }

References DetId::id_, kHcalPhiMask1, kHcalPhiMask2, and oldFormat().

Referenced by LEDTask::_process(), LaserTask::_process(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), CMTRawAnalyzer::analyze(), JetToDigiDump::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HCALRecHitAnalyzer::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HCALGPUAnalyzer::analyze(), HcalTB06Analysis::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), IsolatedTracksHcalScale::analyze(), RecAnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), HcalHBHEMuonHighEtaAnalyzer::analyzeTracks(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), SpikeAndDoubleSpikeCleaner::clean(), crystal_iphi_high(), crystal_iphi_low(), HcalTopology::decrementDepth(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), HcalTopology::detId2denseIdPreLS1(), spr::eHCALmatrix(), cms::MinBias::endJob(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), CMTRawAnalyzer::fillDigiAmplitudeHFQIE10(), CMTRawAnalyzer::fillDigiAmplitudeQIE11(), CMTRawAnalyzer::fillDigiErrorsHFQIE10(), CMTRawAnalyzer::fillDigiErrorsQIE11(), HCALRecHitAnalyzer::FillGeometry(), HcalHardcodeGeometryLoader::fillHBHO(), AlCaHOCalibProducer::fillHOStore(), CMTRawAnalyzer::fillMAP(), HcalObjRepresent::fillOneGain(), HcalIsoTrkAnalyzer::fillTree(), HcalObjRepresent::HcalDataContainer< Items, Item >::fillValConts(), HLTHcalLaserMisfireFilter::filter(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), hcaldqm::quantity::getBin_iphi(), CaloGeometryHelper::getClosestCell(), HCalSD::getEnergyDeposit(), spr::getHotCell(), HcalChannelIterator::getIphi(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), HcalDbHardcode::getParameters(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), hcaldqm::quantity::getValue_iphi(), egamma::hasActiveHcal(), hcaldqm::hashfunctions::hash_HBHEPartition(), hcaldqm::hashfunctions::hash_HFPMiphi(), hcaldqm::hashfunctions::hash_iphi(), hcaldqm::hashfunctions::hash_Subdetiphi(), hcaldqm::hashfunctions::hash_SubdetPMiphi(), SimpleHBHEPhase1Algo::hbminusCorrectionFactor(), hcalTransformedId(), HBHERecHit::idFront(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), HcalDbHardcode::isHEPlan1(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeMCParam(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_HBHEPartition(), hcaldqm::hashfunctions::name_HFPMiphi(), hcaldqm::hashfunctions::name_iphi(), hcaldqm::hashfunctions::name_Subdetiphi(), hcaldqm::hashfunctions::name_SubdetPMiphi(), HcalIsoTrkAnalyzer::newId(), TrackDetMatchInfo::nXnEnergy(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalHardcodeCalibrations::produceChannelQuality(), HcalDigisValidation::reco(), HFStripFilter::runFilter(), sameBaseDetId(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), HiPuRhoProducer::setupGeometryMap(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

◆ maskDepth()

constexpr uint32_t HcalDetId::maskDepth ( ) const
inlineconstexpr

get the tower depth

Definition at line 180 of file HcalDetId.h.

180  {
181  if (oldFormat())
182  return (id_ | kHcalDepthSet1);
183  else
184  return (id_ | kHcalDepthSet2);
185  }

References DetId::id_, kHcalDepthSet1, kHcalDepthSet2, and oldFormat().

◆ newForm() [1/2]

constexpr uint32_t HcalDetId::newForm ( ) const
inlineconstexpr

Definition at line 199 of file HcalDetId.h.

199 { return newForm(id_); }

References DetId::id_, and newForm().

Referenced by HcalDigitizer::accumulateCaloHits(), HcalDetId(), newForm(), newFromOld(), operator=(), and otherForm().

◆ newForm() [2/2]

constexpr static int32_t HcalDetId::newForm ( const uint32_t &  inpid)
inlinestaticconstexpr

Definition at line 200 of file HcalDetId.h.

200  {
201  uint32_t rawid(inpid);
202  if ((rawid & kHcalIdFormat2) == 0) {
203  int zsid{0}, eta{0}, phi{0}, dep{0};
204  unpackId(rawid, zsid, eta, phi, dep);
205  rawid = inpid & kHcalIdMask;
206  rawid |= ((kHcalIdFormat2) | ((dep & kHcalDepthMask2) << kHcalDepthOffset2) |
207  ((zsid > 0) ? (kHcalZsideMask2 | (eta << kHcalEtaOffset2)) : ((eta) << kHcalEtaOffset2)) |
208  (phi & kHcalPhiMask2));
209  }
210  return rawid;
211  }

References PVValHelper::eta, kHcalDepthMask2, kHcalDepthOffset2, kHcalEtaOffset2, kHcalIdFormat2, kHcalIdMask, kHcalPhiMask2, kHcalZsideMask2, phi, and unpackId().

◆ newFromOld()

constexpr void HcalDetId::newFromOld ( const uint32_t &  rawid)
inlineconstexprprivate

Definition at line 276 of file HcalDetId.h.

276 { id_ = newForm(rawid); }

References DetId::id_, and newForm().

◆ oldFormat()

constexpr bool HcalDetId::oldFormat ( ) const
inlineconstexpr

◆ operator!=()

constexpr bool HcalDetId::operator!= ( DetId  gen) const
inlineconstexpr

Definition at line 105 of file HcalDetId.h.

105  {
106  uint32_t rawid = gen.rawId();
107  if (rawid == id_)
108  return false;
109  int zsid{0}, eta{0}, phi{0}, dep{0};
110  unpackId(rawid, zsid, eta, phi, dep);
111  bool result = (((id_ & kHcalIdMask) != (rawid & kHcalIdMask)) || (zsid != zside()) || (eta != ietaAbs()) ||
112  (phi != iphi()) || (dep != depth()));
113  return result;
114  }

References depth(), PVValHelper::eta, DetId::id_, ietaAbs(), iphi(), kHcalIdMask, phi, mps_fire::result, unpackId(), and zside().

◆ operator<()

constexpr bool HcalDetId::operator< ( DetId  gen) const
inlineconstexpr

Definition at line 116 of file HcalDetId.h.

116  {
117  uint32_t rawid = gen.rawId();
118  if ((rawid & kHcalIdFormat2) == (id_ & kHcalIdFormat2)) {
119  return id_ < rawid;
120  } else {
121  int zsid{0}, eta{0}, phi{0}, dep{0};
122  unpackId(rawid, zsid, eta, phi, dep);
123  rawid &= kHcalIdMask;
124  if (oldFormat()) {
125  rawid |= (((dep & kHcalDepthMask1) << kHcalDepthOffset1) |
126  ((zsid > 0) ? (kHcalZsideMask1 | (eta << kHcalEtaOffset1)) : ((eta) << kHcalEtaOffset1)) |
127  (phi & kHcalPhiMask1));
128  } else {
129  rawid |= ((kHcalIdFormat2) | ((dep & kHcalDepthMask2) << kHcalDepthOffset2) |
130  ((zsid > 0) ? (kHcalZsideMask2 | (eta << kHcalEtaOffset2)) : ((eta) << kHcalEtaOffset2)) |
131  (phi & kHcalPhiMask2));
132  }
133  return (id_ < rawid);
134  }
135  }

References PVValHelper::eta, DetId::id_, kHcalDepthMask1, kHcalDepthMask2, kHcalDepthOffset1, kHcalDepthOffset2, kHcalEtaOffset1, kHcalEtaOffset2, kHcalIdFormat2, kHcalIdMask, kHcalPhiMask1, kHcalPhiMask2, kHcalZsideMask1, kHcalZsideMask2, oldFormat(), phi, and unpackId().

◆ operator=()

constexpr HcalDetId& HcalDetId::operator= ( const DetId gen)
inlineconstexpr

Assignment from a generic cell id

Definition at line 75 of file HcalDetId.h.

75  {
76  if (!gen.null()) {
77  HcalSubdetector subdet = (HcalSubdetector(gen.subdetId()));
78  if (gen.det() != Hcal || (subdet != HcalBarrel && subdet != HcalEndcap && subdet != HcalOuter &&
80  throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec;
81  }
82  if ((subdet == HcalBarrel) || (subdet == HcalEndcap) || (subdet == HcalOuter) || (subdet == HcalForward)) {
83  id_ = newForm(gen.rawId());
84  } else {
85  id_ = gen.rawId();
86  }
87  } else {
88  id_ = gen.rawId();
89  }
90  return (*this);
91  }

References TauDecayModes::dec, Exception, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, DetId::id_, newForm(), and subdet().

◆ operator==()

constexpr bool HcalDetId::operator== ( DetId  gen) const
inlineconstexpr

Comparison operator

Definition at line 94 of file HcalDetId.h.

94  {
95  uint32_t rawid = gen.rawId();
96  if (rawid == id_)
97  return true;
98  int zsid{0}, eta{0}, phi{0}, dep{0};
99  unpackId(rawid, zsid, eta, phi, dep);
100  bool result = (((id_ & kHcalIdMask) == (rawid & kHcalIdMask)) && (zsid == zside()) && (eta == ietaAbs()) &&
101  (phi == iphi()) && (dep == depth()));
102  return result;
103  }

References depth(), PVValHelper::eta, DetId::id_, ietaAbs(), iphi(), kHcalIdMask, phi, mps_fire::result, unpackId(), and zside().

◆ otherForm()

constexpr uint32_t HcalDetId::otherForm ( ) const
inlineconstexpr

change format

Definition at line 187 of file HcalDetId.h.

187  {
188  uint32_t rawid = (id_ & kHcalIdMask);
189  if (oldFormat()) {
190  rawid = newForm(id_);
191  } else {
192  rawid |= ((depth() & kHcalDepthMask1) << kHcalDepthOffset1) |
193  ((ieta() > 0) ? (kHcalZsideMask1 | (ieta() << kHcalEtaOffset1)) : ((-ieta()) << kHcalEtaOffset1)) |
194  (iphi() & kHcalPhiMask1);
195  }
196  return rawid;
197  }

References depth(), DetId::id_, ieta(), iphi(), kHcalDepthMask1, kHcalDepthOffset1, kHcalEtaOffset1, kHcalIdMask, kHcalPhiMask1, kHcalZsideMask1, newForm(), and oldFormat().

Referenced by changeForm().

◆ sameBaseDetId()

constexpr bool HcalDetId::sameBaseDetId ( const DetId gen) const
inlineconstexpr

base detId for HF dual channels

Definition at line 213 of file HcalDetId.h.

213  {
214  uint32_t rawid = gen.rawId();
215  if (rawid == id_)
216  return true;
217  int zsid{0}, eta{0}, phi{0}, dep{0};
218  if ((id_ & kHcalIdMask) != (rawid & kHcalIdMask))
219  return false;
220  unpackId(rawid, zsid, eta, phi, dep);
221  if (subdet() == HcalForward && dep > 2)
222  dep -= 2;
223  bool result = ((zsid == zside()) && (eta == ietaAbs()) && (phi == iphi()) && (dep == hfdepth()));
224  return result;
225  }

References PVValHelper::eta, HcalForward, hfdepth(), DetId::id_, ietaAbs(), iphi(), kHcalIdMask, phi, mps_fire::result, subdet(), unpackId(), and zside().

◆ secondAnodeId()

constexpr HcalDetId HcalDetId::secondAnodeId ( ) const
inlineconstexpr

second PMT anode detId for HF dual channels

Definition at line 241 of file HcalDetId.h.

241  {
242  if (subdet() != HcalForward || depth() > 2) {
243  return HcalDetId(id_);
244  } else {
245  int zsid{0}, eta{0}, phi{0}, dep{0};
246  unpackId(id_, zsid, eta, phi, dep);
247  dep += 2;
248  uint32_t rawid = id_ & kHcalIdMask;
249  rawid |= (kHcalIdFormat2) | ((dep & kHcalDepthMask2) << kHcalDepthOffset2) |
250  ((zsid > 0) ? (kHcalZsideMask2 | (eta << kHcalEtaOffset2)) : ((eta) << kHcalEtaOffset2)) |
251  (phi & kHcalPhiMask2);
252  return HcalDetId(rawid);
253  }
254  }

References depth(), PVValHelper::eta, HcalDetId(), HcalForward, DetId::id_, kHcalDepthMask2, kHcalDepthOffset2, kHcalEtaOffset2, kHcalIdFormat2, kHcalIdMask, kHcalPhiMask2, kHcalZsideMask2, phi, subdet(), and unpackId().

Referenced by HFPhase1Reconstructor::produce().

◆ subdet()

constexpr HcalSubdetector HcalDetId::subdet ( ) const
inlineconstexpr

get the subdetector

Definition at line 138 of file HcalDetId.h.

138 { return (HcalSubdetector)(subdetId()); }

References DetId::subdetId().

Referenced by LaserTask::_dump(), QIE10Task::_process(), PedestalTask::_process(), LEDTask::_process(), RecHitTask::_process(), DigiTask::_process(), LaserTask::_process(), HcalDigitizer::accumulateCaloHits(), HcalTriggerPrimitiveAlgo::addSignal(), HcalGeometry::alignmentTransformIndexLocal(), CMTRawAnalyzer::analyze(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), CaloTowersValidation::analyze(), CaloTowersAnalyzer::analyze(), WriteL1TriggerObjectsTxt::analyze(), HcalSimHitsValidation::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HcalRecHitsValidation::analyze(), HcalTB06Analysis::analyze(), HGCalSimHitStudy::analyze(), HGCalDigiValidation::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), AnalyzerMinbias::analyzeHcal(), RecAnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), HitParentTest::analyzeHits(), CaloSimHitAnalysis::analyzeHits(), HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), HGCalTBAnalyzer::analyzeSimHits(), HcalHBHEMuonHighEtaAnalyzer::analyzeTracks(), CaloTowersCreationAlgo::assignHitHcal(), baseDetId(), reco::helper::JetIDHelper::classifyJetComponents(), reco::helper::JetIDHelper::classifyJetTowers(), CaloTowersCreationAlgo::convert(), HcalTopology::decrementDepth(), HcalPulseShapes::defaultShape(), HcalTimeSlewSim::delay(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdPreLS1(), spr::eHCALmatrix(), hcaldqm::RecoRunSummary::endJob(), hcaldqm::TPRunSummary::endJob(), hcaldqm::DigiRunSummary::endJob(), hcaldqm::DigiRunSummary::endLuminosityBlock(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), CMTRawAnalyzer::fillDigiAmplitudeHFQIE10(), CMTRawAnalyzer::fillDigiAmplitudeQIE11(), CMTRawAnalyzer::fillDigiErrorsHFQIE10(), CMTRawAnalyzer::fillDigiErrorsQIE11(), HcalObjRepresent::fillOneGain(), CaloParticleDebugger::fillSimHits(), CaloTruthAccumulator::fillSimHits(), HLTHcalLaserMisfireFilter::filter(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), hcaldqm::quantity::getBin_depth(), hcaldqm::quantity::getBin_Subdet(), spr::getEnergy(), HcalChannelIterator::getHcalSubdetector(), spr::getHotCell(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_Subdet(), hcaldqm::quantity::getValue_SubdetPM(), HcalHBHEMuonAnalyzer::goodCell(), HcalHBHEMuonHighEtaAnalyzer::goodCell(), CaloTowersCreationAlgo::hadShwrPos(), egamma::hasActiveHcal(), hcaldqm::hashfunctions::hash_depth(), hcaldqm::hashfunctions::hash_Subdet(), hcaldqm::hashfunctions::hash_Subdetdepth(), hcaldqm::hashfunctions::hash_Subdetieta(), hcaldqm::hashfunctions::hash_Subdetiphi(), hcaldqm::hashfunctions::hash_SubdetPM(), hcaldqm::hashfunctions::hash_SubdetPMiphi(), SimpleHBHEPhase1Algo::hbminusCorrectionFactor(), HcalDetId(), hcalTransformedId(), hfdepth(), HBHERecHit::idFront(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalGeometry::localCorners(), HcalDDDGeometryLoader::makeCell(), HcalDbHardcode::makeHardcodeFrontEndMap(), CaloTowersCreationAlgo::makeHcalDropChMap(), SignCaloSpecificAlgo::makeVectorOutOfCaloTowers(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_depth(), hcaldqm::hashfunctions::name_Subdet(), hcaldqm::hashfunctions::name_Subdetdepth(), hcaldqm::hashfunctions::name_Subdetieta(), hcaldqm::hashfunctions::name_Subdetiphi(), hcaldqm::hashfunctions::name_SubdetPM(), hcaldqm::hashfunctions::name_SubdetPMiphi(), HcalIsoTrkAnalyzer::newId(), operator=(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HBHEPhase1Reconstructor::processData(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), CaloTowersCreationAlgo::rescaleTowers(), sameBaseDetId(), secondAnodeId(), HcalSimParameterMap::setFrameSize(), HcalZSAlgoRealistic::shouldKeep(), HcalTBSimParameterMap::simParameters(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), PFRecHitQTestHCALChannel::test(), PFRecHitQTestHCALThresholdVsDepth::test(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcaluLUTTPGCoder::update(), CaloSpecificAlgo::update_HadEtInHB_HadEtInHE_HadEtInHO_HadEtInHF_EmEtInHF(), CaloSpecificAlgo::update_MaxTowerEm_MaxTowerHad(), CaloSpecificAlgo::update_sumEtInpHF_MExInpHF_MEyInpHF_sumEtInmHF_MExInmHF_MEyInmHF(), and CaloSpecificAlgo::update_totalEt_totalEm().

◆ unpackId()

constexpr static void HcalDetId::unpackId ( const uint32_t &  rawid,
int &  zsid,
int &  eta,
int &  phi,
int &  dep 
)
inlinestaticconstexprprivate

Definition at line 278 of file HcalDetId.h.

278  {
279  if ((rawid & kHcalIdFormat2) == 0) {
280  zsid = (rawid & kHcalZsideMask1) ? (1) : (-1);
281  eta = (rawid >> kHcalEtaOffset1) & kHcalEtaMask1;
282  phi = rawid & kHcalPhiMask1;
283  dep = (rawid >> kHcalDepthOffset1) & kHcalDepthMask1;
284  } else {
285  zsid = (rawid & kHcalZsideMask2) ? (1) : (-1);
286  eta = (rawid >> kHcalEtaOffset2) & kHcalEtaMask2;
287  phi = rawid & kHcalPhiMask2;
288  dep = (rawid >> kHcalDepthOffset2) & kHcalDepthMask2;
289  }
290  }

References PVValHelper::eta, kHcalDepthMask1, kHcalDepthMask2, kHcalDepthOffset1, kHcalDepthOffset2, kHcalEtaMask1, kHcalEtaMask2, kHcalEtaOffset1, kHcalEtaOffset2, kHcalIdFormat2, kHcalPhiMask1, kHcalPhiMask2, kHcalZsideMask1, kHcalZsideMask2, and phi.

Referenced by baseDetId(), newForm(), operator!=(), operator<(), operator==(), sameBaseDetId(), and secondAnodeId().

◆ zside()

constexpr int HcalDetId::zside ( ) const
inlineconstexpr

get the z-side of the cell (1/-1)

Definition at line 141 of file HcalDetId.h.

141  {
142  if (oldFormat())
143  return (id_ & kHcalZsideMask1) ? (1) : (-1);
144  else
145  return (id_ & kHcalZsideMask2) ? (1) : (-1);
146  }

References DetId::id_, kHcalZsideMask1, kHcalZsideMask2, and oldFormat().

Referenced by FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryForward(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), HcalHBHEMuonSimAnalyzer::analyze(), HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloTowerConstituentsMap::constituentsOf(), crystal_ieta_high(), crystal_ieta_low(), HcalTopology::decrementDepth(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), HcalTopology::detId2denseIdPreLS1(), ChannelPattern::Fill_by_hand(), HCalSD::getEnergyDeposit(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HCALConfigDB::getOnlineLUT(), HCALConfigDB::getOnlineLUTFromXML(), HcalDbHardcode::getParameters(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), ieta(), HcalTopology::incrementDepth(), HcalDbHardcode::isHEPlan1(), HcalDDDGeometryLoader::makeCell(), HFClusterAlgo::makeCluster(), HcalIsoTrkAnalyzer::newId(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), sameBaseDetId(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), hgcal::RecHitTools::zside(), and HGCalTriggerTools::zside().

Member Data Documentation

◆ kHcalDepthMask1

constexpr uint32_t HcalDetId::kHcalDepthMask1 = 0x1F
staticconstexpr

Definition at line 24 of file HcalDetId.h.

Referenced by depth(), operator<(), otherForm(), and unpackId().

◆ kHcalDepthMask2

constexpr uint32_t HcalDetId::kHcalDepthMask2 = 0xF
staticconstexpr

◆ kHcalDepthOffset1

constexpr uint32_t HcalDetId::kHcalDepthOffset1 = 14
staticconstexpr

◆ kHcalDepthOffset2

constexpr uint32_t HcalDetId::kHcalDepthOffset2 = 20
staticconstexpr

Definition at line 23 of file HcalDetId.h.

Referenced by baseDetId(), depth(), HcalDetId(), newForm(), operator<(), secondAnodeId(), and unpackId().

◆ kHcalDepthSet1

constexpr uint32_t HcalDetId::kHcalDepthSet1 = 0x1C000
staticconstexpr

Definition at line 26 of file HcalDetId.h.

Referenced by maskDepth().

◆ kHcalDepthSet2

constexpr uint32_t HcalDetId::kHcalDepthSet2 = 0xF00000
staticconstexpr

Definition at line 27 of file HcalDetId.h.

Referenced by maskDepth().

◆ kHcalEtaMask1

constexpr uint32_t HcalDetId::kHcalEtaMask1 = 0x3F
staticconstexpr

◆ kHcalEtaMask2

constexpr uint32_t HcalDetId::kHcalEtaMask2 = 0x1FF
staticconstexpr

◆ kHcalEtaOffset1

constexpr uint32_t HcalDetId::kHcalEtaOffset1 = 7
staticconstexpr

◆ kHcalEtaOffset2

constexpr uint32_t HcalDetId::kHcalEtaOffset2 = 10
staticconstexpr

◆ kHcalIdFormat2

constexpr uint32_t HcalDetId::kHcalIdFormat2 = 0x1000000
staticconstexpr

Definition at line 28 of file HcalDetId.h.

Referenced by baseDetId(), HcalDetId(), newForm(), oldFormat(), operator<(), secondAnodeId(), and unpackId().

◆ kHcalIdMask

constexpr uint32_t HcalDetId::kHcalIdMask = 0xFE000000
staticconstexpr

◆ kHcalPhiMask1

constexpr uint32_t HcalDetId::kHcalPhiMask1 = 0x7F
staticconstexpr

◆ kHcalPhiMask2

constexpr uint32_t HcalDetId::kHcalPhiMask2 = 0x3FF
staticconstexpr

◆ kHcalZsideMask1

constexpr uint32_t HcalDetId::kHcalZsideMask1 = 0x2000
staticconstexpr

Definition at line 20 of file HcalDetId.h.

Referenced by AHCalDetId::AHCalDetId(), operator<(), otherForm(), unpackId(), and zside().

◆ kHcalZsideMask2

constexpr uint32_t HcalDetId::kHcalZsideMask2 = 0x80000
staticconstexpr

Definition at line 21 of file HcalDetId.h.

Referenced by baseDetId(), HcalDetId(), newForm(), operator<(), secondAnodeId(), unpackId(), and zside().

◆ Undefined

const HcalDetId HcalDetId::Undefined
static
HcalOther
Definition: HcalAssistant.h:38
HcalDetId::kHcalZsideMask2
static constexpr uint32_t kHcalZsideMask2
Definition: HcalDetId.h:21
HcalDetId::kHcalDepthOffset1
static constexpr uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:22
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
HcalDetId::kHcalEtaOffset1
static constexpr uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:16
HcalDetId::hfdepth
constexpr int hfdepth() const
get full depth information for HF
Definition: HcalDetId.h:171
DetId::Hcal
Definition: DetId.h:28
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
HcalDetId::kHcalEtaOffset2
static constexpr uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:17
HcalDetId::HcalDetId
constexpr HcalDetId()
Definition: HcalDetId.h:33
HcalBarrel
Definition: HcalAssistant.h:33
DetId::kSubdetMask
static const int kSubdetMask
Definition: DetId.h:20
DetId::kSubdetOffset
static const int kSubdetOffset
Definition: DetId.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:70
HcalDetId::kHcalPhiMask2
static constexpr uint32_t kHcalPhiMask2
Definition: HcalDetId.h:15
HcalDetId::newForm
constexpr uint32_t newForm() const
Definition: HcalDetId.h:199
HcalOuter
Definition: HcalAssistant.h:35
gen
Definition: PythiaDecays.h:13
HcalDetId::kHcalIdFormat2
static constexpr uint32_t kHcalIdFormat2
Definition: HcalDetId.h:28
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HcalDetId::kHcalDepthMask2
static constexpr uint32_t kHcalDepthMask2
Definition: HcalDetId.h:25
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
DetId::kDetMask
static const int kDetMask
Definition: DetId.h:19
HcalDetId::kHcalDepthSet2
static constexpr uint32_t kHcalDepthSet2
Definition: HcalDetId.h:27
DetId::id_
uint32_t id_
Definition: DetId.h:69
HcalDetId::unpackId
constexpr static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:278
HcalDetId::kHcalDepthMask1
static constexpr uint32_t kHcalDepthMask1
Definition: HcalDetId.h:24
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId::kHcalZsideMask1
static constexpr uint32_t kHcalZsideMask1
Definition: HcalDetId.h:20
DetId::Detector
Detector
Definition: DetId.h:24
HcalDetId::otherForm
constexpr uint32_t otherForm() const
change format
Definition: HcalDetId.h:187
HcalDetId::oldFormat
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
HcalDetId::kHcalDepthOffset2
static constexpr uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:23
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
DetId::kDetOffset
static const int kDetOffset
Definition: DetId.h:21
HcalEndcap
Definition: HcalAssistant.h:34
Exception
Definition: hltDiff.cc:245
HcalTriggerTower
Definition: HcalAssistant.h:37
DetId::DetId
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
HcalDetId::kHcalEtaMask1
static constexpr uint32_t kHcalEtaMask1
Definition: HcalDetId.h:18
HcalDetId::kHcalEtaMask2
static constexpr uint32_t kHcalEtaMask2
Definition: HcalDetId.h:19
mps_fire.result
result
Definition: mps_fire.py:311
HcalDetId::kHcalIdMask
static constexpr uint32_t kHcalIdMask
Definition: HcalDetId.h:29
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
HcalDetId::zside
constexpr int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:141
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HcalDetId::kHcalDepthSet1
static constexpr uint32_t kHcalDepthSet1
Definition: HcalDetId.h:26
HcalDetId::kHcalPhiMask1
static constexpr uint32_t kHcalPhiMask1
Definition: HcalDetId.h:14