Skip to content
Snippets Groups Projects
Commit 00e9f3d4 authored by Emmanuel Le Guirriec's avatar Emmanuel Le Guirriec
Browse files

Fix_problematic_trigger_names in JETM1 and JETM9

Former-commit-id: 1b4d934c316a21d68eb961d28ad7ead83889169f
parent c415413d
No related branches found
No related tags found
No related merge requests found
......@@ -17,14 +17,30 @@ from DerivationFrameworkJetEtMiss import TriggerLists
triggers = TriggerLists.jetTrig()
# NOTE: need to be able to OR isSimulated as an OR with the trigger
orstr =' || '
trigger = '('+orstr.join(triggers)+')'
expression = trigger+' || (EventInfo.eventTypeBitmask==1) || HLT_xe120_pufit_L1XE50'
expression = ' (EventInfo.eventTypeBitmask==1) || HLT_xe120_pufit_L1XE50'
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
JETM1TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM1TrigSkimmingTool1",
TriggerListOR = triggers )
ToolSvc += JETM1TrigSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
JETM1SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM1SkimmingTool1",
JETM1OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM1OfflineSkimmingTool1",
expression = expression)
ToolSvc += JETM1SkimmingTool
ToolSvc += JETM1OfflineSkimmingTool
# OR of the above two selections
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR
JETM1ORTool = DerivationFramework__FilterCombinationOR(name="JETM1ORTool", FilterList=[JETM1TrigSkimmingTool,JETM1OfflineSkimmingTool] )
ToolSvc+=JETM1ORTool
#=======================================
# CREATE PRIVATE SEQUENCE
#=======================================
jetm1Seq = CfgMgr.AthSequencer("JETM1Sequence")
DerivationFrameworkJob += jetm1Seq
#====================================================================
# SET UP STREAM
......@@ -34,12 +50,14 @@ fileName = buildFileName( derivationFlags.WriteDAOD_JETM1Stream )
JETM1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM1Stream.AcceptAlgs(["JETM1Kernel"])
#=======================================
# ESTABLISH THE THINNING HELPER
#=======================================
from DerivationFrameworkCore.ThinningHelper import ThinningHelper
JETM1ThinningHelper = ThinningHelper( "JETM1ThinningHelper" )
JETM1ThinningHelper.AppendToStream( JETM1Stream )
#====================================================================
# THINNING TOOLS
#====================================================================
......@@ -63,6 +81,17 @@ JETM1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(n
ToolSvc += JETM1ElectronTPThinningTool
thinningTools.append(JETM1ElectronTPThinningTool)
#=======================================
# CREATE THE DERIVATION KERNEL ALGORITHM
#=======================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
jetm1Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM1Kernel" ,
SkimmingTools = [JETM1ORTool],
ThinningTools = thinningTools)
# Truth particle thinning
doTruthThinning = True
preserveAllDescendants = False
......@@ -88,22 +117,6 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo:
ToolSvc += JETM1TruthThinningTool
thinningTools.append(JETM1TruthThinningTool)
#=======================================
# CREATE PRIVATE SEQUENCE
#=======================================
jetm1Seq = CfgMgr.AthSequencer("JETM1Sequence")
DerivationFrameworkJob += jetm1Seq
#=======================================
# CREATE THE DERIVATION KERNEL ALGORITHM
#=======================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
jetm1Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM1Kernel" ,
SkimmingTools = [JETM1SkimmingTool],
ThinningTools = thinningTools)
#====================================================================
# Special jets
#====================================================================
......
......@@ -15,14 +15,25 @@ from DerivationFrameworkJetEtMiss import TriggerLists
triggers = TriggerLists.jetTrig()
# NOTE: need to be able to OR isSimulated as an OR with the trigger
orstr =' || '
trigger = '('+orstr.join(triggers)+')'
expression = trigger+' || (EventInfo.eventTypeBitmask==1)'
#orstr =' || '
#trigger = '('+orstr.join(triggers)+')'
expression = 'EventInfo.eventTypeBitmask==1'
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
JETM9TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM9TrigSkimmingTool1",
TriggerListOR = triggers )
ToolSvc += JETM9TrigSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
JETM9SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM9SkimmingTool1",
JETM9OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM9OfflineSkimmingTool1",
expression = expression)
ToolSvc += JETM9SkimmingTool
ToolSvc += JETM9OfflineSkimmingTool
# OR of the above two selections
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR
JETM9ORTool = DerivationFramework__FilterCombinationOR(name="JETM9ORTool", FilterList=[JETM9TrigSkimmingTool,JETM9OfflineSkimmingTool] )
ToolSvc+=JETM9ORTool
#=======================================
# CREATE PRIVATE SEQUENCE
......@@ -32,18 +43,6 @@ jetm9Seq = CfgMgr.AthSequencer("JETM9Sequence")
DerivationFrameworkJob += jetm9Seq
#jetm9Seq = DerivationFrameworkJob
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_JETM9Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_JETM9Stream )
JETM9Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM9Stream.AcceptAlgs(["JETM9Kernel"])
# for thinning
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="JETM9ThinningSvc", outStreams=[evtStream] )
# Truth particle thinning
thinningTools = []
......@@ -63,15 +62,6 @@ if DerivationFrameworkIsMonteCarlo:
ToolSvc += JETM9TruthThinning
thinningTools.append(JETM9TruthThinning)
#=======================================
# CREATE THE DERIVATION KERNEL ALGORITHM
#=======================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
jetm9Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM9Kernel",
SkimmingTools = [JETM9SkimmingTool],
ThinningTools = thinningTools)
#====================================================================
# Special jets
#====================================================================
......@@ -88,6 +78,24 @@ replaceAODReducedJets(reducedJetList,jetm9Seq,"JETM9")
OutputJets["JETM9"] = ["AntiKt4EMTopoJets","AntiKt4LCTopoJets",
"AntiKt4TruthJets","AntiKt4TruthWZJets","AntiKt2PV0TrackJets"]
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
jetm9Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM9Kernel",
SkimmingTools = [JETM9ORTool],
ThinningTools = thinningTools)
#====================================================================
# SET UP STREAM
#====================================================================
streamName = derivationFlags.WriteDAOD_JETM9Stream.StreamName
fileName = buildFileName( derivationFlags.WriteDAOD_JETM9Stream )
JETM9Stream = MSMgr.NewPoolRootStream( streamName, fileName )
JETM9Stream.AcceptAlgs(["JETM9Kernel"])
# for thinning
from AthenaServices.Configurables import ThinningSvc, createThinningSvc
augStream = MSMgr.GetStream( streamName )
evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="JETM9ThinningSvc", outStreams=[evtStream] )
#====================================================================
# Jets for R-scan
#====================================================================
......@@ -97,6 +105,8 @@ for radius in [0.2, 0.3, 0.5, 0.6, 0.7, 0.8]:
addRscanJets("AntiKt",radius,"TruthWZ",jetm9Seq,"JETM9")
addRscanJets("AntiKt",radius,"LCTopo",jetm9Seq,"JETM9")
#====================================================================
# Add the containers to the output stream - slimming done here
#====================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment