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

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

Static Public Member Functions

static uint32_t newForm (const uint32_t &)
 

Static Public Attributes

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

Private Member Functions

void newFromOld (const uint32_t &)
 

Static Private Member Functions

static void unpackId (const uint32_t &, int &, int &, int &, int &)
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 
- 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::HcalDetId ( )

Create a null cellid

Definition at line 8 of file HcalDetId.cc.

Referenced by baseDetId(), and secondAnodeId().

8  : DetId() {
9 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
HcalDetId::HcalDetId ( uint32_t  rawid)

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

Definition at line 11 of file HcalDetId.cc.

11  : DetId(newForm(rawid)) {
12 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
uint32_t newForm() const
Definition: HcalDetId.cc:142
HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)

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

Definition at line 14 of file HcalDetId.cc.

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

14  : DetId(Hcal,subdet) {
15  // (no checking at this point!)
17  ((tower_ieta>0)?(kHcalZsideMask2|(tower_ieta<<kHcalEtaOffset2)):((-tower_ieta)<<kHcalEtaOffset2)) |
18  (tower_iphi&kHcalPhiMask2);
19 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
HcalDetId::HcalDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 21 of file HcalDetId.cc.

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

21  {
22  if (!gen.null()) {
24  if (gen.det()!=Hcal ||
25  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
26  subdet!=HcalOuter && subdet!=HcalForward &&
27  subdet!=HcalTriggerTower && subdet!=HcalOther)) {
28  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalDetId from " << std::hex << gen.rawId() << std::dec;
29  }
30  id_ = newForm(gen.rawId());
31  } else {
32  id_ = gen.rawId();
33  }
34  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t id_
Definition: DetId.h:55
uint32_t newForm() const
Definition: HcalDetId.cc:142

Member Function Documentation

HcalDetId HcalDetId::baseDetId ( ) const

Definition at line 171 of file HcalDetId.cc.

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

Referenced by ieta().

171  {
172  if (subdet() != HcalForward || depth() <= 2) {
173  return HcalDetId(id_);
174  } else {
175  int zsid, eta, phi, dep;
176  unpackId(id_, zsid, eta, phi, dep);
177  dep -= 2;
178  uint32_t rawid = id_&kHcalIdMask;
179  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
180  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
181  (phi&kHcalPhiMask2);
182  return HcalDetId(rawid);
183  }
184 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
HcalDetId()
Definition: HcalDetId.cc:8
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
static const int kHcalIdMask
Definition: HcalDetId.h:30
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
void HcalDetId::changeForm ( )

Definition at line 138 of file HcalDetId.cc.

References DetId::id_, and otherForm().

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

138  {
139  id_ = otherForm();
140 }
uint32_t otherForm() const
change format
Definition: HcalDetId.cc:126
uint32_t id_
Definition: DetId.h:55
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 79 of file HcalDetId.h.

References crystal_iphi_high(), crystal_iphi_low(), ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

79 { return ((ieta()-zside())*5)+5*zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
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 77 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

77 { return ((ieta()-zside())*5)+zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
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 207 of file HcalDetId.cc.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf(), and crystal_ieta_high().

207  {
208  int simple_iphi=((iphi()-1)*5)+5;
209  simple_iphi+=10;
210  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
211 }
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
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 201 of file HcalDetId.cc.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf(), and crystal_ieta_high().

201  {
202  int simple_iphi=((iphi()-1)*5)+1;
203  simple_iphi+=10;
204  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
205 }
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
int HcalDetId::depth ( ) const

get the tower depth

Definition at line 108 of file HcalDetId.cc.

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

Referenced by QIE10Task::_process(), HcalTriggerPrimitiveAlgo::addSignal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), cms::Analyzer_minbias::analyze(), HGCalDigiValidation::analyze(), HGCalRecHitValidation::analyze(), HGCalSimHitValidation::analyze(), HcalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloTowersCreationAlgo::assignHitHcal(), baseDetId(), reco::helper::JetIDHelper::classifyJetComponents(), HcalTopology::decrementDepth(), HcalTopology::detId2denseId(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdPreLS1(), cms::MinBias::endJob(), ChannelPattern::Fill_by_hand(), HcalHardcodeGeometryLoader::fillHBHO(), HcalObjRepresent::fillOneGain(), hcaldqm::quantity::getBin_depth(), CaloGeometryHelper::getClosestCell(), HcalChannelIterator::getDepth(), HcalDbHardcode::getGainIndex(), hgcal::RecHitTools::getLayer(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), ParticleTowerProducer::getNearestTower(), HcalDbHardcode::getParameters(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_depth(), CaloTowersCreationAlgo::hadShwrPos(), hcaldqm::hashfunctions::hash_depth(), hcaldqm::hashfunctions::hash_Subdetdepth(), hcalTransformedId(), hfdepth(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), ieta(), PFHBHERecHitCreator::importRecHits(), PFHcalRecHitCreator< Digi, Geometry, Layer, Detector >::importRecHits(), PFHFRecHitCreator::importRecHits(), PFHBHERecHitCreatorMaxSample::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), CastorDbHardcode::makeGain(), HcalDbHardcode::makeHardcodeSiPMParameter(), CaloTowersCreationAlgo::makeHcalDropChMap(), HGCalRecHitSimpleAlgo::makeRecHit(), FastHFShowerLibrary::modifyDepth(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_depth(), hcaldqm::hashfunctions::name_Subdetdepth(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), ParticleTowerProducer::resetTowers(), secondAnodeId(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), PFRecHitQTestHCALChannel::test(), PFRecHitQTestHCALTimeVsDepth::test(), PFRecHitQTestHCALThresholdVsDepth::test(), HcalTrigTowerGeometry::towerIds(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and CalorimetryManager::updateHCAL().

108  {
110  else return (id_>>kHcalDepthOffset2)&kHcalDepthMask2;
111 }
static const int kHcalDepthMask1
Definition: HcalDetId.h:25
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
static const int kHcalDepthOffset1
Definition: HcalDetId.h:23
bool oldFormat() const
Definition: HcalDetId.h:50
uint32_t id_
Definition: DetId.h:55
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
int HcalDetId::hfdepth ( ) const

get full depth information for HF

Definition at line 113 of file HcalDetId.cc.

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

Referenced by ieta(), and sameBaseDetId().

113  {
114  int dep = depth();
115  if (subdet() == HcalForward) {
116  if (dep > 2) dep -= 2;
117  }
118  return dep;
119 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
int HcalDetId::ieta ( ) const
inline

get the cell ieta

Definition at line 56 of file HcalDetId.h.

References baseDetId(), changeForm(), depth(), hfdepth(), ietaAbs(), iphi(), maskDepth(), newForm(), otherForm(), sameBaseDetId(), secondAnodeId(), and zside().

Referenced by QIE10Task::_process(), RecHitTask::_process(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryForward(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), HcalTB06Analysis::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), HcalHBHEMuonAnalyzer::analyze(), ValidIsoTrkCalib::analyze(), HGCalSimHitValidation::analyze(), IsoTrackCalibration::analyze(), IsoTrackCalib::analyze(), IsolatedTracksHcalScale::analyze(), HOCalibAnalyzer::analyze(), HcalSimHitStudy::analyzeHits(), HcalDeterministicFit::apply(), CaloTowersCreationAlgo::assignHitHcal(), MuonHOAcceptance::buildDeadAreas(), MuonHOAcceptance::buildSiPMAreas(), HcalHaloAlgo::Calculate(), reco::helper::JetIDHelper::classifyJetComponents(), RBXAndHPDCleaner::clean(), 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(), HCALRecHitAnalyzer::FillGeometry(), HcalHardcodeGeometryLoader::fillHBHO(), AlCaHOCalibProducer::fillHOStore(), HcalObjRepresent::fillOneGain(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), CaloGeometryHelper::getClosestCell(), hcalCalib::GetCoefFromMtrxInvOfAve(), HcalDbHardcode::getGainIndex(), spr::getHotCell(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIeta(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HcalDbHardcode::getParameters(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_SubdetPM(), hcaldqm::hashfunctions::hash_HFPMiphi(), hcaldqm::hashfunctions::hash_ieta(), hcaldqm::hashfunctions::hash_Subdetieta(), hcaldqm::hashfunctions::hash_SubdetPM(), hcaldqm::hashfunctions::hash_SubdetPMiphi(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), SimpleHBHEPhase1Algo::hbminusCorrectionFactor(), hcalTransformedId(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HBHERecHit::idFront(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeMCParam(), HcalHBHEMuonSimAnalyzer::matchId(), HcalRaddamMuon::matchId(), HcalHBHEMuonAnalyzer::matchId(), FastHFShowerLibrary::modifyDepth(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_HFPMiphi(), hcaldqm::hashfunctions::name_ieta(), hcaldqm::hashfunctions::name_Subdetieta(), hcaldqm::hashfunctions::name_SubdetPM(), hcaldqm::hashfunctions::name_SubdetPMiphi(), TrackDetMatchInfo::nXnEnergy(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), HcalDeterministicFit::phase1Apply(), PFCTRecHitProducer::produce(), reco::CentralityProducer::produce(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigiTester::reco(), HcalDigisValidation::reco(), HcalSimpleRecAlgoImpl::reco(), HcalSimpleRecAlgoImpl::recoHBHE(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), IsoTrig::studyIsolation(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

56 { return zside()*ietaAbs(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:98
int HcalDetId::ietaAbs ( ) const

get the absolute value of the cell ieta

Definition at line 98 of file HcalDetId.cc.

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

Referenced by HGCalSimHitValidation::analyzeHits(), CaloTowersCreationAlgo::assignHitHcal(), HBHEHitMap::calcHits_(), HcalTopology::decrementDepth(), HcalTopology::detId2denseIdHB(), HcalTopology::detId2denseIdHE(), HcalTopology::detId2denseIdHF(), HcalTopology::detId2denseIdHO(), HcalTopology::detId2denseIdPreLS1(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), AlCaIsoTracksFilter::filter(), CaloGeometryHelper::getClosestCell(), HCalSD::getEnergyDeposit(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), CaloTowersCreationAlgo::getThresholdAndWeight(), ieta(), HcalTopology::incrementDepth(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeHardcodeSiPMParameter(), CaloTowersCreationAlgo::makeHcalDropChMap(), oldFormat(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), sameBaseDetId(), HcalSimParameters::samplingFactor(), AlCaIsoTracksProducer::select(), HBHEPulseShapeFlagSetter::SetPulseShapeFlags(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcaluLUTTPGCoder::update(), CalorimetryManager::updateHCAL(), and ObjectValidator::validHit().

98  {
99  if (oldFormat()) return (id_>>kHcalEtaOffset1)&kHcalEtaMask1;
100  else return (id_>>kHcalEtaOffset2)&kHcalEtaMask2;
101 }
bool oldFormat() const
Definition: HcalDetId.h:50
uint32_t id_
Definition: DetId.h:55
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalEtaMask2
Definition: HcalDetId.h:20
static const int kHcalEtaMask1
Definition: HcalDetId.h:19
static const int kHcalEtaOffset1
Definition: HcalDetId.h:17
int HcalDetId::iphi ( ) const

get the cell iphi

Definition at line 103 of file HcalDetId.cc.

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

Referenced by QIE10Task::_process(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HcalTB06Analysis::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), HcalHBHEMuonAnalyzer::analyze(), ValidIsoTrkCalib::analyze(), HGCalSimHitValidation::analyze(), IsolatedTracksHcalScale::analyze(), BeamHaloAnalyzer::analyze(), HcalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloTowersCreationAlgo::assignHitHcal(), MuonHOAcceptance::buildDeadAreas(), MuonHOAcceptance::buildSiPMAreas(), RBXAndHPDCleaner::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(), HCALRecHitAnalyzer::FillGeometry(), HcalHardcodeGeometryLoader::fillHBHO(), AlCaHOCalibProducer::fillHOStore(), HcalObjRepresent::fillOneGain(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), hcaldqm::quantity::getBin_iphi(), CaloGeometryHelper::getClosestCell(), HCalSD::getEnergyDeposit(), spr::getHotCell(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIphi(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HcalDbHardcode::getParameters(), hcaldqm::quantity::getValue_iphi(), hcaldqm::hashfunctions::hash_HBHEPartition(), hcaldqm::hashfunctions::hash_HFPMiphi(), hcaldqm::hashfunctions::hash_iphi(), hcaldqm::hashfunctions::hash_Subdetiphi(), hcaldqm::hashfunctions::hash_SubdetPMiphi(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), SimpleHBHEPhase1Algo::hbminusCorrectionFactor(), hcalTransformedId(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HBHERecHit::idFront(), ieta(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), HcalDbHardcode::isHEPlan1(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), CaloTowersCreationAlgo::makeHcalDropChMap(), HcalDbHardcode::makeMCParam(), HcalHBHEMuonSimAnalyzer::matchId(), HcalRaddamMuon::matchId(), HcalHBHEMuonAnalyzer::matchId(), FastHFShowerLibrary::modifyDepth(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_HBHEPartition(), hcaldqm::hashfunctions::name_HFPMiphi(), hcaldqm::hashfunctions::name_iphi(), hcaldqm::hashfunctions::name_Subdetiphi(), hcaldqm::hashfunctions::name_SubdetPMiphi(), TrackDetMatchInfo::nXnEnergy(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), PFCTRecHitProducer::produce(), HcalDigisValidation::reco(), HcalSimpleRecAlgoImpl::reco(), HcalSimpleRecAlgoImpl::recoHBHE(), sameBaseDetId(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

103  {
104  if (oldFormat()) return id_&kHcalPhiMask1;
105  else return id_&kHcalPhiMask2;
106 }
bool oldFormat() const
Definition: HcalDetId.h:50
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
uint32_t id_
Definition: DetId.h:55
static const int kHcalPhiMask1
Definition: HcalDetId.h:15
uint32_t HcalDetId::maskDepth ( ) const

get the tower depth

Definition at line 121 of file HcalDetId.cc.

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

Referenced by HcalTriggerPrimitiveAlgo::addSignal(), and ieta().

121  {
122  if (oldFormat()) return (id_|kHcalDepthSet1);
123  else return (id_|kHcalDepthSet2);
124 }
static const int kHcalDepthSet2
Definition: HcalDetId.h:28
static const int kHcalDepthSet1
Definition: HcalDetId.h:27
bool oldFormat() const
Definition: HcalDetId.h:50
uint32_t id_
Definition: DetId.h:55
uint32_t HcalDetId::newForm ( ) const

Definition at line 142 of file HcalDetId.cc.

References DetId::id_.

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

142  {
143  return newForm(id_);
144 }
uint32_t id_
Definition: DetId.h:55
uint32_t newForm() const
Definition: HcalDetId.cc:142
uint32_t HcalDetId::newForm ( const uint32_t &  inpid)
static

Definition at line 146 of file HcalDetId.cc.

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

146  {
147  uint32_t rawid(inpid);
148  if ((rawid&kHcalIdFormat2)==0) {
149  int zsid, eta, phi, dep;
150  unpackId(rawid, zsid, eta, phi, dep);
151  rawid = inpid&kHcalIdMask;
152  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
153  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
154  (phi&kHcalPhiMask2);
155  }
156  return rawid;
157 }
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
static const int kHcalIdMask
Definition: HcalDetId.h:30
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
void HcalDetId::newFromOld ( const uint32_t &  rawid)
private

Definition at line 213 of file HcalDetId.cc.

References DetId::id_, and newForm().

213  {
214  id_ = newForm(rawid);
215 }
uint32_t id_
Definition: DetId.h:55
uint32_t newForm() const
Definition: HcalDetId.cc:142
bool HcalDetId::oldFormat ( ) const
inline

Definition at line 50 of file HcalDetId.h.

References DetId::id_, ietaAbs(), and zside().

Referenced by HcalDigitizer::accumulateCaloHits(), depth(), HcalTopology::down(), ietaAbs(), iphi(), maskDepth(), HcalTopology::north(), operator<(), otherForm(), HcalTopology::south(), HcalTopology::up(), and zside().

50 { return ((id_&kHcalIdFormat2)==0)?(true):(false); }
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
bool HcalDetId::operator!= ( DetId  id) const

Definition at line 62 of file HcalDetId.cc.

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

62  {
63  uint32_t rawid = gen.rawId();
64  if (rawid == id_) return false;
65  int zsid, eta, phi, dep;
66  unpackId(rawid, zsid, eta, phi, dep);
67  bool result = (((id_&kHcalIdMask)!=(rawid&kHcalIdMask)) || (zsid!=zside())
68  || (eta!=ietaAbs()) || (phi!=iphi()) || (dep!=depth()));
69  return result;
70 }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
static const int kHcalIdMask
Definition: HcalDetId.h:30
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:98
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
uint32_t id_
Definition: DetId.h:55
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
bool HcalDetId::operator< ( DetId  id) const

Definition at line 72 of file HcalDetId.cc.

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

72  {
73  uint32_t rawid = gen.rawId();
74  if ((rawid&kHcalIdFormat2)==(id_&kHcalIdFormat2)) {
75  return id_<rawid;
76  } else {
77  int zsid, eta, phi, dep;
78  unpackId(rawid, zsid, eta, phi, dep);
79  rawid &= kHcalIdMask;
80  if (oldFormat()) {
81  rawid |= ((dep&kHcalDepthMask1)<<kHcalDepthOffset1) |
82  ((zsid>0)?(kHcalZsideMask1|(eta<<kHcalEtaOffset1)):((eta)<<kHcalEtaOffset1)) |
83  (phi&kHcalPhiMask1);
84  } else {
85  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
86  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
87  (phi&kHcalPhiMask2);
88  }
89  return (id_<rawid);
90  }
91 }
static const int kHcalDepthMask1
Definition: HcalDetId.h:25
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
static const int kHcalDepthOffset1
Definition: HcalDetId.h:23
bool oldFormat() const
Definition: HcalDetId.h:50
static const int kHcalIdMask
Definition: HcalDetId.h:30
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask1
Definition: HcalDetId.h:21
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
static const int kHcalPhiMask1
Definition: HcalDetId.h:15
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
static const int kHcalEtaOffset1
Definition: HcalDetId.h:17
HcalDetId & HcalDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 36 of file HcalDetId.cc.

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

36  {
37  if (!gen.null()) {
39  if (gen.det()!=Hcal ||
40  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
41  subdet!=HcalOuter && subdet!=HcalForward &&
42  subdet!=HcalTriggerTower && subdet!=HcalOther)) {
43  throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec;
44  }
45  id_ = newForm(gen.rawId());
46  } else {
47  id_ = gen.rawId();
48  }
49  return (*this);
50 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t id_
Definition: DetId.h:55
uint32_t newForm() const
Definition: HcalDetId.cc:142
bool HcalDetId::operator== ( DetId  id) const

Comparison operator

Definition at line 52 of file HcalDetId.cc.

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

52  {
53  uint32_t rawid = gen.rawId();
54  if (rawid == id_) return true;
55  int zsid, eta, phi, dep;
56  unpackId(rawid, zsid, eta, phi, dep);
57  bool result = (((id_&kHcalIdMask) == (rawid&kHcalIdMask)) && (zsid==zside())
58  && (eta==ietaAbs()) && (phi==iphi()) && (dep==depth()));
59  return result;
60 }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
static const int kHcalIdMask
Definition: HcalDetId.h:30
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:98
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
uint32_t id_
Definition: DetId.h:55
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
uint32_t HcalDetId::otherForm ( ) const

change format

Definition at line 126 of file HcalDetId.cc.

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

Referenced by changeForm(), and ieta().

126  {
127  uint32_t rawid = (id_&kHcalIdMask);
128  if (oldFormat()) {
129  rawid = newForm(id_);
130  } else {
131  rawid |= ((depth()&kHcalDepthMask1)<<kHcalDepthOffset1) |
133  (iphi()&kHcalPhiMask1);
134  }
135  return rawid;
136 }
static const int kHcalDepthMask1
Definition: HcalDetId.h:25
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
static const int kHcalDepthOffset1
Definition: HcalDetId.h:23
bool oldFormat() const
Definition: HcalDetId.h:50
static const int kHcalIdMask
Definition: HcalDetId.h:30
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
uint32_t id_
Definition: DetId.h:55
uint32_t newForm() const
Definition: HcalDetId.cc:142
static const int kHcalZsideMask1
Definition: HcalDetId.h:21
static const int kHcalPhiMask1
Definition: HcalDetId.h:15
static const int kHcalEtaOffset1
Definition: HcalDetId.h:17
bool HcalDetId::sameBaseDetId ( const DetId gen) const

base detId for HF dual channels

Definition at line 159 of file HcalDetId.cc.

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

Referenced by ieta().

159  {
160  uint32_t rawid = gen.rawId();
161  if (rawid == id_) return true;
162  int zsid, eta, phi, dep;
163  if ((id_&kHcalIdMask) != (rawid&kHcalIdMask)) return false;
164  unpackId(rawid, zsid, eta, phi, dep);
165  if (subdet() == HcalForward && dep > 2) dep -= 2;
166  bool result = ((zsid==zside()) && (eta==ietaAbs()) && (phi==iphi()) &&
167  (dep==hfdepth()));
168  return result;
169 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:93
int hfdepth() const
get full depth information for HF
Definition: HcalDetId.cc:113
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const int kHcalIdMask
Definition: HcalDetId.h:30
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:98
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
uint32_t id_
Definition: DetId.h:55
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
HcalDetId HcalDetId::secondAnodeId ( ) const

second PMT anode detId for HF dual channels

Definition at line 186 of file HcalDetId.cc.

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

Referenced by ieta(), and HFPhase1Reconstructor::produce().

186  {
187  if (subdet() != HcalForward || depth() > 2) {
188  return HcalDetId(id_);
189  } else {
190  int zsid, eta, phi, dep;
191  unpackId(id_, zsid, eta, phi, dep);
192  dep += 2;
193  uint32_t rawid = id_&kHcalIdMask;
194  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
195  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
196  (phi&kHcalPhiMask2);
197  return HcalDetId(rawid);
198  }
199 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
HcalDetId()
Definition: HcalDetId.cc:8
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
static const int kHcalIdMask
Definition: HcalDetId.h:30
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static void unpackId(const uint32_t &, int &, int &, int &, int &)
Definition: HcalDetId.cc:217
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
HcalSubdetector HcalDetId::subdet ( ) const
inline

get the subdetector

Definition at line 49 of file HcalDetId.h.

References DetId::subdetId().

Referenced by PedestalTask::_process(), RecHitTask::_process(), HcalDigitizer::accumulateCaloHits(), HcalGeometry::alignmentTransformIndexLocal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), HcalTB06Analysis::analyze(), CaloTowersValidation::analyze(), CaloTowersAnalyzer::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HcalRecHitsValidation::analyze(), HGCalDigiValidation::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), AnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), HGCalTBAnalyzer::analyzeSimHits(), 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::DigiRunSummary::endJob(), hcaldqm::TPRunSummary::endJob(), cms::MinBias::endJob(), hcaldqm::DigiRunSummary::endLuminosityBlock(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), HcalObjRepresent::fillOneGain(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), hcaldqm::quantity::getBin_Subdet(), spr::getEnergy(), HcalChannelIterator::getHcalSubdetector(), spr::getHotCell(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_Subdet(), hcaldqm::quantity::getValue_SubdetPM(), CaloTowersCreationAlgo::hadShwrPos(), 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(), HcalHBHEMuonSimAnalyzer::matchId(), HcalRaddamMuon::matchId(), HcalHBHEMuonAnalyzer::matchId(), FastHFShowerLibrary::modifyDepth(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_Subdet(), hcaldqm::hashfunctions::name_Subdetdepth(), hcaldqm::hashfunctions::name_Subdetieta(), hcaldqm::hashfunctions::name_Subdetiphi(), hcaldqm::hashfunctions::name_SubdetPM(), hcaldqm::hashfunctions::name_SubdetPMiphi(), operator<<(), operator=(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HBHEPhase1Reconstructor::processData(), PFCTRecHitProducer::produce(), HcalDigiTester::reco(), HcalDigisValidation::reco(), HcalSimpleRecAlgoImpl::reco(), HcalSimpleRecAlgoImpl::recoHBHE(), CaloTowersCreationAlgo::rescale(), CaloTowersCreationAlgo::rescaleTowers(), sameBaseDetId(), secondAnodeId(), HcalSimParameterMap::setFrameSize(), HcalZSAlgoRealistic::shouldKeep(), HcalTBSimParameterMap::simParameters(), HcalSimParameterMap::simParameters(), hcalCalib::Terminate(), PFRecHitQTestHCALChannel::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(), CaloSpecificAlgo::update_totalEt_totalEm(), and ObjectValidator::validHit().

49 { return (HcalSubdetector)(subdetId()); }
HcalSubdetector
Definition: HcalAssistant.h:31
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
void HcalDetId::unpackId ( const uint32_t &  rawid,
int &  zsid,
int &  eta,
int &  phi,
int &  dep 
)
staticprivate

Definition at line 217 of file HcalDetId.cc.

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

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

218  {
219  if ((rawid&kHcalIdFormat2)==0) {
220  zsid = (rawid&kHcalZsideMask1)?(1):(-1);
221  eta = (rawid>>kHcalEtaOffset1)&kHcalEtaMask1;
222  phi = rawid&kHcalPhiMask1;
223  dep = (rawid>>kHcalDepthOffset1)&kHcalDepthMask1;
224  } else {
225  zsid = (rawid&kHcalZsideMask2)?(1):(-1);
226  eta = (rawid>>kHcalEtaOffset2)&kHcalEtaMask2;
227  phi = rawid&kHcalPhiMask2;
228  dep = (rawid>>kHcalDepthOffset2)&kHcalDepthMask2;
229  }
230 }
static const int kHcalDepthMask1
Definition: HcalDetId.h:25
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
static const int kHcalDepthOffset1
Definition: HcalDetId.h:23
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
static const int kHcalZsideMask1
Definition: HcalDetId.h:21
static const int kHcalEtaOffset2
Definition: HcalDetId.h:18
static const int kHcalZsideMask2
Definition: HcalDetId.h:22
static const int kHcalEtaMask2
Definition: HcalDetId.h:20
static const int kHcalEtaMask1
Definition: HcalDetId.h:19
static const int kHcalPhiMask1
Definition: HcalDetId.h:15
static const int kHcalDepthOffset2
Definition: HcalDetId.h:24
static const int kHcalEtaOffset1
Definition: HcalDetId.h:17
int HcalDetId::zside ( ) const

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

Definition at line 93 of file HcalDetId.cc.

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

Referenced by FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryForward(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), HGCalSimHitValidation::analyzeHits(), CaloTowersCreationAlgo::assignHitHcal(), 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(), HcalDbHardcode::getParameters(), ieta(), HcalTopology::incrementDepth(), HcalDbHardcode::isHEPlan1(), HcalDDDGeometryLoader::makeCell(), HFClusterAlgo::makeCluster(), CaloTowersCreationAlgo::makeHcalDropChMap(), oldFormat(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), sameBaseDetId(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), and hgcal::RecHitTools::zside().

93  {
94  if (oldFormat()) return (id_&kHcalZsideMask1)?(1):(-1);
95  else return (id_&kHcalZsideMask2)?(1):(-1);
96 }
bool oldFormat() const
Definition: HcalDetId.h:50
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask1
Definition: HcalDetId.h:21
static const int kHcalZsideMask2
Definition: HcalDetId.h:22

Member Data Documentation

const int HcalDetId::kHcalDepthMask1 = 0x1F
static

Definition at line 25 of file HcalDetId.h.

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

const int HcalDetId::kHcalDepthMask2 = 0xF
static
const int HcalDetId::kHcalDepthOffset1 = 14
static

Definition at line 23 of file HcalDetId.h.

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

const int HcalDetId::kHcalDepthOffset2 = 20
static
const int HcalDetId::kHcalDepthSet1 = 0x1C000
static

Definition at line 27 of file HcalDetId.h.

Referenced by maskDepth().

const int HcalDetId::kHcalDepthSet2 = 0xF00000
static

Definition at line 28 of file HcalDetId.h.

Referenced by maskDepth().

const int HcalDetId::kHcalEtaMask1 = 0x3F
static

Definition at line 19 of file HcalDetId.h.

Referenced by ietaAbs(), and unpackId().

const int HcalDetId::kHcalEtaMask2 = 0x1FF
static
const int HcalDetId::kHcalEtaOffset1 = 7
static

Definition at line 17 of file HcalDetId.h.

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

const int HcalDetId::kHcalEtaOffset2 = 10
static
const int HcalDetId::kHcalIdFormat2 = 0x1000000
static
const int HcalDetId::kHcalIdMask = 0xFE000000
static
const int HcalDetId::kHcalPhiMask1 = 0x7F
static

Definition at line 15 of file HcalDetId.h.

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

const int HcalDetId::kHcalPhiMask2 = 0x3FF
static
const int HcalDetId::kHcalZsideMask1 = 0x2000
static

Definition at line 21 of file HcalDetId.h.

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

const int HcalDetId::kHcalZsideMask2 = 0x80000
static
const HcalDetId HcalDetId::Undefined
static