Main Page
Namespaces
Classes
Package Documentation
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
,
8
int
eta
,
int
phi
,
int
lay) {
9
10
uint32_t
idx
=(det&15)<<28;
//bits 28-31
11
idx+=((depth-1)&3)<<26;
//bits 26-27
12
idx+=((lay-1)&31)<<21;
//bits 21-25
13
idx+=(z&1)<<20;
//bits 20
14
idx+=(eta&1023)<<10;
//bits 10-19
15
idx+=(phi&1023);
//bits 0-9
16
17
return
idx
;
18
19
}
20
21
void
HcalTestNumbering::unpackHcalIndex
(
const
uint32_t &
idx
,
int
& det,
int
&
z
,
22
int
&
depth
,
int
&
eta
,
int
&
phi
,
23
int
& lay) {
24
det = (idx>>28)&15;
25
depth= (idx>>26)&3; depth+=1;
26
lay = (idx>>21)&31; lay+=1;
27
z = (idx>>20)&1;
28
eta = (idx>>10)&1023;
29
phi = (idx&1023);
30
}
PVValHelper::phi
Definition:
PVValidationHelpers.h:64
HcalTestNumbering.h
PVValHelper::eta
Definition:
PVValidationHelpers.h:65
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:15
DDAxes::phi
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition:
HcalTestNumbering.cc:7
particleFlowClusterECALTimeSelected_cfi.depth
depth
Definition:
particleFlowClusterECALTimeSelected_cfi.py:8
HcalTestNumbering::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition:
HcalTestNumbering.cc:21
training_settings.idx
idx
Definition:
training_settings.py:16
DDAxes::z
Generated for CMSSW Reference Manual by
1.8.11