diff --git a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp index 64d05894f7d1e61dc74b7abb67bdd117db9e31ed..79f68150c9a026b214a56e4a60ec579e50bc5112 100644 --- a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp +++ b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp @@ -10,7 +10,9 @@ \*****************************************************************************/ #include "DecayChain.h" #include "FitParams.h" +#include "GaudiKernel/GaudiException.h" #include "InteractionPoint.h" +#include "Kernel/ParticleID.h" #include "ParticleBase.h" #include <algorithm> @@ -175,6 +177,11 @@ namespace DecayTreeFitter { if ( changed ) { m_dim = 0; m_constraintlist.clear(); + } else { + std::cout << "ERROR: Constraint of particle " << pid.pid() + << " was not applied as it is missing in the decay tree. Check your options." << std::endl; + throw GaudiException( "To-be constrained particle is not in chain.", "DecayTreeFitter::DecayChain", + StatusCode( 856 ) ); } }