Commit 3e3366da authored by Daniel Hynds's avatar Daniel Hynds
Browse files

check if tot is 0 for a cluster

parent 21946f73
......@@ -183,6 +183,10 @@ void Timepix3Clustering::calculateClusterCentre(Cluster* cluster) {
timestamp = (*pixels)[pix]->m_timestamp;
}
// Row and column positions are tot-weighted
if(tot == 0){
LOG(WARNING) << "Cluster with ToT 0!";
tot = 1.;
}
row /= tot;
column /= tot;
......
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