9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY1D1D1D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY1D1D1D_H
57 std::vector<std::vector<BinUtility*>>* binUtilVec)
66 if (!binUtil1 || !binUtil2 || !binUtilVec) {
67 throw std::logic_error(
"Invalid BinUtilities");
71 int v1Size = binUtil1->bins();
72 int v2Size = binUtil2->bins();
73 m_array = std::vector<std::vector<std::vector<SharedObject<T>>>>(v1Size);
74 for (
int i = 0;
i < v1Size; ++
i) {
75 m_array[
i] = std::vector<std::vector<SharedObject<T>>>(v2Size);
76 for (
int j = 0; j < v2Size; ++j) {
78 std::vector<SharedObject<T>>((*binUtilVec)[
i][j]->bins());
84 int vecsize(tclassvector.size());
87 if (binUtil1->inside(currentGlobal) && binUtil2->inside(currentGlobal)) {
88 int bin1 = binUtil1->bin(currentGlobal);
89 int bin2 = binUtil2->bin(currentGlobal);
91 int bin3 = (*binUtilVec)[
bin1][
bin2]->bin(currentGlobal);
92 std::vector<std::vector<SharedObject<T>>>& currArr =
m_array[
bin1];
93 std::vector<SharedObject<T>>& curVec = currArr[
bin2];
94 curVec[
bin3] = ((tclassvector)[
ivec]).first;
97 "BinnedArray1D1D1D",
"Object outside bounds", StatusCode::FAILURE);
114 std::vector<std::vector<BinUtility*>>
::iterator singleBinIter =
115 barr.m_binUtilArray->begin();
116 for (; singleBinIter != barr.m_binUtilArray->end(); ++singleBinIter) {
118 std::vector<BinUtility*>((*singleBinIter).size()));
119 for (
unsigned int ibin = 0; ibin <
m_binUtilArray->back().size(); ibin++)
127 m_array = std::vector<std::vector<std::vector<SharedObject<T>>>>(v1Size);
128 for (
int i = 0;
i < v1Size; ++
i) {
129 m_array[
i] = std::vector<std::vector<SharedObject<T>>>(v2Size);
130 for (
int j = 0; j < v2Size; ++j)
136 for (
int ibin1 = 0; ibin1 < v1Size; ++ibin1) {
137 for (
int ibin2 = 0; ibin2 < v2Size; ++ibin2) {
138 for (
size_t ibin3 = 0;
139 ibin3 < (*m_binUtilArray)[ibin1][ibin2]->bins();
141 m_array[ibin1][ibin2][ibin3] = (barr.m_array)[ibin1][ibin2][ibin3];
160 for (
size_t ibin1 = 0; ibin1 < v1Size; ibin1++) {
161 for (
size_t ibin2 = 0; ibin2 < v2Size; ibin2++)
171 std::vector<std::vector<BinUtility*>>
::iterator singleBinIter =
173 for (; singleBinIter != barr.
m_binUtilArray->end(); ++singleBinIter) {
175 std::vector<BinUtility*>((*singleBinIter).size()));
185 std::vector<std::vector<std::vector<SharedObject<T>>>>(v1Size);
186 for (
size_t i = 0;
i < v1Size; ++
i) {
187 m_array[
i] = std::vector<std::vector<SharedObject<T>>>(v2Size);
188 for (
size_t j = 0; j < v2Size; ++j)
194 for (
size_t ibin1 = 0; ibin1 < v1Size; ++ibin1) {
195 for (
size_t ibin2 = 0; ibin2 < v2Size; ++ibin2) {
196 for (
size_t ibin3 = 0;
197 ibin3 < (*m_binUtilArray)[ibin1][ibin2]->bins();
200 (barr.
m_array)[ibin1][ibin2][ibin3];
220 for (
int ibin1 = 0; ibin1 < v1Size; ibin1++) {
221 for (
int ibin2 = 0; ibin2 < v2Size; ibin2++)
305 std::make_unique<std::vector<T*>>();
308 for (
size_t ibin3 = 0;
319 std::vector<std::vector<std::vector<SharedObject<T>>>>
m_array;
328 #endif // TRKSURFACES_BINNEDARRAY1D1D1D_H