Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
2c54a6e
Add a --native option and code to use the algorithms in k4Reco
jmcarcell Mar 21, 2025
5d58c59
Fix args
jmcarcell Mar 21, 2025
668df4d
Fix another arg
jmcarcell Mar 21, 2025
f957c5e
Fix OutputLevel
jmcarcell Mar 22, 2025
8549f85
Fix refit
jmcarcell Mar 22, 2025
61357c8
Fix TruthTracking
jmcarcell Mar 22, 2025
098367e
Fix DDPlanarDigi
jmcarcell Mar 22, 2025
780bb66
Fix TruthTrackFinder
jmcarcell Mar 22, 2025
a9c2b6b
Remove DebugHits
jmcarcell Mar 22, 2025
0f9d8bc
Fix the name of the MCParticle in LCIO
jmcarcell Mar 22, 2025
9473d41
Fix the name of the SimTrackerHitCollection
jmcarcell Mar 22, 2025
17b587e
Fix the name of MCParticles
jmcarcell Mar 27, 2025
4141834
Update
jmcarcell Jun 5, 2026
0d5a018
Update parameters for ConformalTracking
jmcarcell Mar 28, 2025
248a2ab
Reverse changes in CLDReconstruction.py
jmcarcell Mar 28, 2025
334ce75
Add a file to be used with IOSvc
jmcarcell Mar 28, 2025
970d3ed
Add a native option to the main file that is always off
jmcarcell Jun 5, 2026
d8bcd69
Update
jmcarcell Mar 28, 2025
e2c29b2
Update
jmcarcell Mar 28, 2025
5a4664b
Update
jmcarcell Mar 28, 2025
9221814
Fix extra comma
jmcarcell Mar 28, 2025
a5a9183
Fix pre-commit
jmcarcell Mar 28, 2025
eb64284
Add a function to convert to the format accepted by processors
jmcarcell Apr 14, 2025
784311f
Add DDCaloDigi to the native reconstruction chain
jmcarcell Apr 14, 2025
a88dd0a
Fix list
jmcarcell Apr 14, 2025
cb24223
Add missing import
jmcarcell Apr 14, 2025
940b1c9
Transform to the Marlin format
jmcarcell Apr 14, 2025
92134f7
Use lists for Marlin
jmcarcell Apr 14, 2025
ff37332
Also convert strings
jmcarcell Apr 14, 2025
4da991a
Add MuonDigi
jmcarcell Jul 23, 2025
f650a1e
Give a name to the muon digi algorithm
jmcarcell Jul 23, 2025
524b25f
Add LumiCal
jmcarcell Jul 23, 2025
9bb16c8
Simplify lists
jmcarcell Jul 23, 2025
fb464f2
Add a collection merger to have a single link collection as output
jmcarcell Jul 23, 2025
32a2e03
Add Pandora
jmcarcell Jun 5, 2026
cb0fbca
Add a script and a test to compare collections
jmcarcell Jul 23, 2025
9d5c347
Fix tests
jmcarcell Jul 23, 2025
19ba706
Fix tests
jmcarcell Jul 24, 2025
e190684
Fix the MuonDigi
jmcarcell Jul 24, 2025
3c23a7c
Fix property name
jmcarcell Jul 24, 2025
0e9d488
Give different names to the muon digi
jmcarcell Jul 24, 2025
7779bdb
Reorganize CaloDigi
jmcarcell Jul 24, 2025
af144bb
Use the actual wrapped file
jmcarcell Jul 24, 2025
c6ea5e9
Make sure to set if it's ECAL or HCAL for the CaloDigi
jmcarcell Jul 24, 2025
adfc212
Fix tests
jmcarcell Jul 24, 2025
29881c8
Fix test command
jmcarcell Jul 24, 2025
63cd630
Make sure to turn True/False variables back to int
jmcarcell Jul 24, 2025
f606dc1
Fix test dependency
jmcarcell Jul 24, 2025
90a54cb
Possibly fix the muon digitizer
jmcarcell Jul 24, 2025
4a3eed0
Reorder imports to be able to run without the wrapper
jmcarcell Jul 24, 2025
c1db7d8
Simplify the configuration of ConformalTracking
jmcarcell Jul 25, 2025
82a43c5
Comment out the cellIDSvc
jmcarcell Jul 28, 2025
e2e3094
Reverse changes after moving to IOSvc in CLDReconstruction.py
jmcarcell Jun 5, 2026
54dcaa3
Use strings instead of lists for some input and output collections
jmcarcell Oct 21, 2025
50428c3
Do not provide an additional top-level steering file
jmcarcell Oct 21, 2025
e056900
Disable a few of the Marlin-specific things when running with native
jmcarcell Oct 21, 2025
b0a6b7b
Fix test
jmcarcell Oct 21, 2025
36af8dd
Disable a few more things with native
jmcarcell Oct 21, 2025
41d7a7d
Make sure to use an input
jmcarcell Oct 21, 2025
4d41a61
Do not remove parameters that now exist
jmcarcell Oct 23, 2025
3a5a32e
Fix collection types for Marlin in ConformalTracking.py
jmcarcell Nov 25, 2025
5f86829
Use toMarlinDict
jmcarcell Nov 25, 2025
14b42dd
Make the collection names strings again
jmcarcell Nov 25, 2025
e7d8b5f
Change from string to list
jmcarcell Nov 25, 2025
b4d20fd
Make sure to write an output file
jmcarcell Nov 25, 2025
b1ee4ed
Remove Overlay and others to compare the native version
jmcarcell Nov 25, 2025
3b6b6d4
Add a test running without Overlay
jmcarcell Nov 25, 2025
5052c59
Fix dep
jmcarcell Nov 25, 2025
fd43528
Fix import
jmcarcell Jun 5, 2026
ed544e4
Fix pre-commit
jmcarcell Jun 5, 2026
855539c
Fix typos and useless f-string constructions, don't shadow dict
jmcarcell Jun 5, 2026
def030d
Make OutputCollection in CaloDigi take a str and not a list
jmcarcell Jun 5, 2026
9118af2
Make toMarlinDict more readable
jmcarcell Jun 5, 2026
7c543fc
Use str instead of list for OutputCollection
jmcarcell Jun 5, 2026
f16aa91
Use str instead of list for OutputCollection
jmcarcell Jun 5, 2026
318a352
Do not use a reference to MyDDCaloDigiParameters, it's not a copy
jmcarcell Jun 5, 2026
1a666af
Fix pre-commit
jmcarcell Jun 5, 2026
1f04f1f
Make DEPENDS correct
jmcarcell Jun 5, 2026
e77847e
Use isinstance once with float and int
jmcarcell Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 43 additions & 31 deletions CLDConfig/CLDReconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
sys.path.append(base_dir)
from py_utils import SequenceLoader, parse_collection_patch_file
from k4MarlinWrapper.io_helpers import IOHandlerHelper
from Configurables import GeoSvc, TrackingCellIDEncodingSvc

