CMS 3D CMS Logo

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

#include <SiPixelCalibDigi.h>

Classes

struct  datacontainer
 

Public Member Functions

uint16_t col () const
 
void fill (uint32_t ipoint, uint32_t adcval)
 
std::vector< uint8_t > getnentries () const
 
uint32_t getnentries (uint32_t ipoint) const
 
uint32_t getnpoints () const
 
std::vector< uint32_t > getsum () const
 
uint32_t getsum (uint32_t ipoint) const
 
std::vector< uint32_t > getsumsquares () const
 
uint32_t getsumsquares (uint32_t ipoint) const
 
void init (uint16_t row, uint16_t col, uint16_t npoints)
 
void reset ()
 
uint16_t row () const
 
std::pair< uint16_t, uint16_t > row_and_col () const
 
void setrowcol (uint16_t row, uint16_t col)
 
 SiPixelCalibDigi ()
 
 SiPixelCalibDigi (int packed_value)
 
 SiPixelCalibDigi (int packed_value, uint16_t row, uint16_t col)
 
virtual ~SiPixelCalibDigi ()
 

Private Attributes

std::vector< datacontainerm_data
 
std::pair< uint16_t, uint16_t > m_row_and_column
 

Detailed Description

Definition at line 9 of file SiPixelCalibDigi.h.

Constructor & Destructor Documentation

◆ SiPixelCalibDigi() [1/3]

SiPixelCalibDigi::SiPixelCalibDigi ( int  packed_value,
uint16_t  row,
uint16_t  col 
)
inline

Definition at line 11 of file SiPixelCalibDigi.h.

11  : m_data(packed_value), m_row_and_column(row, col) {
12  reset();
13  }

References reset().

◆ SiPixelCalibDigi() [2/3]

SiPixelCalibDigi::SiPixelCalibDigi ( int  packed_value)
inline

Definition at line 14 of file SiPixelCalibDigi.h.

14 : m_data(packed_value), m_row_and_column(0, 0) { reset(); }

References reset().

◆ SiPixelCalibDigi() [3/3]

SiPixelCalibDigi::SiPixelCalibDigi ( )
inline

Definition at line 15 of file SiPixelCalibDigi.h.

15 : m_data(0), m_row_and_column(0, 0) { ; }

◆ ~SiPixelCalibDigi()

virtual SiPixelCalibDigi::~SiPixelCalibDigi ( )
inlinevirtual

Definition at line 16 of file SiPixelCalibDigi.h.

16 { ; }

Member Function Documentation

◆ col()

uint16_t SiPixelCalibDigi::col ( ) const
inline

Definition at line 38 of file SiPixelCalibDigi.h.

38 { return m_row_and_column.second; }

References m_row_and_column.

Referenced by python.rootplot.root2matplotlib.Hist2D::colz(), init(), operator<<(), and setrowcol().

◆ fill()

void SiPixelCalibDigi::fill ( uint32_t  ipoint,
uint32_t  adcval 
)

Definition at line 23 of file SiPixelCalibDigi.cc.

23  {
24  if (ipoint >= m_data.size())
25  return;
26  m_data[ipoint].nentries++;
27  m_data[ipoint].adccountsum += adcval;
28  m_data[ipoint].adccountsumsq += adcval * adcval;
29  return;
30 }

References plotBeamSpotDB::ipoint, and m_data.

◆ getnentries() [1/2]

std::vector< uint8_t > SiPixelCalibDigi::getnentries ( ) const

Definition at line 37 of file SiPixelCalibDigi.cc.

37  {
38  std::vector<uint8_t> result(0);
39  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
40  result.push_back(m_data[ii].nentries);
41  return result;
42 }

References cuy::ii, m_data, and mps_fire::result.

◆ getnentries() [2/2]

uint32_t SiPixelCalibDigi::getnentries ( uint32_t  ipoint) const
inline

Definition at line 31 of file SiPixelCalibDigi.h.

31  {
32  return m_data[ipoint].nentries;
33  } // returns the number of entries made for calibration point ipoint

References plotBeamSpotDB::ipoint, and m_data.

◆ getnpoints()

uint32_t SiPixelCalibDigi::getnpoints ( ) const
inline

Definition at line 24 of file SiPixelCalibDigi.h.

24 { return m_data.size(); } // returns the number of calibration points

References m_data.

Referenced by operator<<().

◆ getsum() [1/2]

std::vector< uint32_t > SiPixelCalibDigi::getsum ( ) const

Definition at line 44 of file SiPixelCalibDigi.cc.

