CMS 3D CMS Logo

Public Member Functions | Static Public Attributes

HcalDetId Class Reference

#include <HcalDetId.h>

Inheritance diagram for HcalDetId:
DetId

List of all members.

Public Member Functions

int crystal_ieta_high () const
 get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)
int crystal_ieta_low () const
 get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)
int crystal_iphi_high () const
 get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)
int crystal_iphi_low () const
 get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)
int depth () const
 get the tower depth
 HcalDetId ()
 HcalDetId (const DetId &id)
 HcalDetId (uint32_t rawid)
 HcalDetId (HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
int ieta () const
 get the cell ieta
int ietaAbs () const
 get the absolute value of the cell ieta
int iphi () const
 get the cell iphi
HcalDetIdoperator= (const DetId &id)
HcalSubdetector subdet () const
 get the subdetector
int zside () const
 get the z-side of the cell (1/-1)

Static Public Attributes

static const HcalDetId Undefined

Detailed Description

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

Date:
2012/11/12 20:52:53
Revision:
1.21
Author:
J. Mans - Minnesota

Rev.1.11: A.Kubik,R.Ofierzynski: add the hashed_index

Definition at line 18 of file HcalDetId.h.


Constructor & Destructor Documentation

HcalDetId::HcalDetId ( )

Create a null cellid

Definition at line 7 of file HcalDetId.cc.

                     : DetId() {
}
HcalDetId::HcalDetId ( uint32_t  rawid)

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

Definition at line 10 of file HcalDetId.cc.

                                   : DetId(rawid) {
}
HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)

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

Definition at line 13 of file HcalDetId.cc.

References DetId::id_.

                                                                                      : DetId(Hcal,subdet) {
  // (no checking at this point!)
  id_ |= ((depth&0x1F)<<14) |
    ((tower_ieta>0)?(0x2000|(tower_ieta<<7)):((-tower_ieta)<<7)) |
    (tower_iphi&0x7F);
}
HcalDetId::HcalDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 20 of file HcalDetId.cc.

References DetId::det(), Exception, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, DetId::id_, DetId::null(), DetId::rawId(), subdet(), and DetId::subdetId().

                                     {
  if (!gen.null()) {
    HcalSubdetector subdet=(HcalSubdetector(gen.subdetId()));
    if (gen.det()!=Hcal || 
        (subdet!=HcalBarrel && subdet!=HcalEndcap && 
         subdet!=HcalOuter && subdet!=HcalForward )) {
      throw cms::Exception("Invalid DetId") << "Cannot initialize HcalDetId from " << std::hex << gen.rawId() << std::dec; 
    }  
  }
  id_=gen.rawId();
}

Member Function Documentation

int HcalDetId::crystal_ieta_high ( ) const [inline]

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

Definition at line 46 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

{ return ((ieta()-zside())*5)+5*zside(); }
int HcalDetId::crystal_ieta_low ( ) const [inline]

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

Definition at line 44 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

{ return ((ieta()-zside())*5)+zside(); }
int HcalDetId::crystal_iphi_high ( ) const

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

Definition at line 52 of file HcalDetId.cc.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

                                       { 
  int simple_iphi=((iphi()-1)*5)+5; 
  simple_iphi+=10;
  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
}
int HcalDetId::crystal_iphi_low ( ) const

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

Definition at line 46 of file HcalDetId.cc.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

                                      { 
  int simple_iphi=((iphi()-1)*5)+1; 
  simple_iphi+=10;
  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
}
int HcalDetId::depth ( ) const [inline]

get the tower depth

Definition at line 42 of file HcalDetId.h.

References DetId::id_.

