HLT2 photon/electron reconstruction is misconfigured
The ClassifyPhotonElectronAlg seems to be accidentally misconfigured because of the way private tools are currently configured in PyConf (and the fact that >1 instances of the same tool type are needed for the algorithm). The fact that PyConf silently does this is a bug. (I discovered this by adding the necessary protection in PyConf for a different reason.)
The impact of this bug on physics should be evaluated.
The fix is to give explicit names to the tool instances.
diff --git a/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py b/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py
index 19246727c7..2549c79c26 100644
--- a/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py
+++ b/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py
@@ -262,23 +262,29 @@ def make_photons_and_electrons(clusters, matchtable, matchclassifier, pvs):
PrimaryVertices=pvs,
PhotonCorrection=[
CaloFutureECorrection(
+ name="ECorrectionPhoton",
ConditionName=ecalCorrectionPath("Photon", "E"),
),
CaloFutureSCorrection(
+ name="SCorrectionPhoton",
ConditionName=ecalCorrectionPath("Photon", "S"),
),
CaloFutureLCorrection(
+ name="LCorrectionPhoton",
ConditionName=ecalCorrectionPath("Photon", "L"),
),
],
ElectronCorrection=[
CaloFutureECorrection(
+ name="ECorrectionElectron",
ConditionName=ecalCorrectionPath("Electron", "E"),
),
CaloFutureSCorrection(
+ name="SCorrectionElectron",
ConditionName=ecalCorrectionPath("Electron", "S"),
),
CaloFutureLCorrection(
+ name="LCorrectionElectron",
ConditionName=ecalCorrectionPath("Electron", "L"),
),
],
Running from 2025-patches (68390c2f4bffed4411ef6f95835b5252a0820d70) without and with the fix
./run gaudirun.py -n -o 2025.opts Hlt/Moore/tests/options/default_input_and_conds_hlt2_2025_data.py Hlt/Hlt2Conf/options/hlt2_pp_2025.py
# apply fix
./run gaudirun.py -n -o 2025-fixed.opts Hlt/Moore/tests/options/default_input_and_conds_hlt2_2025_data.py Hlt/Hlt2Conf/options/hlt2_pp_2025.py
gives the following .opts difference
diff --git 2025.opts 2025-fixed.opts
index 49b93af0a5..7efafa50e5 100644
--- 2025.opts
+++ 2025-fixed.opts
@@ -271736,31 +271736,41 @@ Hlt2_Charm_XSec_LcpToPpKmPip.ParticleCombiner = "ParticleVertexFitter/ParticleVe
Hlt2_Charm_XSec_LcpToPpKmPip.ParticlePropertySvc = "LHCb::ParticlePropertySvc";
Hlt2_Charm_XSec_LcpToPpKmPip.ParticleVertexFitter.StateProvider = "TrackStateProvider/TrackStateProvider";
Hlt2_Charm_XSec_LcpToPpKmPip.PrimaryVertices = "/Event/Rec/Vertex/Primary";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.CaloFutureElectron.Extrapolator = "TrackRungeKuttaExtrapolator/TrackRungeKuttaExtrapolator";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.CaloFutureElectron.TrackRungeKuttaExtrapolator.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.ConditionName = "/world/DownstreamRegion/Ecal:ElectronECorrection";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.ElectronTool = "CaloFutureElectron/CaloFutureElectron";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureECorrection.FileAccess = "ParamFileSvc";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureLCorrection.ConditionName = "/world/DownstreamRegion/Ecal:ElectronLCorrection";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureLCorrection.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureSCorrection.ConditionName = "/world/DownstreamRegion/Ecal:ElectronSCorrection";
-Hlt2_ClassifyPhotonElectronAlg.CaloFutureSCorrection.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
Hlt2_ClassifyPhotonElectronAlg.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.CaloFutureElectron.Extrapolator = "TrackRungeKuttaExtrapolator/TrackRungeKuttaExtrapolator";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.CaloFutureElectron.TrackRungeKuttaExtrapolator.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.ConditionName = "/world/DownstreamRegion/Ecal:ElectronECorrection";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.ElectronTool = "CaloFutureElectron/CaloFutureElectron";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionElectron.FileAccess = "ParamFileSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.CaloFutureElectron.Extrapolator = "TrackRungeKuttaExtrapolator/TrackRungeKuttaExtrapolator";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.CaloFutureElectron.TrackRungeKuttaExtrapolator.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.ConditionName = "/world/DownstreamRegion/Ecal:PhotonECorrection";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.ElectronTool = "CaloFutureElectron/CaloFutureElectron";
+Hlt2_ClassifyPhotonElectronAlg.ECorrectionPhoton.FileAccess = "ParamFileSvc";
Hlt2_ClassifyPhotonElectronAlg.ElectrMaxChi2 = 50.0;
Hlt2_ClassifyPhotonElectronAlg.ElectrMinEt = 50.0;
-Hlt2_ClassifyPhotonElectronAlg.ElectronCorrection = ["CaloFutureECorrection/CaloFutureECorrection", "CaloFutureSCorrection/CaloFutureSCorrection", "CaloFutureLCorrection/CaloFutureLCorrection"];
+Hlt2_ClassifyPhotonElectronAlg.ElectronCorrection = ["CaloFutureECorrection/ECorrectionElectron", "CaloFutureSCorrection/SCorrectionElectron", "CaloFutureLCorrection/LCorrectionElectron"];
Hlt2_ClassifyPhotonElectronAlg.InputClassifier = "/Event/Hlt2_ClusterNeutralityClassifierAlg/ClassifierOutput";
Hlt2_ClassifyPhotonElectronAlg.InputClusters = "/Event/Hlt2_CaloFutureClusterCovarianceAlg/OutputData";
Hlt2_ClassifyPhotonElectronAlg.InputTable = "/Event/Hlt2_CaloMergeTrackMatchTables/Output";
+Hlt2_ClassifyPhotonElectronAlg.LCorrectionElectron.ConditionName = "/world/DownstreamRegion/Ecal:ElectronLCorrection";
+Hlt2_ClassifyPhotonElectronAlg.LCorrectionElectron.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.LCorrectionPhoton.ConditionName = "/world/DownstreamRegion/Ecal:PhotonLCorrection";
+Hlt2_ClassifyPhotonElectronAlg.LCorrectionPhoton.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
Hlt2_ClassifyPhotonElectronAlg.MinDigits = 2;
Hlt2_ClassifyPhotonElectronAlg.OutputElectrons = "/Event/Hlt2_ClassifyPhotonElectronAlg/OutputElectrons";
Hlt2_ClassifyPhotonElectronAlg.OutputPhotons = "/Event/Hlt2_ClassifyPhotonElectronAlg/OutputPhotons";
-Hlt2_ClassifyPhotonElectronAlg.PhotonCorrection = ["CaloFutureECorrection/CaloFutureECorrection", "CaloFutureSCorrection/CaloFutureSCorrection", "CaloFutureLCorrection/CaloFutureLCorrection"];
+Hlt2_ClassifyPhotonElectronAlg.PhotonCorrection = ["CaloFutureECorrection/ECorrectionPhoton", "CaloFutureSCorrection/SCorrectionPhoton", "CaloFutureLCorrection/LCorrectionPhoton"];
Hlt2_ClassifyPhotonElectronAlg.PhotonMinChi2 = 0.0;
Hlt2_ClassifyPhotonElectronAlg.PhotonMinClassifier = 0.7;
Hlt2_ClassifyPhotonElectronAlg.PhotonMinEt = 100.0;
Hlt2_ClassifyPhotonElectronAlg.PrimaryVertices = "/Event/Hlt2_TrackBeamLineVertexFinderSoA/OutputVertices";
+Hlt2_ClassifyPhotonElectronAlg.SCorrectionElectron.ConditionName = "/world/DownstreamRegion/Ecal:ElectronSCorrection";
+Hlt2_ClassifyPhotonElectronAlg.SCorrectionElectron.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
+Hlt2_ClassifyPhotonElectronAlg.SCorrectionPhoton.ConditionName = "/world/DownstreamRegion/Ecal:PhotonSCorrection";
+Hlt2_ClassifyPhotonElectronAlg.SCorrectionPhoton.DD4hepSvc = "LHCb::Det::LbDD4hep::DD4hepSvc";
Hlt2_CloneKillerMatch.MinLongLongDeltaQoP = 1e-06;
Hlt2_CloneKillerMatch.TracksInContainer = "/Event/Hlt2_PrMatchNN/MatchOutput";
Hlt2_CloneKillerMatch.TracksOutContainer = "/Event/Hlt2_CloneKillerMatch/TracksOutContainer";