44  {
45  std::vector<uint32_t> result(0);
46  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
47  result.push_back(m_data[ii].adccountsum);
48  return result;
49 }

References cuy::ii, m_data, and mps_fire::result.

◆ getsum() [2/2]

uint32_t SiPixelCalibDigi::getsum ( uint32_t  ipoint) const
inline

Definition at line 25 of file SiPixelCalibDigi.h.

25  {
26  return m_data[ipoint].adccountsum;
27  } // returns the sum of adc counts for the collected events at point ipoint

References plotBeamSpotDB::ipoint, and m_data.

◆ getsumsquares() [1/2]

std::vector< uint32_t > SiPixelCalibDigi::getsumsquares ( ) const

Definition at line 51 of file SiPixelCalibDigi.cc.

51  {
52  std::vector<uint32_t> result(0);
53  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
54  result.push_back(m_data[ii].adccountsumsq);
55  return result;
56 }

References cuy::ii, m_data, and mps_fire::result.

◆ getsumsquares() [2/2]

uint32_t SiPixelCalibDigi::getsumsquares ( uint32_t  ipoint) const
inline

Definition at line 28 of file SiPixelCalibDigi.h.

28  {
29  return m_data[ipoint].adccountsumsq;
30  } // returns the sum of the squares of adc counts for the collected events at point ipoint

References plotBeamSpotDB::ipoint, and m_data.

◆ init()

void SiPixelCalibDigi::init ( uint16_t  row,
uint16_t  col,
uint16_t  npoints 
)

Definition at line 9 of file SiPixelCalibDigi.cc.

9  {
10  setrowcol(row, col);
11  reset();
12  // expand if size of arrays has changed.... not implemented yet...
13 }

References col(), reset(), row(), and setrowcol().

◆ reset()

void SiPixelCalibDigi::reset ( void  )

Definition at line 15 of file SiPixelCalibDigi.cc.

15  {
16  for (uint32_t iter = 0; iter < m_data.size(); ++iter) {
17  m_data[iter].nentries = 0;
18  m_data[iter].adccountsum = 0;
19  m_data[iter].adccountsumsq = 0;
20  }
21 }

References m_data.

Referenced by init(), and SiPixelCalibDigi().

◆ row()

uint16_t SiPixelCalibDigi::row ( ) const
inline

Definition at line 37 of file SiPixelCalibDigi.h.

37 { return m_row_and_column.first; }

References m_row_and_column.

Referenced by init(), operator<<(), and setrowcol().

◆ row_and_col()

std::pair<uint16_t, uint16_t> SiPixelCalibDigi::row_and_col ( ) const
inline

Definition at line 39 of file SiPixelCalibDigi.h.

39 { return m_row_and_column; }

References m_row_and_column.

◆ setrowcol()

void SiPixelCalibDigi::setrowcol ( uint16_t  row,
uint16_t  col 
)

Definition at line 32 of file SiPixelCalibDigi.cc.

32  {
33  m_row_and_column.first = row;
34  m_row_and_column.second = col;
35 }

References col(), m_row_and_column, and row().

Referenced by SiPixelCalibDigiProducer::fillPixel(), and init().

Member Data Documentation

◆ m_data

std::vector<datacontainer> SiPixelCalibDigi::m_data
private

Definition at line 50 of file SiPixelCalibDigi.h.

Referenced by fill(), getnentries(), getnpoints(), getsum(), getsumsquares(), and reset().

◆ m_row_and_column

std::pair<uint16_t, uint16_t> SiPixelCalibDigi::m_row_and_column
private

Definition at line 51 of file SiPixelCalibDigi.h.

Referenced by col(), row(), row_and_col(), and setrowcol().

plotBeamSpotDB.ipoint
ipoint
Definition: plotBeamSpotDB.py:340
SiPixelCalibDigi::m_row_and_column
std::pair< uint16_t, uint16_t > m_row_and_column
Definition: SiPixelCalibDigi.h:51
SiPixelCalibDigi::reset
void reset()
Definition: SiPixelCalibDigi.cc:15
SiPixelCalibDigi::m_data
std::vector< datacontainer > m_data
Definition: SiPixelCalibDigi.h:50
SiPixelCalibDigi::row
uint16_t row() const
Definition: SiPixelCalibDigi.h:37
SiPixelCalibDigi::setrowcol
void setrowcol(uint16_t row, uint16_t col)
Definition: SiPixelCalibDigi.cc:32
mps_fire.result
result
Definition: mps_fire.py:311
SiPixelCalibDigi::col
uint16_t col() const
Definition: SiPixelCalibDigi.h:38
cuy.ii
ii
Definition: cuy.py:590