32 boostHisto eSumHistoScaled = boost::histogram::make_histogram(boost::histogram::axis::regular<>(100, 0, 100,
"t-texp"), boost::histogram::axis::integer<>(0, mNcells,
"CELL ID"));
34 auto hEnergyCol = boost::histogram::make_histogram(boost::histogram::axis::regular<>(100, 0, 100.,
"t-texp"));
35 auto hEnergyRow = boost::histogram::make_histogram(boost::histogram::axis::regular<>(250, 0, 250.,
"t-texp"));
37 auto hEnergyScaled = boost::histogram::make_histogram(boost::histogram::axis::regular<>(100, 0, 100,
"t-texp"), boost::histogram::axis::integer<>(0, mNcells,
"CELL ID"));
42 for (
int iter = 1; iter < 5; iter++) {
44 std::vector<double> vecCol[100];
45 std::vector<double> vecRow[250];
47 for (
int cellID = 0; cellID < mNcells; cellID++) {
48 auto tempSlice = boost::histogram::algorithm::reduce(cellAmplitude, boost::histogram::algorithm::shrink(cellID, cellID), boost::histogram::algorithm::shrink(emin, emax));
51 int row = std::get<0>(position);
52 int col = std::get<1>(position);
54 double dCellEnergy = 0.;
55 double dNumOfHits = 0.;
58 auto energyAxis = boost::histogram::axis::regular<>(100, 0, 100,
"t-texp");
59 auto eMinIndex = energyAxis.index(emin);
60 auto eMaxIndex = energyAxis.index(emax);
61 for (
int EBin = eMinIndex; EBin < eMaxIndex; EBin++) {
62 dCellEnergy += hEnergyScaled.at(EBin, cellID) * energyAxis.value(EBin);
63 dNumOfHits += hEnergyScaled.at(EBin, cellID);
66 if (dCellEnergy > 0.) {
67 hEnergyCol(
col + 0.5, dCellEnergy);
68 hEnergyRow(
row + 0.5, dCellEnergy);
69 vecCol[
col].push_back(dCellEnergy);
70 vecRow[
row].push_back(dCellEnergy);
75 for (
int iCol = 1; iCol <= 100; iCol++) {
76 if (vecCol[iCol - 1].
size() > 0.) {
77 auto colAxis = boost::histogram::axis::regular<>(100, 0, 100.,
"t-texp");
78 auto indexCol = colAxis.index(iCol - 0.5);
79 hEnergyCol(indexCol, hEnergyCol.at(indexCol) / vecCol[iCol - 1].size());
84 for (
int iRow = 1; iRow <= 250; iRow++) {
85 if (vecRow[iRow - 1].
size() > 0.) {
86 auto rowAxis = boost::histogram::axis::regular<>(250, 0, 250.,
"t-texp");
87 auto indexRow = rowAxis.index(iRow - 0.5);
88 hEnergyRow(indexRow, hEnergyRow.at(indexRow) / vecRow[iRow - 1].size());
94 auto rowResult = o2::utils::fitBoostHistoWithGaus<double>(hEnergyRow);
95 double meanValRow = rowResult.at(1);
97 auto colResult = o2::utils::fitBoostHistoWithGaus<double>(hEnergyCol);
98 double meanValCol = colResult.at(1);
101 for (
int iCell = 0; iCell < mNcells; iCell++) {
104 int col = std::get<1>(position);
105 if (hEnergyCol.at(
col) > 0.) {
107 for (
int EBin = 1; EBin < 100; EBin++) {
108 hEnergyScaled(EBin, iCell, hEnergyScaled.at(EBin, iCell) * (meanValCol / hEnergyCol.at(
col)));
114 for (
int iCell = 0; iCell < mNcells; iCell++) {
117 int row = std::get<0>(position);
118 if (hEnergyRow.at(
row) > 0.) {
120 for (
int EBin = 1; EBin < 100; EBin++) {
121 hEnergyScaled(EBin, iCell, hEnergyScaled.at(EBin, iCell) * (meanValRow / hEnergyRow.at(
row)));
135 for (Int_t cell = 0; cell < mNcells; cell++) {
139 for (Int_t
j = 1;
j <= 100;
j++) {
140 auto energyAxis = boost::histogram::axis::regular<>(100, 0, 100,
"t-texp");
141 Double_t E = energyAxis.value(
j);
142 Double_t N = hEnergyScaled.at(
j, cell);
143 if (E < emin || E > emax) {
150 eSumHistoScaled(cell, Esum / (Nsum));
154 return eSumHistoScaled;