CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
HcalTBNumberingScheme Class Reference

#include <SimG4CMS/HcalTestBeam/interface/HcalTBNumberingScheme.h>

Public Member Functions

 HcalTBNumberingScheme ()
 
virtual ~HcalTBNumberingScheme ()
 

Static Public Member Functions

static uint32_t getUnitID (const uint32_t id, const int mode)
 
static std::vector< uint32_t > getUnitIDs (const int type, const int mode)
 

Detailed Description

Description: Numbering scheme for hadron calorimeter in test beam

Usage: Sets up tower ID's of all towers in the 2004 Hcal test beam setup

Definition at line 25 of file HcalTBNumberingScheme.h.

Constructor & Destructor Documentation

◆ HcalTBNumberingScheme()

HcalTBNumberingScheme::HcalTBNumberingScheme ( )
inline

Definition at line 27 of file HcalTBNumberingScheme.h.

27 {}

◆ ~HcalTBNumberingScheme()

virtual HcalTBNumberingScheme::~HcalTBNumberingScheme ( )
inlinevirtual

Definition at line 28 of file HcalTBNumberingScheme.h.

28 {}

Member Function Documentation

◆ getUnitID()

uint32_t HcalTBNumberingScheme::getUnitID ( const uint32_t  id,
const int  mode 
)
static

Definition at line 26 of file HcalTBNumberingScheme.cc.

26  {
27  int subdet, zside, group, ieta, iphi, lay;
28  HcalTestNumbering::unpackHcalIndex(idHit, subdet, zside, group, ieta, iphi, lay);
29  LogDebug("HcalTBSim") << "HcalTBNumberingScheme: i/p ID 0x" << std::hex << idHit << std::dec << " det " << zside
30  << " group " << group << " layer " << lay << " eta " << ieta << " phi " << iphi;
31 
32  uint32_t idunit;
33  if (subdet == static_cast<int>(HcalBarrel)) {
34  if (lay <= 17)
35  group = 1;
36  else
37  group = 2;
38  }
39  if (mode > 0) {
40  if (subdet == static_cast<int>(HcalBarrel) && iphi > 4) {
41  if (lay <= 17) {
42  // HB2 (unmasked and masked)
43  if (ieta > 4 && ieta < 10) {
44  idunit = HcalTestNumbering::packHcalIndex(0, 0, 1, 0, iphi, lay);
45  } else {
46  idunit = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, group);
47  }
48  } else {
49  // HO behind HB2
50  idunit = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 18);
51  }
52  } else {
53  // HB1, HE, HO behind HB1
54  idunit = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, group);
55  }
56  } else {
57  idunit = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, group);
58  }
59 
60  HcalTestNumbering::unpackHcalIndex(idunit, subdet, zside, group, ieta, iphi, lay);
61  LogDebug("HcalTBSim") << "HcalTBNumberingScheme: idHit 0x" << std::hex << idHit << " idunit 0x" << idunit << std::dec
62  << "\n"
63  << "HcalTBNumberingScheme: o/p ID 0x" << std::hex << idunit << std::dec << " det " << zside
64  << " group " << group << " layer " << lay << " eta " << ieta << " phi " << iphi;
65 
66  return idunit;
67 }

References TauDecayModes::dec, watchdog::group, HcalBarrel, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, LogDebug, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, HcalTestNumbering::packHcalIndex(), HcalTestNumbering::unpackHcalIndex(), and ecaldqm::zside().

Referenced by HcalTB04Analysis::fillBuffer().

◆ getUnitIDs()

std::vector< uint32_t > HcalTBNumberingScheme::getUnitIDs ( const int  type,
const int  mode 
)
static

Definition at line 69 of file HcalTBNumberingScheme.cc.

69  {
70  std::vector<uint32_t> tmp;
71  int iphi, ieta, lay;
72  uint32_t id;
73 
74  if (type != 1) {
75  // Include HB and HO id's
76  if (mode > 0) {
77  // HB1 and masked part of HB2
78  for (ieta = 1; ieta < 17; ieta++) {
79  for (iphi = 1; iphi < 9; iphi++) {
80  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 1);
81  tmp.push_back(id);
82  }
83  }
84  // HO behind HB1
85  for (ieta = 1; ieta < 16; ieta++) {
86  for (iphi = 2; iphi < 5; iphi++) {
87  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 2);
88  tmp.push_back(id);
89  }
90  }
91  // HB2
92  for (lay = 1; lay < 18; lay++) {
93  for (iphi = 5; iphi < 9; iphi++) {
94  id = HcalTestNumbering::packHcalIndex(0, 0, 1, 0, iphi, lay);
95  tmp.push_back(id);
96  }
97  }
98  // HO behind HB2
99  lay = 18;
100  for (ieta = 1; ieta < 16; ieta++) {
101  for (iphi = 5; iphi < 8; iphi++) {
102  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, lay);
103  tmp.push_back(id);
104  }
105  }
106  } else {
107  // HB1 & HB2
108  for (ieta = 1; ieta < 17; ieta++) {
109  for (iphi = 1; iphi < 9; iphi++) {
110  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 1);
111  tmp.push_back(id);
112  }
113  }
114  // HO behind HB
115  for (ieta = 1; ieta < 16; ieta++) {
116  for (iphi = 2; iphi < 8; iphi++) {
117  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 2);
118  tmp.push_back(id);
119  }
120  }
121  }
122  }
123 
124  if (type > 0) {
125  // Include HE id's
126  for (ieta = 15; ieta < 17; ieta++) {
127  for (iphi = 3; iphi < 7; iphi++) {
128  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, 3);
129  tmp.push_back(id);
130  }
131  }
132  for (iphi = 3; iphi < 7; iphi++) {
133  id = HcalTestNumbering::packHcalIndex(0, 0, 1, 17, iphi, 1);
134  tmp.push_back(id);
135  }
136  for (ieta = 18; ieta < 21; ieta++) {
137  for (iphi = 3; iphi < 7; iphi++) {
138  for (int idep = 1; idep < 3; idep++) {
139  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, idep);
140  tmp.push_back(id);
141  }
142  }
143  }
144  for (ieta = 21; ieta < 26; ieta++) {
145  for (iphi = 2; iphi < 4; iphi++) {
146  for (int idep = 1; idep < 3; idep++) {
147  id = HcalTestNumbering::packHcalIndex(0, 0, 1, ieta, iphi, idep);
148  tmp.push_back(id);
149  }
150  }
151  }
152  }
153 
154  return tmp;
155 }

References triggerObjects_cff::id, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, HcalTestNumbering::packHcalIndex(), and createJobs::tmp.

Referenced by HcalTB04Analysis::init().

ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
HcalBarrel
Definition: HcalAssistant.h:33
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
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
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition: HcalTestNumbering.cc:7
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
watchdog.group
group
Definition: watchdog.py:82