ATLAS Offline Software
Functions | Variables
python.BFieldConfigFlags Namespace Reference

Functions

def _fieldAutoCfg (prevFlags)
 
def createBFieldConfigFlags ()
 

Variables

 msg = logging.getLogger('BFieldConfigFlags')
 

Function Documentation

◆ _fieldAutoCfg()

def python.BFieldConfigFlags._fieldAutoCfg (   prevFlags)
private

Definition at line 17 of file BFieldConfigFlags.py.

17 def _fieldAutoCfg(prevFlags):
18  if prevFlags.Input.isMC or prevFlags.Common.isOnline:
19  return [True,True]
20 
21  from CoolConvUtilities.MagFieldUtils import getFieldForRun
22  lbs=prevFlags.Input.LumiBlockNumbers
23  fieldStat=getFieldForRun(run=prevFlags.Input.RunNumbers[0],lumiblock=0 if len(lbs)==0 else lbs[0],quiet=True)
24  if fieldStat is None:
25  msg.error("Unable to get field status from DCS, assume both magnets ON")
26  return [True,True]
27  return [fieldStat.solenoidCurrent()>1, fieldStat.toroidCurrent()>1]
28 
29 
30 

◆ createBFieldConfigFlags()

def python.BFieldConfigFlags.createBFieldConfigFlags ( )

Definition at line 31 of file BFieldConfigFlags.py.

32  bcf=AthConfigFlags()
33  # True when solenoid is on
34  bcf.addFlag("BField.solenoidOn", lambda prevFlags : _fieldAutoCfg(prevFlags)[0])
35  # True when barrel toroid is on
36  bcf.addFlag("BField.barrelToroidOn", lambda prevFlags : _fieldAutoCfg(prevFlags)[1])
37  # True when endcap toroid is on
38  bcf.addFlag("BField.endcapToroidOn", lambda prevFlags : _fieldAutoCfg(prevFlags)[1])
39  # Solenoid field scale
40  bcf.addFlag("BField.configuredSolenoidFieldScale", 1.)
41  return bcf

Variable Documentation

◆ msg

python.BFieldConfigFlags.msg = logging.getLogger('BFieldConfigFlags')

Definition at line 6 of file BFieldConfigFlags.py.

python.BFieldConfigFlags.createBFieldConfigFlags
def createBFieldConfigFlags()
Definition: BFieldConfigFlags.py:31
python.MagFieldUtils.getFieldForRun
def getFieldForRun(run, quiet=False, lumiblock=None)
Definition: MagFieldUtils.py:48
python.BFieldConfigFlags._fieldAutoCfg
def _fieldAutoCfg(prevFlags)
Definition: BFieldConfigFlags.py:17