From a01dacf4be115536e71da2b458d6a48c8746d266 Mon Sep 17 00:00:00 2001 From: "patrick.koppenburg@cern.ch" <patrick.koppenburg@cern.ch> Date: Thu, 29 Sep 2022 15:08:49 +0200 Subject: [PATCH 1/4] Add a warning in DEcayTreeFit --- Phys/DecayTreeFitter/src/lib/DecayChain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp index 64d05894f7d..61ba13e6897 100644 --- a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp +++ b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp @@ -13,6 +13,7 @@ #include "InteractionPoint.h" #include "ParticleBase.h" #include <algorithm> +#include "Kernel/ParticleID.h" namespace DecayTreeFitter { @@ -175,6 +176,8 @@ namespace DecayTreeFitter { if ( changed ) { m_dim = 0; m_constraintlist.clear(); + } else { + std::cout << "Warning: Constraint of particle " << pid.pid() << " was not applied due as it is missing in the decay tree. Check your options." << std::endl; } } -- GitLab From 06a8ea800542c66be1ca7740d2aab01f75c99b20 Mon Sep 17 00:00:00 2001 From: Gitlab CI <noreply@cern.ch> Date: Thu, 29 Sep 2022 13:14:19 +0000 Subject: [PATCH 2/4] Fixed formatting patch generated by https://gitlab.cern.ch/lhcb/Rec/-/jobs/24863039 --- Phys/DecayTreeFitter/src/lib/DecayChain.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp index 61ba13e6897..e371bd9efad 100644 --- a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp +++ b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp @@ -11,9 +11,9 @@ #include "DecayChain.h" #include "FitParams.h" #include "InteractionPoint.h" +#include "Kernel/ParticleID.h" #include "ParticleBase.h" #include <algorithm> -#include "Kernel/ParticleID.h" namespace DecayTreeFitter { @@ -177,7 +177,8 @@ namespace DecayTreeFitter { m_dim = 0; m_constraintlist.clear(); } else { - std::cout << "Warning: Constraint of particle " << pid.pid() << " was not applied due as it is missing in the decay tree. Check your options." << std::endl; + std::cout << "Warning: Constraint of particle " << pid.pid() + << " was not applied due as it is missing in the decay tree. Check your options." << std::endl; } } -- GitLab From 869fd54b0a2448272fae911e01e09ca221fe91f3 Mon Sep 17 00:00:00 2001 From: "patrick.koppenburg@cern.ch" <patrick.koppenburg@cern.ch> Date: Fri, 30 Sep 2022 10:37:50 +0200 Subject: [PATCH 3/4] Throw an exception --- Phys/DecayTreeFitter/src/lib/DecayChain.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp index e371bd9efad..b8f65df4231 100644 --- a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp +++ b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp @@ -14,6 +14,7 @@ #include "Kernel/ParticleID.h" #include "ParticleBase.h" #include <algorithm> +#include "GaudiKernel/GaudiException.h" namespace DecayTreeFitter { @@ -177,8 +178,10 @@ namespace DecayTreeFitter { m_dim = 0; m_constraintlist.clear(); } else { - std::cout << "Warning: Constraint of particle " << pid.pid() - << " was not applied due as it is missing in the decay tree. Check your options." << std::endl; + 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 ) ); } } -- GitLab From 0d7f196e69b2b383eb46ad853c1191661fb709d4 Mon Sep 17 00:00:00 2001 From: "patrick.koppenburg@cern.ch" <patrick.koppenburg@cern.ch> Date: Fri, 30 Sep 2022 10:38:37 +0200 Subject: [PATCH 4/4] Throw an exception --- Phys/DecayTreeFitter/src/lib/DecayChain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp index b8f65df4231..79f68150c9a 100644 --- a/Phys/DecayTreeFitter/src/lib/DecayChain.cpp +++ b/Phys/DecayTreeFitter/src/lib/DecayChain.cpp @@ -10,11 +10,11 @@ \*****************************************************************************/ #include "DecayChain.h" #include "FitParams.h" +#include "GaudiKernel/GaudiException.h" #include "InteractionPoint.h" #include "Kernel/ParticleID.h" #include "ParticleBase.h" #include <algorithm> -#include "GaudiKernel/GaudiException.h" namespace DecayTreeFitter { @@ -180,8 +180,8 @@ namespace DecayTreeFitter { } 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 ) ); + throw GaudiException( "To-be constrained particle is not in chain.", "DecayTreeFitter::DecayChain", + StatusCode( 856 ) ); } } -- GitLab