parser_group = parser.add_argument_group("CLDReconstruction.py custom options")
# Need the dummy input such that the IOHandlerHelper.add_reader call below does not crash when called with --help
Expand All @@ -36,6 +37,7 @@
parser_group.add_argument("--enableLCFIJet", action="store_true", help="Enable LCFIPlus jet clustering parts", default=False)
parser_group.add_argument("--cms", action="store", help="Choose a Centre-of-Mass energy", default=240, choices=(91, 160, 240, 365), type=int)
parser_group.add_argument("--compactFile", help="Compact detector file to use", type=str, default=os.environ["K4GEO"] + "/FCCee/CLD/compact/CLD_o2_v07/CLD_o2_v07.xml")
parser_group.add_argument("--native", action="store_true", help="Use the native EDM4hep tracking", default=False)
tracking_group = parser_group.add_mutually_exclusive_group()
tracking_group.add_argument("--conformalTracking", action="store_true", default=True, help="Use conformal tracking pattern recognition")
tracking_group.add_argument("--truthTracking", action="store_true", default=False, help="Cheat tracking pattern recognition")
Expand All @@ -44,6 +46,9 @@

evtsvc = EventDataSvc("EventDataSvc")
iosvc = IOSvc()
if reco_args.native:
iosvc.Input = reco_args.inputFiles
iosvc.Output = f"{reco_args.outputBasename}_REC.edm4hep.root"

svcList = [evtsvc, iosvc]
algList = []
Expand All @@ -67,11 +72,12 @@
geoservice.EnableGeant4Geo = False
svcList.append(geoservice)

cellIDSvc = TrackingCellIDEncodingSvc("CellIDSvc")
cellIDSvc.EncodingStringParameterName = "GlobalTrackerReadoutID"
cellIDSvc.GeoSvcName = geoservice.name()
cellIDSvc.OutputLevel = INFO
svcList.append(cellIDSvc)
if not reco_args.native:
cellIDSvc = TrackingCellIDEncodingSvc("CellIDSvc")
cellIDSvc.EncodingStringParameterName = "GlobalTrackerReadoutID"
cellIDSvc.GeoSvcName = geoservice.name()
cellIDSvc.OutputLevel = INFO
svcList.append(cellIDSvc)

if len(geoservice.detectors) > 1:
# we are making assumptions for reconstruction parameters based on the detector option, so we limit the possibilities
Expand All @@ -94,28 +100,29 @@
base_dir=base_dir,
)

io_handler = IOHandlerHelper(algList, iosvc)
io_handler.add_reader(reco_args.inputFiles)

MyAIDAProcessor = MarlinProcessorWrapper("MyAIDAProcessor")
MyAIDAProcessor.OutputLevel = WARNING
MyAIDAProcessor.ProcessorType = "AIDAProcessor"
MyAIDAProcessor.Parameters = {
"Compress": ["1"],
"FileName": [f"{reco_args.outputBasename}_aida"],
"FileType": ["root"]
if not reco_args.native:
io_handler = IOHandlerHelper(algList, iosvc)
io_handler.add_reader(reco_args.inputFiles)

MyAIDAProcessor = MarlinProcessorWrapper("MyAIDAProcessor")
MyAIDAProcessor.OutputLevel = WARNING
MyAIDAProcessor.ProcessorType = "AIDAProcessor"
MyAIDAProcessor.Parameters = {
"Compress": ["1"],
"FileName": [f"{reco_args.outputBasename}_aida"],
"FileType": ["root"]
}

EventNumber = MarlinProcessorWrapper("EventNumber")
EventNumber.OutputLevel = WARNING
EventNumber.ProcessorType = "Statusmonitor"
EventNumber.Parameters = {
"HowOften": ["1"]
}

EventNumber = MarlinProcessorWrapper("EventNumber")
EventNumber.OutputLevel = WARNING
EventNumber.ProcessorType = "Statusmonitor"
EventNumber.Parameters = {
"HowOften": ["1"]
}

# setup AIDA histogramming and add eventual background overlay
algList.append(MyAIDAProcessor)
sequenceLoader.load("Overlay/Overlay")
# setup AIDA histogramming and add eventual background overlay
algList.append(MyAIDAProcessor)
sequenceLoader.load("Overlay/Overlay")
# tracker hit digitisation
sequenceLoader.load("Tracking/TrackingDigi")

Expand All @@ -134,22 +141,26 @@
sequenceLoader.load("ParticleFlow/Pandora")
sequenceLoader.load("CaloDigi/LumiCal")
# monitoring and Reco to MCTruth linking
sequenceLoader.load("HighLevelReco/RecoMCTruthLink")
sequenceLoader.load("Diagnostics/Tracking")
if not reco_args.native:
sequenceLoader.load("HighLevelReco/RecoMCTruthLink")
sequenceLoader.load("Diagnostics/Tracking")
# pfo selector (might need re-optimisation)
if not reco_args.trackingOnly:
if not reco_args.trackingOnly and not reco_args.native:
sequenceLoader.load("HighLevelReco/PFOSelector")
sequenceLoader.load("HighLevelReco/JetClusteringOrRenaming")
sequenceLoader.load("HighLevelReco/JetAndVertex")
# event number processor, down here to attach the conversion back to edm4hep to it
algList.append(EventNumber)
if not reco_args.native:
algList.append(EventNumber)

DST_KEEPLIST = ["MCParticlesSkimmed", "MCPhysicsParticles", "RecoMCTruthLink", "SiTracks", "SiTracks_Refitted", "PandoraClusters", "PandoraPFOs", "SelectedPandoraPFOs", "LooseSelectedPandoraPFOs", "TightSelectedPandoraPFOs", "RefinedVertexJets", "RefinedVertexJets_rel", "RefinedVertexJets_vtx", "RefinedVertexJets_vtx_RP", "BuildUpVertices", "BuildUpVertices_res", "BuildUpVertices_RP", "BuildUpVertices_res_RP", "BuildUpVertices_V0", "BuildUpVertices_V0_res", "BuildUpVertices_V0_RP", "BuildUpVertices_V0_res_RP", "PrimaryVertices", "PrimaryVertices_res", "PrimaryVertices_RP", "PrimaryVertices_res_RP", "RefinedVertices", "RefinedVertices_RP"]

DST_SUBSETLIST = ["EfficientMCParticles", "InefficientMCParticles", "MCPhysicsParticles"]

# TODO: replace all the ugly strings by something sensible like Enum
if CONFIG["OutputMode"] == "LCIO":
if reco_args.native:
raise RuntimeError("LCIO output is not supported with --native")
Output_REC = io_handler.add_lcio_writer("Output_REC")
Output_REC.Parameters = {
"LCIOOutputFile": [f"{reco_args.outputBasename}_REC.slcio"],
Expand All @@ -167,7 +178,7 @@
"KeepCollectionNames": DST_KEEPLIST,
}

if CONFIG["OutputMode"] == "EDM4Hep":
if CONFIG["OutputMode"] == "EDM4Hep" and not reco_args.native:
# Make sure that all collections are always available by patching in missing ones on-the-fly
collPatcherRec = MarlinProcessorWrapper(
"CollPatcherREC", OutputLevel=INFO, ProcessorType="PatchCollections"
Expand All @@ -183,7 +194,8 @@


# We need to attach all the necessary converters
io_handler.finalize_converters()
if not reco_args.native:
io_handler.finalize_converters()

ApplicationMgr( TopAlg = algList,
EvtSel = 'NONE',
Expand Down
237 changes: 138 additions & 99 deletions CLDConfig/CaloDigi/CaloDigi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,117 +17,156 @@
# limitations under the License.
#
from Gaudi.Configuration import WARNING
from Configurables import MarlinProcessorWrapper
from Configurables import DDCaloDigi
from Configurables import CollectionMerger
from py_utils import toMarlinDict

import sys

ECALCollections = ["ECalBarrelCollection", "ECalEndcapCollection"]
ECALOutputCollections = ["ECALBarrel", "ECALEndcap"]
HCALCollections = ["HCalBarrelCollection", "HCalEndcapCollection", "HCalRingCollection"]
HCALOutputCollections = ["HCALBarrel", "HCALEndcap", "HCALOther"]
ECALorHCAL = [True, True, False, False, False]

MyDDCaloDigiParameters = {
"Histograms": ["0"],
"RootFile": ["Digi_SiW.root"],
"RelationOutputCollection": ["RelationCaloHit"],
"energyPerEHpair": ["3.6"],
# ECAL
"ECALCollections": ["ECalBarrelCollection", "ECalEndcapCollection"],
"ECALOutputCollection0": ["ECALBarrel"],
"ECALOutputCollection1": ["ECALEndcap"],
"ECALOutputCollection2": [""],
"IfDigitalEcal": ["0"],
"ECALLayers": ["41", "100"],
"ECAL_default_layerConfig": ["000000000000000"],
"StripEcal_default_nVirtualCells": ["9"],
"CalibECALMIP": ["0.0001"],
"ECALThreshold": ["5e-05"],
"ECALThresholdUnit": ["GeV"],
"ECALGapCorrection": ["1"],
"ECALGapCorrectionFactor": ["1"],
"ECALModuleGapCorrectionFactor": ["0.0"],
"MapsEcalCorrection": ["0"],
"ECAL_PPD_N_Pixels": ["10000"],
"ECAL_PPD_N_Pixels_uncertainty": ["0.05"],
"ECAL_PPD_PE_per_MIP": ["7"],
"ECAL_apply_realistic_digi": ["0"],
"ECAL_deadCellRate": ["0"],
"ECAL_deadCell_memorise": ["false"],
"ECAL_elec_noise_mips": ["0"],
"ECAL_maxDynamicRange_MIP": ["2500"],
"ECAL_miscalibration_correl": ["0"],
"ECAL_miscalibration_uncorrel": ["0"],
"ECAL_miscalibration_uncorrel_memorise": ["false"],
"ECAL_pixel_spread": ["0.05"],
"ECAL_strip_absorbtionLength": ["1e+06"],
"UseEcalTiming": ["1"],
"ECALCorrectTimesForPropagation": ["1"],
"ECALTimeWindowMin": ["-1"],
"ECALSimpleTimingCut": ["true"],
"ECALDeltaTimeHitResolution": ["10"],
"ECALTimeResolution": ["10"],
# HCAL
"HCALCollections": ["HCalBarrelCollection", "HCalEndcapCollection", "HCalRingCollection"],
"HCALOutputCollection0": ["HCALBarrel"],
"HCALOutputCollection1": ["HCALEndcap"],
"HCALOutputCollection2": ["HCALOther"],
"IfDigitalHcal": ["0"],
"HCALLayers": ["100"],
"CalibHCALMIP": ["0.0001"],
"HCALThreshold": ["0.00025"],
"HCALThresholdUnit": ["GeV"],
"HCALEndcapCorrectionFactor": ["1.000"],
"HCALGapCorrection": ["1"],
"HCALModuleGapCorrectionFactor": ["0.5"],
"HCAL_PPD_N_Pixels": ["400"],
"HCAL_PPD_N_Pixels_uncertainty": ["0.05"],
"HCAL_PPD_PE_per_MIP": ["10"],
"HCAL_apply_realistic_digi": ["0"],
"HCAL_deadCellRate": ["0"],
"HCAL_deadCell_memorise": ["false"],
"HCAL_elec_noise_mips": ["0"],
"HCAL_maxDynamicRange_MIP": ["200"],
"HCAL_miscalibration_correl": ["0"],
"HCAL_miscalibration_uncorrel": ["0"],
"HCAL_miscalibration_uncorrel_memorise": ["false"],
"HCAL_pixel_spread": ["0"],
"UseHcalTiming": ["1"],
"HCALCorrectTimesForPropagation": ["1"],
"HCALTimeWindowMin": ["-1"],
"HCALSimpleTimingCut": ["true"],
"HCALDeltaTimeHitResolution": ["10"],
"HCALTimeResolution": ["10"],
"Histograms": 0,
"RootFile": "Digi_SiW.root",
"energyPerEHpair": 3.6,
# ECAL
"IfDigitalEcal": 0,
"ECALLayers": [41, 100],
"ECAL_default_layerConfig": "000000000000000",
"StripEcal_default_nVirtualCells": 9,
"CalibECALMIP": 0.0001,
"ECALThreshold": 5e-05,
"ECALThresholdUnit": "GeV",
"ECALGapCorrection": 1,
"ECALGapCorrectionFactor": 1,
"ECALModuleGapCorrectionFactor": 0.0,
"MapsEcalCorrection": 0,
"ECAL_PPD_N_Pixels": 10000,
"ECAL_PPD_N_Pixels_uncertainty": 0.05,
"ECAL_PPD_PE_per_MIP": 7,
"ECAL_apply_realistic_digi": 0,
"ECAL_deadCellRate": 0,
"ECAL_deadCell_memorise": False,
"ECAL_elec_noise_mips": 0,
"ECAL_maxDynamicRange_MIP": 2500,
"ECAL_miscalibration_correl": 0,
"ECAL_miscalibration_uncorrel": 0,
"ECAL_miscalibration_uncorrel_memorise": False,
"ECAL_pixel_spread": 0.05,
"ECAL_strip_absorbtionLength": 1e+06,
"UseEcalTiming": 1,
"ECALCorrectTimesForPropagation": 1,
"ECALTimeWindowMin": -1,
"ECALSimpleTimingCut": True,
"ECALDeltaTimeHitResolution": 10,
"ECALTimeResolution": 10,
# HCAL
"IfDigitalHcal": 0,
"HCALLayers": [100],
"CalibHCALMIP": 0.0001,
"HCALThreshold": [0.00025],
"HCALThresholdUnit": "GeV",
"HCALEndcapCorrectionFactor": 1.000,
"HCALGapCorrection": 1,
"HCALModuleGapCorrectionFactor": 0.5,
"HCAL_PPD_N_Pixels": 400,
"HCAL_PPD_N_Pixels_uncertainty": 0.05,
"HCAL_PPD_PE_per_MIP": 10,
"HCAL_apply_realistic_digi": 0,
"HCAL_deadCellRate": 0,
"HCAL_deadCell_memorise": False,
"HCAL_elec_noise_mips": 0,
"HCAL_maxDynamicRange_MIP": 200,
"HCAL_miscalibration_correl": 0,
"HCAL_miscalibration_uncorrel": 0,
"HCAL_miscalibration_uncorrel_memorise": False,
"HCAL_pixel_spread": 0,
"UseHcalTiming": 1,
"HCALCorrectTimesForPropagation": 1,
"HCALTimeWindowMin": -1,
"HCALSimpleTimingCut": True,
"HCALDeltaTimeHitResolution": 10,
"HCALTimeResolution": 10,
}

parameters_10ns = {
"CalibrECAL": [37.5227197175, 37.5227197175],
"ECALEndcapCorrectionFactor": 1.03245503522,
"ECALBarrelTimeWindowMax": 10,
"ECALEndcapTimeWindowMax": 10,
"CalibrHCALBarrel": [45.9956826061],
"CalibrHCALEndcap": [46.9252540291],
"CalibrHCALOther": [57.4588011802],
"HCALBarrelTimeWindowMax": 10,
"HCALEndcapTimeWindowMax": 10,
}

MyDDCaloDigi = MarlinProcessorWrapper(f"MyDDCaloDigi_{CONFIG['CalorimeterIntegrationTimeWindow']}")
MyDDCaloDigi.OutputLevel = WARNING
MyDDCaloDigi.ProcessorType = "DDCaloDigi"
MyDDCaloDigi.Parameters = MyDDCaloDigiParameters.copy()
parameters_400ns = {
"CalibrECAL": [37.4591745147, 37.4591745147],
"ECALEndcapCorrectionFactor": 1.01463983425,
"ECALBarrelTimeWindowMax": 400,
"ECALEndcapTimeWindowMax": 400,
"CalibrHCALBarrel": [42.544403752],
"CalibrHCALEndcap": [42.9667604345],
"CalibrHCALOther": [51.3503963688],
"HCALBarrelTimeWindowMax": 400,
"HCALEndcapTimeWindowMax": 400,
}

if CONFIG["CalorimeterIntegrationTimeWindow"] == "10ns":
MyDDCaloDigi.Parameters |= {
"CalibrECAL": ["37.5227197175", "37.5227197175"],
"ECALEndcapCorrectionFactor": ["1.03245503522"],
"ECALBarrelTimeWindowMax": ["10"],
"ECALEndcapTimeWindowMax": ["10"],
"CalibrHCALBarrel": ["45.9956826061"],
"CalibrHCALEndcap": ["46.9252540291"],
"CalibrHCALOther": ["57.4588011802"],
"HCALBarrelTimeWindowMax": ["10"],
"HCALEndcapTimeWindowMax": ["10"],
}

MyDDCaloDigiParameters |= parameters_10ns
elif CONFIG["CalorimeterIntegrationTimeWindow"] == "400ns":
MyDDCaloDigi.Parameters |= {
"CalibrECAL": ["37.4591745147", "37.4591745147"],
"ECALEndcapCorrectionFactor": ["1.01463983425"],
"ECALBarrelTimeWindowMax": ["400"],
"ECALEndcapTimeWindowMax": ["400"],
"CalibrHCALBarrel": ["42.544403752"],
"CalibrHCALEndcap": ["42.9667604345"],
"CalibrHCALOther": ["51.3503963688"],
"HCALBarrelTimeWindowMax": ["400"],
"HCALEndcapTimeWindowMax": ["400"],
}
MyDDCaloDigiParameters |= parameters_400ns
else:
print(f"The value {CONFIG['CalorimeterIntegrationTimeWindow']} "
"for the calorimeter integration time window is not a valid choice")
sys.exit(1)

CaloDigiSequence = [MyDDCaloDigi]

if reco_args.native:
# Not implemented in the algorithm
for key in ["Histograms", "RootFile"]:
MyDDCaloDigiParameters.pop(key)

MyDDCaloDigi = []
collections = ECALCollections + HCALCollections
out_collections = ECALOutputCollections + HCALOutputCollections
for i, (incol, outcol) in enumerate(zip(collections, out_collections)):
MyDDCaloDigi.append(
DDCaloDigi(
f"{incol}Digitiser",
**MyDDCaloDigiParameters,
InputCaloHitCollection=[incol],
OutputCaloHitCollection=[outcol],
InputColIsECAL=ECALorHCAL[i],
RelationOutputCollection=[f"GaudiRelationCaloHit{outcol}"],
OutputLevel=WARNING,
)
)
merger = CollectionMerger(
"CollectionMerger",
InputCollections=[f"GaudiRelationCaloHit{outcol}" for outcol in out_collections],
OutputCollection="RelationCaloHit",
)
MyDDCaloDigi.append(merger)
else:
from Configurables import MarlinProcessorWrapper
MyDDCaloDigiParameters["RelationOutputCollection"] = ["RelationCaloHit"]
MyDDCaloDigiParameters["ECALCollections"] = ECALCollections
for i in range(len(ECALCollections)):
MyDDCaloDigiParameters[f"ECALOutputCollection{i}"] = [ECALOutputCollections[i]]
MyDDCaloDigiParameters["HCALCollections"] = HCALCollections
for i in range(len(HCALCollections)):
MyDDCaloDigiParameters[f"HCALOutputCollection{i}"] = [HCALOutputCollections[i]]

MyDDCaloDigi = [MarlinProcessorWrapper(f"MyDDCaloDigi_{CONFIG['CalorimeterIntegrationTimeWindow']}")]
MyDDCaloDigi[0].OutputLevel = WARNING
MyDDCaloDigi[0].ProcessorType = "DDCaloDigi"
MyDDCaloDigi[0].Parameters = toMarlinDict(MyDDCaloDigiParameters)


CaloDigiSequence = MyDDCaloDigi
Loading
Loading