Commit b19c26d8 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

DerivationFrameworkHiggs: Update more thinning tools to use MT thinning.

Update DiTauTrackParticleThinning, EgammaTrackParticleThinning,
MuonTrackParticleThinning, and TauTrackParticleThinning to use MT thinning.

Update uses of them for MT thinning (mostly passing them the stream name
rather than thinning service).
parent b85f5854
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#################################################
# Common code used for the HIGG4 thinning #
......@@ -23,7 +23,7 @@ def TriggerChains(HIGG4DxName):
else :
assert False, "HIGG4DxThinning: Unknown derivation stream '{}'".format(HIGG4DxName)
def setup(HIGG4DxName, HIGG4DxThinningSvc, ToolSvc):
def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc):
thinningTools=[]
#jets and tracks
......@@ -75,7 +75,7 @@ def setup(HIGG4DxName, HIGG4DxThinningSvc, ToolSvc):
HIGG4DxMuonSelectionString = "Muons.pt > 1*GeV"
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG4DxMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = HIGG4DxName+"MuonTPThinningTool",
ThinningService = HIGG4DxThinningSvc,
StreamName = streamName,
MuonKey = "Muons",
SelectionString = HIGG4DxMuonSelectionString,
InDetTrackParticlesKey = "InDetTrackParticles")
......@@ -88,7 +88,7 @@ def setup(HIGG4DxName, HIGG4DxThinningSvc, ToolSvc):
HIGG4DxElectronSelectionString = "Electrons.pt > 1*GeV"
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG4DxElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = HIGG4DxName+"ElectronTPThinningTool",
ThinningService = HIGG4DxThinningSvc,
StreamName = streamName,
SGKey = "Electrons",
SelectionString = HIGG4DxElectronSelectionString,
InDetTrackParticlesKey = "InDetTrackParticles")
......@@ -101,7 +101,7 @@ def setup(HIGG4DxName, HIGG4DxThinningSvc, ToolSvc):
HIGG4DxTauSelectionString = "TauJets.pt > 40*GeV"
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG4DxTauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = HIGG4DxName+"TauTPThinningTool",
ThinningService = HIGG4DxThinningSvc,
StreamName = streamName,
TauKey = "TauJets",
SelectionString = HIGG4DxTauSelectionString,
ConeSize = 0.6,
......
......@@ -16,6 +16,23 @@ import AthenaCommon.SystemOfUnits as Units
from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.BeamFlags import jobproperties
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_HIGG1D1Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG1D1Stream )
HIGG1D1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
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
#====================================================================
......@@ -98,7 +115,7 @@ print HIGG1D1JetEMTPThinningTool
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG1D1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name = "HIGG1D1MuonTPThinningTool",
ThinningService = "HIGG1D1ThinningSvc",
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D1MuonTPThinningTool
......@@ -108,7 +125,7 @@ print HIGG1D1MuonTPThinningTool
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG1D1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG1D1ElectronTPThinningTool",
ThinningService = "HIGG1D1ThinningSvc",
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D1ElectronTPThinningTool
......@@ -118,7 +135,7 @@ print HIGG1D1ElectronTPThinningTool
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG1D1PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG1D1PhotonTPThinningTool",
ThinningService = "HIGG1D1ThinningSvc",
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D1PhotonTPThinningTool
......@@ -188,23 +205,6 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("HIGG1D1K
ThinningTools = thinningTools
)
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_HIGG1D1Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG1D1Stream )
HIGG1D1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
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] )
#====================================================================
# Add the containers to the output stream - slimming done here
#====================================================================
from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
......
......@@ -13,6 +13,21 @@ from DerivationFrameworkMuons.MuonsCommon import *
RecomputeElectronSelectors = True
#RecomputeElectronSelectors = False
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_HIGG1D2Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG1D2Stream )
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
#====================================================================
......@@ -119,7 +134,7 @@ print HIGG1D2JetEMTPThinningTool
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG1D2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name = "HIGG1D2MuonTPThinningTool",
ThinningService = "HIGG1D2ThinningSvc",
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D2MuonTPThinningTool
......@@ -129,7 +144,7 @@ print HIGG1D2MuonTPThinningTool
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG1D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG1D2ElectronTPThinningTool",
ThinningService = "HIGG1D2ThinningSvc",
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D2ElectronTPThinningTool
......@@ -139,7 +154,7 @@ print HIGG1D2ElectronTPThinningTool
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG1D2PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG1D2PhotonTPThinningTool",
ThinningService = "HIGG1D2ThinningSvc",
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG1D2PhotonTPThinningTool
......@@ -194,21 +209,6 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("HIGG1D2K
)
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_HIGG1D2Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG1D2Stream )
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] )
#====================================================================
# Add the containers to the output stream - slimming done here
#====================================================================
from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
......
......@@ -57,7 +57,7 @@ thinningTools.append(HIGG2D1JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG2D1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D1MuonTPThinningTool",
ThinningService = HIGG2D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG2D1MuonTPThinningTool
......@@ -66,7 +66,7 @@ thinningTools.append(HIGG2D1MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D1ElectronTPThinningTool",
ThinningService = HIGG2D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = False)
......@@ -76,7 +76,7 @@ thinningTools.append(HIGG2D1ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D1PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG2D1PhotonTPThinningTool",
ThinningService = HIGG2D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -86,7 +86,7 @@ thinningTools.append(HIGG2D1PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG2D1TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D1TauTPThinningTool",
ThinningService = HIGG2D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -57,7 +57,7 @@ thinningTools.append(HIGG2D2JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG2D2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D2MuonTPThinningTool",
ThinningService = HIGG2D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG2D2MuonTPThinningTool
......@@ -66,7 +66,7 @@ thinningTools.append(HIGG2D2MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D2ElectronTPThinningTool",
ThinningService = HIGG2D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = False)
......
......@@ -57,7 +57,7 @@ thinningTools.append(HIGG2D3JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG2D3MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D3MuonTPThinningTool",
ThinningService = HIGG2D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG2D3MuonTPThinningTool
......@@ -66,7 +66,7 @@ thinningTools.append(HIGG2D3MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D3ElectronTPThinningTool",
ThinningService = HIGG2D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = False)
......@@ -76,7 +76,7 @@ thinningTools.append(HIGG2D3ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D3PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG2D3PhotonTPThinningTool",
ThinningService = HIGG2D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -86,7 +86,7 @@ thinningTools.append(HIGG2D3PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG2D3TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D3TauTPThinningTool",
ThinningService = HIGG2D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -64,7 +64,7 @@ thinningTools.append(HIGG2D4JetTPThinningTool2)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG2D4MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D4MuonTPThinningTool",
ThinningService = HIGG2D4ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG2D4MuonTPThinningTool
......@@ -73,7 +73,7 @@ thinningTools.append(HIGG2D4MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D4ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D4ElectronTPThinningTool",
ThinningService = HIGG2D4ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = False)
......@@ -83,7 +83,7 @@ thinningTools.append(HIGG2D4ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D4PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG2D4PhotonTPThinningTool",
ThinningService = HIGG2D4ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -93,7 +93,7 @@ thinningTools.append(HIGG2D4PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG2D4TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D4TauTPThinningTool",
ThinningService = HIGG2D4ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -215,7 +215,7 @@ thinningTools.append(HIGG2D5JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG2D5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D5MuonTPThinningTool",
ThinningService = HIGG2D5ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG2D5MuonTPThinningTool
......@@ -224,7 +224,7 @@ thinningTools.append(HIGG2D5MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D5ElectronTPThinningTool",
ThinningService = HIGG2D5ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = False)
......@@ -234,7 +234,7 @@ thinningTools.append(HIGG2D5ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG2D5PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG2D5PhotonTPThinningTool",
ThinningService = HIGG2D5ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -244,7 +244,7 @@ thinningTools.append(HIGG2D5PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG2D5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D5TauTPThinningTool",
ThinningService = HIGG2D5ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -57,7 +57,7 @@ thinningTools.append(HIGG3D1JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG3D1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG3D1MuonTPThinningTool",
ThinningService = HIGG3D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG3D1MuonTPThinningTool
......@@ -66,7 +66,7 @@ thinningTools.append(HIGG3D1MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG3D1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG3D1ElectronTPThinningTool",
ThinningService = HIGG3D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG3D1ElectronTPThinningTool
......
......@@ -109,7 +109,7 @@ thinningTools.append(HIGG3D3JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG3D3MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG3D3MuonTPThinningTool",
ThinningService = HIGG3D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG3D3MuonTPThinningTool
......@@ -118,7 +118,7 @@ thinningTools.append(HIGG3D3MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG3D3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG3D3ElectronTPThinningTool",
ThinningService = HIGG3D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG3D3ElectronTPThinningTool
......
......@@ -42,7 +42,7 @@ HIGG4D1ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.T
HIGG4D1ThinningHelper.AppendToStream( HIGG4D1Stream )
# thinning tools
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, HIGG4D1ThinningHelper.ThinningSvc(), ToolSvc)
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, streamName, HIGG4D1ThinningHelper.ThinningSvc(), ToolSvc)
# skimming tools
import DerivationFrameworkHiggs.HIGG4DxSkimming
......
......@@ -42,7 +42,7 @@ HIGG4D2ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.T
HIGG4D2ThinningHelper.AppendToStream( HIGG4D2Stream )
# thinning tools
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, HIGG4D2ThinningHelper.ThinningSvc(), ToolSvc)
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, streamName, HIGG4D2ThinningHelper.ThinningSvc(), ToolSvc)
# skimming tools
import DerivationFrameworkHiggs.HIGG4DxSkimming
......
......@@ -42,7 +42,7 @@ HIGG4D3ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.T
HIGG4D3ThinningHelper.AppendToStream( HIGG4D3Stream )
# thinning tools
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, HIGG4D3ThinningHelper.ThinningSvc(), ToolSvc)
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, streamName, HIGG4D3ThinningHelper.ThinningSvc(), ToolSvc)
# skimming tools
import DerivationFrameworkHiggs.HIGG4DxSkimming
......
......@@ -42,7 +42,7 @@ HIGG4D4ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.T
HIGG4D4ThinningHelper.AppendToStream( HIGG4D4Stream )
# thinning tools
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, HIGG4D4ThinningHelper.ThinningSvc(), ToolSvc)
thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, streamName, HIGG4D4ThinningHelper.ThinningSvc(), ToolSvc)
# skimming tools
import DerivationFrameworkHiggs.HIGG4DxSkimming
......
......@@ -82,7 +82,7 @@ thinningTools.append(HIGG5D1JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG5D1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG5D1MuonTPThinningTool",
ThinningService = HIGG5D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG5D1MuonTPThinningTool
......@@ -91,7 +91,7 @@ thinningTools.append(HIGG5D1MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D1ElectronTPThinningTool",
ThinningService = HIGG5D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -101,7 +101,7 @@ thinningTools.append(HIGG5D1ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D1PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D1PhotonTPThinningTool",
ThinningService = HIGG5D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -111,7 +111,7 @@ thinningTools.append(HIGG5D1PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG5D1TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "HIGG5D1TauTPThinningTool",
ThinningService = HIGG5D1ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -82,7 +82,7 @@ thinningTools.append(HIGG5D2JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG5D2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG5D2MuonTPThinningTool",
ThinningService = HIGG5D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG5D2MuonTPThinningTool
......@@ -91,7 +91,7 @@ thinningTools.append(HIGG5D2MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D2ElectronTPThinningTool",
ThinningService = HIGG5D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -101,7 +101,7 @@ thinningTools.append(HIGG5D2ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D2PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D2PhotonTPThinningTool",
ThinningService = HIGG5D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -111,7 +111,7 @@ thinningTools.append(HIGG5D2PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG5D2TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "HIGG5D2TauTPThinningTool",
ThinningService = HIGG5D2ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -72,7 +72,7 @@ thinningTools.append(HIGG5D3JetTPThinningTool)
# Tracks associated with Muons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
HIGG5D3MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG5D3MuonTPThinningTool",
ThinningService = HIGG5D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
MuonKey = "Muons",
InDetTrackParticlesKey = "InDetTrackParticles")
ToolSvc += HIGG5D3MuonTPThinningTool
......@@ -81,7 +81,7 @@ thinningTools.append(HIGG5D3MuonTPThinningTool)
# Tracks associated with Electrons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D3ElectronTPThinningTool",
ThinningService = HIGG5D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Electrons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -91,7 +91,7 @@ thinningTools.append(HIGG5D3ElectronTPThinningTool)
# Tracks associated with Photons
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
HIGG5D3PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "HIGG5D3PhotonTPThinningTool",
ThinningService = HIGG5D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
SGKey = "Photons",
InDetTrackParticlesKey = "InDetTrackParticles",
BestMatchOnly = True)
......@@ -101,7 +101,7 @@ thinningTools.append(HIGG5D3PhotonTPThinningTool)
# Tracks associated with taus
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG5D3TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "HIGG5D3TauTPThinningTool",
ThinningService = HIGG5D3ThinningHelper.ThinningSvc(),
StreamName = streamName,
TauKey = "TauJets",
ConeSize = 0.6,
InDetTrackParticlesKey = "InDetTrackParticles")
......
......@@ -30,6 +30,20 @@ print "HIGG6D1.py jobproperties.Beam.energy()", jobproperties.Beam.energy()
if is_MC:
from DerivationFrameworkMCTruth.MCTruthCommon import *
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_HIGG6D1Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_HIGG6D1Stream )
HIGG6D1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
HIGG6D1Stream.AcceptAlgs(["HIGG6D1Kernel"])
# 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="HIGG6D1ThinningSvc", outStreams=[evtStream] )
#====================================================================
# TAU SELECTOR TOOL
#====================================================================
......@@ -165,12 +179,11 @@ ToolSvc += HIGG6D1JetTPThinningTool
#====================================================================
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
HIGG6D1TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG6D1TauTPThinningTool",
ThinningService = "HIGG6D1ThinningSvc",
StreamName = streamName,
TauKey = "TauJets",
InDetTrackParticlesKey = "InDetTrackParticles",
# SelectionString = tauSel,
ConeSize = 0.6,
ApplyAnd = False)