15#ifndef ALICEO2_ITSSMFT_ALPIDESIMRESPONSE_H
16#define ALICEO2_ITSSMFT_ALPIDESIMRESPONSE_H
36 static int constexpr NPix = 5;
46 for (
int iRow =
NPix; iRow--;) {
47 int rw = flipRow ?
NPix - 1 - iRow : iRow;
48 for (
int iCol =
NPix; iCol--;) {
49 int bDest = rw *
NPix + (flipCol ?
NPix - 1 - iCol : iCol);
57 float getValue(
int iRow,
int iCol,
bool flipRow,
bool flipCol)
const
59 int bin = (flipRow ?
NPix - 1 - iRow : iRow) *
NPix + (flipCol ?
NPix - 1 - iCol : iCol);
67 void print(
bool flipRow =
false,
bool flipCol =
false)
const;
70 std::array<float, MatSize>
data;
89 int getColBin(
float pos)
const;
90 int getRowBin(
float pos)
const;
91 int getDepthBin(
float pos)
const;
92 std::string composeDataName(
int colBin,
int rowBin);
108 std::vector<AlpideRespSimMat>
mData;
119 void initData(
int tableNumber, std::string dataPath,
const bool quiet =
true);
123 const AlpideRespSimMat*
getResponse(
float vRow,
float vCol,
float vDepth,
bool& flipRow,
bool& flipCol,
float rowMax,
float colMax)
const;
152inline int AlpideSimResponse::getColBin(
float pos)
const
160inline int AlpideSimResponse::getRowBin(
float pos)
const
168inline int AlpideSimResponse::getDepthBin(
float pos)
const
173 return i < 0 ? 0 :
i;
Definition of the SegmentationAlpide class.
static int constexpr getNPix()
number of pixels in the quadrant
void adopt(const AlpideRespSimMat &src, bool flipRow=false, bool flipCol=false)
static int constexpr NPix
float getValue(int iRow, int iCol, bool flipRow, bool flipCol) const
float getValue(int iRow, int iCol) const
probability to find an electron in pixel ix,iy,iz
AlpideRespSimMat()=default
std::array< float, MatSize > * getArray()
pointer on underlying array
static int constexpr MatSize
side of quadrant (pixels) with non-0 response
virtual ~AlpideRespSimMat()=default
const std::string & getDataPath() const
float getStepDepth() const
int mMaxBinRow
max allowed Xb (to avoid subtraction)
AlpideSimResponse()=default
format to read the data for given Col,Row
float mDptShift
upper boundary of Dpt
const std::string & getColRowDataFmt() const
float getDepthMax() const
float mStepInvCol
shift of the depth center wrt 0
int mNBinDpt
number of bins in Y(row direction)
void setDataPath(const std::string pth)
std::vector< AlpideRespSimMat > mData
inverse step of the Dpt grid
float mRowMax
upper boundary of Col
const std::string & getGridColName() const
int mMaxBinCol
number of bins in Z(sensor dept)
bool getResponse(float vRow, float vCol, float cDepth, AlpideRespSimMat &dest) const
void setGridRowName(const std::string nm)
float getDepthMin() const
void setColMax(float v) noexcept
std::string mGridRowName
name of the file with grid in Col
std::string mColRowDataFmt
name of the file with grid in Row
float mColMax
max allowed Yb (to avoid subtraction)
const std::string & getGridRowName() const
float mDptMin
upper boundary of Row
float getDepthShift() const
void initData(int tableNumber, std::string dataPath, const bool quiet=true)
~AlpideSimResponse()=default
float mStepInvDpt
inverse step of the Row grid
ClassDefNV(AlpideSimResponse, 2)
float mDptMax
lower boundary of Dpt
float mStepInvRow
inverse step of the Col grid
void setRowMax(float v) noexcept
void setGridColName(const std::string nm)
std::string mDataPath
path to look for data file
static int constexpr getNPix()
int mNBinRow
number of bins in X(col direction)
void setColRowDataFmt(const std::string nm)
static constexpr float PitchCol
static constexpr float PitchRow
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...