diff --git a/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc b/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc index 3bcfe729c5793..a06f5c0402cb1 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc @@ -896,6 +896,10 @@ bool Pythia8Hadronizer::residualDecay() { void Pythia8Hadronizer::finalizeEvent() { bool lhe = lheEvent() != nullptr; + // protection against empty weight container + if ((event()->weights()).empty()) + (event()->weights()).push_back(1.); + // now create the GenEventInfo product from the GenEvent and fill // the missing pieces eventInfo() = std::make_unique(event().get());