Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
atlas
athena
Commits
a365c0d9
Commit
a365c0d9
authored
1 year ago
by
Walter Lampl
Browse files
Options
Downloads
Patches
Plain Diff
don't import CoolConvUtilities in the MC-case
parent
4a7d1c51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!69166
2024-02-23: merge of 24.0 into main
,
!69044
Auto-Configure BField flags
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MagneticField/MagFieldConfig/python/BFieldConfigFlags.py
+4
-2
4 additions, 2 deletions
MagneticField/MagFieldConfig/python/BFieldConfigFlags.py
with
4 additions
and
2 deletions
MagneticField/MagFieldConfig/python/BFieldConfigFlags.py
+
4
−
2
View file @
a365c0d9
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
from
AthenaConfiguration.AthConfigFlags
import
AthConfigFlags
from
CoolConvUtilities.MagFieldUtils
import
getFieldForRun
#So far no attempt to auto-config field for MC or online-running
...
...
@@ -15,7 +15,8 @@ from CoolConvUtilities.MagFieldUtils import getFieldForRun
def
_toroidFieldAutoCfg
(
prevFlags
):
if
prevFlags
.
Input
.
isMC
or
prevFlags
.
Common
.
isOnline
:
return
True
from
CoolConvUtilities.MagFieldUtils
import
getFieldForRun
lbs
=
prevFlags
.
Input
.
LumiBlockNumbers
fieldStat
=
getFieldForRun
(
run
=
prevFlags
.
Input
.
RunNumbers
[
0
],
lumiblock
=
0
if
len
(
lbs
)
==
0
else
lbs
[
0
],
quiet
=
True
)
return
(
fieldStat
.
toroidCurrent
()
>
1
)
...
...
@@ -24,6 +25,7 @@ def _solenoidFieldAutoCfg(prevFlags):
if
prevFlags
.
Input
.
isMC
or
prevFlags
.
Common
.
isOnline
:
return
True
from
CoolConvUtilities.MagFieldUtils
import
getFieldForRun
lbs
=
prevFlags
.
Input
.
LumiBlockNumbers
fieldStat
=
getFieldForRun
(
run
=
prevFlags
.
Input
.
RunNumbers
[
0
],
lumiblock
=
0
if
len
(
lbs
)
==
0
else
lbs
[
0
],
quiet
=
True
)
return
(
fieldStat
.
solenoidCurrent
()
>
1
)
...
...
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