epic icon indicating copy to clipboard operation
epic copied to clipboard

Fixed thickness calculation for sensitive surface

Open henryg7vdj opened this issue 1 month ago • 0 comments

Briefly, what does this PR introduce?

I believe there is a minor bug in the calculation of the inner and outer thicknesses for the sensitive surface in BarrelTrackerWithFrame_geo.cpp. When there are two sensitive compositions placed at the same z position, the thicknesses for the second are incorrect because of the order in which the calculation is done.

To fix this, I moved the thickness_so_far calculation to before the if (x_comp.isSensitive()) { section, and changed the sign of + x_comp.thickness() / 2.0 when it is used to calculate the inner and outer thicknesses.

Before the fix:

	sensor	thickness_so_far	inner_thickness		outer_thickness
L3	1		0.213875			0.219275 			0.0054
	2		0.224675			0.230075 			-0.0054
L4	1		0.218605			0.224005			0.0054
	2		0.229405			0.234805 			-0.0054

After the fix:

L3	1		0.224675			0.219275 			0.0054
	2		0.224675			0.219275 			0.0054
L4	1		0.229405			0.224005 			0.0054
	2		0.229405			0.224005 			0.0054

I hope this has fixed the issue.

What kind of change does this PR introduce?

  • [x ] Bug fix (issue #__)
  • [ ] New feature (issue #__)
  • [ ] Documentation update
  • [ ] Other: __

Please check if this PR fulfills the following:

  • [ ] Tests for the changes have been added
  • [ ] Documentation has been added / updated
  • [ ] Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Does this PR change default behavior?

henryg7vdj avatar Nov 10 '25 15:11 henryg7vdj