FairRoot/PandaRoot
Public Member Functions | Protected Attributes | List of all members
PndSdsCalcFePixel Class Reference

Class to calculate the position of digis on a front-end from the digis on a sensor. More...

#include <PndSdsCalcFePixel.h>

Public Member Functions

 PndSdsCalcFePixel ()
 Default constructor. More...
 
 PndSdsCalcFePixel (const PndSdsPixelDigiPar &digi_par)
 Main constructor. More...
 
 ~PndSdsCalcFePixel ()
 
std::vector< PndSdsPixelCalcFEHits (const std::vector< PndSdsPixel > &sensor_hits)
 Main function to calculate front-end hits. More...
 
void CalcSensorColRow (Int_t &col, Int_t &row, const Int_t fe) const
 Main function to calculate sensor hits. More...
 

Protected Attributes

Int_t fNcols
 
Int_t fNrows
 number of columns on a front-end chip More...
 
Int_t fMaxFEperCol
 nrows number of rows on a front-end chip More...
 
Int_t fMaxFEperRow
 maximum number of front-end chip per column on a sensor More...
 

Detailed Description

Class to calculate the position of digis on a front-end from the digis on a sensor.

Author
T.Stockmanns t.sto.nosp@m.ckma.nosp@m.nns@f.nosp@m.z-ju.nosp@m.elich.nosp@m..de

This class calculates the column, row and front-end number of a digi from the column, row number on a sensor and vice versa

Definition at line 17 of file PndSdsCalcFePixel.h.

Constructor & Destructor Documentation

PndSdsCalcFePixel::PndSdsCalcFePixel ( )

Default constructor.

Definition at line 4 of file PndSdsCalcFePixel.cxx.

4  :
5  fNcols(1), fNrows(1), fMaxFEperCol(1), fMaxFEperRow(1) {
6 }
Int_t fNrows
number of columns on a front-end chip
Int_t fMaxFEperRow
maximum number of front-end chip per column on a sensor
Int_t fMaxFEperCol
nrows number of rows on a front-end chip
PndSdsCalcFePixel::PndSdsCalcFePixel ( const PndSdsPixelDigiPar digi_par)

Main constructor.

Definition at line 8 of file PndSdsCalcFePixel.cxx.

8  :
9  fNcols(digi_par.GetFECols()), fNrows(digi_par.GetFERows()), fMaxFEperCol(digi_par.GetMaxFEperCol()), fMaxFEperRow(
10  digi_par.GetMaxFEperRow()) {
11 }
Int_t fNrows
number of columns on a front-end chip
Int_t GetFERows() const
Int_t GetFECols() const
Int_t fMaxFEperRow
maximum number of front-end chip per column on a sensor
Int_t GetMaxFEperCol() const
Int_t fMaxFEperCol
nrows number of rows on a front-end chip
Int_t GetMaxFEperRow() const
PndSdsCalcFePixel::~PndSdsCalcFePixel ( )

Definition at line 13 of file PndSdsCalcFePixel.cxx.

13  {
14 }

Member Function Documentation

std::vector< PndSdsPixel > PndSdsCalcFePixel::CalcFEHits ( const std::vector< PndSdsPixel > &  sensor_hits)

Main function to calculate front-end hits.

Definition at line 16 of file PndSdsCalcFePixel.cxx.

References col, fe, fMaxFEperCol, fMaxFEperRow, fNcols, fNrows, row, and PndSdsPixel::SetAddNoise().

Referenced by PndSdsHybridHitProducer::Exec().

16  {
17  Int_t col, row, fe, fe_row, fe_col;
18  std::vector<PndSdsPixel> result;
19  for (auto const& sensor_hit : sensor_hits) {
20  col = sensor_hit.GetCol();
21  row = sensor_hit.GetRow();
22  fe_col = col / fNcols;
23  if (fMaxFEperCol > fe_col) {
24  col -= fe_col * fNcols;
25  fe = fe_col;
26  }
27  fe_row = row / fNrows;
28  if (fMaxFEperRow > fe_row) {
29  fe += fMaxFEperCol * (fe_row);
30  row -= fe_row * fNrows;
31  }
32  PndSdsPixel myPixel(sensor_hit.GetSensorID(), fe, col, row, sensor_hit.GetCharge());
33  myPixel.SetAddNoise(sensor_hit.GetAddNoise());
34  result.push_back(myPixel);
35  }
36  return result;
37 }
int row
Definition: anaLmdDigi.C:67
int col
Definition: anaLmdDigi.C:67
Int_t fNrows
number of columns on a front-end chip
Int_t fMaxFEperRow
maximum number of front-end chip per column on a sensor
void SetAddNoise(Double_t addnoise)
Definition: PndSdsPixel.h:39
int fe
Definition: anaLmdDigi.C:67
Int_t fMaxFEperCol
nrows number of rows on a front-end chip
void PndSdsCalcFePixel::CalcSensorColRow ( Int_t &  col,
Int_t &  row,
const Int_t  fe 
) const

Main function to calculate sensor hits.

Definition at line 39 of file PndSdsCalcFePixel.cxx.

References fMaxFEperCol, fNcols, and fNrows.

Referenced by PndMvdDigiPixelDraw::Exec().

39  {
40  Int_t fe_row = fe / fMaxFEperCol;
41  Int_t fe_col = fe % fMaxFEperCol;
42  row = row + fe_row * fNrows;
43  col = col + fe_col * fNcols;
44  return;
45 }
int row
Definition: anaLmdDigi.C:67
int col
Definition: anaLmdDigi.C:67
Int_t fNrows
number of columns on a front-end chip
int fe
Definition: anaLmdDigi.C:67
Int_t fMaxFEperCol
nrows number of rows on a front-end chip

Member Data Documentation

Int_t PndSdsCalcFePixel::fMaxFEperCol
protected

nrows number of rows on a front-end chip

Definition at line 41 of file PndSdsCalcFePixel.h.

Referenced by CalcFEHits(), and CalcSensorColRow().

Int_t PndSdsCalcFePixel::fMaxFEperRow
protected

maximum number of front-end chip per column on a sensor

Definition at line 42 of file PndSdsCalcFePixel.h.

Referenced by CalcFEHits().

Int_t PndSdsCalcFePixel::fNcols
protected

Definition at line 39 of file PndSdsCalcFePixel.h.

Referenced by CalcFEHits(), and CalcSensorColRow().

Int_t PndSdsCalcFePixel::fNrows
protected

number of columns on a front-end chip

Definition at line 40 of file PndSdsCalcFePixel.h.

Referenced by CalcFEHits(), and CalcSensorColRow().


The documentation for this class was generated from the following files: