Add neutron to PDGCode enum-to-string mapping#1759
Conversation
Add neutron = 2112 and anti_neutron = -2112 as enum aliases in PDGCode, keeping backward-compatible n0/anti_n0 names. Change the string representations from "n0"/"anti_n0" to "neutron"/"anti_neutron" for consistency with how "proton" is already named. Apply the same changes to CompressedPDGCode. Co-authored-by: oksuzian <48927306+oksuzian@users.noreply.github.com>
|
@FNALbuild run build test |
|
Hi @Copilot,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. 📝 The author of this pull request is not a member of the Mu2e github organisation. ⌛ The following tests have been triggered for d0b0ace: build (Build queue - API unavailable) |
|
☀️ The build tests passed at d0b0ace.
N.B. These results were obtained from a build of this Pull Request at d0b0ace after being merged into the base branch at 627421c. For more information, please check the job page here. |
rlcee
left a comment
There was a problem hiding this comment.
In my reading of the code, this should work.
The PDGCode enum names
proton/anti_protonbut only hasn0/anti_n0for the neutron — inconsistent and less readable.neutron = 2112andanti_neutron = -2112enum aliases inPDGCodeandCompressedPDGCode"n0"→"neutron"and"anti_n0"→"anti_neutron"n0/anti_n0enum names kept as aliases — fully backward compatibleOriginal prompt
💡 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.