From 669327736a960107e7c8762c9d132812faca89fd Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Fri, 7 Aug 2026 21:20:59 +0200 Subject: [PATCH 01/13] update ActsGeoSvc config --- MAIAConfig/Tracking/CKF_tracking.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MAIAConfig/Tracking/CKF_tracking.py b/MAIAConfig/Tracking/CKF_tracking.py index 91acd6f..88cbaae 100644 --- a/MAIAConfig/Tracking/CKF_tracking.py +++ b/MAIAConfig/Tracking/CKF_tracking.py @@ -1,6 +1,8 @@ from GaudiKernel.Constants import INFO, WARNING, DEBUG from Configurables import ActsGeoSvc, CKFTrackingAlg, ACTSDuplicateRemoval, FilterTracksAlg, TrackTruthAlg, RefitFinal +import os + def ActsGeoSvc_cfg(args): """Configure the ACTS GeoSvc. Set use_dd4hep_field=True to make ACTS use the real, position-dependent @@ -8,7 +10,8 @@ def ActsGeoSvc_cfg(args): """ return ActsGeoSvc( "ActsGeoSvc", - #UseDD4hepBField=args.use_dd4hep_field + UseDD4hepBField=args.use_dd4hep_field, + MaterialMapFile = os.environ.get("ACTSTRACKING_DATA") + "/k4ActsTracking/data/MAIA_v0_gen3_material_map.json", ) def CKFTracker_cfg(args): @@ -33,7 +36,7 @@ def CKFTracker_cfg(args): SeedFinding_RMax = 150, SeedFinding_MinPt = 500, SeedFinding_ImpactMax = 3, - CKF_NumMeasurementsCutOff = 1, + CKF_NumMeasurementsCutOff = 2, SeedFinding_SigmaScattering = 50, SeedFinding_CollisionRegion = 6, SeedFinding_RadLengthPerSeed = 0.1, From f2d9d3eea060441522fefbea0c5056d6c03f01d0 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 8 Aug 2026 20:52:00 +0200 Subject: [PATCH 02/13] add functions to prune collections from BIB runs --- MAIAConfig/Common/steering.py | 62 +++++++++++++++++++++++++++++++++++ MAIAConfig/reco_args.py | 21 ++++++++++++ MAIAConfig/reco_steer.py | 9 ++++- README.md | 22 +++++++++++-- 4 files changed, 111 insertions(+), 3 deletions(-) diff --git a/MAIAConfig/Common/steering.py b/MAIAConfig/Common/steering.py index 050bd8e..f0b2e21 100644 --- a/MAIAConfig/Common/steering.py +++ b/MAIAConfig/Common/steering.py @@ -24,6 +24,68 @@ def merge_alg_lists(*alg_lists): return merged +# EDM4hep collection types covering every flavour of tracker hit written by the +# MAIA chain: the simulated hits, both the plane-measurement (VXD/IT/OT) and the +# 3D digitised/merged hits, and the hit <-> simulated-hit links, which would +# otherwise be left pointing at collections that are no longer in the file. +TRACKER_HIT_TYPES = [ + "edm4hep::SimTrackerHitCollection", + "edm4hep::TrackerHitPlaneCollection", + "edm4hep::TrackerHit3DCollection", + "podio::LinkCollection", +] + +# The calorimeter counterpart: the simulated hits together with their per-hit +# contributions, the digitised/reconstructed hits (ECal, HCal and the muon +# system, which uses the same type), and the hit <-> simulated-hit links. +CALORIMETER_HIT_TYPES = [ + "edm4hep::SimCalorimeterHitCollection", + "edm4hep::CaloHitContributionCollection", + "edm4hep::CalorimeterHitCollection", + "podio::LinkCollection", +] + + +def _drop_collection_types(collection_types): + """ + Append type-based drop commands to the IOSvc keep/drop switch. + + Reading the current value back before appending keeps successive calls + (tracker + calorimeter) from overwriting each other. + """ + from k4FWCore import IOSvc + + io_svc = IOSvc("IOSvc") + commands = list(getattr(io_svc, "outputCommands", [])) or ["keep *"] + commands += ["drop type " + coll_type for coll_type in collection_types] + io_svc.outputCommands = commands + + +def drop_tracker_hits(): + """ + Exclude all TrackerHit and SimTrackerHit collections (and their relation + links) from the output file. + + Must be called after build_application, which creates the IOSvc that the + keep/drop switch belongs to. The selection is type based, so it also + catches the collections created downstream (merged hits) whose names are + not known here. + """ + _drop_collection_types(TRACKER_HIT_TYPES) + + +def drop_calorimeter_hits(): + """ + Exclude all CalorimeterHit and SimCalorimeterHit collections (plus the + calorimeter contributions and relation links) from the output file. + + Same call-after-build_application requirement as drop_tracker_hits. Note + that the Pandora clusters and PFOs are kept, but their references into the + calorimeter hits no longer resolve once the hits are gone. + """ + _drop_collection_types(CALORIMETER_HIT_TYPES) + + def build_application(args, alg_list, input_files, output_file, histo_file, evt_max=10): """ Configure the services, IO and ApplicationMgr common to every steering diff --git a/MAIAConfig/reco_args.py b/MAIAConfig/reco_args.py index 814bae4..2479b7b 100644 --- a/MAIAConfig/reco_args.py +++ b/MAIAConfig/reco_args.py @@ -49,4 +49,25 @@ def get_reco_args(): default=False, ) + # Shared with digi_args: the overlay flags are declared at digitisation, but + # the reco steering needs to know about them too so that the (very large) + # tracker and calorimeter hit collections can be dropped from the output + # when background is overlaid. add_argument_once keeps the combined + # digi_reco job working. + add_argument_once( + parser, + "--doOverlayFull", + help="Do BIB overlay", + action="store_true", + default=False, + ) + + add_argument_once( + parser, + "--doOverlayIP", + help="Do incoherent pairs overlay", + action="store_true", + default=False, + ) + return parser.parse_known_args()[0] diff --git a/MAIAConfig/reco_steer.py b/MAIAConfig/reco_steer.py index 25ba5d9..f05871a 100644 --- a/MAIAConfig/reco_steer.py +++ b/MAIAConfig/reco_steer.py @@ -8,7 +8,7 @@ from reco_args import get_reco_args from recoAlgList import makeRecoAlgList -from Common.steering import build_application +from Common.steering import build_application, drop_calorimeter_hits, drop_tracker_hits # Collect arguments and build the reconstruction algorithm list args = get_reco_args() @@ -22,6 +22,13 @@ histo_file = "reco_histograms.root", ) +# With background overlaid the hit collections dominate the output file size, +# so drop every (Sim)TrackerHit and (Sim)CalorimeterHit collection from the reco +# output. The reconstructed objects (tracks, clusters, PFOs, jets) are kept. +if args.doOverlayIP or args.doOverlayFull: + drop_tracker_hits() + drop_calorimeter_hits() + # Per-algorithm CPU monitoring via the Gaudi Auditor Service. The ChronoAuditor # records CPU usage of each algorithm's execute() and ChronoStatSvc prints the # per-algorithm total + per-event-average table ("Final CPU consumption") at end diff --git a/README.md b/README.md index f04ad5f..af0faab 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,11 @@ The full set is: | `--inputFiles` | both | per macro (see above) | Input EDM4hep file(s) to read; accepts several files. | | `--outputFile` | both | per macro (see above) | Output EDM4hep file to write. | | `--histoFile` | both | per macro | Output ROOT file for the histograms. | -| `--doOverlayFull` | digi | `False` | Overlay beam-induced background (BIB). | +| `--doOverlayFull` | digi + reco | `False` | Overlay beam-induced background (BIB). In the reco step it only acts as a flag: when set, all tracker and calorimeter hit collections are dropped from the reconstruction output (see below). | | `--OverlayFullPathToMuPlus` | digi | `/path/to/muplus/` | Directory of the μ⁺ BIB overlay files (used with `--doOverlayFull`). | | `--OverlayFullPathToMuMinus` | digi | `/path/to/muminus/` | Directory of the μ⁻ BIB overlay files (used with `--doOverlayFull`). | | `--OverlayFullNumberBackground` | digi | `812` | Number of BIB background files overlaid (used with `--doOverlayFull`). | -| `--doOverlayIP` | digi | `False` | Overlay incoherent pairs. When both overlays are enabled they are chained (BIB then IP) before digitisation. | +| `--doOverlayIP` | digi + reco | `False` | Overlay incoherent pairs. When both overlays are enabled they are chained (BIB then IP) before digitisation. In the reco step it only acts as a flag: when set, all tracker and calorimeter hit collections are dropped from the reconstruction output (see below). | | `--OverlayIPBackgroundFileNames` | digi | `[/path/to/pairs.slcio]` | Incoherent-pair overlay input file(s) (used with `--doOverlayIP`). | | `--doFilterDL` | digi | `False` | Double-layer hit filtering in the vertex detector. | | `--doTrackerConing` | digi + reco | `False` | Cone-filter the tracker hits around the signal MC particles (BIB cleaning). When enabled, the digi step writes the `…Coned` hit collections and the merger reads them before tracking. | @@ -109,6 +109,24 @@ The full set is: | `--TrackingThreads` | reco | `1` | Internal thread count of the CKF tracking and truth-matching algorithms (independent of `--numThreads`). | | `--numThreads` | both | `1` | Number of threads for the Gaudi event loop. `1` runs serially; any value `> 1` enables the multi-threaded Gaudi Hive event loop with that many threads (scheduler + event slots); `0` auto-detects a sensible count from the CPU count. | +### Hit collections in the overlay output + +Running with background (`--doOverlayFull` and/or `--doOverlayIP`) makes the hit +collections dominate the output file, so `reco_steer.py` drops all of them from +the reconstruction output when either flag is set: the tracker hits +(`drop_tracker_hits`, i.e. `SimTrackerHit`, `TrackerHitPlane`, `TrackerHit3D`) +and the calorimeter hits (`drop_calorimeter_hits`, i.e. `SimCalorimeterHit`, +`CaloHitContribution`, `CalorimeterHit`, which also covers the muon system), +together with the corresponding hit ↔ simulated-hit link collections. The +selection is done by collection *type* through the `IOSvc` keep/drop switch, so +it also covers the collections produced during reconstruction (e.g. +`MergedTrackerHits`). + +The reconstructed objects — tracks, Pandora clusters, PFOs, jets, vertices, +`MCParticles` and the track ↔ MC-particle links — are kept, but any reference +they hold into a dropped hit collection (`Track::trackerHits`, +`Cluster::hits`, …) no longer resolves in the output file. + ### BIB hit cleaning Mirroring the Marlin `steer_reco.py` workflow, once the calorimeter hits are From ffb31a1fe608a390a17b9ff3b6a943fea6050a7d Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 8 Aug 2026 20:55:55 +0200 Subject: [PATCH 03/13] add keepEverything --- MAIAConfig/reco_args.py | 9 +++++++++ MAIAConfig/reco_steer.py | 3 ++- README.md | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/MAIAConfig/reco_args.py b/MAIAConfig/reco_args.py index 2479b7b..16f5ed3 100644 --- a/MAIAConfig/reco_args.py +++ b/MAIAConfig/reco_args.py @@ -70,4 +70,13 @@ def get_reco_args(): default=False, ) + parser.add_argument( + "--keepEverything", + help="Write every collection to the reconstruction output, including " + "the tracker and calorimeter hits that are otherwise dropped when " + "an overlay is enabled", + action="store_true", + default=False, + ) + return parser.parse_known_args()[0] diff --git a/MAIAConfig/reco_steer.py b/MAIAConfig/reco_steer.py index f05871a..2903c22 100644 --- a/MAIAConfig/reco_steer.py +++ b/MAIAConfig/reco_steer.py @@ -25,7 +25,8 @@ # With background overlaid the hit collections dominate the output file size, # so drop every (Sim)TrackerHit and (Sim)CalorimeterHit collection from the reco # output. The reconstructed objects (tracks, clusters, PFOs, jets) are kept. -if args.doOverlayIP or args.doOverlayFull: +# --keepEverything switches the dropping off and writes the full event. +if (args.doOverlayIP or args.doOverlayFull) and not args.keepEverything: drop_tracker_hits() drop_calorimeter_hits() diff --git a/README.md b/README.md index af0faab..e63ac0c 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ The full set is: | `--doTrackerConing` | digi + reco | `False` | Cone-filter the tracker hits around the signal MC particles (BIB cleaning). When enabled, the digi step writes the `…Coned` hit collections and the merger reads them before tracking. | | `--RandSeed` | digi | `42` | Random seed for the digitisation smearing. | | `--doTrackPerf` | reco | `False` | Run the tracking performance monitoring. | +| `--keepEverything` | reco | `False` | Write every collection to the reconstruction output, overriding the hit dropping that `--doOverlayFull`/`--doOverlayIP` would otherwise trigger (see below). | | `--TrackingThreads` | reco | `1` | Internal thread count of the CKF tracking and truth-matching algorithms (independent of `--numThreads`). | | `--numThreads` | both | `1` | Number of threads for the Gaudi event loop. `1` runs serially; any value `> 1` enables the multi-threaded Gaudi Hive event loop with that many threads (scheduler + event slots); `0` auto-detects a sensible count from the CPU count. | @@ -127,6 +128,13 @@ The reconstructed objects — tracks, Pandora clusters, PFOs, jets, vertices, they hold into a dropped hit collection (`Track::trackerHits`, `Cluster::hits`, …) no longer resolves in the output file. +Pass `--keepEverything` to switch the dropping off and write the full event +even with an overlay enabled: + +```bash +k4run reco_steer.py --doOverlayFull --keepEverything +``` + ### BIB hit cleaning Mirroring the Marlin `steer_reco.py` workflow, once the calorimeter hits are From 3cea523e066f527cfcf0a9d07862e6a288dfcf78 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 8 Aug 2026 20:58:29 +0200 Subject: [PATCH 04/13] port logic to digireco too: --- MAIAConfig/digi_reco_steer.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MAIAConfig/digi_reco_steer.py b/MAIAConfig/digi_reco_steer.py index 40ce515..1c42b76 100644 --- a/MAIAConfig/digi_reco_steer.py +++ b/MAIAConfig/digi_reco_steer.py @@ -14,7 +14,12 @@ from reco_args import get_reco_args from digiAlgList import makeDigiAlgList from recoAlgList import makeRecoAlgList -from Common.steering import build_application, merge_alg_lists +from Common.steering import ( + build_application, + drop_calorimeter_hits, + drop_tracker_hits, + merge_alg_lists, +) # Register the digi arguments first, then the reco arguments; the returned reco # namespace is a superset that carries every option needed by both lists. The @@ -33,3 +38,10 @@ output_file = "digireco_output.edm4hep.root", histo_file = "digireco_histograms.root", ) + +# Same output slimming as reco_steer.py: with background overlaid the hit +# collections dominate the output file size, so drop every (Sim)TrackerHit and +# (Sim)CalorimeterHit collection unless --keepEverything asks for the full event. +if (args.doOverlayIP or args.doOverlayFull) and not args.keepEverything: + drop_tracker_hits() + drop_calorimeter_hits() From f4e2eb8d061a2c684e22625ba6612efad638345b Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 8 Aug 2026 21:04:43 +0200 Subject: [PATCH 05/13] remove MergeMCParticles, as it is now missing upstream --- MAIAConfig/Overlay/overlay_IP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAIAConfig/Overlay/overlay_IP.py b/MAIAConfig/Overlay/overlay_IP.py index 23f3b5c..f0d37b9 100644 --- a/MAIAConfig/Overlay/overlay_IP.py +++ b/MAIAConfig/Overlay/overlay_IP.py @@ -71,6 +71,6 @@ def overlay_ip_cfg(args): OutputSimTrackerHits = out_tracker_hits, OutputSimCalorimeterHits = out_calo_hits, OutputCaloHitContributions = out_calo_contribs, - MergeMCParticles = False, + #MergeMCParticles = False, OutputLevel = INFO ) From ab81345c3de5b7591ea61a385f8c0a1d7bb6bfe8 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 8 Aug 2026 21:06:17 +0200 Subject: [PATCH 06/13] clang formatting --- MAIAConfig/reco_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAIAConfig/reco_args.py b/MAIAConfig/reco_args.py index 16f5ed3..f83a2e1 100644 --- a/MAIAConfig/reco_args.py +++ b/MAIAConfig/reco_args.py @@ -22,7 +22,7 @@ def get_reco_args(): action="store_true", default=False ) - + parser.add_argument( "--use_dd4hep_field", help="Use DD4hep field", From a5c4c5cc9a6be8f9a1b92606f223df8b38609cb1 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sun, 9 Aug 2026 20:49:55 +0200 Subject: [PATCH 07/13] address jburzy comments --- MAIAConfig/Overlay/overlay_IP.py | 1 + MAIAConfig/Tracking/CKF_tracking.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/MAIAConfig/Overlay/overlay_IP.py b/MAIAConfig/Overlay/overlay_IP.py index f0d37b9..9648283 100644 --- a/MAIAConfig/Overlay/overlay_IP.py +++ b/MAIAConfig/Overlay/overlay_IP.py @@ -71,6 +71,7 @@ def overlay_ip_cfg(args): OutputSimTrackerHits = out_tracker_hits, OutputSimCalorimeterHits = out_calo_hits, OutputCaloHitContributions = out_calo_contribs, + # Uncomment when https://github.com/key4hep/k4FWCore/pull/413 is merged. #MergeMCParticles = False, OutputLevel = INFO ) diff --git a/MAIAConfig/Tracking/CKF_tracking.py b/MAIAConfig/Tracking/CKF_tracking.py index 88cbaae..9a00a05 100644 --- a/MAIAConfig/Tracking/CKF_tracking.py +++ b/MAIAConfig/Tracking/CKF_tracking.py @@ -36,6 +36,8 @@ def CKFTracker_cfg(args): SeedFinding_RMax = 150, SeedFinding_MinPt = 500, SeedFinding_ImpactMax = 3, + # CKF_NumMeasurementsCutOff: controls the CKF branching during track extension. + # Set to 1 to keep only the best candidate. CKF_NumMeasurementsCutOff = 2, SeedFinding_SigmaScattering = 50, SeedFinding_CollisionRegion = 6, From 03055637309ddba21c4bde827bd0e26f32e61fef Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sun, 9 Aug 2026 20:53:10 +0200 Subject: [PATCH 08/13] trim whitespace --- MAIAConfig/Tracking/CKF_tracking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAIAConfig/Tracking/CKF_tracking.py b/MAIAConfig/Tracking/CKF_tracking.py index 9a00a05..8d098b5 100644 --- a/MAIAConfig/Tracking/CKF_tracking.py +++ b/MAIAConfig/Tracking/CKF_tracking.py @@ -36,7 +36,7 @@ def CKFTracker_cfg(args): SeedFinding_RMax = 150, SeedFinding_MinPt = 500, SeedFinding_ImpactMax = 3, - # CKF_NumMeasurementsCutOff: controls the CKF branching during track extension. + # CKF_NumMeasurementsCutOff: controls the CKF branching during track extension. # Set to 1 to keep only the best candidate. CKF_NumMeasurementsCutOff = 2, SeedFinding_SigmaScattering = 50, From 97df7b41960ccb1d590d48e0f1be7fa07f66f864 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Thu, 13 Aug 2026 08:56:32 +0200 Subject: [PATCH 09/13] PR review comments --- MAIAConfig/Tracking/CKF_tracking.py | 28 ++-------------------------- MAIAConfig/reco_args.py | 18 ++++++++++-------- MAIAConfig/reco_steer.py | 17 +++++------------ 3 files changed, 17 insertions(+), 46 deletions(-) diff --git a/MAIAConfig/Tracking/CKF_tracking.py b/MAIAConfig/Tracking/CKF_tracking.py index 8d098b5..d316722 100644 --- a/MAIAConfig/Tracking/CKF_tracking.py +++ b/MAIAConfig/Tracking/CKF_tracking.py @@ -1,5 +1,5 @@ from GaudiKernel.Constants import INFO, WARNING, DEBUG -from Configurables import ActsGeoSvc, CKFTrackingAlg, ACTSDuplicateRemoval, FilterTracksAlg, TrackTruthAlg, RefitFinal +from Configurables import ActsGeoSvc, CKFTrackingAlg, ACTSDuplicateRemoval, FilterTracksAlg, TrackTruthAlg import os @@ -11,7 +11,7 @@ def ActsGeoSvc_cfg(args): return ActsGeoSvc( "ActsGeoSvc", UseDD4hepBField=args.use_dd4hep_field, - MaterialMapFile = os.environ.get("ACTSTRACKING_DATA") + "/k4ActsTracking/data/MAIA_v0_gen3_material_map.json", + MaterialMapFile = args.materialMapFile, ) def CKFTracker_cfg(args): @@ -62,7 +62,6 @@ def deduper_cfg(): OutputLevel = INFO ) - def track_filter_cfg(): """ Create a new FilterTracksAlg instance for filtering tracks. @@ -94,26 +93,3 @@ def track_truth_cfg(args): OutputParticle2TrackRelationName = ["SiTrackRelations"], OutputLevel = INFO ) - -def track_refitter_cfg(): - """ - Create a new TrackRefitter instance for refitting tracks. - """ - return RefitFinal( - "Refitter", -# DoCutsOnRedChi2Nhits = True, - EnergyLossOn = True, - InputRelationCollectionName = ["SiTrackRelations"], - InputTrackCollectionName = ["SiTracks"], - Max_Chi2_Incr = 1.79769e+30, - MinClustersOnTrackAfterFit = 3, - MultipleScatteringOn = True, -# NHitsCuts = ["1,2", "1", "3,4", "1", "5,6", "0"], - OutputRelationCollectionName = ["SiTracks_Refitted_Relation"], - OutputTrackCollectionName = ["SiTracks_Refitted"], -# ReducedChi2Cut = 10., - ReferencePoint = -1, - SmoothOn = False, - extrapolateForward = True, - OutputLevel = INFO - ) diff --git a/MAIAConfig/reco_args.py b/MAIAConfig/reco_args.py index f83a2e1..ad81574 100644 --- a/MAIAConfig/reco_args.py +++ b/MAIAConfig/reco_args.py @@ -16,6 +16,14 @@ def get_reco_args(): default=os.environ.get("k4geo_DIR", "")+"/MuColl/MAIA/compact/MAIA_v0/MAIA_v0.xml", ) + add_argument_once( + parser, + "--materialMapFile", + help="Material map file", + type=str, + default=os.environ.get("ACTSTRACKING_DATA") + "/k4ActsTracking/data/MAIA_v0_gen3_material_map.json", + ) + parser.add_argument( "--doTrackPerf", help="Run Performance Analysis on Tracking", @@ -38,9 +46,7 @@ def get_reco_args(): default=1, ) - # Shared with digi_args: the digi step produces the "...Coned" collections - # and the merger here must read them. add_argument_once allows the two - # parsers to coexist in the combined digi_reco job. + # Shared with digi_args. add_argument_once( parser, "--doTrackerConing", @@ -49,11 +55,7 @@ def get_reco_args(): default=False, ) - # Shared with digi_args: the overlay flags are declared at digitisation, but - # the reco steering needs to know about them too so that the (very large) - # tracker and calorimeter hit collections can be dropped from the output - # when background is overlaid. add_argument_once keeps the combined - # digi_reco job working. + # Shared with digi_args. add_argument_once( parser, "--doOverlayFull", diff --git a/MAIAConfig/reco_steer.py b/MAIAConfig/reco_steer.py index 2903c22..129055b 100644 --- a/MAIAConfig/reco_steer.py +++ b/MAIAConfig/reco_steer.py @@ -22,22 +22,15 @@ histo_file = "reco_histograms.root", ) -# With background overlaid the hit collections dominate the output file size, -# so drop every (Sim)TrackerHit and (Sim)CalorimeterHit collection from the reco -# output. The reconstructed objects (tracks, clusters, PFOs, jets) are kept. -# --keepEverything switches the dropping off and writes the full event. +# With BIB, drop every (Sim)TrackerHit and (Sim)CalorimeterHit collection +# from the reco output. --keepEverything writes the full event. if (args.doOverlayIP or args.doOverlayFull) and not args.keepEverything: drop_tracker_hits() drop_calorimeter_hits() -# Per-algorithm CPU monitoring via the Gaudi Auditor Service. The ChronoAuditor -# records CPU usage of each algorithm's execute() and ChronoStatSvc prints the -# per-algorithm total + per-event-average table ("Final CPU consumption") at end -# of job. Most meaningful single-threaded. -# -# The global message level is raised to INFO so the ChronoStatSvc table (emitted -# under the "*****Chrono*****" / ":Execute" message sources) is not -# suppressed by the WARNING default that build_application sets. +# Per-algorithm CPU monitoring via the Gaudi Auditor Service. Most meaningful +# single-threaded. Global message level raised to INFO not to be suppressed +# by the WARNING default. from GaudiKernel.Constants import INFO from Configurables import AuditorSvc, ChronoStatSvc app.OutputLevel = INFO From f3a3c47d59adbad2bbcfa8782518384a7f5ac0aa Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Thu, 13 Aug 2026 09:10:01 +0200 Subject: [PATCH 10/13] fix track truth gating --- MAIAConfig/digi_args.py | 3 +-- MAIAConfig/recoAlgList.py | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/MAIAConfig/digi_args.py b/MAIAConfig/digi_args.py index 6fad7d8..571acc0 100644 --- a/MAIAConfig/digi_args.py +++ b/MAIAConfig/digi_args.py @@ -62,8 +62,7 @@ def get_digi_args(): default=False, ) - # Shared with reco_args (the merger reads the coned hits when enabled), so - # added once to allow combining the two parsers in a single job. + # Shared with reco_args (the merger reads the coned hits when enabled). add_argument_once( parser, "--doTrackerConing", diff --git a/MAIAConfig/recoAlgList.py b/MAIAConfig/recoAlgList.py index a9a3f50..2d0faa0 100644 --- a/MAIAConfig/recoAlgList.py +++ b/MAIAConfig/recoAlgList.py @@ -1,4 +1,5 @@ from Gaudi.Configuration import * +from MAIAConfig.MAIAConfig.Tracking.CKF_tracking import track_truth_cfg def makeRecoAlgList(the_args): '''-------------------------------------------------------------''' @@ -15,18 +16,16 @@ def makeRecoAlgList(the_args): algList.append(mergehitsrelations_cfg(the_args)) # CKF Tracking - from Tracking.CKF_tracking import CKFTracker_cfg, deduper_cfg, track_filter_cfg, track_truth_cfg, ActsGeoSvc_cfg, track_refitter_cfg + from Tracking.CKF_tracking import CKFTracker_cfg, deduper_cfg, track_filter_cfg, ActsGeoSvc_cfg ActsGeoSvc_cfg(the_args) # service: configure it, do NOT append to the algorithm list algList.append(CKFTracker_cfg(the_args)) algList.append(deduper_cfg()) algList.append(track_filter_cfg()) - algList.append(track_truth_cfg(the_args)) - #algList.append(track_refitter_cfg()) # Track Performance Monitoring if the_args.doTrackPerf: - from Diagnostics.track_performance import trackTruth_cfg - algList.append(trackTruth_cfg()) + from Diagnostics.track_performance import track_truth_cfg + algList.append(track_truth_cfg(the_args)) # Pandora PFOs from ParticleFlow.pandora import pandoraPFA_cfg, fastJet_cfg From 704696d11485fa1f0f831f59a2f289bccc1d8387 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Thu, 13 Aug 2026 10:36:24 +0200 Subject: [PATCH 11/13] trailing whitespace --- MAIAConfig/reco_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAIAConfig/reco_args.py b/MAIAConfig/reco_args.py index 25c6851..3f85f80 100644 --- a/MAIAConfig/reco_args.py +++ b/MAIAConfig/reco_args.py @@ -80,7 +80,7 @@ def get_reco_args(): action="store_true", default=False, ) - + parser.add_argument( "--pandoraSettings", help="Pandora settings XML. A bare file name is looked up in the " From aaaaf757d5618b508d5e57bce9ea613c5c5197f9 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Thu, 13 Aug 2026 10:39:24 +0200 Subject: [PATCH 12/13] cleared double broken import --- MAIAConfig/recoAlgList.py | 1 - 1 file changed, 1 deletion(-) diff --git a/MAIAConfig/recoAlgList.py b/MAIAConfig/recoAlgList.py index ad05991..23729cf 100644 --- a/MAIAConfig/recoAlgList.py +++ b/MAIAConfig/recoAlgList.py @@ -1,5 +1,4 @@ from Gaudi.Configuration import * -from MAIAConfig.MAIAConfig.Tracking.CKF_tracking import track_truth_cfg def makeRecoAlgList(the_args): '''-------------------------------------------------------------''' From 74cb2f53c42d2a7ebe84885b9c2584be20c297f0 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Thu, 13 Aug 2026 10:44:35 +0200 Subject: [PATCH 13/13] made test more descriptive --- .github/workflows/mucoll-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mucoll-ci.yml b/.github/workflows/mucoll-ci.yml index 7c06936..291ee2a 100644 --- a/.github/workflows/mucoll-ci.yml +++ b/.github/workflows/mucoll-ci.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - build-mucoll-image: + build-and-test-mucoll-sim-main: runs-on: ubuntu-latest steps: - name: Free Disk Space (Ubuntu)