From e43bc10363ba63899ca4dbdead822cdd3477672a Mon Sep 17 00:00:00 2001 From: Austin Schneider Date: Thu, 18 Jan 2024 16:33:51 -0700 Subject: [PATCH] Missing coordinate tranform in volume sampling --- .../primary/vertex/CylinderVolumePositionDistribution.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/distributions/private/primary/vertex/CylinderVolumePositionDistribution.cxx b/projects/distributions/private/primary/vertex/CylinderVolumePositionDistribution.cxx index aa393cb59..0ff9db99a 100644 --- a/projects/distributions/private/primary/vertex/CylinderVolumePositionDistribution.cxx +++ b/projects/distributions/private/primary/vertex/CylinderVolumePositionDistribution.cxx @@ -33,7 +33,7 @@ LI::math::Vector3D CylinderVolumePositionDistribution::SamplePosition(std::share } double CylinderVolumePositionDistribution::GenerationProbability(std::shared_ptr detector_model, std::shared_ptr interactions, LI::dataclasses::InteractionRecord const & record) const { - LI::math::Vector3D pos(record.interaction_vertex); + LI::math::Vector3D pos(cylinder.GlobalToLocalPosition(record.interaction_vertex)); double z = pos.GetZ(); double r = sqrt(pos.GetX() * pos.GetX() + pos.GetY() * pos.GetY()); if(abs(z) >= 0.5 * cylinder.GetZ()