Add ability to change particle type when regrowing#1877
Conversation
|
Hi @brownd1978,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for 934d561: build (Build queue - API unavailable) |
|
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for a384c3d: build (Build queue - API unavailable) |
|
☀️ The build tests passed at a384c3d.
N.B. These results were obtained from a build of this Pull Request at a384c3d after being merged into the base branch at 20895af. For more information, please check the job page here. |
PR SummaryPurpose: Adds an option to force regrown tracks to have a different particle type (mass) than what the
Core Changes
Issues Found1. Behavior change unrelated to the PR's stated purpose (potential regression) — The - // throw cet::exception(...)
- // for now, revert to the legacy implementation...
- auto vel = _pstate.velocity();
- return _pstate.time() - _pstate.position3().Z()/vel.Z();
+ throw cet::exception("RECO")<<"mu2e::KalSegment: no trajectory specified in flag" << std::endl;This converts a silent-fallback path into a hard exception. Any caller relying on the legacy behavior (e.g. segments without a trajectory flag set) will now throw. This is out of scope for "change particle type when regrowing" and deserves explicit callout / confirmation that no production path hits it. 2. Suspicious cast in the module — auto tpart = tpart_ != PDGCode::unknown ? static_cast<PDGCode>(std::copysign(...)) : kseed.particle();
3. Duplicate include — +#include "Offline/GlobalConstantsService/inc/GlobalConstantsHandle.hh"
+#include "Offline/GlobalConstantsService/inc/ParticleDataList.hh"
4. Mass-lookup duplication — The identical 4-line mass-lookup block is copy-pasted into all three |
|
📝 The HEAD of |
This PR provides an option to force regrown tracks to have a different particle type (mass) than what the KalSeed stores. The default is for regrown tracks to have the same particle type as the KalSeed.