CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types
HcalDetId Class Reference

#include <HcalDetId.h>

Inheritance diagram for HcalDetId:
DetId

Public Types

enum  { kSizeForDenseIndexing = 2*kHcalhalf }
 
enum  { kHBSize = 2*kHBhalf }
 
enum  { kHESize = 2*kHEhalf }
 
enum  { kHOSize = 2*kHOhalf }
 
enum  { kHFSize = 2*kHFhalf }
 
- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5
}
 

Public Member Functions

int crystal_ieta_high () const
 get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) 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...
 
uint32_t denseIndex () const
 
int depth () const
 get the tower depth More...
 
int hashed_index () const
 
 HcalDetId ()
 
 HcalDetId (uint32_t rawid)
 
 HcalDetId (HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
 
 HcalDetId (const DetId &id)
 
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...
 
HcalDetIdoperator= (const DetId &id)
 
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 HcalDetId detIdFromDenseIndex (uint32_t di)
 
static bool validDenseIndex (uint32_t din)
 
static bool validDetId (HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
 

Static Public Attributes

static const HcalDetId Undefined
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Private Types

enum  {
  kHBhalf = 1296, kHEhalf = 1296, kHOhalf = 1080, kHFhalf = 864,
  kHcalhalf = kHBhalf + kHEhalf + kHOhalf + kHFhalf
}
 

Additional Inherited Members

- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

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

Date:
2011/05/29 18:43:20
Revision:
1.15
Author
J. Mans - Minnesota

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

Definition at line 18 of file HcalDetId.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
kHBhalf 
kHEhalf 
kHOhalf 
kHFhalf 
kHcalhalf 

Definition at line 70 of file HcalDetId.h.

anonymous enum
Enumerator
kSizeForDenseIndexing 

Definition at line 78 of file HcalDetId.h.

anonymous enum
Enumerator
kHBSize 

Definition at line 79 of file HcalDetId.h.

anonymous enum
Enumerator
kHESize 

Definition at line 80 of file HcalDetId.h.

anonymous enum
Enumerator
kHOSize 

Definition at line 81 of file HcalDetId.h.

anonymous enum
Enumerator
kHFSize 

Definition at line 82 of file HcalDetId.h.

Constructor & Destructor Documentation

HcalDetId::HcalDetId ( )

Create a null cellid

Definition at line 7 of file HcalDetId.cc.

Referenced by detIdFromDenseIndex().

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

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

Definition at line 10 of file HcalDetId.cc.

10  : DetId(rawid) {
11 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)

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

Definition at line 13 of file HcalDetId.cc.

References DetId::id_.

13  : DetId(Hcal,subdet) {
14  // (no checking at this point!)
15  id_ |= ((depth&0x1F)<<14) |
16  ((tower_ieta>0)?(0x2000|(tower_ieta<<7)):((-tower_ieta)<<7)) |
17  (tower_iphi&0x7F);
18 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
int depth() const
get the tower depth
Definition: HcalDetId.h:42
uint32_t id_
Definition: DetId.h:57
HcalDetId::HcalDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 20 of file HcalDetId.cc.

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

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

Member Function Documentation

int HcalDetId::crystal_ieta_high ( ) const
inline

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

Definition at line 46 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

46 { return ((ieta()-zside())*5)+5*zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:34
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
int HcalDetId::crystal_ieta_low ( ) const
inline

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

Definition at line 44 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

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

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

53  {
54  int simple_iphi=((iphi()-1)*5)+5;
55  simple_iphi+=10;
56  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
57 }
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
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 47 of file HcalDetId.cc.

References iphi().

Referenced by CaloTowerConstituentsMap::constituentsOf().

47  {
48  int simple_iphi=((iphi()-1)*5)+1;
49  simple_iphi+=10;
50  return ((simple_iphi>360)?(simple_iphi-360):(simple_iphi));
51 }
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
uint32_t HcalDetId::denseIndex ( ) const
inline

Definition at line 60 of file HcalDetId.h.

References hashed_index().

60 { return hashed_index() ; }
int hashed_index() const
Definition: HcalDetId.cc:119
int HcalDetId::depth ( ) const
inline

get the tower depth

Definition at line 42 of file HcalDetId.h.

References DetId::id_.

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

42 { return (id_>>14)&0x1F; }
uint32_t id_
Definition: DetId.h:57
HcalDetId HcalDetId::detIdFromDenseIndex ( uint32_t  di)
static

Definition at line 155 of file HcalDetId.cc.

References HcalBarrel, HcalDetId(), HcalEndcap, HcalForward, HcalOuter, recoMuon::in, kHBhalf, kHEhalf, kHFhalf, kHOhalf, sd, and validDenseIndex().

Referenced by CaloGenericDetId::CaloGenericDetId(), HcalGeometry::localCorners(), and ParticleTowerProducer::produce().

156 {
157  if( validDenseIndex( di ) )
158  {
160  int ie ( 0 ) ;
161  int ip ( 0 ) ;
162  int dp ( 0 ) ;
163  int in ( di ) ;
164  int iz ( 1 ) ;
165  if( in > 2*( kHBhalf + kHEhalf + kHOhalf ) - 1 )
166  {
167  sd = HcalForward ;
168  in -= 2*( kHBhalf + kHEhalf + kHOhalf ) ;
169  iz = ( in<kHFhalf ? 1 : -1 ) ;
170  in %= kHFhalf ;
171  ip = 4*( in/48 ) ;
172  in %= 48 ;
173  ip += 1 + ( in>21 ? 2 : 0 ) ;
174  if( 3 == ip%4 ) in -= 22 ;
175  ie = 29 + in/2 ;
176  dp = 1 + in%2 ;
177  }
178  else
179  {
180  if( in > 2*( kHBhalf + kHEhalf ) - 1 )
181  {
182  sd = HcalOuter ;
183  in -= 2*( kHBhalf + kHEhalf ) ;
184  iz = ( in<kHOhalf ? 1 : -1 ) ;
185  in %= kHOhalf ;
186  dp = 4 ;
187  ip = 1 + in/15 ;
188  ie = 1 + ( in - 15*( ip - 1 ) ) ;
189  }
190  else
191  {
192  if( in > 2*kHBhalf - 1 )
193  {
194  sd = HcalEndcap ;
195  in -= 2*kHBhalf ;
196  iz = ( in<kHEhalf ? 1 : -1 ) ;
197  in %= kHEhalf ;
198  ip = 2*( in/36 ) ;
199  in %= 36 ;
200  ip += 1 + in/28 ;
201  if( 0 == ip%2 ) in %= 28 ;
202  ie = 15 + ( in<2 ? 1 + in : 2 +
203  ( in<20 ? 1 + ( in - 2 )/2 : 9 +
204  ( in<26 ? 1 + ( in - 20 )/3 : 3 ) ) ) ;
205  dp = ( in<1 ? 3 :
206  ( in<2 ? 1 :
207  ( in<20 ? 1 + ( in - 2 )%2 :
208  ( in<26 ? 1 + ( in - 20 )%3 :
209  ( 1 + ( in - 26 )%2 ) ) ) ) ) ;
210  }
211  else // barrel
212  {
213  iz = ( di<kHBhalf ? 1 : -1 ) ;
214  in %= kHBhalf ;
215  ip = in/18 + 1 ;
216  in %= 18 ;
217  if( in < 14 )
218  {
219  dp = 1 ;
220  ie = in + 1 ;
221  }
222  else
223  {
224  in %= 14 ;
225  dp = 1 + in%2 ;
226  ie = 15 + in/2 ;
227  }
228  }
229  }
230  }
231  return HcalDetId( sd, iz*int(ie), ip, dp ) ;
232  }
233  else
234  {
235  return HcalDetId() ;
236  }
237 }
HcalDetId()
Definition: HcalDetId.cc:7
HcalSubdetector
Definition: HcalAssistant.h:32
static bool validDenseIndex(uint32_t din)
Definition: HcalDetId.h:62
double sd
int HcalDetId::hashed_index ( ) const

Definition at line 119 of file HcalDetId.cc.

References depth(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, ietaAbs(), iphi(), kHBhalf, kHEhalf, kHFhalf, kHOhalf, sd, subdet(), and zside().

Referenced by HcalRecHitsMaker::createVectorOfSubdetectorCells(), denseIndex(), CalorimetryManager::EMShowerSimulation(), CalorimetryManager::HDShowerSimulation(), PFRecHitProducerHO::hoNeighbArray(), HcalRecHitsMaker::init(), PFRecHitProducerHO::move(), CalorimetryManager::MuonMipSimulation(), CalorimetryManager::reconstruct(), and CalorimetryManager::reconstructECAL().

120 {
121  const HcalSubdetector sd ( subdet() ) ;
122  const int ip ( iphi() ) ;
123  const int ie ( ietaAbs() ) ;
124  const int dp ( depth() ) ;
125  const int zn ( zside() < 0 ? 1 : 0 ) ;
126 
127  // HB valid DetIds: phi=1-72,eta=1-14,depth=1; phi=1-72,eta=15-16,depth=1-2
128 
129  // HE valid DetIds: phi=1-72,eta=16-17,depth=1; phi=1-72,eta=18-20,depth=1-2;
130  // phi=1-71(in steps of 2),eta=21-26,depth=1-2; phi=1-71(in steps of 2),eta=27-28,depth=1-3
131  // phi=1-71(in steps of 2),eta=29,depth=1-2
132 
133  // HO valid DetIds: phi=1-72,eta=1-15,depth=4!
134 
135  // HF valid DetIds: phi=1-71(in steps of 2),eta=29-39,depth=1-2; phi=3-71(in steps of 4),eta=40-41,depth=1-2
136 
137  return ( ( sd == HcalBarrel ) ?
138  ( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*kHBhalf :
139  ( ( sd == HcalEndcap ) ?
140  2*kHBhalf + ( ip - 1 )*8 + ( ip/2 )*20 +
141  ( ( ie==16 || ie==17 ) ? ie - 16 :
142  ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
143  ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
144  ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
145  26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*kHEhalf :
146  ( ( sd == HcalOuter ) ?
147  2*kHBhalf + 2*kHEhalf + ( ip - 1 )*15 + ( ie - 1 ) + zn*kHOhalf :
148  ( ( sd == HcalForward ) ?
149  2*kHBhalf + 2*kHEhalf + 2*kHOhalf +
150  ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
151  2*( ie - 29 ) + ( dp - 1 ) + zn*kHFhalf : -1 ) ) ) ) ;
152 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:34
int depth() const
get the tower depth
Definition: HcalDetId.h:42
HcalSubdetector
Definition: HcalAssistant.h:32
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:36
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
double sd
int HcalDetId::ieta ( ) const
inline

get the cell ieta

Definition at line 38 of file HcalDetId.h.

References ietaAbs(), and zside().

Referenced by HFLightCal::analyze(), HFLightCalRand::analyze(), HFPreLightCal::analyze(), JetToDigiDump::analyze(), HcalNoiseMonitor::analyze(), HCALRecHitAnalyzer::analyze(), DQMHcalPhiSymAlCaReco::analyze(), HcalCorrPFCalculation::analyze(), cms::DiJetAnalyzer::analyze(), cms::HcalConstantsASCIIWriter::analyze(), cms::Analyzer_minbias::analyze(), ValidIsoTrkCalib::analyze(), HcalIsoTrkAnalyzer::analyze(), IsolatedTracksHcalScale::analyze(), MuonHOAcceptance::buildDeadAreas(), MuonHOAcceptance::buildSiPMAreas(), HcalHaloAlgo::Calculate(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), reco::helper::JetIDHelper::classifyJetComponents(), PFClusterAlgo::cleanRBXAndHPD(), PFRecHitProducerHCAL::createRecHits(), PFRecHitProducerHO::createRecHits(), crystal_ieta_high(), crystal_ieta_low(), cms::MinBias::endJob(), HCALRecHitAnalyzer::FillGeometry(), HcalDetDiagLEDMonitor::fillHistos(), HcalObjRepresent::fillOneGain(), HcalDetDiagLaserMonitor::fillProblems(), HcalLaserHBHEFilter2012::filter(), HcalLaserHBHEHFFilter2012::filter(), TrackDetMatchInfo::findMaxDeposition(), CaloGeometryHelper::getClosestCell(), hcalCalib::GetCoefFromMtrxInvOfAve(), HBHEHitMapOrganizer::getHPDNeighbors(), HcalChannelIterator::getIeta(), HcaluLUTTPGCoder::getLUTId(), CaloTowersCreationAlgo::getThresholdAndWeight(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HcalTopology::incrementDepth(), DetIdInfo::info(), fireworks::info(), HcalRecHitsMaker::init(), HcalText2DetIdConverter::init(), CastorLedAnalysis::LedTrendings(), HcalLedAnalysis::LedTrendings(), HcalRecHitsMaker::loadHcalRecHits(), HFClusterAlgo::makeCluster(), HcalRawDataClient::mapChannproblem(), HcalRawDataMonitor::mapChannproblem(), HcalRawDataClient::mapDCCproblem(), HcalRawDataMonitor::mapDCCproblem(), HcalRawDataClient::mapHTRproblem(), HcalRawDataMonitor::mapHTRproblem(), HcalRecHitsMaker::noiseInfCfromDB(), TrackDetMatchInfo::nXnEnergy(), CastorPedestalAnalysis::per2CapsHists(), HcalPedestalAnalysis::per2CapsHists(), cond::PayLoadInspector< DataT >::plot(), printTableLine(), HcalCoarsePedestalMonitor::processEvent(), HcalBeamMonitor::processEvent(), HcalDigiMonitor::processEvent(), reco::CentralityProducer::produce(), AlCaHOCalibProducer::produce(), HcalDigiTester::reco(), HcalSimpleRecAlgoImpl::reco(), HcalDetDiagLEDMonitor::SaveReference(), HcalDetDiagPedestalMonitor::SaveReference(), HcalDetDiagLaserMonitor::SaveReference(), CastorLedAnalysis::SetupLEDHists(), HcalLedAnalysis::SetupLEDHists(), hcalCalib::Terminate(), HcalTrigTowerGeometry::towerIds(), CaloTowerConstituentsMap::towerOf(), CastorPedestalAnalysis::Trendings(), HcalPedestalAnalysis::Trendings(), HcalUnpacker::unpack(), and CaloGenericDetId::validDetId().

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

get the cell iphi

Definition at line 40 of file HcalDetId.h.

References DetId::id_.

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

40 { return id_&0x7F; }
uint32_t id_
Definition: DetId.h:57
HcalDetId & HcalDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 33 of file HcalDetId.cc.

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

33  {
34  if (!gen.null()) {
36  if (gen.det()!=Hcal ||
37  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
38  subdet!=HcalOuter && subdet!=HcalForward ))
39  {
40  throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec;
41  }
42  }
43  id_=gen.rawId();
44  return (*this);
45 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
HcalSubdetector
Definition: HcalAssistant.h:32
uint32_t id_
Definition: DetId.h:57
HcalSubdetector HcalDetId::subdet ( ) const
inline

get the subdetector

Definition at line 32 of file HcalDetId.h.

References DetId::subdetId().

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

32 { return (HcalSubdetector)(subdetId()); }
HcalSubdetector
Definition: HcalAssistant.h:32
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
static bool HcalDetId::validDenseIndex ( uint32_t  din)
inlinestatic

Definition at line 62 of file HcalDetId.h.

References kSizeForDenseIndexing.

Referenced by detIdFromDenseIndex().

bool HcalDetId::validDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)
static

Definition at line 70 of file HcalDetId.cc.

References abs, HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by WriteL1TriggerObjetsXml::analyze(), HcalGeometry::getCells(), hcalCalib::makeTextFile(), hcalCalib::ReadPhiSymCor(), HcaluLUTTPGCoder::update(), and CaloGenericDetId::validDetId().

74 {
75  const int ie ( abs( ies ) ) ;
76 
77  return ( ( ip >= 1 ) &&
78  ( ip <= 72 ) &&
79  ( dp >= 1 ) &&
80  ( ie >= 1 ) &&
81  ( ( ( sd == HcalBarrel ) &&
82  ( ( ( ie <= 14 ) &&
83  ( dp == 1 ) ) ||
84  ( ( ( ie == 15 ) || ( ie == 16 ) ) &&
85  ( dp <= 2 ) ) ) ) ||
86  ( ( sd == HcalEndcap ) &&
87  ( ( ( ie == 16 ) &&
88  ( dp == 3 ) ) ||
89  ( ( ie == 17 ) &&
90  ( dp == 1 ) ) ||
91  ( ( ie >= 18 ) &&
92  ( ie <= 20 ) &&
93  ( dp <= 2 ) ) ||
94  ( ( ie >= 21 ) &&
95  ( ie <= 26 ) &&
96  ( dp <= 2 ) &&
97  ( ip%2 == 1 ) ) ||
98  ( ( ie >= 27 ) &&
99  ( ie <= 28 ) &&
100  ( dp <= 3 ) &&
101  ( ip%2 == 1 ) ) ||
102  ( ( ie == 29 ) &&
103  ( dp <= 2 ) &&
104  ( ip%2 == 1 ) ) ) ) ||
105  ( ( sd == HcalOuter ) &&
106  ( ie <= 15 ) &&
107  ( dp == 4 ) ) ||
108  ( ( sd == HcalForward ) &&
109  ( dp <= 2 ) &&
110  ( ( ( ie >= 29 ) &&
111  ( ie <= 39 ) &&
112  ( ip%2 == 1 ) ) ||
113  ( ( ie >= 40 ) &&
114  ( ie <= 41 ) &&
115  ( ip%4 == 3 ) ) ) ) ) ) ;
116 }
#define abs(x)
Definition: mlp_lapack.h:159
double sd
int HcalDetId::zside ( ) const
inline

Member Data Documentation

const HcalDetId HcalDetId::Undefined
static