removed times 2 in calculated photon center distance

This commit is contained in:
2025-10-08 17:01:38 +02:00
parent 72a2604ca5
commit 5329be816e
2 changed files with 8 additions and 8 deletions

View File

@@ -88,8 +88,8 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) {
dY = 1.0;
break;
}
photon.x -= m_ietax(ix, iy, ie) * 2 - dX;
photon.y -= m_ietay(ix, iy, ie) * 2 - dY;
photon.x -= m_ietax(ix, iy, ie) - dX;
photon.y -= m_ietay(ix, iy, ie) - dY;
photons.push_back(photon);
}
} else if (clusters.cluster_size_x() == 2 ||
@@ -114,10 +114,10 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) {
auto iy = last_smaller(m_etabinsy, eta.y);
// TODO: why 2?
photon.x -= m_ietax(ix, iy, ie) *
2; // eta goes between 0 and 1 but we could move the hit
// anywhere in the 2x2
photon.y -= m_ietay(ix, iy, ie) * 2;
photon.x -=
m_ietax(ix, iy, ie); // eta goes between 0 and 1 but we could
// move the hit anywhere in the 2x2
photon.y -= m_ietay(ix, iy, ie);
photons.push_back(photon);
}

View File

@@ -23,8 +23,8 @@ def create_photon_hit_with_gaussian_distribution(mean, covariance_matrix, data_p
return (probability_values.reshape(X.shape)).round() #python bindings only support frame types of uint16_t
def photon_hit_in_euclidean_space(cluster_center, pixels_per_superpixel, photon_hit):
scaled_photon_hit_x = cluster_center - (1 - photon_hit[0][0])*0.5*pixels_per_superpixel*pixel_width
scaled_photon_hit_y = cluster_center - (1 - photon_hit[0][1])*0.5*pixels_per_superpixel*pixel_width
scaled_photon_hit_x = cluster_center - (1 - photon_hit[0][0])*pixels_per_superpixel*pixel_width
scaled_photon_hit_y = cluster_center - (1 - photon_hit[0][1])*pixels_per_superpixel*pixel_width
return (scaled_photon_hit_x, scaled_photon_hit_y)
def create_2x2cluster_from_frame(frame, pixels_per_superpixel):