Referenced by HcalTriggerPrimitiveAlgo::addSignal(), CaloHitResponse::analogSignalAmplitude(), HFLightCalRand::analyze(), HCALRecHitAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HFLightCal::analyze(), cms::DiJetAnalyzer::analyze(), JetToDigiDump::analyze(), cms::Analyzer_minbias::analyze(), cms::HcalConstantsASCIIWriter::analyze(), HFPreLightCal::analyze(), CaloTowersCreationAlgo::assignHit(), CaloRecHitCandidateProducer::cellTresholdAndWeight(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), reco::helper::JetIDHelper::classifyJetComponents(), Digi2Raw2Digi::compare(), PFRecHitProducerPS::createRecHits(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdPreLS1(), cond::HcalValidationCorrsDataRepr::doFillIn(), cond::HcalPedestalsDataRepr::doFillIn(), cond::HcalLUTCorrsDataRepr::doFillIn(), cond::HcalGainWidthsDataRepr::doFillIn(), cond::HcalLutMetadataDataRepr::doFillIn(), cond::HcalRespCorrsDataRepr::doFillIn(), cond::HcalTimeCorrsDataRepr::doFillIn(), cond::HcalPFCorrsDataRepr::doFillIn(), cond::HcalQIEDataDataRepr::doFillIn(), cond::HcalZSThresholdsDataRepr::doFillIn(), cms::MinBias::endJob(), ChannelPattern::Fill_by_hand(), HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalDetDiagLEDMonitor::fillHistos(), HcalObjRepresent::fillOneGain(), HcalDetDiagLaserMonitor::fillProblems(), CaloGeometryHelper::getClosestCell(), HcalChannelIterator::getDepth(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), ParticleTowerProducer::getNearestTower(), CaloTowersCreationAlgo::getThresholdAndWeight(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HcalTopology::incrementDepth(), fireworks::info(), DetIdInfo::info(), HcalText2DetIdConverter::init(), HcalLedAnalysis::LedTrendings(), CastorDbHardcode::makeGain(), CaloTowersCreationAlgo::makeHcalDropChMap(), HcalRawDataClient::mapChannproblem(), HcalRawDataMonitor::mapChannproblem(), HcalRawDataMonitor::mapDCCproblem(), HcalRawDataClient::mapDCCproblem(), HcalRawDataMonitor::mapHTRproblem(), HcalRawDataClient::mapHTRproblem(), CastorDbASCIIIO::DetIdLess::operator()(), HcalPedestalAnalysis::per2CapsHists(), cond::PayLoadInspector< DataT >::plot(), HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), printTableLine(), HcalCableMapper::process(), HcalDigiMonitor::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigiTester::reco(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), ParticleTowerProducer::resetTowers(), HcalDetDiagPedestalMonitor::SaveReference(), HcalDetDiagLEDMonitor::SaveReference(), HcalDetDiagLaserMonitor::SaveReference(), HcalLedAnalysis::SetupLEDHists(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), HcalPedestalAnalysis::Trendings(), and CalorimetryManager::updateHCAL().

{ return (id_>>14)&0x1F; }
int HcalDetId::ieta ( ) const [inline]

get the cell ieta

Definition at line 38 of file HcalDetId.h.

References ietaAbs(), and zside().

Referenced by HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), CaloHitResponse::analogSignalAmplitude(), HCALRecHitAnalyzer::analyze(), HFLightCalRand::analyze(), IsoTrig::analyze(), IsolatedTracksHcalScale::analyze(), HcalIsoTrkAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), cms::DiJetAnalyzer::analyze(), HcalCorrPFCalculation::analyze(), HFLightCal::analyze(), JetToDigiDump::analyze(), HcalNoiseMonitor::analyze(), cms::HcalConstantsASCIIWriter::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HFPreLightCal::analyze(), myJetAna::analyze(), MuonHOAcceptance::buildDeadAreas(), MuonHOAcceptance::buildSiPMAreas(), HcalHaloAlgo::Calculate(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), reco::helper::JetIDHelper::classifyJetComponents(), PFClusterAlgo::cleanRBXAndHPD(), PFRecHitProducerPS::createRecHits(), crystal_ieta_high(), crystal_ieta_low(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), cms::MinBias::endJob(), HCALRecHitAnalyzer::FillGeometry(), HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalDetDiagLEDMonitor::fillHistos(), HcalObjRepresent::fillOneGain(), HcalDetDiagLaserMonitor::fillProblems(), HcalLaserHBHEHFFilter2012::filter(), HcalLaserHBHEFilter2012::filter(), reco::CentralityProducer::filter(), TrackDetMatchInfo::findMaxDeposition(), CaloGeometryHelper::getClosestCell(), hcalCalib::GetCoefFromMtrxInvOfAve(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIeta(), HcaluLUTTPGCoder::getLUTId(), CaloTowersCreationAlgo::getThresholdAndWeight(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HcalTopology::incrementDepth(), fireworks::info(), DetIdInfo::info(), HcalText2DetIdConverter::init(), HcalRecHitsMaker::init(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalRawDataClient::mapChannproblem(), HcalRawDataMonitor::mapChannproblem(), HcalRawDataMonitor::mapDCCproblem(), HcalRawDataClient::mapDCCproblem(), HcalRawDataMonitor::mapHTRproblem(), HcalRawDataClient::mapHTRproblem(), HcalRecHitsMaker::noiseInfCfromDB(), TrackDetMatchInfo::nXnEnergy(), HcalPedestalAnalysis::per2CapsHists(), cond::PayLoadInspector< DataT >::plot(), printTableLine(), HcalDeadCellMonitor::process_RecHit(), HcalDigiMonitor::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalBeamMonitor::processEvent(), HcalRecHitMonitor::processEvent_rechit(), HcalHotCellMonitor::processEvent_rechitenergy(), HcalHotCellMonitor::processHit_rechitNeighbors(), AlCaHOCalibProducer::produce(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), HcalDigiTester::reco(), HcalSimpleRecAlgoImpl::reco(), HcalDetDiagPedestalMonitor::SaveReference(), HcalDetDiagLEDMonitor::SaveReference(), HcalDetDiagLaserMonitor::SaveReference(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpack().

{ return zside()*ietaAbs(); }
int HcalDetId::ietaAbs ( ) const [inline]
int HcalDetId::iphi ( ) const [inline]

get the cell iphi

Definition at line 40 of file HcalDetId.h.

References DetId::id_.

Referenced by HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), CaloHitResponse::analogSignalAmplitude(), HFLightCalRand::analyze(), HCALRecHitAnalyzer::analyze(), IsolatedTracksHcalScale::analyze(), HcalIsoTrkAnalyzer::analyze(), BeamHaloAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), cms::DiJetAnalyzer::analyze(), HcalCorrPFCalculation::analyze(), HFLightCal::analyze(), JetToDigiDump::analyze(), cms::HcalConstantsASCIIWriter::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HFPreLightCal::analyze(), MuonHOAcceptance::buildDeadAreas(), MuonHOAcceptance::buildSiPMAreas(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), PFClusterAlgo::cleanRBXAndHPD(), PFRecHitProducerPS::createRecHits(), crystal_iphi_high(), crystal_iphi_low(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), HcalTopology::detId2denseIdPreLS1(), cms::MinBias::endJob(), ChannelPattern::Fill_by_hand(), HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalDetDiagLEDMonitor::fillHistos(), HcalObjRepresent::fillOneGain(), HcalDetDiagLaserMonitor::fillProblems(), HcalLaserHBHEHFFilter2012::filter(), HcalLaserHBHEFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), CaloGeometryHelper::getClosestCell(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIphi(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HcalTopology::incrementDepth(), fireworks::info(), DetIdInfo::info(), HcalText2DetIdConverter::init(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalRawDataClient::mapChannproblem(), HcalRawDataMonitor::mapChannproblem(), HcalRawDataMonitor::mapDCCproblem(), HcalRawDataClient::mapDCCproblem(), HcalRawDataMonitor::mapHTRproblem(), HcalRawDataClient::mapHTRproblem(), TrackDetMatchInfo::nXnEnergy(), CastorDbASCIIIO::DetIdLess::operator()(), HcalPedestalAnalysis::per2CapsHists(), cond::PayLoadInspector< DataT >::plot(), HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), printTableLine(), HcalCableMapper::process(), HcalDigiMonitor::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalBeamMonitor::processEvent(), AlCaHOCalibProducer::produce(), HcalDetDiagPedestalMonitor::SaveReference(), HcalDetDiagLEDMonitor::SaveReference(), HcalDetDiagLaserMonitor::SaveReference(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpack().

{ return id_&0x7F; }
HcalDetId & HcalDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 32 of file HcalDetId.cc.

References DetId::det(), Exception, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, DetId::id_, DetId::null(), DetId::rawId(), subdet(), and DetId::subdetId().

                                                {
  if (!gen.null()) {
    HcalSubdetector subdet=(HcalSubdetector(gen.subdetId()));
    if (gen.det()!=Hcal || 
        (subdet!=HcalBarrel && subdet!=HcalEndcap && 
         subdet!=HcalOuter && subdet!=HcalForward ))
      {
        throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec; 
      }  
  }
  id_=gen.rawId();
  return (*this);
}
HcalSubdetector HcalDetId::subdet ( ) const [inline]

get the subdetector

Definition at line 32 of file HcalDetId.h.

References DetId::subdetId().

Referenced by HFHitFilter::accepts(), HcalGeometry::alignmentTransformIndexLocal(), CaloHitResponse::analogSignalAmplitude(), HFLightCalRand::analyze(), HCALRecHitAnalyzer::analyze(), HFLightCal::analyze(), CaloTowersValidation::analyze(), JetToDigiDump::analyze(), HcalRecHitsValidation::analyze(), CaloTowersAnalyzer::analyze(), HFPreLightCal::analyze(), CaloTowersCreationAlgo::assignHit(), CaloRecHitCandidateProducer::cellTresholdAndWeight(), reco::helper::JetIDHelper::classifyJetComponents(), reco::helper::JetIDHelper::classifyJetTowers(), CaloTowersCreationAlgo::convert(), PFRecHitProducerPS::createRecHits(), HcalPulseShapes::defaultShape(), HcalTimeSlewSim::delay(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdPreLS1(), cms::MinBias::endJob(), ChannelPattern::Fill_by_hand(), HcalObjRepresent::fillOneGain(), HcalLaserHBHEHFFilter2012::filter(), HcalLaserHBHEFilter2012::filter(), HcalChannelIterator::getHcalSubdetector(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), CaloTowersCreationAlgo::getThresholdAndWeight(), CaloTowersCreationAlgo::hadShwrPos(), HcalDetId(), HcalTopology::incrementDepth(), fireworks::info(), DetIdInfo::info(), HcalRecHitsMaker::loadHcalRecHits(), HcalGeometry::localCorners(), HcalDDDGeometryLoader::makeCell(), CaloTowersCreationAlgo::makeHcalDropChMap(), SignCaloSpecificAlgo::makeVectorOutOfCaloTowers(), HcalRawDataClient::mapChannproblem(), HcalRawDataMonitor::mapChannproblem(), HcalRawDataMonitor::mapDCCproblem(), HcalRawDataClient::mapDCCproblem(), HcalRawDataMonitor::mapHTRproblem(), HcalRawDataClient::mapHTRproblem(), HcalRecHitsMaker::noiseInfCfromDB(), operator=(), cond::PayLoadInspector< DataT >::plot(), HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HcalDigiMonitor::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalDigiTester::reco(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), CaloTowersCreationAlgo::rescaleTowers(), HcalSimParameterMap::setFrameSize(), HcalZSAlgoRealistic::shouldKeep(), HcalTBSimParameterMap::simParameters(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), CaloSpecificAlgo::update_HadEtInHB_HadEtInHE_HadEtInHO_HadEtInHF_EmEtInHF(), CaloSpecificAlgo::update_MaxTowerEm_MaxTowerHad(), CaloSpecificAlgo::update_sumEtInpHF_MExInpHF_MEyInpHF_sumEtInmHF_MExInmHF_MEyInmHF(), CaloSpecificAlgo::update_totalEt_totalEm(), and ObjectValidator::validHit().

{ return (HcalSubdetector)(subdetId()); }
int HcalDetId::zside ( ) const [inline]

Member Data Documentation