CMS 3D CMS Logo

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

#include <HGCalWaferIndex.h>

Public Member Functions

 HGCalWaferIndex ()
 
 ~HGCalWaferIndex ()
 

Static Public Member Functions

static int32_t waferCopy (const int32_t index)
 
static bool waferFormat (const int32_t index)
 
static int32_t waferIndex (int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
 
static int32_t waferLayer (const int32_t index)
 
static int32_t waferU (const int32_t index)
 
static int32_t waferV (const int32_t index)
 

Detailed Description

Definition at line 7 of file HGCalWaferIndex.h.

Constructor & Destructor Documentation

◆ HGCalWaferIndex()

HGCalWaferIndex::HGCalWaferIndex ( )
inline

Definition at line 9 of file HGCalWaferIndex.h.

9 {}

◆ ~HGCalWaferIndex()

HGCalWaferIndex::~HGCalWaferIndex ( )
inline

Definition at line 10 of file HGCalWaferIndex.h.

10 {}

Member Function Documentation

◆ waferCopy()

int HGCalWaferIndex::waferCopy ( const int32_t  index)
static

Definition at line 47 of file HGCalWaferIndex.cc.

47 { return (id >> kHGCalWaferCopyOffset) & kHGCalWaferCopyMask; }

References kHGCalWaferCopyMask, and kHGCalWaferCopyOffset.

◆ waferFormat()

bool HGCalWaferIndex::waferFormat ( const int32_t  index)
static

Definition at line 49 of file HGCalWaferIndex.cc.

49 { return ((id & kHGCalLayerOldMask) == 0); }

References kHGCalLayerOldMask.

◆ waferIndex()

int32_t HGCalWaferIndex::waferIndex ( int32_t  layer,
int32_t  waferU,
int32_t  waferV,
bool  old = false 
)
static

Definition at line 17 of file HGCalWaferIndex.cc.

17  {
18  int32_t id(0);
19  if (old) {
22  } else {
23  int waferUabs(std::abs(waferU)), waferVabs(std::abs(waferV));
24  int waferUsign = (waferU >= 0) ? 0 : 1;
25  int waferVsign = (waferV >= 0) ? 0 : 1;
26  id |= (((waferUabs & kHGCalWaferUMask) << kHGCalWaferUOffset) |
27  ((waferUsign & kHGCalWaferUSignMask) << kHGCalWaferUSignOffset) |
28  ((waferVabs & kHGCalWaferVMask) << kHGCalWaferVOffset) |
29  ((waferVsign & kHGCalWaferVSignMask) << kHGCalWaferVSignOffset) |
30  ((layer & kHGCalLayerMask) << kHGCalLayerOffset));
31  }
32  return id;
33 }

References funct::abs(), triggerObjects_cff::id, kHGCalLayerMask, kHGCalLayerOffset, kHGCalLayerOldMask, kHGCalWaferCopyMask, kHGCalWaferCopyOffset, kHGCalWaferUMask, kHGCalWaferUOffset, kHGCalWaferUSignMask, kHGCalWaferUSignOffset, kHGCalWaferVMask, kHGCalWaferVOffset, kHGCalWaferVSignMask, kHGCalWaferVSignOffset, waferU(), and waferV().

Referenced by HGCalDDDConstants::getTypeHex(), HGCalNumberingScheme::getUnitID(), HGCalDDDConstants::HGCalDDDConstants(), HGCalDDDConstants::isValidHex8(), HGCalGeomParameters::loadWaferHexagon(), HGCalGeomParameters::loadWaferHexagon8(), HGCalDDDConstants::locateCell(), HGCalDDDConstants::maskCell(), HGCalDDDConstants::maxCells(), HGCalDDDConstants::numberCellsHexagon(), DDHGCalEEFileAlgo::positionSensitive(), DDHGCalHEFileAlgo::positionSensitive(), HGCalEEFileAlgo::positionSensitive(), HGCalHEFileAlgo::positionSensitive(), HGCalDDDConstants::waferFromPosition(), HGCalDDDConstants::waferIndex(), HGCalDDDConstants::waferPosition(), HGCalDDDConstants::waferType(), HGCalDDDConstants::waferTypeRotation(), and HGCalDDDConstants::waferVirtual().

◆ waferLayer()

int HGCalWaferIndex::waferLayer ( const int32_t  index)
static

◆ waferU()

int HGCalWaferIndex::waferU ( const int32_t  index)
static

◆ waferV()

int HGCalWaferIndex::waferV ( const int32_t  index)
static
HGCalWaferIndex::waferV
static int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:42
kHGCalWaferUSignMask
const int kHGCalWaferUSignMask
Definition: HGCalWaferIndex.cc:6
kHGCalLayerMask
const int kHGCalLayerMask
Definition: HGCalWaferIndex.cc:12
kHGCalLayerOldMask
const int kHGCalLayerOldMask
Definition: HGCalWaferIndex.cc:15
kHGCalWaferCopyOffset
const int kHGCalWaferCopyOffset
Definition: HGCalWaferIndex.cc:13
kHGCalWaferUMask
const int kHGCalWaferUMask
Definition: HGCalWaferIndex.cc:4
kHGCalWaferVSignMask
const int kHGCalWaferVSignMask
Definition: HGCalWaferIndex.cc:10
kHGCalWaferVMask
const int kHGCalWaferVMask
Definition: HGCalWaferIndex.cc:8
HGCalWaferIndex::waferU
static int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:37
kHGCalWaferUOffset
const int kHGCalWaferUOffset
Definition: HGCalWaferIndex.cc:3
kHGCalWaferVSignOffset
const int kHGCalWaferVSignOffset
Definition: HGCalWaferIndex.cc:9
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
kHGCalWaferCopyMask
const int kHGCalWaferCopyMask
Definition: HGCalWaferIndex.cc:14
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
kHGCalWaferUSignOffset
const int kHGCalWaferUSignOffset
Definition: HGCalWaferIndex.cc:5
kHGCalLayerOffset
const int kHGCalLayerOffset
Definition: HGCalWaferIndex.cc:11
kHGCalWaferVOffset
const int kHGCalWaferVOffset
Definition: HGCalWaferIndex.cc:7