CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
HcalTestBeamNumbering Class Reference

#include <HcalTestBeamNumbering.h>

Public Types

enum  HcalTestBeamDetector { HcalTBEmpty = 0, HcalTBScintillator = 1, HcalTBWireChamber = 2 }
 

Public Member Functions

 HcalTestBeamNumbering ()
 

Static Public Member Functions

static uint32_t packIndex (int det, int lay, int x, int y)
 
static void unpackIndex (const uint32_t &idx, int &det, int &lay, int &x, int &y)
 

Static Public Attributes

static const int kHcalBeamLayerMask = 0x7F
 
static const int kHcalBeamLayerOffset = 21
 
static const int kHcalBeamTypeMask = 0xF
 
static const int kHcalBeamTypeOffset = 28
 
static const int kHcalBeamXSignMask = 0x1
 
static const int kHcalBeamXSignOffset = 9
 
static const int kHcalBeamXValueMask = 0x1FF
 
static const int kHcalBeamXValueOffset = 0
 
static const int kHcalBeamYSignMask = 0x1
 
static const int kHcalBeamYSignOffset = 19
 
static const int kHcalBeamYValueMask = 0x1FF
 
static const int kHcalBeamYValueOffset = 10
 

Detailed Description

Definition at line 9 of file HcalTestBeamNumbering.h.

Member Enumeration Documentation

◆ HcalTestBeamDetector

Enumerator
HcalTBEmpty 
HcalTBScintillator 
HcalTBWireChamber 

Definition at line 24 of file HcalTestBeamNumbering.h.

Constructor & Destructor Documentation

◆ HcalTestBeamNumbering()

HcalTestBeamNumbering::HcalTestBeamNumbering ( )
inline

Definition at line 26 of file HcalTestBeamNumbering.h.

26 {}

Member Function Documentation

◆ packIndex()

uint32_t HcalTestBeamNumbering::packIndex ( int  det,
int  lay,
int  x,
int  y 
)
static

Definition at line 6 of file HcalTestBeamNumbering.cc.

6  {
7  int ix(0), ixx(x);
8  if (x < 0) {
9  ix = 1;
10  ixx = -x;
11  }
12  int iy(0), iyy(y);
13  if (y < 0) {
14  iy = 1;
15  iyy = -y;
16  }
17  uint32_t idx = (det & kHcalBeamTypeMask) << kHcalBeamTypeOffset;
23 
24 #ifdef EDM_ML_DEBUG
25  std::cout << "HcalTestBeamNumbering: Detector " << det << " Layer " << lay << " x " << x << " " << ix << " " << ixx
26  << " y " << y << " " << iy << " " << iyy << " ID " << std::hex << idx << std::dec << std::endl;
27 #endif
28  return idx;
29 }

References gather_cfg::cout, TauDecayModes::dec, heavyIonCSV_trainingSettings::idx, ixx, iyy, kHcalBeamLayerMask, kHcalBeamLayerOffset, kHcalBeamTypeMask, kHcalBeamTypeOffset, kHcalBeamXSignMask, kHcalBeamXSignOffset, kHcalBeamXValueMask, kHcalBeamXValueOffset, kHcalBeamYSignMask, kHcalBeamYSignOffset, kHcalBeamYValueMask, kHcalBeamYValueOffset, x, and y.

Referenced by HcalTB06BeamSD::setDetUnitId().

◆ unpackIndex()

void HcalTestBeamNumbering::unpackIndex ( const uint32_t &  idx,
int &  det,
int &  lay,
int &  x,
int &  y 
)
static

Member Data Documentation

◆ kHcalBeamLayerMask

const int HcalTestBeamNumbering::kHcalBeamLayerMask = 0x7F
static

Definition at line 20 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamLayerOffset

const int HcalTestBeamNumbering::kHcalBeamLayerOffset = 21
static

Definition at line 19 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamTypeMask

const int HcalTestBeamNumbering::kHcalBeamTypeMask = 0xF
static

Definition at line 22 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamTypeOffset

const int HcalTestBeamNumbering::kHcalBeamTypeOffset = 28
static

Definition at line 21 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamXSignMask

const int HcalTestBeamNumbering::kHcalBeamXSignMask = 0x1
static

Definition at line 14 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamXSignOffset

const int HcalTestBeamNumbering::kHcalBeamXSignOffset = 9
static

Definition at line 13 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamXValueMask

const int HcalTestBeamNumbering::kHcalBeamXValueMask = 0x1FF
static

Definition at line 12 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamXValueOffset

const int HcalTestBeamNumbering::kHcalBeamXValueOffset = 0
static

Definition at line 11 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamYSignMask

const int HcalTestBeamNumbering::kHcalBeamYSignMask = 0x1
static

Definition at line 18 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamYSignOffset

const int HcalTestBeamNumbering::kHcalBeamYSignOffset = 19
static

Definition at line 17 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamYValueMask

const int HcalTestBeamNumbering::kHcalBeamYValueMask = 0x1FF
static

Definition at line 16 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

◆ kHcalBeamYValueOffset

const int HcalTestBeamNumbering::kHcalBeamYValueOffset = 10
static

Definition at line 15 of file HcalTestBeamNumbering.h.

Referenced by packIndex(), and unpackIndex().

HcalTestBeamNumbering::HcalTBWireChamber
Definition: HcalTestBeamNumbering.h:24
DDAxes::y
HcalTestBeamNumbering::kHcalBeamXValueOffset
static const int kHcalBeamXValueOffset
Definition: HcalTestBeamNumbering.h:11
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DDAxes::x
iyy
int iyy[18][41][3]
Definition: EcalDAQHandler.cc:317
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
HcalTestBeamNumbering::kHcalBeamYValueOffset
static const int kHcalBeamYValueOffset
Definition: HcalTestBeamNumbering.h:15
HcalTestBeamNumbering::HcalTBScintillator
Definition: HcalTestBeamNumbering.h:24
HcalTestBeamNumbering::kHcalBeamXValueMask
static const int kHcalBeamXValueMask
Definition: HcalTestBeamNumbering.h:12
HcalTestBeamNumbering::kHcalBeamTypeMask
static const int kHcalBeamTypeMask
Definition: HcalTestBeamNumbering.h:22
HcalTestBeamNumbering::kHcalBeamTypeOffset
static const int kHcalBeamTypeOffset
Definition: HcalTestBeamNumbering.h:21
HcalTestBeamNumbering::HcalTBEmpty
Definition: HcalTestBeamNumbering.h:24
HcalTestBeamNumbering::kHcalBeamYValueMask
static const int kHcalBeamYValueMask
Definition: HcalTestBeamNumbering.h:16
HcalTestBeamNumbering::kHcalBeamLayerOffset
static const int kHcalBeamLayerOffset
Definition: HcalTestBeamNumbering.h:19
HcalTestBeamNumbering::kHcalBeamLayerMask
static const int kHcalBeamLayerMask
Definition: HcalTestBeamNumbering.h:20
HcalTestBeamNumbering::kHcalBeamXSignOffset
static const int kHcalBeamXSignOffset
Definition: HcalTestBeamNumbering.h:13
ixx
int ixx[18][41][3]
Definition: EcalDAQHandler.cc:226
HcalTestBeamNumbering::kHcalBeamYSignOffset
static const int kHcalBeamYSignOffset
Definition: HcalTestBeamNumbering.h:17
HcalTestBeamNumbering::kHcalBeamYSignMask
static const int kHcalBeamYSignMask
Definition: HcalTestBeamNumbering.h:18
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HcalTestBeamNumbering::kHcalBeamXSignMask
static const int kHcalBeamXSignMask
Definition: HcalTestBeamNumbering.h:14