Commit f644e33f authored by scott snyder's avatar scott snyder Committed by scott snyder

DerivationFrameworkHiggs: Update GenericTruthThinning for MT thinning.

    
Convert GenericTruthThinning to use MT-compatible thinning.
Update uses of it (pass stream name rather than thinning service).
parent 2f955456
......@@ -124,7 +124,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc):
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
#thin taus
HIGG4DxTruthTool_TAU = DerivationFramework__GenericTruthThinning(name = HIGG4DxName+"TruthTool_TAU",
ThinningService = HIGG4DxThinningSvc,
StreamName = streamName,
ParticleSelectionString = truth_cond_tau,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......@@ -135,7 +135,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc):
#thin leptons and taus
HIGG4DxTruthTool_COMB = DerivationFramework__GenericTruthThinning(name = HIGG4DxName+"TruthTool_COMB",
ThinningService = HIGG4DxThinningSvc,
StreamName = streamName,
ParticleSelectionString = truth_cond_comb,
PreserveDescendants = False,
PreserveGeneratorDescendants = False,
......@@ -147,7 +147,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc):
#thin photons
"""HIGG4DxTruthTool_PHO = DerivationFramework__GenericTruthThinning(name = "HIGG4DxTruthTool_PHO",
ThinningService = HIGG4DxThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticlesKey = "TruthPhotons",
ParticleSelectionString = truth_photon_thinning)
......
......@@ -27,11 +27,8 @@ HIGG1D1Stream.AcceptAlgs(["HIGG1D1Kernel"])
## Do not use this variable at the derivation stage
#HIGG1D1Stream.AddItem("std::vector<int>#leadingV")
# Thinning service name must match the one passed to the thinning tools
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="HIGG1D1ThinningSvc", outStreams=[evtStream] )
#====================================================================
# SKIMMING TOOLS
......@@ -153,7 +150,7 @@ truth_expression = '('+truth_cond_1+' || '+truth_cond_2 +' || '+truth_cond_3 +'
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG1D1TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG1D1TruthThinningTool",
ThinningService = "HIGG1D1ThinningSvc",
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -22,11 +22,8 @@ HIGG1D2Stream = MSMgr.NewPoolRootStream( streamName, fileName )
HIGG1D2Stream.AcceptAlgs(["HIGG1D2Kernel"])
# Thinning service name must match the one passed to the thinning tools
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="HIGG1D2ThinningSvc", outStreams=[evtStream] )
#====================================================================
# SKIMMING TOOLS
......@@ -174,7 +171,7 @@ truth_expression = '('+truth_cond_1+' || '+truth_cond_2 +' || '+truth_cond_3 +'
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG1D2TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG1D2TruthThinningTool",
ThinningService = "HIGG1D2ThinningSvc",
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -107,7 +107,7 @@ if useGenericTruthThinning:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG2D1TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG2D1TruthThinningTool",
ThinningService = HIGG2D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -97,7 +97,7 @@ if useGenericTruthThinning:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG2D2TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG2D2TruthThinningTool",
ThinningService = HIGG2D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -115,7 +115,7 @@ truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_con
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG2D3TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG2D3TruthThinningTool",
ThinningService = HIGG2D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -111,7 +111,7 @@ if useGenericTruthThinning:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG2D4TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG2D4TruthThinningTool",
ThinningService = HIGG2D4ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -255,7 +255,7 @@ if useGenericTruthThinning:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG2D5TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG2D5TruthThinningTool",
ThinningService = HIGG2D5ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......
......@@ -83,7 +83,7 @@ truth_expression = truth_cond1+' || '+truth_cond2 +' || '+truth_cond3 +' || '+tr
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG3D1TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG3D1TruthThinningTool",
ThinningService = HIGG3D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = True,
PreserveAncestors = True,
......
......@@ -26,7 +26,7 @@ truth_expression = truth_cond1+' || '+truth_cond2 +' || '+truth_cond3 +' || '+tr
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG3D2TruthParticlesThinningTool = DerivationFramework__GenericTruthThinning( name = "HIGG3D2TruthParticlesThinningTool",
ThinningService = "HIGG3D2ThinningSvc",
StreamName = streamName,
ParticlesKey = "TruthParticles",
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
......@@ -53,12 +53,9 @@ streamName = derivationFlags.WriteDAOD_HIGG3D2Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG3D2Stream )
HIGG3D2Stream = MSMgr.NewPoolRootStream( streamName, fileName )
HIGG3D2Stream.AcceptAlgs(["HIGG3D2Kernel"])
# Special lines for thinning
# Thinning service name must match the one passed to the thinning tools
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="HIGG3D2ThinningSvc", outStreams=[evtStream] )
#====================================================================
# Add the containers to the output stream - slimming done here
......
......@@ -133,7 +133,7 @@ truth_expression = truth_cond1+' || '+truth_cond2 +' || '+truth_cond3 +' || '+tr
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG3D3TruthThinningTool = DerivationFramework__GenericTruthThinning(name = "HIGG3D3TruthThinningTool",
ThinningService = HIGG3D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = True,
PreserveAncestors = True,
......
......@@ -50,7 +50,7 @@ truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_con
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG5D1MCThinningTool = DerivationFramework__GenericTruthThinning(
name = "HIGG5D1MCThinningTool",
ThinningService = HIGG5D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......@@ -234,10 +234,8 @@ DerivationFrameworkJob += higg5d1Seq
# # Thinning
# from AthenaServices.Configurables import ThinningSvc, createThinningSvc
# augStream = MSMgr.GetStream( streamName )
# evtStream = augStream.GetEventStream()
# svcMgr += createThinningSvc( svcName="HIGG5D1ThinningSvc", outStreams=[evtStream] )
#====================================================================
# Add the containers to the output stream - slimming done here
......
......@@ -50,7 +50,7 @@ truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_con
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG5D2MCThinningTool = DerivationFramework__GenericTruthThinning(
name = "HIGG5D2MCThinningTool",
ThinningService = HIGG5D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......@@ -280,10 +280,8 @@ DerivationFrameworkJob += higg5d2Seq
# # Thinning
# from AthenaServices.Configurables import ThinningSvc, createThinningSvc
# augStream = MSMgr.GetStream( streamName )
# evtStream = augStream.GetEventStream()
# svcMgr += createThinningSvc( svcName="HIGG5D2ThinningSvc", outStreams=[evtStream] )
#====================================================================
# Add the containers to the output stream - slimming done here
......
......@@ -49,7 +49,7 @@ truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_con
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG5D3MCThinningTool = DerivationFramework__GenericTruthThinning(
name = "HIGG5D3MCThinningTool",
ThinningService = HIGG5D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_expression,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......@@ -350,10 +350,8 @@ DerivationFrameworkJob += higg5d3Seq
# # Thinning
# from AthenaServices.Configurables import ThinningSvc, createThinningSvc
# augStream = MSMgr.GetStream( streamName )
# evtStream = augStream.GetEventStream()
# svcMgr += createThinningSvc( svcName=HIGG5D3ThinningHelper.ThinningSvc(), outStreams=[evtStream] )
#====================================================================
# Add the containers to the output stream - slimming done here
......
......@@ -27,11 +27,8 @@ fileName = buildFileName( derivationFlags.WriteDAOD_HIGG8D1Stream )
HIGG8D1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
HIGG8D1Stream.AcceptAlgs(["HIGG8D1Kernel"])
# Thinning service name must match the one passed to the thinning tools
#from AthenaServices.Configurables import ThinningSvc, createThinningSvc
#augStream = MSMgr.GetStream( streamName )
#evtStream = augStream.GetEventStream()
#svcMgr += createThinningSvc( svcName="HIGG8D1ThinningSvc", outStreams=[evtStream] )
#====================================================================
# TAU SELECTOR TOOL
......@@ -152,7 +149,7 @@ truth_cond_comb = "("+truth_cond_lep+"||"+truth_cond_tau+"||"+truth_photon+")"
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
HIGG8D1TruthTool = DerivationFramework__GenericTruthThinning(name = "HIGG8D1TruthTool",
ThinningService = HIGG8D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_cond_tau,
PreserveDescendants = False,
PreserveGeneratorDescendants = True,
......@@ -160,7 +157,7 @@ HIGG8D1TruthTool = DerivationFramework__GenericTruthThinning(name
TauHandling = False)
HIGG8D1TruthTool2 = DerivationFramework__GenericTruthThinning(name = "HIGG8D1TruthTool2",
ThinningService = HIGG8D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
ParticleSelectionString = truth_cond_comb,
PreserveDescendants = True, # False
PreserveGeneratorDescendants = False,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment