CMS 3D CMS Logo

HcalTestNumberingScheme.cc
Go to the documentation of this file.
1 // File: HcalTestNumberingScheme.cc
3 // Description: Numbering scheme for barrel electromagnetic calorimeter
8 
9 #include <iostream>
10 
11 //#define EDM_ML_DEBUG
12 
14  edm::LogVerbatim("HcalSim") << "Creating HcalTestNumberingScheme with TB Flag " << forTBH2;
15 }
16 
18  edm::LogVerbatim("HcalSim") << "Deleting HcalTestNumberingScheme";
19 }
20 
22  //pack it into an integer
23  uint32_t index = 0;
24  if (forTBH2) {
25  // TB H2 Case
26  int etaR = id.etaR;
27  int phi = id.phis;
28  HcalSubdetector subdet = (HcalSubdetector)(id.subdet);
29  if (subdet == HcalBarrel && phi > 4) { // HB2
30  if (etaR > 4 && etaR < 10)
31  index = HcalDetId(subdet, id.lay, id.phis, 1).rawId();
32  } else { // HB1
33  index = HcalDetId(subdet, etaR, id.phis, id.depth).rawId();
34  }
35  } else {
36  // Test case
37  index = HcalTestNumbering::packHcalIndex(id.subdet, id.zside, id.depth, id.etaR, id.phis, id.lay);
38  }
39 #ifdef EDM_ML_DEBUG
40  edm::LogVerbatim("HcalSim") << "HcalTestNumberingScheme det = " << id.subdet << " depth/lay = " << id.depth << "/"
41  << id.lay << " zside = " << id.zside << " eta/R = " << id.etaR << " phi = " << id.phis
42  << " packed index = 0x" << std::hex << index << std::dec << std::endl;
43 #endif
44  return index;
45 }
46 
47 uint32_t HcalTestNumberingScheme::packHcalIndex(int det, int z, int depth, int eta, int phi, int lay) {
48  return HcalTestNumbering::packHcalIndex(det, z, depth, eta, phi, lay);
49 }
50 
52  const uint32_t& idx, int& det, int& z, int& depth, int& eta, int& phi, int& lay) {
54 }
HcalTestNumberingScheme::getUnitID
uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id) override
Definition: HcalTestNumberingScheme.cc:21
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
HcalTestNumberingScheme::~HcalTestNumberingScheme
~HcalTestNumberingScheme() override
Definition: HcalTestNumberingScheme.cc:17
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HcalBarrel
Definition: HcalAssistant.h:33
training_settings.idx
idx
Definition: training_settings.py:16
HcalTestNumbering::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition: HcalTestNumbering.cc:18
PVValHelper::eta
Definition: PVValidationHelpers.h:69
DDAxes::z
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition: HcalTestNumbering.cc:7
PVValHelper::phi
Definition: PVValidationHelpers.h:68
HcalTestNumberingScheme::forTBH2
bool forTBH2
Definition: HcalTestNumberingScheme.h:22
HcalDetId.h
HcalTestNumberingScheme::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition: HcalTestNumberingScheme.cc:47
HcalDetId
Definition: HcalDetId.h:12
edm::LogVerbatim
Definition: MessageLogger.h:297
HcalTestNumberingScheme::HcalTestNumberingScheme
HcalTestNumberingScheme()=delete
HcalSubdetector.h
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
DDAxes::phi
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalTestNumberingScheme::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition: HcalTestNumberingScheme.cc:51
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcalTestNumberingScheme.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143