Skip to content
Snippets Groups Projects

Create new unified Overlay transform

Merged Tadej Novak requested to merge tadej/athena:overlay/SCT_MT into master
All threads resolved!
2 files
+ 56
21
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -11,8 +11,12 @@ def getCopyCaloCalibrationHitContainer(name, collectionName="", **kwargs):
raise ConfigurationError("'collectionName' should be set! Use `CfgGetter.getAlgorithmClone`")
kwargs.setdefault("collectionName", collectionName)
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+" + collectionName)
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+" + collectionName)
if overlayFlags.isOverlayMT():
kwargs.setdefault("SignalInputKey", "StoreGateSvc+" + overlayFlags.sigPrefix() + collectionName)
kwargs.setdefault("OutputKey", "StoreGateSvc+" + collectionName)
else:
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+" + collectionName)
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+" + collectionName)
return CfgMgr.CopyCaloCalibrationHitContainer(name, **kwargs)
@@ -20,8 +24,12 @@ def getCopyCaloCalibrationHitContainer(name, collectionName="", **kwargs):
def getCopyInTimeJetTruthInfo(name="CopyInTimeJetTruthInfo", **kwargs):
from OverlayCommonAlgs.OverlayFlags import overlayFlags
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+InTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+InTimeAntiKt4TruthJets")
if overlayFlags.isOverlayMT():
kwargs.setdefault("BkgInputKey", "StoreGateSvc+" + overlayFlags.bkgPrefix() + "InTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", "StoreGateSvc+" + "InTimeAntiKt4TruthJets")
else:
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+InTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+InTimeAntiKt4TruthJets")
return CfgMgr.CopyJetTruthInfo(name, **kwargs)
@@ -29,8 +37,12 @@ def getCopyInTimeJetTruthInfo(name="CopyInTimeJetTruthInfo", **kwargs):
def getCopyOutOfTimeJetTruthInfo(name="CopyOutOfTimeJetTruthInfo", **kwargs):
from OverlayCommonAlgs.OverlayFlags import overlayFlags
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+OutOfTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+OutOfTimeAntiKt4TruthJets")
if overlayFlags.isOverlayMT():
kwargs.setdefault("BkgInputKey", "StoreGateSvc+" + overlayFlags.bkgPrefix() + "OutOfTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", "StoreGateSvc+" + "OutOfTimeAntiKt4TruthJets")
else:
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+OutOfTimeAntiKt4TruthJets")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+OutOfTimeAntiKt4TruthJets")
return CfgMgr.CopyJetTruthInfo(name, **kwargs)
@@ -40,13 +52,22 @@ def getCopyMcEventCollection(name="CopyMcEventCollection", **kwargs):
kwargs.setdefault("RemoveBkgHardScatterTruth", True)
if overlayFlags.isDataOverlay():
# Disable background for data overlay
kwargs.setdefault("BkgInputKey", "")
if overlayFlags.isOverlayMT():
if overlayFlags.isDataOverlay():
# Disable background for data overlay
kwargs.setdefault("BkgInputKey", "")
else:
kwargs.setdefault("BkgInputKey", "StoreGateSvc+" + overlayFlags.bkgPrefix() + "TruthEvent")
kwargs.setdefault("SignalInputKey", "StoreGateSvc+" + overlayFlags.sigPrefix() + "TruthEvent")
kwargs.setdefault("OutputKey", "StoreGateSvc+TruthEvent")
else:
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+TruthEvent")
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+TruthEvent")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+TruthEvent")
if overlayFlags.isDataOverlay():
# Disable background for data overlay
kwargs.setdefault("BkgInputKey", "")
else:
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+TruthEvent")
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+TruthEvent")
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+TruthEvent")
return CfgMgr.CopyMcEventCollection(name, **kwargs)
@@ -54,9 +75,14 @@ def getCopyMcEventCollection(name="CopyMcEventCollection", **kwargs):
def getCopyTimings(name="CopyTimings", **kwargs):
from OverlayCommonAlgs.OverlayFlags import overlayFlags
if overlayFlags.isDataOverlay():
# Disable background for data overlay
kwargs.setdefault("BkgInputKey", "")
if overlayFlags.isOverlayMT():
if overlayFlags.isDataOverlay():
# Disable background for data overlay
kwargs.setdefault("BkgInputKey", "")
else:
kwargs.setdefault("BkgInputKey", "StoreGateSvc+" + overlayFlags.bkgPrefix() + "EVNTtoHITS_timings")
kwargs.setdefault("SignalInputKey", "StoreGateSvc+" + overlayFlags.sigPrefix() + "EVNTtoHITS_timings")
kwargs.setdefault("OutputKey", "StoreGateSvc+EVNTtoHITS_timings")
else:
kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+EVNTtoHITS_timings")
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+EVNTtoHITS_timings")
@@ -71,8 +97,12 @@ def getCopyTrackRecordCollection(name, collectionName="", **kwargs):
if not collectionName:
raise ConfigurationError("'collectionName' should be set! Use `CfgGetter.getAlgorithmClone`")
kwargs.setdefault("collectionName", collectionName)
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+" + collectionName)
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+" + collectionName)
kwargs.setdefault("collectionName", collectionName)
if overlayFlags.isOverlayMT():
kwargs.setdefault("SignalInputKey", "StoreGateSvc+" + overlayFlags.sigPrefix() + collectionName)
kwargs.setdefault("OutputKey", "StoreGateSvc+" + collectionName)
else:
kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+" + collectionName)
kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+" + collectionName)
return CfgMgr.CopyTrackRecordCollection(name, **kwargs)
Loading