24 size_t nBinsAxis1 = std::get<2>(gridAxis1);
25 size_t nBinsAxis2 = std::get<2>(gridAxis2);
28 double minAxis1 = std::get<0>(gridAxis1);
29 double minAxis2 = std::get<0>(gridAxis2);
30 double maxAxis1 = std::get<1>(gridAxis1);
31 double maxAxis2 = std::get<1>(gridAxis2);
35 double stepAxis1 = std::fabs(maxAxis1 - minAxis1) / (nBinsAxis1 - 1);
36 double stepAxis2 = std::fabs(maxAxis2 - minAxis2) / (nBinsAxis2 - 1);
37 maxAxis1 += stepAxis1;
38 maxAxis2 += stepAxis2;
52 size_t nBinsAxis1 = std::get<2>(gridAxis1);
53 size_t nBinsAxis2 = std::get<2>(gridAxis2);
54 size_t nBinsAxis3 = std::get<2>(gridAxis3);
57 double minAxis1 = std::get<0>(gridAxis1);
58 double minAxis2 = std::get<0>(gridAxis2);
59 double minAxis3 = std::get<0>(gridAxis3);
60 double maxAxis1 = std::get<1>(gridAxis1);
61 double maxAxis2 = std::get<1>(gridAxis2);
62 double maxAxis3 = std::get<1>(gridAxis3);
67 std::fabs(maxAxis1 - minAxis1) / std::max(nBinsAxis1 - 1,
size_t(1));
69 std::fabs(maxAxis2 - minAxis2) / std::max(nBinsAxis2 - 1,
size_t(1));
71 std::fabs(maxAxis3 - minAxis3) / std::max(nBinsAxis3 - 1,
size_t(1));
72 maxAxis1 += stepAxis1;
73 maxAxis2 += stepAxis2;
74 maxAxis3 += stepAxis3;
88 std::function<double(Acts::Vector3)> transfoGlobalToLocal;
126 throw std::invalid_argument(
"Incorrect bin, should be x,y,z,r,phi,z");
129 return transfoGlobalToLocal;
137 bool isCartesian =
false;
138 bool isCylindrical =
false;
140 for (
size_t b = 0;
b < bu.size();
b++) {
145 isCylindrical =
true;
148 if (!(isCartesian || isCylindrical) || (isCylindrical && isCartesian)) {
149 throw std::invalid_argument(
"Incorrect bin, should be x,y,z or r,phi,z");
156 std::function<double(Acts::Vector3)> coord1 =
158 std::function<double(Acts::Vector3)> coord2 =
161 transfoGlobalToLocal = [coord1, coord2,
164 return {coord1(pos), coord2(pos)};
175 bool isCartesian =
false;
176 bool isCylindrical =
false;
178 for (
size_t b = 0;
b < bu.size();
b++) {
183 isCylindrical =
true;
186 if (!(isCartesian || isCylindrical) || (isCylindrical && isCartesian)) {
187 throw std::invalid_argument(
"Incorrect bin, should be x,y,z or r,phi,z");
196 std::function<double(Acts::Vector3)> coord1 =
198 std::function<double(Acts::Vector3)> coord2 =
200 std::function<double(Acts::Vector3)> coord3 =
204 transfoGlobalToLocal = [coord1, coord2, coord3,
207 return {coord1(pos), coord2(pos), coord3(pos)};
245 mGrid.at(
index) = grid.
at(
index).average().parameters();