7 vector<DetGroup>&&
one, vector<DetGroup>&&
two, std::vector<DetGroup>&
result,
int firstIndex,
int firstCrossed) {
8 if (
one.empty() &&
two.empty())
13 if (firstIndex == firstCrossed)
14 incrementAndDoubleSize(
result);
17 }
else if (
two.empty()) {
19 if (firstIndex == firstCrossed)
22 incrementAndDoubleSize(
result);
24 if (firstIndex == firstCrossed)
34 int indSize1 =
one.front().indexSize();
35 int indSize2 =
two.front().indexSize();
37 for (
auto&& dg :
one) {
39 result.back().setIndexSize(indSize1 + indSize2);
41 for (
auto&& dg :
two) {
43 result.back().incrementIndex(indSize1);
48 for (
auto&& ig : gvec) {
49 int gSize = ig.indexSize();
50 int index = ig.index();
53 int resSize =
ires->indexSize();
54 if (gSize != resSize) {
55 LogDebug(
"TkDetLayers") <<
"DetGroupMerger::addSameLevel called with groups of different index sizes";
59 int resIndex =
ires->index();
60 if (
index == resIndex) {
61 ires->insert(
ires->end(), ig.begin(), ig.end());
64 }
else if (
index < resIndex) {
77 int indSize = vec.front().indexSize();
78 for (vector<DetGroup>::iterator
i = vec.begin();
i != vec.end();
i++) {
79 i->setIndexSize(2 * indSize);
84 int indSize = vec.front().indexSize();
85 for (vector<DetGroup>::iterator
i = vec.begin();
i != vec.end();
i++) {
86 i->incrementIndex(indSize);