diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py index d17253f93cb772b974bd24eea18f4b5337b9c741..640d8688161a5b54759d1e79059effbbe0fda763 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py @@ -54,7 +54,10 @@ athOutSeq += CfgMgr.xAODMaker__ElementLinkResetAlg( "ELReset" ) from RecExConfig.InputFilePeeker import inputFileSummary if inputFileSummary is not None: - if (inputFileSummary['evt_type'][0] == 'IS_SIMULATION') and (inputFileSummary['stream_names'][0] != 'StreamEVGEN'): + # If we have Simulation metadata in the file or if this is simulation, add it to the IOVDbSvc + # Might have Simulation metadata but not IS_SIMULATION if we're running data overlay + if ('metadata' in inputFileSummary and '/Simulation/Parameters' in inputFileSummary['metadata']) or \ + (inputFileSummary['evt_type'][0] == 'IS_SIMULATION' and inputFileSummary['stream_names'][0] != 'StreamEVGEN'): svcMgr.IOVDbSvc.Folders += ['/Simulation/Parameters'] # Set up the metadata tool: diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py index 39f06090daa8deae8d2b4b15ab2d8b42c0549fb6..c10ff58592512f8083f3ee8607e2cfcd52667810 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py @@ -5,7 +5,7 @@ import json def addLHE3Weights(seq, pref = '', var_dict = {}): from AthenaCommon.AppMgr import ToolSvc - from ReweightUtils.ReweightUtilsConf import * + from ReweightUtils.ReweightUtilsConf import SumOfWeightsAlg,McEventWeight sumOfWeightsAlg = SumOfWeightsAlg(name = pref+"LHE3SumWeightsAlg") @@ -22,7 +22,7 @@ def addLHE3Weights(seq, pref = '', var_dict = {}): seq += sumOfWeightsAlg -from DerivationFrameworkCore.DerivationFrameworkMaster import * +from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkHasTruth,DerivationFrameworkJob # skip this in datfrom AthenaCommon.GlobalFlags import globalflags if DerivationFrameworkHasTruth: diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py index 4df14dafea424b15c74c7de2f5cb5cc908a797c9..97799b9f2b224a9d953cbb1dd29d58c97f46cf08 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py @@ -4,7 +4,7 @@ def addWeights(seq, pdfMap = {'CT14nlo':20}, pref = ""): from AthenaCommon.AppMgr import ToolSvc - from ReweightUtils.ReweightUtilsConf import * + from ReweightUtils.ReweightUtilsConf import McEventWeight,SumOfWeightsAlg,PDFWeight,WeightsAgregator #Load standard generator event weight mcEventWeightNom = McEventWeight(name = pref+"mcWNom") @@ -46,7 +46,7 @@ def addWeightsHist(stream, seq, svcMgr, CfgMgr, ToolSvc, derivName, fileName, pd svcMgr.THistSvc.PrintAll = True stream.OtherAlgs += svcMgr.THistSvc - from ReweightUtils.ReweightUtilsConf import * + from ReweightUtils.ReweightUtilsConf import McEventWeight,PDFWeight,WeightsAgregator #Load standard generator event weight mcEventWeightNom = McEventWeight(name = derivName+"_mcEventWeightNom") @@ -90,7 +90,6 @@ def addWeightsHist(stream, seq, svcMgr, CfgMgr, ToolSvc, derivName, fileName, pd seq += CfgMgr.CP__PileupReweightingProvider(derivName+"_pdfProvWeight"+pdfName+"_"+str(i),Tool=provTools[i],ConfigOutputStream="METADATA/pdfWeight"+pdfName+"_"+str(i)) -from DerivationFrameworkCore.DerivationFrameworkMaster import * #addWeights(DerivationFrameworkJob, {'CT10nlo':52, 'MSTW2008nlo68cl': 40, 'NNPDF23_lo_as_0130_qed': 100, 'NNPDF30_nlo_as_0118': 100}, "") listPDF = {} #listPDF["CT14nlo"] = 56 @@ -119,7 +118,7 @@ listPDF["CT10"] = 52 #listPDF["abm12lhc_4_nnlo"] = 28 # skip this in data -from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkHasTruth +from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkHasTruth,DerivationFrameworkJob if DerivationFrameworkHasTruth: addWeights(DerivationFrameworkJob, listPDF, "")