CMS 3D CMS Logo

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

#include <Phase2TrackerDigi.h>

Public Types

typedef uint16_t PackedDigiType
 

Public Member Functions

unsigned int channel () const
 
unsigned int column () const
 
unsigned int edge () const
 
bool overThreshold () const
 
 Phase2TrackerDigi (unsigned int packed_channel)
 
 Phase2TrackerDigi (unsigned int row, unsigned int col)
 
 Phase2TrackerDigi (unsigned int row, unsigned int col, bool ot_flag)
 
 Phase2TrackerDigi ()
 
unsigned int row () const
 
unsigned int strip () const
 

Static Public Member Functions

static std::pair< unsigned int, unsigned int > channelToPixel (unsigned int ch)
 
static PackedDigiType pixelToChannel (unsigned int row, unsigned int col)
 

Static Private Member Functions

static unsigned int channelToColumn (unsigned int ch)
 
static unsigned int channelToRow (unsigned int ch)
 
static unsigned int otBit (unsigned int ch)
 

Private Attributes

PackedDigiType theChannel
 

Detailed Description

Persistent digi for the Phase 2 tracker

Definition at line 12 of file Phase2TrackerDigi.h.

Member Typedef Documentation

Definition at line 15 of file Phase2TrackerDigi.h.

Constructor & Destructor Documentation

Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  packed_channel)
inline

Definition at line 17 of file Phase2TrackerDigi.h.

17 : theChannel(packed_channel) {}
PackedDigiType theChannel
Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  row,
unsigned int  col 
)
inline

Definition at line 19 of file Phase2TrackerDigi.h.

References pixelToChannel(), and theChannel.

19  {
21  }
unsigned int row() const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
col
Definition: cuy.py:1008
PackedDigiType theChannel
Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  row,
unsigned int  col,
bool  ot_flag 
)
inline

Definition at line 23 of file Phase2TrackerDigi.h.

References pixelToChannel(), and theChannel.

23  {
25  if (ot_flag) theChannel |= (1<< 15);
26  }
unsigned int row() const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
col
Definition: cuy.py:1008
PackedDigiType theChannel
Phase2TrackerDigi::Phase2TrackerDigi ( )
inline

Definition at line 28 of file Phase2TrackerDigi.h.

28 : theChannel(0) {}
PackedDigiType theChannel

Member Function Documentation

unsigned int Phase2TrackerDigi::channel ( ) const
inline

Definition at line 37 of file Phase2TrackerDigi.h.

References theChannel.

Referenced by operator-(), operator<(), and operator<<().

37 { return 0x7FFF & theChannel; }
PackedDigiType theChannel
static unsigned int Phase2TrackerDigi::channelToColumn ( unsigned int  ch)
inlinestaticprivate

Definition at line 54 of file Phase2TrackerDigi.h.

Referenced by channelToPixel(), and column().

54 { return ((ch >> 10) & 0x1F); }
static std::pair<unsigned int,unsigned int> Phase2TrackerDigi::channelToPixel ( unsigned int  ch)
inlinestatic
static unsigned int Phase2TrackerDigi::channelToRow ( unsigned int  ch)
inlinestaticprivate

Definition at line 53 of file Phase2TrackerDigi.h.

Referenced by channelToPixel(), and row().

53 { return ch & 0x03FF; }
unsigned int Phase2TrackerDigi::column ( ) const
inline

Definition at line 32 of file Phase2TrackerDigi.h.

References channelToColumn(), and theChannel.

Referenced by Phase2TrackerCluster1D::column(), edge(), and TTClusterAlgorithm_neighbor< T >::isANeighbor().

32 { return channelToColumn(theChannel); }
PackedDigiType theChannel
static unsigned int channelToColumn(unsigned int ch)
unsigned int Phase2TrackerDigi::edge ( void  ) const
inline

Definition at line 35 of file Phase2TrackerDigi.h.

References column().

Referenced by Phase2TrackerCluster1D::edge().

35 { return column(); } // CD: any better name for that?
unsigned int column() const
static unsigned int Phase2TrackerDigi::otBit ( unsigned int  ch)
inlinestaticprivate

Definition at line 55 of file Phase2TrackerDigi.h.

References globals_cff::x1.

Referenced by overThreshold().

55 { return ((ch >> 15) & 0x1) ; }
bool Phase2TrackerDigi::overThreshold ( ) const
inline

Definition at line 39 of file Phase2TrackerDigi.h.

References otBit(), and theChannel.

Referenced by Phase2TrackerClusterizerSequentialAlgorithm::clusterizeDetUnit().

39 { return (otBit(theChannel) ? true : false); }
static unsigned int otBit(unsigned int ch)
PackedDigiType theChannel
static PackedDigiType Phase2TrackerDigi::pixelToChannel ( unsigned int  row,
unsigned int  col 
)
inlinestatic

Definition at line 45 of file Phase2TrackerDigi.h.

Referenced by Phase2TrackerDigitizerAlgorithm::add_noise(), Phase2TrackerDigitizerAlgorithm::induce_signal(), Phase2TrackerDigi(), and ClusterTPAssociationProducer::produce().

45  {
46  assert(row<1016);
47  assert(col<32);
48  return row|(col<<10);
49  }
unsigned int row() const
col
Definition: cuy.py:1008
unsigned int Phase2TrackerDigi::row ( ) const
inline
unsigned int Phase2TrackerDigi::strip ( ) const
inline

Definition at line 34 of file Phase2TrackerDigi.h.

References row().

Referenced by Phase2TrackerCluster1D::firstStrip().

34 { return row(); }
unsigned int row() const

Member Data Documentation

PackedDigiType Phase2TrackerDigi::theChannel
private

Definition at line 52 of file Phase2TrackerDigi.h.

Referenced by channel(), column(), overThreshold(), Phase2TrackerDigi(), and row().