Skip to content

Modify how cluster width is calculated (relevant for split clusters)

Jens Kroeger requested to merge jekroege/corryvreckan:fix_issue_130 into master

This closes #130 (closed).

Tested the principle with the following snippet of code:

#include <iostream>
#include <map>

int main() {
    std::map<int, bool> my_map;

    my_map[400] = true;
    my_map[398] = true; // -> try some different combinations and cluster sizes

    std::cout << "my_map.size() = " << my_map.size() << std::endl;

    std::cout << "first element: " << my_map.begin()->first << std::endl;
    std::cout << "last element (past-the-end element): " << my_map.end()->first << std::endl;
    std::cout << "last element: " << my_map.rbegin()->first << std::endl;

    auto row_min = my_map.begin()->first;
    auto row_max = my_map.rbegin()->first;
    std::cout << "cluster row width = " << 1 + row_max - row_min << std::endl;

    return 0;
}

Also tested in real-life on run 6345 from Aug'2020 DESY test-beam. Results as expected, see screenshot below: image

Edited by Jens Kroeger

Merge request reports