CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
PixelKeys Class Reference

#include <ClusterShapeHitFilter.h>

Public Member Functions

bool isValid () const
 
 operator unsigned int () const
 
bool operator< (const PixelKeys &right) const
 
 PixelKeys (int part, int dx, int dy)
 

Static Public Member Functions

static unsigned char barrelPacking (int dx, int dy)
 
static unsigned char endcapPacking (int dx, int dy)
 

Static Public Attributes

static const int N = N_barrel + N_endcap
 
static const int N_barrel = 137
 
static const int N_endcap = 55
 
static const int offset_endcap_dx = 10
 
static const int offset_endcap_dy = 5
 

Private Attributes

unsigned char key
 

Detailed Description

Definition at line 22 of file ClusterShapeHitFilter.h.

Constructor & Destructor Documentation

◆ PixelKeys()

PixelKeys::PixelKeys ( int  part,
int  dx,
int  dy 
)
inline

Definition at line 24 of file ClusterShapeHitFilter.h.

24 : key((part == 0) ? barrelPacking(dx, dy) : endcapPacking(dx, dy)) {}

Member Function Documentation

◆ barrelPacking()

static unsigned char PixelKeys::barrelPacking ( int  dx,
int  dy 
)
inlinestatic

Definition at line 36 of file ClusterShapeHitFilter.h.

36  {
37  if (dx < 0 || dy < 0)
38  return N;
39  if (dx > 10 || dy > 15)
40  return N;
41  if (dx < 8)
42  return dx * 16 + dy; // max 8*16=128
43  if (dy > 2)
44  return N;
45  return 128 + (dx - 8) * 3 + dy; // max = 128+9 = 137
46  }

References PVValHelper::dx, PVValHelper::dy, and N.

◆ endcapPacking()

static unsigned char PixelKeys::endcapPacking ( int  dx,
int  dy 
)
inlinestatic

Definition at line 28 of file ClusterShapeHitFilter.h.

28  {
29  if (dx < 0 || dy < 0)
30  return N;
31  if (dx > 10 || dy > 4)
32  return N;
33  return N_barrel + dx * offset_endcap_dy + dy; // max 11*5 = 55
34  }

References PVValHelper::dx, PVValHelper::dy, N, N_barrel, and offset_endcap_dy.

◆ isValid()

bool PixelKeys::isValid ( void  ) const
inline

Definition at line 48 of file ClusterShapeHitFilter.h.

48 { return key < N; }

References key, and N.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ operator unsigned int()

PixelKeys::operator unsigned int ( ) const
inline

Definition at line 26 of file ClusterShapeHitFilter.h.

26 { return key; }

References key.

◆ operator<()

bool PixelKeys::operator< ( const PixelKeys right) const
inline

Definition at line 56 of file ClusterShapeHitFilter.h.

56 { return key < right.key; }

References key.

Member Data Documentation

◆ key

unsigned char PixelKeys::key
private

◆ N

const int PixelKeys::N = N_barrel + N_endcap
static

Definition at line 54 of file ClusterShapeHitFilter.h.

Referenced by barrelPacking(), endcapPacking(), and isValid().

◆ N_barrel

const int PixelKeys::N_barrel = 137
static

Definition at line 53 of file ClusterShapeHitFilter.h.

Referenced by endcapPacking().

◆ N_endcap

const int PixelKeys::N_endcap = 55
static

Definition at line 52 of file ClusterShapeHitFilter.h.

◆ offset_endcap_dx

const int PixelKeys::offset_endcap_dx = 10
static

Definition at line 51 of file ClusterShapeHitFilter.h.

◆ offset_endcap_dy

const int PixelKeys::offset_endcap_dy = 5
static

Definition at line 50 of file ClusterShapeHitFilter.h.

Referenced by endcapPacking().

PixelKeys::N_barrel
static const int N_barrel
Definition: ClusterShapeHitFilter.h:53
PixelKeys::N
static const int N
Definition: ClusterShapeHitFilter.h:54
PixelKeys::key
unsigned char key
Definition: ClusterShapeHitFilter.h:59
part
part
Definition: HCALResponse.h:20
PVValHelper::dy
Definition: PVValidationHelpers.h:50
PixelKeys::offset_endcap_dy
static const int offset_endcap_dy
Definition: ClusterShapeHitFilter.h:50
PixelKeys::barrelPacking
static unsigned char barrelPacking(int dx, int dy)
Definition: ClusterShapeHitFilter.h:36
PixelKeys::endcapPacking
static unsigned char endcapPacking(int dx, int dy)
Definition: ClusterShapeHitFilter.h:28
PVValHelper::dx
Definition: PVValidationHelpers.h:49