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 ()
 
 Phase2TrackerDigi (unsigned int packed_channel)
 
 Phase2TrackerDigi (unsigned int row, unsigned int col)
 
 Phase2TrackerDigi (unsigned int row, unsigned int col, bool ot_flag)
 
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

◆ PackedDigiType

Definition at line 14 of file Phase2TrackerDigi.h.

Constructor & Destructor Documentation

◆ Phase2TrackerDigi() [1/4]

Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  packed_channel)
inline

Definition at line 16 of file Phase2TrackerDigi.h.

16 : theChannel(packed_channel) {}

◆ Phase2TrackerDigi() [2/4]

Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  row,
unsigned int  col 
)
inline

Definition at line 18 of file Phase2TrackerDigi.h.

References cuy::col, pixelToChannel(), row(), and theChannel.

◆ Phase2TrackerDigi() [3/4]

Phase2TrackerDigi::Phase2TrackerDigi ( unsigned int  row,
unsigned int  col,
bool  ot_flag 
)
inline

Definition at line 20 of file Phase2TrackerDigi.h.

20  {
22  if (ot_flag)
23  theChannel |= (1 << 15);
24  }

References cuy::col, pixelToChannel(), row(), and theChannel.

◆ Phase2TrackerDigi() [4/4]

Phase2TrackerDigi::Phase2TrackerDigi ( )
inline

Definition at line 26 of file Phase2TrackerDigi.h.

26 : theChannel(0) {}

Member Function Documentation

◆ channel()

unsigned int Phase2TrackerDigi::channel ( ) const
inline

Definition at line 35 of file Phase2TrackerDigi.h.

35 { return 0x7FFF & theChannel; }

References theChannel.

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

◆ channelToColumn()

static unsigned int Phase2TrackerDigi::channelToColumn ( unsigned int  ch)
inlinestaticprivate

Definition at line 52 of file Phase2TrackerDigi.h.

52 { return ((ch >> 10) & 0x1F); }

Referenced by channelToPixel(), and column().

◆ channelToPixel()

static std::pair<unsigned int, unsigned int> Phase2TrackerDigi::channelToPixel ( unsigned int  ch)
inlinestatic

◆ channelToRow()

static unsigned int Phase2TrackerDigi::channelToRow ( unsigned int  ch)
inlinestaticprivate

Definition at line 51 of file Phase2TrackerDigi.h.

51 { return ch & 0x03FF; }

Referenced by channelToPixel(), and row().

◆ column()

unsigned int Phase2TrackerDigi::column ( ) const
inline

Definition at line 30 of file Phase2TrackerDigi.h.

30 { return channelToColumn(theChannel); }

References channelToColumn(), and theChannel.

Referenced by Phase2TrackerCluster1D::column(), and edge().

◆ edge()

unsigned int Phase2TrackerDigi::edge ( void  ) const
inline

Definition at line 33 of file Phase2TrackerDigi.h.

33 { return column(); } // CD: any better name for that?

References column().

Referenced by Phase2TrackerCluster1D::edge().

◆ otBit()

static unsigned int Phase2TrackerDigi::otBit ( unsigned int  ch)
inlinestaticprivate

Definition at line 53 of file Phase2TrackerDigi.h.

53 { return ((ch >> 15) & 0x1); }

References testProducerWithPsetDescEmpty_cfi::x1.

Referenced by overThreshold().

◆ overThreshold()

bool Phase2TrackerDigi::overThreshold ( ) const
inline

Definition at line 37 of file Phase2TrackerDigi.h.

37 { return (otBit(theChannel) ? true : false); }

References otBit(), and theChannel.

Referenced by Phase2TrackerClusterizerSequentialAlgorithm::clusterizeDetUnit().

◆ pixelToChannel()

static PackedDigiType Phase2TrackerDigi::pixelToChannel ( unsigned int  row,
unsigned int  col 
)
inlinestatic

◆ row()

unsigned int Phase2TrackerDigi::row ( ) const
inline

◆ strip()

unsigned int Phase2TrackerDigi::strip ( ) const
inline

Definition at line 32 of file Phase2TrackerDigi.h.

32 { return row(); }

References row().

Referenced by Phase2TrackerCluster1D::firstStrip().

Member Data Documentation

◆ theChannel

PackedDigiType Phase2TrackerDigi::theChannel
private

Definition at line 50 of file Phase2TrackerDigi.h.

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

Phase2TrackerDigi::row
unsigned int row() const
Definition: Phase2TrackerDigi.h:29
cuy.col
col
Definition: cuy.py:1010
cms::cuda::assert
assert(be >=bs)
Phase2TrackerDigi::column
unsigned int column() const
Definition: Phase2TrackerDigi.h:30
Phase2TrackerDigi::pixelToChannel
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
Definition: Phase2TrackerDigi.h:43
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
Phase2TrackerDigi::channelToRow
static unsigned int channelToRow(unsigned int ch)
Definition: Phase2TrackerDigi.h:51
Phase2TrackerDigi::theChannel
PackedDigiType theChannel
Definition: Phase2TrackerDigi.h:50
Phase2TrackerDigi::otBit
static unsigned int otBit(unsigned int ch)
Definition: Phase2TrackerDigi.h:53
Phase2TrackerDigi::channelToColumn
static unsigned int channelToColumn(unsigned int ch)
Definition: Phase2TrackerDigi.h:52