Skip to content

Commit

Permalink
Missing coordinate tranform in volume sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Jan 18, 2024
1 parent 3e3c6e4 commit e43bc10
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LI::math::Vector3D CylinderVolumePositionDistribution::SamplePosition(std::share
}

double CylinderVolumePositionDistribution::GenerationProbability(std::shared_ptr<LI::detector::DetectorModel const> detector_model, std::shared_ptr<LI::interactions::InteractionCollection const> 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()
Expand Down

0 comments on commit e43bc10

Please sign in to comment.