CMS 3D CMS Logo

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

#include <HcalTestNumbering.h>

Public Member Functions

 HcalTestNumbering ()
 
virtual ~HcalTestNumbering ()
 

Static Public Member Functions

static uint32_t packHcalIndex (int det, int z, int depth, int eta, int phi, int lay)
 
static void unpackHcalIndex (const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
 

Detailed Description

Definition at line 10 of file HcalTestNumbering.h.

Constructor & Destructor Documentation

◆ HcalTestNumbering()

HcalTestNumbering::HcalTestNumbering ( )
inline

Definition at line 12 of file HcalTestNumbering.h.

12 {}

◆ ~HcalTestNumbering()

virtual HcalTestNumbering::~HcalTestNumbering ( )
inlinevirtual

Definition at line 13 of file HcalTestNumbering.h.

13 {}

Member Function Documentation

◆ packHcalIndex()

uint32_t HcalTestNumbering::packHcalIndex ( int  det,
int  z,
int  depth,
int  eta,
int  phi,
int  lay 
)
static

Definition at line 7 of file HcalTestNumbering.cc.

References LEDCalibrationChannels::depth, PVValHelper::eta, heavyIonCSV_trainingSettings::idx, phi, and z.

Referenced by HcalTestNumberingScheme::getUnitID(), HcalTB04XtalNumberingScheme::getUnitID(), HcalTBNumberingScheme::getUnitID(), HcalTBNumberingScheme::getUnitIDs(), HcalTB04Analysis::init(), HCalSD::layerWeight(), HcalTestNumberingScheme::packHcalIndex(), and HCalSD::readWeightFromFile().

7  {
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 }

◆ unpackHcalIndex()

void HcalTestNumbering::unpackHcalIndex ( const uint32_t &  idx,
int &  det,
int &  z,
int &  depth,
int &  eta,
int &  phi,
int &  lay 
)
static