DataFormats
HcalDetId
src
HcalTestNumbering.cc
Go to the documentation of this file.
1
// File: HcalTestNumbering.cc
3
// Description: Numbering scheme packing for test beam hadron calorimeter
5
#include "
DataFormats/HcalDetId/interface/HcalTestNumbering.h
"
6
7
uint32_t
HcalTestNumbering::packHcalIndex
(
int
det,
int
z
,
int
depth
,
int
eta
,
int
phi
,
int
lay) {
8
uint32_t
idx
= (det & 15) << 28;
//bits 28-31
9
idx
+= ((
depth
- 1) & 3) << 26;
//bits 26-27
10
idx
+= ((lay - 1) & 31) << 21;
//bits 21-25
11
idx
+= (
z
& 1) << 20;
//bits 20
12
idx
+= (
eta
& 1023) << 10;
//bits 10-19
13
idx
+= (
phi
& 1023);
//bits 0-9
14
15
return
idx
;
16
}
17
18
void
HcalTestNumbering::unpackHcalIndex
(
19
const
uint32_t&
idx
,
int
& det,
int
&
z
,
int
&
depth
,
int
&
eta
,
int
&
phi
,
int
& lay) {
20
det = (
idx
>> 28) & 15;
21
depth
= (
idx
>> 26) & 3;
22
depth
+= 1;
23
lay = (
idx
>> 21) & 31;
24
lay += 1;
25
z
= (
idx
>> 20) & 1;
26
eta
= (
idx
>> 10) & 1023;
27
phi
= (
idx
& 1023);
28
}
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:14
HcalTestNumbering.h
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
DDAxes::phi
Generated for CMSSW Reference Manual by
1.8.16