Residual Calculation does not work for multiple DUTs
When multiple detectors are configured with role="DUT"
, AnalysisDUT
will not calculate the correct residual per device, it will instead take clusters from each of the devices. If use_closest_cluster=true
, residuals belonging to e.g. detector 3 will end up in the histogram of detector 4.
This is due to the fact that the loop in https://gitlab.cern.ch/corryvreckan/corryvreckan/-/blob/master/src/modules/AnalysisDUT/AnalysisDUT.cpp#L390 does not filter the clusters for the residual calculation by detector.
However, a quick fix such as adding
if (m_detector->getName()!=assoc_cluster->getDetectorID()) {
continue;
}
does not work, since it interferes with use_closest_cluster
. Therefore the 'closest_cluster' property of Track
can be modified or, as @simonspa suggested, the clusters could be stored per detector.