From f9a5b7831591653a2d5f42656812bb6806bb4411 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 2 Jul 2024 09:53:35 +0200 Subject: [PATCH] Make sure that CaloHitContributions are present --- standalone/lcio2edm4hep.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/standalone/lcio2edm4hep.cpp b/standalone/lcio2edm4hep.cpp index dcf763e..4ffdb8b 100644 --- a/standalone/lcio2edm4hep.cpp +++ b/standalone/lcio2edm4hep.cpp @@ -218,7 +218,10 @@ int main(int argc, char* argv[]) { if (patching == true) { colPatcher.patchCollections(evt); } - const auto edmEvent = LCIO2EDM4hepConv::convertEvent(evt, collsToConvert); + auto edmEvent = LCIO2EDM4hepConv::convertEvent(evt, collsToConvert); + if (edmEvent.get("AllCaloHitContributionsCombined") == nullptr) { + edmEvent.put(edm4hep::CaloHitContributionCollection(), "AllCaloHitContributionsCombined"); + } // For the first event we also convert some meta information for the // ParticleID handling