CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 23 of file ClusterShapeHitFilter.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file ClusterShapeHitFilter.h.

25 : key( (part==0) ? barrelPacking(dx,dy) : endcapPacking(dx,dy)) {}
static unsigned char barrelPacking(int dx, int dy)
static unsigned char endcapPacking(int dx, int dy)
part
Definition: HCALResponse.h:20
unsigned char key

Member Function Documentation

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

Definition at line 35 of file ClusterShapeHitFilter.h.

References N.

35  {
36  if ( dx<0 || dy<0 ) return N;
37  if ( dx>10 || dy>15 ) return N;
38  if (dx<8) return dx*16+dy; // max 8*16=128
39  if (dy>2) return N;
40  return 128 + (dx-8)*3+dy; // max = 128+9 = 137
41  }
static const int N
static unsigned char PixelKeys::endcapPacking ( int  dx,
int  dy 
)
inlinestatic

Definition at line 29 of file ClusterShapeHitFilter.h.

References N, N_barrel, and offset_endcap_dy.

29  {
30  if ( dx<0 || dy<0 ) return N;
31  if ( dx>10 || dy>4 ) return N;
32  return N_barrel + dx*offset_endcap_dy+dy; // max 11*5 = 55
33  }
static const int N_barrel
static const int N
static const int offset_endcap_dy
bool PixelKeys::isValid ( void  ) const
inline

Definition at line 43 of file ClusterShapeHitFilter.h.

References key, and N.

Referenced by ClusterShapeHitFilter::isCompatible(), and core.AutoHandle.AutoHandle::ReallyLoad().

43 { return key<N;}
static const int N
unsigned char key
PixelKeys::operator unsigned int ( ) const
inline

Definition at line 27 of file ClusterShapeHitFilter.h.

References key.

27 { return key;}
unsigned char key
bool PixelKeys::operator< ( const PixelKeys right) const
inline

Definition at line 52 of file ClusterShapeHitFilter.h.

References key.

52 { return key< right.key; }
unsigned char key

Member Data Documentation

unsigned char PixelKeys::key
private
const int PixelKeys::N = N_barrel+N_endcap
static

Definition at line 50 of file ClusterShapeHitFilter.h.

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

const int PixelKeys::N_barrel =137
static

Definition at line 49 of file ClusterShapeHitFilter.h.

Referenced by endcapPacking().

const int PixelKeys::N_endcap =55
static

Definition at line 48 of file ClusterShapeHitFilter.h.

const int PixelKeys::offset_endcap_dx =10
static

Definition at line 47 of file ClusterShapeHitFilter.h.

const int PixelKeys::offset_endcap_dy =5
static

Definition at line 46 of file ClusterShapeHitFilter.h.

Referenced by endcapPacking().