From 6316e213371be55c951ae4075b19ed9c56bac69a Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Tue, 4 Jul 2023 13:05:24 +0200
Subject: [PATCH] Fix missing 2->2 vertices in Herwig7/HepMC3

Fix missing 2->2 vertices in Herwig7/HepMC3
---
 Generators/EvgenProdTools/src/FixHepMC.cxx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Generators/EvgenProdTools/src/FixHepMC.cxx b/Generators/EvgenProdTools/src/FixHepMC.cxx
index 9e2a551543de..043b2406dd20 100644
--- a/Generators/EvgenProdTools/src/FixHepMC.cxx
+++ b/Generators/EvgenProdTools/src/FixHepMC.cxx
@@ -152,7 +152,8 @@ StatusCode FixHepMC::execute() {
 
     /// AV: In case we have 3 particles, we try to add a vertex 
     /// that corresponds to 1->2 and 1->1 splitting.
-    if (semi_disconnected.size() == 3 || semi_disconnected.size() == 2) {
+    /// AV: In case we have 4 particles, we can try to do that as well.
+    if ( semi_disconnected.size() == 4 || semi_disconnected.size() == 3 || semi_disconnected.size() == 2) {
       size_t no_endv = 0;
       size_t no_prov = 0;
       HepMC::FourVector sum(0,0,0,0);
@@ -303,7 +304,8 @@ StatusCode FixHepMC::execute() {
     }
 
     /// AV: In case we have 3 particles, we try to add a vertex that correspond to 1->2 and 1->1 splitting.
-    if (semi_disconnected.size() == 3 || semi_disconnected.size() == 2) {
+    /// AV: we can try to do that for 4 particles as well.
+    if (semi_disconnected.size() == 4 ||semi_disconnected.size() == 3 || semi_disconnected.size() == 2) {
       size_t no_endv = 0;
       size_t no_prov = 0;
       double vsum[4] = {0,0,0,0};
-- 
GitLab