diff --git a/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py b/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py index b054c9db4be616833571831bf816a17ee05c6332..19246727c7174b60acd55057d55a4ca69d58ad4e 100644 --- a/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py +++ b/Hlt/RecoConf/python/RecoConf/calorimeter_reconstruction.py @@ -52,6 +52,14 @@ from PyConf.Tools import ( ) +def ecalCorrectionPath(hypo, corrType): + return ( + f"/world/DownstreamRegion/Ecal:{hypo}{corrType}Correction" + if UseDD4Hep + else f"Conditions/Reco/Calo/{hypo}{corrType}Correction" + ) + + def make_ecal_digits(raw, rawerror): ecalpath = ( "/world/DownstreamRegion/Ecal:DetElement-Info-IOV" @@ -152,6 +160,12 @@ def make_shower_overlap_tool( name="SplitPhotonShowerOverlap", Profile=condPath, CaloFutureCorrectionBase=make_correction_base(condPath), + CaloFutureSCorrection=CaloFutureSCorrection( + ConditionName=ecalCorrectionPath("SplitPhoton", "S"), + ), + CaloFutureLCorrection=CaloFutureLCorrection( + ConditionName=ecalCorrectionPath("SplitPhoton", "L"), + ), ) @@ -247,14 +261,26 @@ def make_photons_and_electrons(clusters, matchtable, matchclassifier, pvs): PhotonMinEt=100.0, PrimaryVertices=pvs, PhotonCorrection=[ - CaloFutureECorrection(), - CaloFutureSCorrection(), - CaloFutureLCorrection(), + CaloFutureECorrection( + ConditionName=ecalCorrectionPath("Photon", "E"), + ), + CaloFutureSCorrection( + ConditionName=ecalCorrectionPath("Photon", "S"), + ), + CaloFutureLCorrection( + ConditionName=ecalCorrectionPath("Photon", "L"), + ), ], ElectronCorrection=[ - CaloFutureECorrection(), - CaloFutureSCorrection(), - CaloFutureLCorrection(), + CaloFutureECorrection( + ConditionName=ecalCorrectionPath("Electron", "E"), + ), + CaloFutureSCorrection( + ConditionName=ecalCorrectionPath("Electron", "S"), + ), + CaloFutureLCorrection( + ConditionName=ecalCorrectionPath("Electron", "L"), + ), ], ) return { @@ -386,9 +412,15 @@ def make_track_electron_and_brem_matching( PrimaryVertices=pvs, fillResidual=fill_residual_clusters_for_brem, PhotonCorrection=[ - CaloFutureECorrection(), - CaloFutureSCorrection(), - CaloFutureLCorrection(), + CaloFutureECorrection( + ConditionName=ecalCorrectionPath("Photon", "E"), + ), + CaloFutureSCorrection( + ConditionName=ecalCorrectionPath("Photon", "S"), + ), + CaloFutureLCorrection( + ConditionName=ecalCorrectionPath("Photon", "L"), + ), ], ) matches[tt] = { @@ -504,9 +536,15 @@ def make_merged_pi0(ecalClusters, pvs, maxIterations=25, applyLSCorr=True): EtCut=1500.0, PrimaryVertices=pvs, PhotonTools=[ - CaloFutureECorrection(), - CaloFutureSCorrection(), - CaloFutureLCorrection(), + CaloFutureECorrection( + ConditionName=ecalCorrectionPath("SplitPhoton", "E"), + ), + CaloFutureSCorrection( + ConditionName=ecalCorrectionPath("SplitPhoton", "S"), + ), + CaloFutureLCorrection( + ConditionName=ecalCorrectionPath("SplitPhoton", "L"), + ), ], MaxIterations=maxIterations, ApplyLSCorr=applyLSCorr,