Skip to content

Mu2eG4/ExtMon: clean up pixel-chiller construction rotation conventions #1950

Description

@oksuzian

Follow-up from #1948 (review by @gaponenko) and finding 7 of #1947, filed so the cleanup can be picked up after the collaboration meeting.

constructPixelChillerExtMonFNAL (Mu2eG4/src/constructExtMonFNALInfrastructure.cc) takes a parameter named pixelChillerRotationInParent but consumes it with Geant4's backwards interpretation, without the .inverse() that the neighboring ExtMon call sites apply and document ("finishNesting() uses the backwards interpretation of rotations"). The geometry is nevertheless correct as it stands, because the two callers compensate:

  • constructExtMonFNALChillersInHall builds its rotateY angle from swapped wall-vector components (wallVectorX = wallVector.y(); wallVectorY = wallVector.x(); rotAngle = -M_PI*0.5 - atan2(wallVectorY, wallVectorX);), i.e. the angle is tuned to the callee's un-inverted use rather than derived as an actual rotation-in-parent;
  • constructExtMonFNALChillersInRoom passes CLHEP::HepRotation::IDENTITY, where the distinction vanishes.

A naive "fix" of the callee alone flips the hall chillers out of orientation — that was commit 61546d6 on #1948, reverted in 675ab3e after review.

Suggested cleanup, in whatever form the author prefers:

  • make the parameter's meaning and name agree — either genuinely accept a rotation-in-parent and apply .inverse() inside, adjusting the hall caller's angle construction to produce the true rotation, or rename the parameter to state the backwards convention;
  • untangle the swapped-component atan2 in constructExtMonFNALChillersInHall so the angle is derived rather than compensating;
  • a surface-check/GDML pass on the three hall chillers and the room chillers to pin the intended orientations while touching this.

🤖 Generated with Claude Code

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