In [!22 (c51a5f79)](https://gitlab.cern.ch/evtgen/evtgen/-/merge_requests/22/diffs?commit_id=c51a5f79ee0e64f0ad65f4020f2f8e62a16c7c1c), which was cherry-picked into both D119 and D124, several changes were made to EvtDalitzReso to make the evaluate method const.
whichThe previous code was cherry-picked into both D119 and D124, several changes were made tonot const because a data member was modified in a particular case where the parent mass had changed.
EvtDalitzReso to make the evaluate method constFollowing the changes, the data member was left unmodified and a warning was printed instead.
The previous code was not const because a data member was modified in a
particular case where the parent mass had changed.
Following the changes, the data member is left unmodified and a warning is
printed instead.
The warning was never seen in any existing tests. However, the existing tests
do did not cover the case where the parent particle has a natural width, which
implies that the per-event mass of the parent is not constant.
Here we:
* Add a test for just such a case: eta_c -> K+ K- pi0
* Modify the code to restore the correct behaviour
* Make other general improvements to the EvtDalitzReso class:
- Fix use of references to basic types as function arguments
- Expand use of const where appropriate
- Avoid unnecessary sqrts etc.
See also [CERN Gitlab !32](https://gitlab.cern.ch/evtgen/evtgen/-/merge_requests/32).