Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Sherwood
athena
Commits
a6febce7
Commit
a6febce7
authored
5 years ago
by
William Keaton Balunas
Browse files
Options
Downloads
Patches
Plain Diff
Autoconfigure container-specific moments for PFlow jets
parent
59871376
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Reconstruction/Jet/JetRec/python/JetToolSupport.py
+12
-9
12 additions, 9 deletions
Reconstruction/Jet/JetRec/python/JetToolSupport.py
Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
+5
-2
5 additions, 2 deletions
Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
with
17 additions
and
11 deletions
Reconstruction/Jet/JetRec/python/JetToolSupport.py
+
12
−
9
View file @
a6febce7
...
...
@@ -141,11 +141,14 @@ class JetToolManager:
# Configures any tools in the given modifier list with the property
# "JetContainer" to set that property to the given string containerName.
def
configureContainerName
(
self
,
modifiers
,
containerName
):
# Also handles any container-specific configuration needed.
def
autoconfigureModifiers
(
self
,
modifiers
,
containerName
):
for
mod
in
modifiers
:
if
"
JetContainer
"
in
mod
.
properties
():
print
(
"
configuring
"
+
mod
.
name
()
+
"
to have container name
"
+
containerName
)
mod
.
JetContainer
=
containerName
if
"
DoPFlowMoments
"
in
mod
.
properties
():
mod
.
DoPFlowMoments
=
(
"
PFlow
"
in
containerName
)
# Return the list of modifiers associated with a name.
# If the argument is a list, a copy is returned directly.
...
...
@@ -419,7 +422,7 @@ class JetToolManager:
ptminSave
=
self
.
ptminFilter
if
ptminFilter
>
0.0
:
self
.
ptminFilter
=
ptminFilter
jetrec
.
JetModifiers
=
self
.
buildModifiers
(
modifiersin
,
lofinder
,
getters
,
gettersin
,
output
,
calibOpt
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
if
consumers
!=
None
:
jetrec
.
JetConsumers
=
consumers
self
.
ptminFilter
=
ptminSave
...
...
@@ -467,7 +470,7 @@ class JetToolManager:
jetrec
.
InputContainer
=
input
jetrec
.
OutputContainer
=
output
jetrec
.
JetModifiers
=
self
.
getModifiers
(
modifiersin
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
jetrec
.
Trigger
=
isTrigger
or
useTriggerStore
jetrec
.
Timer
=
jetFlags
.
timeJetRecTool
()
self
+=
jetrec
...
...
@@ -502,7 +505,7 @@ class JetToolManager:
jetrec
.
InputContainer
=
input
jetrec
.
OutputContainer
=
output
jetrec
.
JetModifiers
=
self
.
getModifiers
(
modifiersin
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
jetrec
.
Trigger
=
isTrigger
or
useTriggerStore
jetrec
.
Timer
=
jetFlags
.
timeJetRecTool
()
if
pseudojetRetriever
in
self
.
tools
:
...
...
@@ -550,7 +553,7 @@ class JetToolManager:
jetrec
.
InputContainer
=
input
jetrec
.
OutputContainer
=
output
jetrec
.
JetModifiers
=
self
.
getModifiers
(
modifiersin
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
jetrec
.
Trigger
=
isTrigger
or
useTriggerStore
jetrec
.
Timer
=
jetFlags
.
timeJetRecTool
()
self
+=
jetrec
...
...
@@ -609,7 +612,7 @@ class JetToolManager:
jetrec
.
OutputContainer
=
output
jetrec
.
JetGroomer
=
groomer
jetrec
.
JetModifiers
=
self
.
getModifiers
(
modifiersin
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
if
consumers
!=
None
:
jetrec
.
JetConsumers
=
consumers
jetrec
.
Trigger
=
isTrigger
or
useTriggerStore
...
...
@@ -641,7 +644,7 @@ class JetToolManager:
Label
=
inp
getters
=
[
get
]
jetrec
.
JetModifiers
=
self
.
buildModifiers
(
modifiersin
,
finder
,
getters
,
None
,
output
,
calibOpt
)
self
.
configure
ContainerName
(
jetrec
.
JetModifiers
,
output
)
self
.
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
output
)
self
.
ptminFilter
=
ptminSave
jetrec
.
Trigger
=
isTrigger
or
useTriggerStore
jetrec
.
Timer
=
jetFlags
.
timeJetRecTool
()
...
...
@@ -796,7 +799,7 @@ class JetToolManager:
# Temporary hard-coded solution until this config is deprecated.
triggerPrefix
=
"
HLT_xAOD__JetContainer_
"
self
.
configure
ContainerName
(
modifiers
,
triggerPrefix
+
name
.
split
(
'
_
'
)[
1
])
self
.
auto
configure
Modifiers
(
modifiers
,
triggerPrefix
+
name
.
split
(
'
_
'
)[
1
])
self
.
ptminFilter
=
ptminSave
...
...
@@ -876,7 +879,7 @@ class JetToolManager:
triggerGroomerTool
=
TriggerJetGroomerTool
(
name
)
triggerGroomerTool
.
JetGroomer
=
trimmerTool
triggerGroomerTool
.
JetModifiers
=
self
.
getModifiers
(
modifiersin
)
self
.
configure
ContainerName
(
triggerGroomerTool
.
JetModifiers
,
name
.
split
(
'
_
'
)[
1
])
self
.
auto
configure
Modifiers
(
triggerGroomerTool
.
JetModifiers
,
name
.
split
(
'
_
'
)[
1
])
triggerGroomerTool
.
OutputLevel
=
OutputLevel
# TriggerJetGroomerTool obtains a TriggerJetGroomerTool, will pass it
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
+
5
−
2
View file @
a6febce7
...
...
@@ -213,10 +213,13 @@ def expandPrereqs(reqtype,prereqs):
########################################################################
# For each modifier in the given list with a configurable input container
# name ("JetContainer"), configure it to containerName.
def
configureContainerName
(
modifiers
,
containerName
):
# Also handle any container-specific configuration needed.
def
autoconfigureModifiers
(
modifiers
,
containerName
):
for
mod
in
modifiers
:
if
"
JetContainer
"
in
mod
.
properties
():
mod
.
JetContainer
=
containerName
if
"
DoPFlowMoments
"
in
mod
.
properties
():
mod
.
DoPFlowMoments
=
(
"
PFlow
"
in
containerName
)
########################################################################
...
...
@@ -475,7 +478,7 @@ def getJetRecTool(jetname, finder, pjs, mods):
JetFinder
=
finder
,
JetModifiers
=
mods
)
configure
ContainerName
(
jetrec
.
JetModifiers
,
jetname
)
auto
configure
Modifiers
(
jetrec
.
JetModifiers
,
jetname
)
return
jetrec
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment