Skip to content

Monte Carlo circular Gaussian source calculation bug #204

@hayakawa16

Description

@hayakawa16

The Monte Carlo circular Gaussian source calculation based on a diameter FWHM infile specification is in error. The original code is Line 363 SourceToolbox.cs
return new Position(
center.X + 0.8493218 * beamDiameterFwhm * x,
center.Y + 0.8493218 * beamDiameterFwhm * y,
center.Z);

This x and y position should be from the circle center. That means radius. Instead of beamDiameterFwhm, it should be beamRadiusFwhm = beamDiameterFwhm/2.0.
Proposed new code:
return new Position(
center.X + 0.8493218 * (beamDiameterFwhm / 2) * x,
center.Y + 0.8493218 * (beamDiameterFwhm / 2) * y,
center.Z);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions