16#ifndef ALICEO2_TPC_IDCGROUP_H_
17#define ALICEO2_TPC_IDCGROUP_H_
43 IDCGroup(
const unsigned char groupPads = 4,
const unsigned char groupRows = 4,
const unsigned char groupLastRowsThreshold = 2,
const unsigned char groupLastPadsThreshold = 2,
const unsigned int groupNotnPadsSectorEdges = 0,
const unsigned short cru = 0)
55 float operator()(
unsigned int glrow,
unsigned int pad,
unsigned int integrationInterval)
const {
return mIDCsGrouped[
getIndex(glrow, pad, integrationInterval)]; }
61 float&
operator()(
unsigned int glrow,
unsigned int pad,
unsigned int integrationInterval) {
return mIDCsGrouped[
getIndex(glrow, pad, integrationInterval)]; }
73 float getValUngrouped(
unsigned int ulrow,
unsigned int upad,
unsigned int integrationInterval)
const {
return mIDCsGrouped[
getIndexUngrouped(ulrow, upad, integrationInterval)]; }
79 float getValUngroupedGlobal(
unsigned int ugrow,
unsigned int upad,
unsigned int integrationInterval)
const;
82 const auto&
getData() const& {
return mIDCsGrouped; }
85 auto getData() && {
return std::move(mIDCsGrouped); }
88 void setData(
const std::vector<float>& idcs) { mIDCsGrouped = idcs; }
95 void dumpToTree(
const char* outname =
"IDCGroup.root")
const;
100 void dumpToFile(
const char* outFileName =
"IDCGroup.root",
const char* outName =
"IDCGroup")
const;
105 void draw(
const unsigned int integrationInterval = 0,
const std::string
filename =
"IDCsGrouped.pdf")
const;
108 unsigned short getCRU()
const {
return mCRU; }
111 std::vector<float> mIDCsGrouped{};
112 const unsigned short mCRU{};
115 static std::vector<float> get1DIDCs(
const std::vector<float> idc,
const unsigned int nIntervals,
const unsigned int nIDCsPerIntegrationInterval,
const unsigned short cru,
const bool normalize,
const CalDet<PadFlags>* flagMap);
117 ClassDefNV(IDCGroup, 1)
helper class for grouping of pads and rows for one region
Helper class for accessing grouped pads for one region.
unsigned int getIndex(const unsigned int glrow, const unsigned int pad, unsigned int integrationInterval) const
unsigned int getNIDCsPerIntegrationInterval() const
unsigned int getIndexUngrouped(const unsigned int ulrow, const unsigned int upad, unsigned int integrationInterval) const
Class to hold grouped IDC values for one CRU for one TF.
float getValUngrouped(unsigned int ulrow, unsigned int upad, unsigned int integrationInterval) const
float getValUngroupedGlobal(unsigned int ugrow, unsigned int upad, unsigned int integrationInterval) const
const auto & getData() const &
unsigned short getCRU() const
IDCGroup(const unsigned char groupPads=4, const unsigned char groupRows=4, const unsigned char groupLastRowsThreshold=2, const unsigned char groupLastPadsThreshold=2, const unsigned int groupNotnPadsSectorEdges=0, const unsigned short cru=0)
void setValUngrouped(unsigned int ulrow, unsigned int upad, unsigned int integrationInterval, const float value)
void resize(const unsigned int nIntegrationIntervals)
unsigned int getNIntegrationIntervals() const
void dumpToFile(const char *outFileName="IDCGroup.root", const char *outName="IDCGroup") const
float operator()(unsigned int glrow, unsigned int pad, unsigned int integrationInterval) const
void setData(const std::vector< float > &idcs)
directly setting grouped IDC values
void dumpToTree(const char *outname="IDCGroup.root") const
float & operator()(unsigned int glrow, unsigned int pad, unsigned int integrationInterval)
void draw(const unsigned int integrationInterval=0, const std::string filename="IDCsGrouped.pdf") const
GLsizei const GLfloat * value
Global TPC definitions and constants.