CMS 3D CMS Logo

Enumerations | Functions
HcalDetIdTransform Namespace Reference

Enumerations

enum  {
  RAWID = 0, IETA, IETAABS, SUBDET,
  IETADEPTH, IETAABSDEPTH, N_TRANSFORMS
}
 

Functions

unsigned transform (const HcalDetId &id, unsigned transformCode)
 
void validateCode (unsigned transformCode)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RAWID 
IETA 
IETAABS 
SUBDET 
IETADEPTH 
IETAABSDEPTH 
N_TRANSFORMS 

Definition at line 10 of file HcalDetIdTransform.h.

10  {
11  RAWID = 0, // Raw detector id
12  IETA, // ieta() + shift
13  IETAABS, // ietaAbs()
14  SUBDET, // subdetId()
15  IETADEPTH, // maps ieta() and depth() into a unique number
16  IETAABSDEPTH, // maps ietaAbs() and depth() into a unique number
18  };

Function Documentation

◆ transform()

unsigned HcalDetIdTransform::transform ( const HcalDetId id,
unsigned  transformCode 
)

Definition at line 7 of file HcalDetIdTransform.cc.

7  {
8  static const int ietaShift = 1024;
9  static const int maxHcalDepth = 64;
10 
11  if (transformCode >= N_TRANSFORMS)
12  throw cms::Exception(
13  "In HcalDetIdTransform::transform:"
14  " invalid transform code");
15  unsigned t = 0;
16  switch (transformCode) {
17  case RAWID:
18  t = id.rawId();
19  break;
20 
21  case IETA:
22  t = id.ieta() + ietaShift;
23  break;
24 
25  case IETAABS:
26  t = id.ietaAbs();
27  break;
28 
29  case SUBDET:
30  t = id.subdetId();
31  break;
32 
33  case IETADEPTH:
34  t = (id.ieta() + ietaShift) * maxHcalDepth + id.depth();
35  break;
36 
37  case IETAABSDEPTH:
38  t = id.ietaAbs() * maxHcalDepth + id.depth();
39  break;
40 
41  default:
42  throw cms::Exception(
43  "In HcalDetIdTransform::transform:"
44  " unhandled switch clause. This is a bug."
45  " Please report.");
46  }
47  return t;
48  }

References LEDCalibrationChannels::depth, Exception, IETA, IETAABS, IETAABSDEPTH, IETADEPTH, N_TRANSFORMS, RAWID, SUBDET, and OrderedSet::t.

Referenced by AlignableDet::alignments(), AlignableBeamSpot::alignments(), AlignableDetUnit::alignments(), AlphaT::AlphaT(), edm::ContainerMask< T >::applyOrTo(), edm::ScheduleInfo::availableModuleLabels(), edm::StreamSchedule::availablePaths(), CSCGeometryParsFromDD::build(), ticl::TracksterP4FromEnergySum::calcP4(), SiPixelPI::checkAnswerOK(), reco::helper::JetIDHelper::classifyJetComponents(), reco::helper::JetIDHelper::classifyJetTowers(), TkGluedMeasurementDet::collectRecHits(), TCMETAlgo::configure(), SiStripRawProcessingAlgorithms::convertVirginRawToHybrid(), edmNew::copyDetSetRange(), ConstrainedTreeBuilder::covarianceMatrix(), ConstrainedTreeBuilderT::covarianceMatrix(), FastCircle::createCircleParameters(), SiStripAPVRestorer::createCMMapCMstored(), align::createPoints(), TGeoFromDddService::createShape(), TGeoMgrFromDdd::createShape(), DDSpecPar::value< std::vector< double > >(), DDSpecPar::value< std::vector< int > >(), DDSpecPar::value< std::vector< std::string > >(), JME::JetResolutionObject::Definition::Definition(), FWDetailViewManager::detailViewsFor(), Pixel3DDigitizerAlgorithm::diffusion(), ElectronHEEPIDValueMapProducer::ElectronHEEPIDValueMapProducer(), l1t::OnlineDBqueryHelper::fetch(), HGCalTriggerNtupleHGCMulticlusters::fill(), HGCalTriggerNtupleHGCClusters::fill(), edm::FwdPtrCollectionFilter< T, S, H >::filter(), FWDetailViewManager::findViewersFor(), Phase2TrackerDigitizerAlgorithm::fluctuateEloss(), emtf::Forest::Forest(), FWEveViewManager::FWEveViewManager(), metsig::METSignificance::getCovariance(), EcalFedMap::getFedFromSlice(), edm::DetSetVector< TotemRPLocalTrack::FittedRecHit >::getIds(), HcalItemCollById< HFPhase1PMTData >::getIndex(), HcalItemArrayCollById< Item, N >::getIndex(), CSCStripElectronicsSim::getKeyStripsFromMC(), TrackerDetToDTCELinkCablingMap::getKnownDTCELinkIds(), reco::TaggingVariableList::getList(), edm::ParameterSet::getParameterNames(), l1t::Parameter::getTableColumn(), HGCalVFESummationImpl::HGCalVFESummationImpl(), SeedingLayerSetsHits::hits(), SiPixelDigitizerAlgorithm::init(), Herwig7Interface::initRepository(), pat::JetCorrFactors::jecFlavor(), L1TkMuonProducer::L1TkMuonProducer(), reco::MaskCollection< Object >::mask(), cms::MuonTCMETValueMapProducer::MuonTCMETValueMapProducer(), MuonTypeByOrCut::MuonTypeByOrCut(), DQMRootOutputModule::openFile(), alpha_T::operator()(), ThirdHitRZPrediction< Propagator >::operator()(), CSCStripData::operator*=(), emtf::Forest::operator=(), BTagEntry::Parameters::Parameters(), gen::JetMatchingMGFastJet::parseParameter(), gen::JetMatchingMadgraph::parseParameter(), pat::PATLostTracks::PATLostTracks(), GaussianSumUtilities1D::pdfComponents(), SiStripProcessedRawDigiProducer::pr_process(), MultiClustersFromTrackstersProducer::produce(), trackerDTC::DTC::produce(), pat::MatcherByPulls< T >::produce(), EcalTrivialConditionRetriever::produceEcalAlignmentEB(), EcalTrivialConditionRetriever::produceEcalAlignmentEE(), EcalTrivialConditionRetriever::produceEcalAlignmentES(), edm::eventsetup::EventSetupRecordProvider::proxyProviderDescriptions(), QualityCutsAnalyzer::QualityCutsAnalyzer(), l1t::LUT::read(), MP7FileReader::readRows(), MiniFloatConverter::reduceMantissaToNbitsRounding(), Phase1PixelMaps::rescaleAllBarrel(), Phase1PixelMaps::rescaleAllForward(), MP7FileReader::searchLinks(), LMFColoredTable::setColor(), ODSRPConfig::setParameters(), gen::Pythia6Service::setSLHAFromHeader(), Herwig6Hadronizer::setSLHAFromHeader(), LMFPnPrimDat::setSystem(), LMFColoredTable::setSystem(), SiStripLorentzAngleFakeESSource::SiStripLorentzAngleFakeESSource(), PrimaryVertexResolution::sortTracksByPt(), trackerDTC::DTC::split(), RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker(), SiStripRawProcessingAlgorithms::suppressHybridData(), SiStripRawProcessingAlgorithms::suppressProcessedRawData(), SiStripRawProcessingAlgorithms::suppressVirginRawData(), TrackerGeometryCompare::surveyToTracker(), TauDiscriminationProducerBase< TauType, TauDiscriminator >::TauDiscriminationProducerBase(), trackerStablePhiSort(), L1TMuonEndCapForestESProducer::traverse(), upcaseString(), TrackingMaterialProducer::update(), progressbar.FormatLabel::update(), and sistrip::FEDEmulator::zeroSuppress().

◆ validateCode()

void HcalDetIdTransform::validateCode ( unsigned  transformCode)

Definition at line 50 of file HcalDetIdTransform.cc.

50  {
51  if (transformCode >= N_TRANSFORMS)
52  throw cms::Exception(
53  "In HcalDetIdTransform::validateCode:"
54  " invalid transform code");
55  }

References Exception, and N_TRANSFORMS.

Referenced by HcalItemArrayCollById< Item, N >::HcalItemArrayCollById(), and HcalItemCollById< HFPhase1PMTData >::HcalItemCollById().

HcalDetIdTransform::IETAABS
Definition: HcalDetIdTransform.h:13
HcalDetIdTransform::N_TRANSFORMS
Definition: HcalDetIdTransform.h:17
HcalDetIdTransform::IETADEPTH
Definition: HcalDetIdTransform.h:15
OrderedSet.t
t
Definition: OrderedSet.py:90
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDetIdTransform::IETA
Definition: HcalDetIdTransform.h:12
HcalDetIdTransform::RAWID
Definition: HcalDetIdTransform.h:11
HcalDetIdTransform::SUBDET
Definition: HcalDetIdTransform.h:14
HcalDetIdTransform::IETAABSDEPTH
Definition: HcalDetIdTransform.h:16
Exception
Definition: hltDiff.cc:246