Skip to content

Conversation

Copy link

Copilot AI commented Nov 13, 2025

Beamline acceptance and steering plots only overlaid circles for pipe cross-sections, failing to visualize non-ConeSegment intersection solids.

Changes

  • Shape extraction (shared_functions.h): Added extractShapeOutline() to extract boundary points from arbitrary TGeo shapes via polar sampling with binary search on TGeoShape::Contains()

  • Shape rendering: Added drawShapeOutline() using TPolyLine for arbitrary polygonal cross-sections

  • Analysis updates: Modified acceptanceAnalysis.C and beamlineAnalysis.C to conditionally render circles for ConeSegments or arbitrary outlines for other shapes

Implementation

The volParams struct now carries shape outlines:

struct volParams{
  double radius;
  // ... position, rotation fields
  bool isConeSegment;
  std::vector<std::pair<double, double>> shapeOutline;  // (x,y) in local frame
};

Drawing logic checks shape type:

if (isCone && pipeRadius > 0) {
    TEllipse *circle = new TEllipse(0,0,pipeRadius);
    circle->Draw("same");
} else if (!params.shapeOutline.empty()) {
    drawShapeOutline(params.shapeOutline, kRed, 2);
}

ConeSegments continue using circles; all other shapes render their actual cross-section geometry.

Original prompt

This section details on the original issue you should resolve

<issue_title>Beamline benchmark should overlay outline of arbitrary cross section shape</issue_title>
<issue_description>At the moment only circular cross sections are shown over the plots of the beamline acceptance and steering figures. Ideally we could also overlay the arbitrary shape of intersection solids when the beampipe section isn't a ConeSegment.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add overlay for arbitrary cross section shapes in beamline plots Support arbitrary cross-section shapes in beamline benchmark overlays Nov 13, 2025
Copilot finished work on behalf of simonge November 13, 2025 11:55
Copilot AI requested a review from simonge November 13, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Beamline benchmark should overlay outline of arbitrary cross section shape

2 participants