Commit ec7d0fb6 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fix_issue_130' into 'master'

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

Closes #130

See merge request !387
parents 7cca1539 15d992be
Pipeline #2154389 passed with stages
in 18 minutes and 53 seconds
......@@ -12,6 +12,7 @@ Also, if one pixel of a cluster has charge zero, the arithmetic mean is calculat
Thus, the arithmetic mean is safer.
Split clusters can be recovered using a larger search radius for neighboring pixels.
Their width is defined as the maximum extent in column/row direction, i.e. a cluster of pixels (1,10), (1,12) would have a column width of 1 and a row width of 3.
### Parameters
* `time_cut_rel`: Number of standard deviations the `time_resolution` of the detector plane will be multiplied by. This value is then used as the maximum time difference allowed between pixels for association to a cluster. By default, a relative time cut is applied. Absolute and relative time cuts are mutually exclusive. Defaults to `3.0`.
......@@ -18,14 +18,13 @@ Cluster::Cluster() : m_columnWidth(0.), m_rowWidth(0.), m_split(false) {}
void Cluster::addPixel(const Pixel* pixel) {
m_pixels.push_back(const_cast<Pixel*>(pixel)); // NOLINT
if(m_columnHits.count(pixel->column()) == 0) {
if(m_rowHits.count(pixel->row()) == 0) {
m_columnHits[pixel->column()] = true;
m_rowHits[pixel->row()] = true;
// Take split clusters into account correctly, e.g.
// (1,10),(1,12) should have a row width = 3
m_columnWidth = static_cast<size_t>(1 + m_columnHits.begin()->first - m_columnHits.rbegin()->first);
m_rowWidth = static_cast<size_t>(1 + m_rowHits.rbegin()->first - m_rowHits.begin()->first);
double Cluster::error() const {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment