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 &gen)
 
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 gen) const
 
bool operator< (DetId gen) const
 
HcalDetIdoperator= (const DetId &gen)
 
bool operator== (DetId gen) const
 
uint32_t otherForm () const
 change format More...
 
bool sameBaseDetId (const DetId &gen) 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
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 (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. 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

static int32_t newForm (const uint32_t &inpid)
 

Static Public Attributes

static uint32_t kHcalDepthMask1 = 0x1F
 
static uint32_t kHcalDepthMask2 = 0xF
 
static uint32_t kHcalDepthOffset1 = 14
 
static uint32_t kHcalDepthOffset2 = 20
 
static uint32_t kHcalDepthSet1 = 0x1C000
 
static uint32_t kHcalDepthSet2 = 0xF00000
 
static uint32_t kHcalEtaMask1 = 0x3F
 
static uint32_t kHcalEtaMask2 = 0x1FF
 
static uint32_t kHcalEtaOffset1 = 7
 
static uint32_t kHcalEtaOffset2 = 10
 
static uint32_t kHcalIdFormat2 = 0x1000000
 
static uint32_t kHcalIdMask = 0xFE000000
 
static uint32_t kHcalPhiMask1 = 0x7F
 
static uint32_t kHcalPhiMask2 = 0x3FF
 
static uint32_t kHcalZsideMask1 = 0x2000
 
static 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

void newFromOld (const uint32_t &rawid)
 

Static Private Member Functions

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 13 of file HcalDetId.h.

Constructor & Destructor Documentation

HcalDetId::HcalDetId ( )
inline

Create a null cellid

Definition at line 35 of file HcalDetId.h.

Referenced by baseDetId(), and secondAnodeId().

35  : DetId() {
36  }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
HcalDetId::HcalDetId ( uint32_t  rawid)
inline

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

Definition at line 38 of file HcalDetId.h.

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

38  {
40  id_ = rawid;
41  } else {
43  if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
44  (subdet==HcalOuter) || (subdet==HcalForward)) {
45  id_ = newForm(rawid);
46  } else {
47  id_ = rawid;
48  }
49  }
50  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
static const int kSubdetOffset
Definition: DetId.h:23
static const int kSubdetMask
Definition: DetId.h:21
HcalSubdetector
Definition: HcalAssistant.h:31
Detector
Definition: DetId.h:26
static const int kDetMask
Definition: DetId.h:20
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
static const int kDetOffset
Definition: DetId.h:22
HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)
inline

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

Definition at line 53 of file HcalDetId.h.

References DetId::id_, kHcalDepthOffset2, kHcalEtaOffset2, and kHcalIdFormat2.

53  : DetId(Hcal,subdet) {
54  // (no checking at this point!)
56  ((tower_ieta>0)?(kHcalZsideMask2|(tower_ieta<<kHcalEtaOffset2)):((-tower_ieta)<<kHcalEtaOffset2)) |
57  (tower_iphi&kHcalPhiMask2);
58  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
HcalDetId::HcalDetId ( const DetId gen)
inline

Constructor from a generic cell id

Definition at line 60 of file HcalDetId.h.

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().

60  {
61  if (!gen.null()) {
63  if (gen.det()!=Hcal ||
64  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
65  subdet!=HcalOuter && subdet!=HcalForward &&
66  subdet!=HcalTriggerTower && subdet!=HcalOther)) {
67  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalDetId from " << std::hex << gen.rawId() << std::dec;
68  }
69  if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
70  (subdet==HcalOuter) || (subdet==HcalForward)) {
71  id_ = newForm(gen.rawId());
72  } else {
73  id_ = gen.rawId();
74  }
75  } else {
76  id_ = gen.rawId();
77  }
78  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
constexpr bool null() const
is this a null id ?
Definition: DetId.h:52
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39

Member Function Documentation

HcalDetId HcalDetId::baseDetId ( ) const
inline

Definition at line 225 of file HcalDetId.h.

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

