From 14c22f73b7a0e13547a2d52193cda956ade47a62 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Mon, 25 Apr 2022 01:19:03 +0000
Subject: [PATCH] Resolve "Explicitly load CaloHitContribution whenever
 SimCalorimeterHit is used"

---
 benchmarks/clustering/options/full_cal_reco.py          | 7 +++++++
 benchmarks/ecal/options/barrel.py                       | 1 +
 benchmarks/ecal/options/endcap_e.py                     | 1 +
 benchmarks/ecal/options/endcap_i.py                     | 1 +
 benchmarks/far_forward/options/zdc_reconstruction.py    | 4 +++-
 benchmarks/imaging_ecal/options/hybrid_cluster.py       | 2 ++
 benchmarks/imaging_ecal/options/imaging_2dcluster.py    | 2 +-
 benchmarks/imaging_ecal/options/imaging_topocluster.py  | 2 +-
 benchmarks/imaging_ecal/options/scfi_cluster.py         | 2 +-
 benchmarks/imaging_shower_ML/options/imaging_ml_data.py | 2 +-
 10 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/benchmarks/clustering/options/full_cal_reco.py b/benchmarks/clustering/options/full_cal_reco.py
index fcf9ed62..9dfd7a15 100644
--- a/benchmarks/clustering/options/full_cal_reco.py
+++ b/benchmarks/clustering/options/full_cal_reco.py
@@ -55,12 +55,19 @@ from Configurables import Jug__Reco__ImagingClusterReco as ImagingClusterReco
 sim_coll = [
     "MCParticles",
     "EcalEndcapNHits",
+    "EcalEndcapNHitsContributions",
     "EcalEndcapPHits",
+    "EcalEndcapPHitsContributions",
     "EcalBarrelHits",
+    "EcalBarrelHitsContributions",
     "EcalBarrelScFiHits",
+    "EcalBarrelScFiHitsContributions",
     "HcalBarrelHits",
+    "HcalBarrelHitsContributions",
     "HcalEndcapPHits",
+    "HcalEndcapPHitsContributions",
     "HcalEndcapNHits",
+    "HcalEndcapNHitsContributions",
 ]
 
 # input and output
diff --git a/benchmarks/ecal/options/barrel.py b/benchmarks/ecal/options/barrel.py
index f4bfd902..41977b81 100644
--- a/benchmarks/ecal/options/barrel.py
+++ b/benchmarks/ecal/options/barrel.py
@@ -40,6 +40,7 @@ from Configurables import Jug__Reco__ImagingClusterReco as ImagingClusterReco
 sim_coll = [
     "MCParticles",
     "EcalBarrelHits",
+    "EcalBarrelHitsContributions",
 ]
 
 # input and output
diff --git a/benchmarks/ecal/options/endcap_e.py b/benchmarks/ecal/options/endcap_e.py
index 1b89fd08..5a6b997e 100644
--- a/benchmarks/ecal/options/endcap_e.py
+++ b/benchmarks/ecal/options/endcap_e.py
@@ -33,6 +33,7 @@ from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG
 sim_coll = [
     "MCParticles",
     "EcalEndcapNHits",
+    "EcalEndcapNHitsContributions",
 ]
 
 # input and output
diff --git a/benchmarks/ecal/options/endcap_i.py b/benchmarks/ecal/options/endcap_i.py
index e8a091b7..b1baf62f 100644
--- a/benchmarks/ecal/options/endcap_i.py
+++ b/benchmarks/ecal/options/endcap_i.py
@@ -36,6 +36,7 @@ from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG
 sim_coll = [
     "MCParticles",
     "EcalEndcapPHits",
+    "EcalEndcapPHitsContributions",
 ]
 
 # input and output
diff --git a/benchmarks/far_forward/options/zdc_reconstruction.py b/benchmarks/far_forward/options/zdc_reconstruction.py
index 695d5fb3..71d9edab 100644
--- a/benchmarks/far_forward/options/zdc_reconstruction.py
+++ b/benchmarks/far_forward/options/zdc_reconstruction.py
@@ -32,7 +32,9 @@ podioevent = EICDataSvc('EventDataSvc', inputs=kwargs['input'].split(','), Outpu
 sim_colls = [
     'MCParticles',
     'ZDCEcalHits',
-    'ZDCHcalHits'
+    'ZDCEcalHitsContributions',
+    'ZDCHcalHits',
+    'ZDCHcalHitsContributions',
 ]
 
 podin = PodioInput('PodioReader', collections=sim_colls, OutputLevel=DEBUG)
diff --git a/benchmarks/imaging_ecal/options/hybrid_cluster.py b/benchmarks/imaging_ecal/options/hybrid_cluster.py
index 1d62058e..dbb19ede 100644
--- a/benchmarks/imaging_ecal/options/hybrid_cluster.py
+++ b/benchmarks/imaging_ecal/options/hybrid_cluster.py
@@ -48,7 +48,9 @@ podioevent = EICDataSvc('EventDataSvc', inputs=kwargs['input'].split(','), Outpu
 sim_colls = [
     'MCParticles',
     'EcalBarrelHits',
+    'EcalBarrelHitsContributions',
     'EcalBarrelScFiHits',
+    'EcalBarrelScFiHitsContributions',
 ]
 podin = PodioInput('PodioReader', collections=sim_colls, OutputLevel=DEBUG)
 podout = PodioOutput('podout', filename=kwargs['output'])
diff --git a/benchmarks/imaging_ecal/options/imaging_2dcluster.py b/benchmarks/imaging_ecal/options/imaging_2dcluster.py
index d7dd39bb..226241f9 100644
--- a/benchmarks/imaging_ecal/options/imaging_2dcluster.py
+++ b/benchmarks/imaging_ecal/options/imaging_2dcluster.py
@@ -36,7 +36,7 @@ print(kwargs)
 geo_service = GeoSvc('GeoSvc', detectors=kwargs['compact'].split(','), OutputLevel=INFO)
 podioevent = EICDataSvc('EventDataSvc', inputs=kwargs['input'].split(','), OutputLevel=DEBUG)
 
-podin = PodioInput('PodioReader', collections=['MCParticles', 'EcalBarrelHits'], OutputLevel=DEBUG)
+podin = PodioInput('PodioReader', collections=['MCParticles', 'EcalBarrelHits',  'EcalBarrelHitsContributions'], OutputLevel=DEBUG)
 podout = PodioOutput('out', filename=kwargs['output'])
 
 
diff --git a/benchmarks/imaging_ecal/options/imaging_topocluster.py b/benchmarks/imaging_ecal/options/imaging_topocluster.py
index 9117d9b3..bb60dcb2 100644
--- a/benchmarks/imaging_ecal/options/imaging_topocluster.py
+++ b/benchmarks/imaging_ecal/options/imaging_topocluster.py
@@ -37,7 +37,7 @@ geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(','), OutputLev
 podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG)
 out = PodioOutput("out", filename=kwargs['output'])
 
-podioinput = PodioInput("PodioReader", collections=["MCParticles", "EcalBarrelHits"], OutputLevel=DEBUG)
+podioinput = PodioInput("PodioReader", collections=["MCParticles", "EcalBarrelHits", "EcalBarrelHitsContributions"], OutputLevel=DEBUG)
 
 # use the same daq_setting for digi/reco pair
 daq_setting = dict(
diff --git a/benchmarks/imaging_ecal/options/scfi_cluster.py b/benchmarks/imaging_ecal/options/scfi_cluster.py
index f356da04..bb55aba3 100644
--- a/benchmarks/imaging_ecal/options/scfi_cluster.py
+++ b/benchmarks/imaging_ecal/options/scfi_cluster.py
@@ -38,7 +38,7 @@ sf = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0'))
 geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(','), OutputLevel=INFO)
 podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG)
 
-podin = PodioInput("PodioReader", collections=["MCParticles", "EcalBarrelScFiHits"], OutputLevel=DEBUG)
+podin = PodioInput("PodioReader", collections=["MCParticles", "EcalBarrelScFiHits", "EcalBarrelScFiHitsContributions"], OutputLevel=DEBUG)
 podout = PodioOutput("out", filename=kwargs['output'])
 
 # use the same daq_setting for digi/reco pair
diff --git a/benchmarks/imaging_shower_ML/options/imaging_ml_data.py b/benchmarks/imaging_shower_ML/options/imaging_ml_data.py
index 4b8188c9..8881fad3 100644
--- a/benchmarks/imaging_shower_ML/options/imaging_ml_data.py
+++ b/benchmarks/imaging_shower_ML/options/imaging_ml_data.py
@@ -34,7 +34,7 @@ sf = float(os.environ.get('JUGGLER_SAMP_FRAC', '1.0'))
 geo_service  = GeoSvc('GeoSvc', detectors=[f.strip() for f in kwargs['compact'].split(',')])
 podev = EICDataSvc('EventDataSvc', inputs=[f.strip() for f in kwargs['input'].split(',')])
 
-podin = PodioInput('PodioReader', collections=['MCParticles', 'EcalBarrelHits', 'EcalBarrelScFiHits'])
+podin = PodioInput('PodioReader', collections=['MCParticles', 'EcalBarrelHits', 'EcalBarrelHitsContributions', 'EcalBarrelScFiHits', 'EcalBarrelScFiHitsContributions'])
 podout = PodioOutput('out', filename=kwargs['output'])
 
 # Central Barrel Ecal (Imaging Cal.)
-- 
GitLab