DecayTreeFitter should warn when a mass constraint is applied to a particle not in the decay chain.
See DaVinci!756 (comment 6042085)
DecayTreeFit applies the mass constraints given by options, but does not complain if the particle to constrain is not in the decay chain. A warning or an error should be issued. cc @amathad @jzhuo @erodrigu @wouter
The check could be added in DecayTreeFit, for instance checking the size of the container here https://gitlab.cern.ch/lhcb/Rec/-/blob/master/Phys/DecayTreeFitter/src/lib/DecayChain.cpp#L169 Or in DecayTreeFitterAlg, checking for the presence of a particle in the decay chain here https://gitlab.cern.ch/lhcb/Rec/-/blob/master/Phys/DecayTreeFitter/src/component/DecayTreeFitterAlg.cpp#L128 .