Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
training-dataset-dumper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Alexander Froch
training-dataset-dumper
Commits
197e1d43
Commit
197e1d43
authored
2 months ago
by
Alexander Froch
Browse files
Options
Downloads
Patches
Plain Diff
Adding more flexibility to the MultiFoldTagger python config
parent
610f2994
No related branches found
No related tags found
No related merge requests found
Pipeline
#9967132
passed
2 months ago
Stage: build
Stage: run
Stage: pages
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FTagDumper/python/blocks/MultifoldTagger.py
+15
-6
15 additions, 6 deletions
FTagDumper/python/blocks/MultifoldTagger.py
with
15 additions
and
6 deletions
FTagDumper/python/blocks/MultifoldTagger.py
+
15
−
6
View file @
197e1d43
...
@@ -15,6 +15,9 @@ class MultifoldTagger(BaseBlock):
...
@@ -15,6 +15,9 @@ class MultifoldTagger(BaseBlock):
----------
----------
nn_paths : list[str]
nn_paths : list[str]
List of paths to the neural network files.
List of paths to the neural network files.
alg_name : str
Name of the algorithm. If None, the name will be
extracted from the nn_paths. By default None
target : str
target : str
Whether to tag the BTagging object or the Jet.
Whether to tag the BTagging object or the Jet.
jet_collection : str | None
jet_collection : str | None
...
@@ -26,13 +29,17 @@ class MultifoldTagger(BaseBlock):
...
@@ -26,13 +29,17 @@ class MultifoldTagger(BaseBlock):
Name of the fold hash variable.
Name of the fold hash variable.
constituents : str
constituents : str
Name of the constituent container.
Name of the constituent container.
default_zero_tracks : bool
Bool to decide how to work with zero tracks. By default False.
"""
"""
nn_paths
:
list
[
str
]
nn_paths
:
list
[
str
]
alg_name
:
str
=
None
target
:
str
=
"
BTagging
"
target
:
str
=
"
BTagging
"
jet_collection
:
str
=
None
jet_collection
:
str
=
None
remap
:
dict
=
None
remap
:
dict
=
None
fold_hash_name
:
str
=
"
jetFoldHash
"
fold_hash_name
:
str
=
"
jetFoldHash
"
constituents
:
str
=
"
InDetTrackParticles
"
constituents
:
str
=
"
InDetTrackParticles
"
default_zero_tracks
:
bool
=
False
def
__post_init__
(
self
):
def
__post_init__
(
self
):
...
@@ -52,25 +59,27 @@ class MultifoldTagger(BaseBlock):
...
@@ -52,25 +59,27 @@ class MultifoldTagger(BaseBlock):
self
.
track_link_type
=
"
IPARTICLE
"
self
.
track_link_type
=
"
IPARTICLE
"
else
:
else
:
raise
ValueError
(
f
"
Unknown target
{
self
.
target
}
"
)
raise
ValueError
(
f
"
Unknown target
{
self
.
target
}
"
)
self
.
name
=
'
_
'
.
join
(
Path
(
self
.
nn_paths
[
0
]).
parts
[
2
:
-
1
])
if
self
.
alg_name
is
None
:
self
.
alg_name
=
'
_
'
.
join
(
Path
(
self
.
nn_paths
[
0
]).
parts
[
2
:
-
1
])
if
"
BTagTrackToJetAssociator
"
in
self
.
remap
:
if
"
BTagTrackToJetAssociator
"
in
self
.
remap
:
self
.
name
=
f
'
{
self
.
remap
[
"
BTagTrackToJetAssociator
"
]
}
_
{
self
.
name
}
'
self
.
alg_
name
=
f
'
{
self
.
remap
[
"
BTagTrackToJetAssociator
"
]
}
_
{
self
.
alg_
name
}
'
def
to_ca
(
self
):
def
to_ca
(
self
):
ca
=
ComponentAccumulator
()
ca
=
ComponentAccumulator
()
ca
.
addEventAlgo
(
ca
.
addEventAlgo
(
self
.
deco_alg
(
self
.
deco_alg
(
name
=
f
'
{
self
.
name
}
_Alg
'
,
name
=
f
'
{
self
.
alg_
name
}
_Alg
'
,
container
=
self
.
container
,
container
=
self
.
container
,
constituentContainer
=
self
.
constituents
,
constituentContainer
=
self
.
constituents
,
decorator
=
CompFactory
.
FlavorTagDiscriminants
.
MultifoldGNNTool
(
decorator
=
CompFactory
.
FlavorTagDiscriminants
.
MultifoldGNNTool
(
name
=
f
'
{
self
.
name
}
_Tool
'
,
name
=
f
'
{
self
.
alg_
name
}
_Tool
'
,
foldHashName
=
self
.
fold_hash_name
,
foldHashName
=
self
.
fold_hash_name
,
nnFiles
=
self
.
nn_paths
,
nnFiles
=
self
.
nn_paths
,
variableRemapping
=
self
.
remap
,
variableRemapping
=
self
.
remap
,
trackLinkType
=
self
.
track_link_type
trackLinkType
=
self
.
track_link_type
,
defaultZeroTracks
=
self
.
default_zero_tracks
,
)
)
)
)
)
)
...
...
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