CMS 3D CMS Logo

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

#include <Phase2TrackerClusterizerArray.h>

Public Member Functions

unsigned int columns () const
 
unsigned int index (unsigned int, unsigned int) const
 
bool inside (unsigned int, unsigned int) const
 
int operator() (unsigned int, unsigned int) const
 
 Phase2TrackerClusterizerArray ()
 
 Phase2TrackerClusterizerArray (unsigned int, unsigned int)
 
unsigned int rows () const
 
void set (unsigned int, unsigned int, bool, bool)
 
unsigned int size () const
 

Private Attributes

std::vector< bool > hipmatrix_
 
std::vector< bool > matrix_
 
unsigned int ncols_
 
unsigned int nrows_
 

Detailed Description

Definition at line 6 of file Phase2TrackerClusterizerArray.h.

Constructor & Destructor Documentation

◆ Phase2TrackerClusterizerArray() [1/2]

Phase2TrackerClusterizerArray::Phase2TrackerClusterizerArray ( )
inline

◆ Phase2TrackerClusterizerArray() [2/2]

Phase2TrackerClusterizerArray::Phase2TrackerClusterizerArray ( unsigned int  nrows,
unsigned int  ncols 
)
inline

Member Function Documentation

◆ columns()

unsigned int Phase2TrackerClusterizerArray::columns ( ) const
inline

Definition at line 54 of file Phase2TrackerClusterizerArray.h.

References ncols_.

◆ index()

unsigned int Phase2TrackerClusterizerArray::index ( unsigned int  row,
unsigned int  col 
) const
inline

Definition at line 83 of file Phase2TrackerClusterizerArray.h.

References cuy::col, and nrows_.

Referenced by BeautifulSoup.PageElement::insert(), operator()(), and set().

83  {
84  return col * nrows_ + row;
85 }
col
Definition: cuy.py:1009

◆ inside()

bool Phase2TrackerClusterizerArray::inside ( unsigned int  row,
unsigned int  col 
) const
inline

Definition at line 60 of file Phase2TrackerClusterizerArray.h.

References cuy::col, ncols_, and nrows_.

Referenced by operator()().

60  {
61  return ((row < nrows_) & (col < ncols_));
62 }
col
Definition: cuy.py:1009

◆ operator()()

int Phase2TrackerClusterizerArray::operator() ( unsigned int  row,
unsigned int  col 
) const
inline

Definition at line 38 of file Phase2TrackerClusterizerArray.h.

References cuy::col, hipmatrix_, index(), inside(), and matrix_.

38  {
39  if (!inside(row, col))
40  return 0; // FIXME this should go outside: avoid it
41  return matrix_[index(row, col)] ? (hipmatrix_[index(row, col)] ? 2 : 1) : 0;
42 }
bool inside(unsigned int, unsigned int) const
col
Definition: cuy.py:1009
unsigned int index(unsigned int, unsigned int) const

◆ rows()

unsigned int Phase2TrackerClusterizerArray::rows ( ) const
inline

Definition at line 48 of file Phase2TrackerClusterizerArray.h.

References nrows_.

◆ set()

void Phase2TrackerClusterizerArray::set ( unsigned int  row,
unsigned int  col,
bool  state,
bool  hip 
)
inline

◆ size()

unsigned int Phase2TrackerClusterizerArray::size ( void  ) const
inline

Member Data Documentation

◆ hipmatrix_

std::vector<bool> Phase2TrackerClusterizerArray::hipmatrix_
private

Definition at line 22 of file Phase2TrackerClusterizerArray.h.

Referenced by operator()(), and set().

◆ matrix_

std::vector<bool> Phase2TrackerClusterizerArray::matrix_
private

Definition at line 21 of file Phase2TrackerClusterizerArray.h.

Referenced by operator()(), set(), and size().

◆ ncols_

unsigned int Phase2TrackerClusterizerArray::ncols_
private

Definition at line 20 of file Phase2TrackerClusterizerArray.h.

Referenced by columns(), and inside().

◆ nrows_

unsigned int Phase2TrackerClusterizerArray::nrows_
private

Definition at line 20 of file Phase2TrackerClusterizerArray.h.

Referenced by index(), inside(), and rows().