225  {
226  if (subdet() != HcalForward || depth() <= 2) {
227  return HcalDetId(id_);
228  } else {
229  int zsid{0}, eta{0}, phi{0}, dep{0};
230  unpackId(id_, zsid, eta, phi, dep);
231  dep -= 2;
232  uint32_t rawid = id_&kHcalIdMask;
233  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
234  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
235  (phi&kHcalPhiMask2);
236  return HcalDetId(rawid);
237  }
238  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
HcalDetId()
Definition: HcalDetId.h:35
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
void HcalDetId::changeForm ( )
inline

Definition at line 195 of file HcalDetId.h.

References DetId::id_, and otherForm().

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

195  {
196  id_ = otherForm();
197  }
uint32_t otherForm() const
change format
Definition: HcalDetId.h:184
uint32_t id_
Definition: DetId.h:62
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 258 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

258 { return ((ieta()-zside())*5)+5*zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
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 256 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

256 { return ((ieta()-zside())*5)+zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
int HcalDetId::crystal_iphi_high ( ) const
inline

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

Definition at line 266 of file HcalDetId.h.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

266  {
267  int simple_iphi=((iphi()-1)*5)+5;
268  simple_iphi+=10;
269  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
270  }
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
int HcalDetId::crystal_iphi_low ( ) const
inline

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

Definition at line 260 of file HcalDetId.h.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

260  {
261  int simple_iphi=((iphi()-1)*5)+1;
262  simple_iphi+=10;
263  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
264  }
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
int HcalDetId::depth ( ) const
inline

get the tower depth

Definition at line 166 of file HcalDetId.h.

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

Referenced by LEDTask::_process(), HcalTriggerPrimitiveAlgo::addSignal(), JetToDigiDump::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HCALRecHitAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), HGCalRecHitValidation::analyze(), HGCalDigiValidation::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), HcalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), CaloTowersCreationAlgo::assignHitHcal(), baseDetId(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), 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(), HcalObjRepresent::HcalDataContainer< Items, Item >::fillValConts(), hcaldqm::quantity::getBin_depth(), HcalChannelIterator::getDepth(), HcalDbHardcode::getGainIndex(), hgcal::RecHitTools::getLayer(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), ParticleTowerProducer::getNearestTower(), HcalDbHardcode::getParameters(), CaloTowersCreationAlgo::getThresholdAndWeight(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), hcaldqm::quantity::getValue_depth(), CaloTowersCreationAlgo::hadShwrPos(), EgammaHadTower::hasActiveHcal(), hcaldqm::hashfunctions::hash_depth(), hcaldqm::hashfunctions::hash_Subdetdepth(), hcalTransformedId(), hfdepth(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), PFHBHERecHitCreator::importRecHits(), PFHcalRecHitCreator< Digi, Geometry, Layer, Detector >::importRecHits(), PFHFRecHitCreator::importRecHits(), PFHBHERecHitCreatorMaxSample::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), HGCalTriggerTools::layer(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), CastorDbHardcode::makeGain(), HcalDbHardcode::makeHardcodeSiPMParameter(), HGCalRecHitSimpleAlgo::makeRecHit(), hcaldqm::hashfunctions::name_DChannel(), hcaldqm::hashfunctions::name_depth(), hcaldqm::hashfunctions::name_Subdetdepth(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), otherForm(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), PulseShapeFitOOTPileupCorrection::phase1Apply(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HcalHardcodeCalibrations::produceChannelQuality(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), CaloTowersCreationAlgo::rescale(), ParticleTowerProducer::resetTowers(), 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().

166  {
168  else return (id_>>kHcalDepthOffset2)&kHcalDepthMask2;
169  }
static uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:24
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
bool oldFormat() const
Definition: HcalDetId.h:147
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalDepthMask1
Definition: HcalDetId.h:26
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
int HcalDetId::hfdepth ( ) const
inline

get full depth information for HF

Definition at line 171 of file HcalDetId.h.

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

Referenced by sameBaseDetId().

171  {
172  int dep = depth();
173  if (subdet() == HcalForward) {
174  if (dep > 2) dep -= 2;
175  }
176  return dep;
177  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
int depth() const
get the tower depth
Definition: HcalDetId.h:166
int HcalDetId::ieta ( ) const
inline

get the cell ieta

Definition at line 159 of file HcalDetId.h.

References ietaAbs(), and zside().

Referenced by RecHitTask::_process(), LEDTask::_process(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryForward(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HcalTB06Analysis::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), IsoTrackCalibration::analyze(), IsoTrackCalib::analyze(), IsolatedTracksHcalScale::analyze(), HOCalibAnalyzer::analyze(), RecAnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), HcalHaloAlgo::Calculate(), reco::helper::JetIDHelper::classifyJetComponents(), RBXAndHPDCleaner::clean(), SpikeAndDoubleSpikeCleaner::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(), HcalIsoTrkAnalyzer::fillTree(), HcalObjRepresent::HcalDataContainer< Items, Item >::fillValConts(), HLTHcalLaserMisfireFilter::filter(), 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(), EgammaHadTower::hasActiveHcal(), 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(), 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(), PFCTRecHitProducer::produce(), reco::CentralityProducer::produce(), HcalHardcodeCalibrations::produceChannelQuality(), HcalHardcodeCalibrations::produceRespCorrs(), HcalDigisValidation::reco(), HFStripFilter::runFilter(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), IsoTrig::studyIsolation(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

159 { return zside()*ietaAbs(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:154
int HcalDetId::ietaAbs ( ) const
inline

get the absolute value of the cell ieta

Definition at line 154 of file HcalDetId.h.

References DetId::id_, kHcalEtaMask1, kHcalEtaMask2, 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(), HCalSD::getEnergyDeposit(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), CaloTowersCreationAlgo::getThresholdAndWeight(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), ieta(), HcalTopology::incrementDepth(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeHardcodeSiPMParameter(), CaloTowersCreationAlgo::makeHcalDropChMap(), operator!=(), CastorDbASCIIIO::DetIdLess::operator()(), operator==(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HcalHardcodeCalibrations::produceChannelQuality(), sameBaseDetId(), HcalSimParameters::samplingFactor(), AlCaIsoTracksProducer::select(), HBHEPulseShapeFlagSetter::SetPulseShapeFlags(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), HcaluLUTTPGCoder::update(), CalorimetryManager::updateHCAL(), and ObjectValidator::validHit().

154  {
155  if (oldFormat()) return (id_>>kHcalEtaOffset1)&kHcalEtaMask1;
156  else return (id_>>kHcalEtaOffset2)&kHcalEtaMask2;
157  }
static uint32_t kHcalEtaMask2
Definition: HcalDetId.h:21
static uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:18
static uint32_t kHcalEtaMask1
Definition: HcalDetId.h:20
bool oldFormat() const
Definition: HcalDetId.h:147
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
int HcalDetId::iphi ( ) const
inline

get the cell iphi

Definition at line 161 of file HcalDetId.h.

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

Referenced by LEDTask::_process(), LaserTask::_process(), HcalGeometry::alignmentBarEndForIndexLocal(), HcalGeometry::alignmentOuterIndexLocal(), JetToDigiDump::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HCALRecHitAnalyzer::analyze(), HcalTB06Analysis::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), IsolatedTracksHcalScale::analyze(), BeamHaloAnalyzer::analyze(), RecAnalyzerMinbias::analyzeHcal(), HcalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), RecAnalyzerHF::beginJob(), PFCandidateRecalibrator::beginRun(), RBXAndHPDCleaner::clean(), 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(), HCALRecHitAnalyzer::FillGeometry(), HcalHardcodeGeometryLoader::fillHBHO(), AlCaHOCalibProducer::fillHOStore(), 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(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIphi(), CastorLedAnalysis::GetLedConst(), HcalLedAnalysis::GetLedConst(), HcaluLUTTPGCoder::getLUTId(), HBHERecHit::getMergedIds(), HcalDbHardcode::getParameters(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellFromCell(), hcaldqm::quantity::getValue_iphi(), EgammaHadTower::hasActiveHcal(), 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(), PFHFRecHitCreator::importRecHits(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalText2DetIdConverter::init(), HcalDbHardcode::isHEPlan1(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HFClusterAlgo::makeCluster(), HcalDbHardcode::makeMCParam(), HcalHBHEMuonSimAnalyzer::matchId(), HcalRaddamMuon::matchId(), HcalHBHEMuonAnalyzer::matchId(), 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(), HcalHardcodeCalibrations::produceChannelQuality(), HcalDigisValidation::reco(), HFStripFilter::runFilter(), sameBaseDetId(), AlCaIsoTracksProducer::select(), L1Analysis::L1AnalysisL1HO::SetHO(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), and HcalUnpacker::unpackVME().

161  {
162  if (oldFormat()) return id_&kHcalPhiMask1;
163  else return id_&kHcalPhiMask2;
164  }
static uint32_t kHcalPhiMask1
Definition: HcalDetId.h:16
bool oldFormat() const
Definition: HcalDetId.h:147
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
uint32_t id_
Definition: DetId.h:62
uint32_t HcalDetId::maskDepth ( ) const
inline

get the tower depth

Definition at line 179 of file HcalDetId.h.

References DetId::id_, and oldFormat().

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

179  {
180  if (oldFormat()) return (id_|kHcalDepthSet1);
181  else return (id_|kHcalDepthSet2);
182  }
static uint32_t kHcalDepthSet1
Definition: HcalDetId.h:28
static uint32_t kHcalDepthSet2
Definition: HcalDetId.h:29
bool oldFormat() const
Definition: HcalDetId.h:147
uint32_t id_
Definition: DetId.h:62
uint32_t HcalDetId::newForm ( ) const
inline

Definition at line 198 of file HcalDetId.h.

References DetId::id_.

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

198  {
199  return newForm(id_);
200  }
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
static int32_t HcalDetId::newForm ( const uint32_t &  inpid)
inlinestatic

Definition at line 201 of file HcalDetId.h.

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

201  {
202  uint32_t rawid(inpid);
203  if ((rawid&kHcalIdFormat2)==0) {
204  int zsid{0}, eta{0}, phi{0}, dep{0};
205  unpackId(rawid, zsid, eta, phi, dep);
206  rawid = inpid&kHcalIdMask;
207  rawid |= ((kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
208  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
209  (phi&kHcalPhiMask2));
210  }
211  return rawid;
212  }
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
void HcalDetId::newFromOld ( const uint32_t &  rawid)
inlineprivate

Definition at line 276 of file HcalDetId.h.

References DetId::id_, and newForm().

276  {
277  id_ = newForm(rawid);
278  }
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
bool HcalDetId::oldFormat ( ) const
inline

Definition at line 147 of file HcalDetId.h.

References DetId::id_.

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

147 { return ((id_&kHcalIdFormat2)==0)?(true):(false); }
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
bool HcalDetId::operator!= ( DetId  gen) const
inline

Definition at line 113 of file HcalDetId.h.

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

113  {
114  uint32_t rawid = gen.rawId();
115  if (rawid == id_) return false;
116  int zsid{0}, eta{0}, phi{0}, dep{0};
117  unpackId(rawid, zsid, eta, phi, dep);
118  bool result = (((id_&kHcalIdMask)!=(rawid&kHcalIdMask)) ||
119  (zsid!=zside()) || (eta!=ietaAbs()) ||
120  (phi!=iphi()) || (dep!=depth()));
121  return result;
122  }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:154
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
uint32_t id_
Definition: DetId.h:62
bool HcalDetId::operator< ( DetId  gen) const
inline

Definition at line 124 of file HcalDetId.h.

References PVValHelper::eta, DetId::id_, kHcalDepthMask1, kHcalDepthOffset2, kHcalEtaOffset1, kHcalEtaOffset2, kHcalIdFormat2, kHcalIdMask, kHcalPhiMask1, oldFormat(), phi, DetId::rawId(), and unpackId().

124  {
125  uint32_t rawid = gen.rawId();
126  if ((rawid&kHcalIdFormat2)==(id_&kHcalIdFormat2)) {
127  return id_<rawid;
128  } else {
129  int zsid{0}, eta{0}, phi{0}, dep{0};
130  unpackId(rawid, zsid, eta, phi, dep);
131  rawid &= kHcalIdMask;
132  if (oldFormat()) {
133  rawid |= (((dep&kHcalDepthMask1)<<kHcalDepthOffset1) |
134  ((zsid>0)?(kHcalZsideMask1|(eta<<kHcalEtaOffset1)):((eta)<<kHcalEtaOffset1)) |
135  (phi&kHcalPhiMask1));
136  } else {
137  rawid |= ((kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
138  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
139  (phi&kHcalPhiMask2));
140  }
141  return (id_<rawid);
142  }
143  }
static uint32_t kHcalZsideMask1
Definition: HcalDetId.h:22
static uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:18
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
static uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:24
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
static uint32_t kHcalPhiMask1
Definition: HcalDetId.h:16
bool oldFormat() const
Definition: HcalDetId.h:147
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalDepthMask1
Definition: HcalDetId.h:26
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
HcalDetId& HcalDetId::operator= ( const DetId gen)
inline

Assignment from a generic cell id

Definition at line 80 of file HcalDetId.h.

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().

80  {
81  if (!gen.null()) {
83  if (gen.det()!=Hcal ||
84  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
85  subdet!=HcalOuter && subdet!=HcalForward &&
86  subdet!=HcalTriggerTower && subdet!=HcalOther)) {
87  throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec;
88  }
89  if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
90  (subdet==HcalOuter) || (subdet==HcalForward)) {
91  id_ = newForm(gen.rawId());
92  } else {
93  id_ = gen.rawId();
94  }
95  } else {
96  id_ = gen.rawId();
97  }
98  return (*this);
99  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
constexpr bool null() const
is this a null id ?
Definition: DetId.h:52
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
bool HcalDetId::operator== ( DetId  gen) const
inline

Comparison operator

Definition at line 102 of file HcalDetId.h.

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

102  {
103  uint32_t rawid = gen.rawId();
104  if (rawid == id_) return true;
105  int zsid{0}, eta{0}, phi{0}, dep{0};
106  unpackId(rawid, zsid, eta, phi, dep);
107  bool result = (((id_&kHcalIdMask) == (rawid&kHcalIdMask)) &&
108  (zsid==zside()) && (eta==ietaAbs()) && (phi==iphi()) &&
109  (dep==depth()));
110  return result;
111  }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:154
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
uint32_t id_
Definition: DetId.h:62
uint32_t HcalDetId::otherForm ( ) const
inline

change format

Definition at line 184 of file HcalDetId.h.

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

Referenced by changeForm().

184  {
185  uint32_t rawid = (id_&kHcalIdMask);
186  if (oldFormat()) {
187  rawid = newForm(id_);
188  } else {
189  rawid |= ((depth()&kHcalDepthMask1)<<kHcalDepthOffset1) |
191  (iphi()&kHcalPhiMask1);
192  }
193  return rawid;
194  }
static uint32_t kHcalZsideMask1
Definition: HcalDetId.h:22
static uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:18
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:24
static uint32_t kHcalPhiMask1
Definition: HcalDetId.h:16
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
bool oldFormat() const
Definition: HcalDetId.h:147
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
uint32_t id_
Definition: DetId.h:62
uint32_t newForm() const
Definition: HcalDetId.h:198
static uint32_t kHcalDepthMask1
Definition: HcalDetId.h:26
bool HcalDetId::sameBaseDetId ( const DetId gen) const
inline

base detId for HF dual channels

Definition at line 214 of file HcalDetId.h.

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

214  {
215  uint32_t rawid = gen.rawId();
216  if (rawid == id_) return true;
217  int zsid{0}, eta{0}, phi{0}, dep{0};
218  if ((id_&kHcalIdMask) != (rawid&kHcalIdMask)) return false;
219  unpackId(rawid, zsid, eta, phi, dep);
220  if (subdet() == HcalForward && dep > 2) dep -= 2;
221  bool result = ((zsid==zside()) && (eta==ietaAbs()) && (phi==iphi()) &&
222  (dep==hfdepth()));
223  return result;
224  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
int hfdepth() const
get full depth information for HF
Definition: HcalDetId.h:171
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:154
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
uint32_t id_
Definition: DetId.h:62
HcalDetId HcalDetId::secondAnodeId ( ) const
inline

second PMT anode detId for HF dual channels

Definition at line 240 of file HcalDetId.h.

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

Referenced by HFPhase1Reconstructor::produce().

240  {
241  if (subdet() != HcalForward || depth() > 2) {
242  return HcalDetId(id_);
243  } else {
244  int zsid{0}, eta{0}, phi{0}, dep{0};
245  unpackId(id_, zsid, eta, phi, dep);
246  dep += 2;
247  uint32_t rawid = id_&kHcalIdMask;
248  rawid |= (kHcalIdFormat2) | ((dep&kHcalDepthMask2)<<kHcalDepthOffset2) |
249  ((zsid>0)?(kHcalZsideMask2|(eta<<kHcalEtaOffset2)):((eta)<<kHcalEtaOffset2)) |
250  (phi&kHcalPhiMask2);
251  return HcalDetId(rawid);
252  }
253  }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
static uint32_t kHcalIdMask
Definition: HcalDetId.h:31
HcalDetId()
Definition: HcalDetId.h:35
int depth() const
get the tower depth
Definition: HcalDetId.h:166
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static void unpackId(const uint32_t &rawid, int &zsid, int &eta, int &phi, int &dep)
Definition: HcalDetId.h:280
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
HcalSubdetector HcalDetId::subdet ( ) const
inline

get the subdetector

Definition at line 146 of file HcalDetId.h.

References DetId::subdetId().

Referenced by LaserTask::_dump(), QIE10Task::_process(), PedestalTask::_process(), RecHitTask::_process(), LEDTask::_process(), DigiTask::_process(), LaserTask::_process(), HcalDigitizer::accumulateCaloHits(), HcalTriggerPrimitiveAlgo::addSignal(), HcalGeometry::alignmentTransformIndexLocal(), JetToDigiDump::analyze(), HCALRecHitAnalyzer::analyze(), HcalTB06Analysis::analyze(), CaloTowersValidation::analyze(), CaloTowersAnalyzer::analyze(), WriteL1TriggerObjectsTxt::analyze(), HcalSimHitsValidation::analyze(), HcalHBHEMuonSimAnalyzer::analyze(), HcalRecHitsValidation::analyze(), HGCalDigiValidation::analyze(), HcalHBHEMuonAnalyzer::analyze(), HGCalSimHitValidation::analyze(), AnalyzerMinbias::analyzeHcal(), RecAnalyzerMinbias::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::TPRunSummary::endJob(), hcaldqm::DigiRunSummary::endJob(), hcaldqm::DigiRunSummary::endLuminosityBlock(), spr::energyHCALCell(), ChannelPattern::Fill_by_hand(), 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(), CaloTowersCreationAlgo::getThresholdAndWeight(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_Subdet(), hcaldqm::quantity::getValue_SubdetPM(), HcalHBHEMuonAnalyzer::goodCell(), CaloTowersCreationAlgo::hadShwrPos(), EgammaHadTower::hasActiveHcal(), 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(), 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=(), HBHEHFLogicalMapEntry::printLMapLine(), HOHXLogicalMapEntry::printLMapLine(), HcalCableMapper::process(), HBHEPhase1Reconstructor::processData(), PFCTRecHitProducer::produce(), 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(), CaloSpecificAlgo::update_totalEt_totalEm(), and ObjectValidator::validHit().

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

Definition at line 280 of file HcalDetId.h.

References kHcalDepthOffset1, kHcalDepthOffset2, kHcalEtaOffset1, kHcalEtaOffset2, kHcalPhiMask1, kHcalPhiMask2, kHcalZsideMask1, kHcalZsideMask2, and operator<<().

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

281  {
282  if ((rawid&kHcalIdFormat2)==0) {
283  zsid = (rawid&kHcalZsideMask1)?(1):(-1);
284  eta = (rawid>>kHcalEtaOffset1)&kHcalEtaMask1;
285  phi = rawid&kHcalPhiMask1;
286  dep = (rawid>>kHcalDepthOffset1)&kHcalDepthMask1;
287  } else {
288  zsid = (rawid&kHcalZsideMask2)?(1):(-1);
289  eta = (rawid>>kHcalEtaOffset2)&kHcalEtaMask2;
290  phi = rawid&kHcalPhiMask2;
291  dep = (rawid>>kHcalDepthOffset2)&kHcalDepthMask2;
292  }
293  }
static uint32_t kHcalEtaMask2
Definition: HcalDetId.h:21
static uint32_t kHcalZsideMask1
Definition: HcalDetId.h:22
static uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:18
static uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:24
static uint32_t kHcalDepthMask2
Definition: HcalDetId.h:27
static uint32_t kHcalPhiMask1
Definition: HcalDetId.h:16
static uint32_t kHcalEtaMask1
Definition: HcalDetId.h:20
static uint32_t kHcalPhiMask2
Definition: HcalDetId.h:17
static uint32_t kHcalEtaOffset2
Definition: HcalDetId.h:19
static uint32_t kHcalDepthMask1
Definition: HcalDetId.h:26
static uint32_t kHcalIdFormat2
Definition: HcalDetId.h:30
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23
static uint32_t kHcalDepthOffset2
Definition: HcalDetId.h:25
int HcalDetId::zside ( ) const
inline

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

Definition at line 149 of file HcalDetId.h.

References DetId::id_, and oldFormat().

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

149  {
150  if (oldFormat()) return (id_&kHcalZsideMask1)?(1):(-1);
151  else return (id_&kHcalZsideMask2)?(1):(-1);
152  }
static uint32_t kHcalZsideMask1
Definition: HcalDetId.h:22
bool oldFormat() const
Definition: HcalDetId.h:147
uint32_t id_
Definition: DetId.h:62
static uint32_t kHcalZsideMask2
Definition: HcalDetId.h:23

Member Data Documentation

uint32_t HcalDetId::kHcalDepthMask1 = 0x1F
static

Definition at line 26 of file HcalDetId.h.

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

uint32_t HcalDetId::kHcalDepthMask2 = 0xF
static
uint32_t HcalDetId::kHcalDepthOffset1 = 14
static

Definition at line 24 of file HcalDetId.h.

Referenced by unpackId().

uint32_t HcalDetId::kHcalDepthOffset2 = 20
static
uint32_t HcalDetId::kHcalDepthSet1 = 0x1C000
static

Definition at line 28 of file HcalDetId.h.

uint32_t HcalDetId::kHcalDepthSet2 = 0xF00000
static

Definition at line 29 of file HcalDetId.h.

uint32_t HcalDetId::kHcalEtaMask1 = 0x3F
static

Definition at line 20 of file HcalDetId.h.

Referenced by ietaAbs().

uint32_t HcalDetId::kHcalEtaMask2 = 0x1FF
static
uint32_t HcalDetId::kHcalEtaOffset1 = 7
static

Definition at line 18 of file HcalDetId.h.

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

uint32_t HcalDetId::kHcalEtaOffset2 = 10
static
uint32_t HcalDetId::kHcalIdFormat2 = 0x1000000
static
uint32_t HcalDetId::kHcalIdMask = 0xFE000000
static

Definition at line 31 of file HcalDetId.h.

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

uint32_t HcalDetId::kHcalPhiMask1 = 0x7F
static

Definition at line 16 of file HcalDetId.h.

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

uint32_t HcalDetId::kHcalPhiMask2 = 0x3FF
static
uint32_t HcalDetId::kHcalZsideMask1 = 0x2000
static

Definition at line 22 of file HcalDetId.h.

Referenced by unpackId().

uint32_t HcalDetId::kHcalZsideMask2 = 0x80000
static

Definition at line 23 of file HcalDetId.h.

Referenced by AHCalDetId::AHCalDetId(), and unpackId().

const HcalDetId HcalDetId::Undefined
static