Commit 2f955456 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

DerivationFrameworkJetEtMiss: Update GenericTruthThinning for MT thinning.

    
Convert GenericTruthThinning to use MT-compatible thinning.
Update uses of it (pass stream name rather than thinning service).
parent 8d40d7d2
...@@ -76,7 +76,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -76,7 +76,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM1TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM1TruthThinningTool", JETM1TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM1TruthThinningTool",
ThinningService = "JETM1ThinningSvc", StreamName = streamName,
ParticlesKey = "TruthParticles", ParticlesKey = "TruthParticles",
VerticesKey = "TruthVertices", VerticesKey = "TruthVertices",
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
......
...@@ -113,7 +113,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -113,7 +113,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM2TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM2TruthThinningTool", JETM2TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM2TruthThinningTool",
ThinningService = JETM2ThinningHelper.ThinningSvc(), StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -124,7 +124,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -124,7 +124,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM3TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM3TruthThinningTool", JETM3TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM3TruthThinningTool",
ThinningService = JETM3ThinningHelper.ThinningSvc(), StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -111,7 +111,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -111,7 +111,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM4TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM4TruthThinningTool", JETM4TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM4TruthThinningTool",
ThinningService = JETM4ThinningHelper.ThinningSvc(), StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -20,11 +20,8 @@ streamName = derivationFlags.WriteDAOD_JETM5Stream.StreamName ...@@ -20,11 +20,8 @@ streamName = derivationFlags.WriteDAOD_JETM5Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_JETM5Stream ) fileName = buildFileName( derivationFlags.WriteDAOD_JETM5Stream )
JETM5Stream = MSMgr.NewPoolRootStream( streamName, fileName ) JETM5Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM5Stream.AcceptAlgs(["JETM5Kernel"]) JETM5Stream.AcceptAlgs(["JETM5Kernel"])
# for thinning
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName ) augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream() evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="JETM5ThinningSvc", outStreams=[evtStream] )
#==================================================================== #====================================================================
# SKIMMING TOOL # SKIMMING TOOL
...@@ -90,7 +87,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -90,7 +87,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM5TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM5TruthThinningTool", JETM5TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM5TruthThinningTool",
ThinningService = "JETM5ThinningSvc", StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -23,11 +23,8 @@ streamName = derivationFlags.WriteDAOD_JETM6Stream.StreamName ...@@ -23,11 +23,8 @@ streamName = derivationFlags.WriteDAOD_JETM6Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_JETM6Stream ) fileName = buildFileName( derivationFlags.WriteDAOD_JETM6Stream )
JETM6Stream = MSMgr.NewPoolRootStream( streamName, fileName ) JETM6Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM6Stream.AcceptAlgs(["JETM6MainKernel"]) JETM6Stream.AcceptAlgs(["JETM6MainKernel"])
# for thinning
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName ) augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream() evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="JETM6ThinningSvc", outStreams=[evtStream] )
#==================================================================== #====================================================================
# SKIMMING TOOL # SKIMMING TOOL
...@@ -154,7 +151,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -154,7 +151,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM6TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM6TruthThinningTool", JETM6TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM6TruthThinningTool",
ThinningService = "JETM6ThinningSvc", StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
#PreserveDescendants = preserveAllDescendants, #PreserveDescendants = preserveAllDescendants,
PreserveDescendants = False, PreserveDescendants = False,
......
...@@ -127,7 +127,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -127,7 +127,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM7TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM7TruthThinningTool", JETM7TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM7TruthThinningTool",
ThinningService = JETM7ThinningHelper.ThinningSvc(), StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -90,7 +90,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ...@@ -90,7 +90,7 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
JETM8TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM8TruthThinningTool", JETM8TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM8TruthThinningTool",
ThinningService = "JETM8ThinningSvc", StreamName = streamName,
ParticleSelectionString = truth_expression, ParticleSelectionString = truth_expression,
PreserveDescendants = preserveAllDescendants, PreserveDescendants = preserveAllDescendants,
PreserveGeneratorDescendants = not preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants,
......
...@@ -57,7 +57,7 @@ if DerivationFrameworkIsMonteCarlo: ...@@ -57,7 +57,7 @@ if DerivationFrameworkIsMonteCarlo:
WriteFirstN = 10) WriteFirstN = 10)
# from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning # from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
# JETM9TruthParticleThinning = DerivationFramework__GenericTruthThinning(name = "JETM9TruthThinning", # JETM9TruthParticleThinning = DerivationFramework__GenericTruthThinning(name = "JETM9TruthThinning",
# ThinningService = "JETM9TruthThinningSvc", # StreamName = streamName,
# ParticlesKey = "TruthParticles", # ParticlesKey = "TruthParticles",
# ParticleSelectionString = "") # ParticleSelectionString = "")
ToolSvc += JETM9TruthThinning ToolSvc += JETM9TruthThinning
......
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