From 033d8386fc8451ef230d3dea7e4e382303f985e0 Mon Sep 17 00:00:00 2001 From: Abraham Tishelman-Charny Date: Wed, 31 Jan 2024 02:41:35 -0500 Subject: [PATCH] Adding protection in all_invariant_masses computation --- analyzers/dataframe/src/JetConstituentsUtils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/analyzers/dataframe/src/JetConstituentsUtils.cc b/analyzers/dataframe/src/JetConstituentsUtils.cc index 0fead9fa72..f339920219 100644 --- a/analyzers/dataframe/src/JetConstituentsUtils.cc +++ b/analyzers/dataframe/src/JetConstituentsUtils.cc @@ -1269,6 +1269,8 @@ namespace FCCAnalyses rv::RVec InvariantMasses; + if(AllJets.size() < 2) return InvariantMasses; + // For each jet, take its invariant mass with the remaining jets. Stop at last jet. for(int i = 0; i < AllJets.size()-1; ++i) {