18template <
typename DataT>
24template <
typename DataT>
27 return mSACOne ? mSACOne->mSACOne[
side].getNIDCs() : 0;
30template <
typename DataT>
33 return !mSACZero ? -1 : mSACZero->getValueIDCZero(
Sector(sector).
side(), SACFactorization::getStackInSide(sector,
stack));
36template <
typename DataT>
39 return !mSACDelta ? -1 : mSACDelta->getValue(
Sector(sector).
side(), SACFactorization::getSACDeltaIndex(SACFactorization::getStackInSide(sector,
stack), integrationInterval));
42template <
typename DataT>
45 return !mSACOne ? -1 : mSACOne->getValue(
side, integrationInterval);
48template <
typename DataT>
51 return (getSACDeltaVal(sector,
stack, integrationInterval) + 1.f) * getSACZeroVal(sector,
stack) * getSACOneVal(
Sector(sector).
side(), integrationInterval);
54template <
typename DataT>
57 std::function<float(
const unsigned int,
const unsigned int)> SACFunc = [
this](
const unsigned int sector,
const unsigned int stack) {
58 return this->getSACZeroVal(sector,
stack);
63 const std::string zAxisTitle = SACDrawHelper::getZAxisTitle(SACType::IDCZero);
64 type ? SACDrawHelper::drawSide(drawFun, sector.
side(), zAxisTitle,
filename,
minZ,
maxZ) :
SACDrawHelper::drawSector(drawFun, sector, zAxisTitle,
filename,
minZ,
maxZ);
67template <
typename DataT>
70 std::function<float(
const unsigned int,
const unsigned int)> SACFunc = [
this, integrationInterval](
const unsigned int sector,
const unsigned int stack) {
71 return this->getSACDeltaVal(sector,
stack, integrationInterval);
76 const std::string zAxisTitle = SACDrawHelper::getZAxisTitle(SACType::IDCDelta);
77 type ? SACDrawHelper::drawSide(drawFun, sector.
side(), zAxisTitle,
filename,
minZ,
maxZ) :
SACDrawHelper::drawSector(drawFun, sector, zAxisTitle,
filename,
minZ,
maxZ);
80template <
typename DataT>
83 std::function<float(
const unsigned int,
const unsigned int)> SACFunc = [
this, integrationInterval](
const unsigned int sector,
const unsigned int stack) {
84 return this->getSACVal(sector,
stack, integrationInterval);
87 SACDrawHelper::SACDraw drawFun;
89 const std::string zAxisTitle = SACDrawHelper::getZAxisTitle(SACType::IDC);
90 type ? SACDrawHelper::drawSide(drawFun, sector.
side(), zAxisTitle,
filename,
minZ,
maxZ) : SACDrawHelper::drawSector(drawFun, sector, zAxisTitle,
filename,
minZ,
maxZ);
93template <
typename DataT>
99 const auto intervals = std::min(getNIntegrationIntervalsSACDelta(Side::A), getNIntegrationIntervalsSACDelta(Side::C));
100 for (
unsigned int integrationInterval = 0; integrationInterval < intervals; ++integrationInterval) {
103 std::vector<float> vSACsDelta(
GEMSTACKS);
104 std::vector<unsigned int> vStack(
GEMSTACKS);
106 unsigned int index = 0;
107 for (
unsigned int sector = 0; sector < Mapper::NSECTORS; ++sector) {
109 vSACs[
index] = getSACVal(sector,
stack, integrationInterval);
110 vSACsZero[
index] = getSACZeroVal(sector,
stack);
111 vSACsDelta[
index] = getSACDeltaVal(sector,
stack, integrationInterval);
112 vStack[
index++] = SACFactorization::getStack(sector,
stack);
115 float sacOneA = getSACOneVal(Side::A, integrationInterval);
116 float sacOneC = getSACOneVal(Side::C, integrationInterval);
119 <<
"integrationInterval=" << integrationInterval
121 <<
"SAC0.=" << vSACsZero
122 <<
"SAC1A=" << sacOneA
123 <<
"SAC1C=" << sacOneC
124 <<
"SACDelta.=" << vSACsDelta
125 <<
"stack.=" << vStack
131template <
typename DataT>
137 for (
int iside = 0; iside <
SIDES; ++iside) {
138 const Side side = (iside == 0) ? Side::A : Side::C;
140 if (!mFourierCoeff) {
144 const int nTFs = mFourierCoeff->mCoeff[
side].getNCoefficients() / mFourierCoeff->mCoeff[
side].getNCoefficientsPerTF();
145 for (
int iTF = 0; iTF < nTFs; ++iTF) {
146 std::vector<float> coeff;
147 std::vector<int> ind;
148 int coeffPerTF = mFourierCoeff->mCoeff[
side].getNCoefficientsPerTF();
149 for (
int i = 0;
i < coeffPerTF; ++
i) {
150 const int index = mFourierCoeff->mCoeff[
side].getIndex(iTF,
i);
151 coeff.emplace_back((mFourierCoeff->mCoeff[
side])(
index));
158 <<
"coeffPerTF=" << coeffPerTF
159 <<
"coeff.=" << coeff
This file provides the structs for storing the factorized IDC values and fourier coefficients to be s...
helper class for accessing SACs from CCDB
helper class for drawing SACs per sector/side
TPC factorization of SACs.
void dumpToTree(const char *outFileName="SACCCDBTree.root") const
unsigned int getNIntegrationIntervalsSACDelta(const o2::tpc::Side side) const
float getSACVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const
float getSACOneVal(const o2::tpc::Side side, const unsigned int integrationInterval) const
void dumpToFourierCoeffToTree(const char *outFileName="FourierCCDBTree.root") const
float getSACDeltaVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const
unsigned int getNIntegrationIntervalsSACOne(const o2::tpc::Side side) const
float getSACZeroVal(const unsigned int sector, const unsigned int stack) const
GLint GLint GLsizei GLint GLenum GLenum type
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
constexpr unsigned char SECTORSPERSIDE
constexpr unsigned short GEMSTACKS
constexpr unsigned char SIDES
constexpr unsigned short GEMSTACKSPERSECTOR
std::function< float(const unsigned int, const unsigned int)> mSACFunc
function returning the value which will be drawn for sector, stack