ATLAS Offline Software
Loading...
Searching...
No Matches
python.MagFieldServicesConfig Namespace Reference

Functions

 AtlasFieldCacheCondAlgCfg (flags, **kwargs)

Variables

 flags = initConfigFlags()
 Files
 isMC
 cfg = ComponentAccumulator()
 acc = AtlasFieldCacheCondAlgCfg(flags)
 f = open("MagneticFieldSvc.pkl","wb")

Function Documentation

◆ AtlasFieldCacheCondAlgCfg()

python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg ( flags,
** kwargs )
Configure the CondAlgsfor the ATLAS magnetic field.

Definition at line 8 of file MagFieldServicesConfig.py.

8def AtlasFieldCacheCondAlgCfg(flags, **kwargs):
9 '''
10 Configure the CondAlgsfor the ATLAS magnetic field.
11 '''
12 result=ComponentAccumulator()
13
14 # initialise required conditions DB folders
15 from IOVDbSvc.IOVDbSvcConfig import addFolders
16
17 if flags.Input.isMC:
18 db='GLOBAL_OFL'
19 else:
20 db='GLOBAL'
21
22 result.merge(addFolders(flags,['/GLOBAL/BField/Maps <noover/>'], detDb=db, className="CondAttrListCollection") )
23
24 if not flags.Common.isOnline:
25 result.merge(addFolders(flags, ['/EXT/DCS/MAGNETS/SENSORDATA'], detDb='DCS_OFL', className="CondAttrListCollection") )
26
27
28 # AtlasFieldMapCondAlg - for reading in map
29 afmArgs = {
30 "name": "AtlasFieldMapCondAlg",
31 }
32 if flags.Common.isOnline:
33 # online does not use DCS
34 afmArgs.update( UseMapsFromCOOL = False )
35 # load map on start() for HLT
36 afmArgs.update( LoadMapOnStart = flags.Trigger.doHLT and flags.Trigger.Online.isPartition )
37 # consider field off if current is below these values:
38 afmArgs.update( SoleMinCurrent = 160 ) # Standby current is 150A
39 afmArgs.update( ToroMinCurrent = 210 ) # Standby current is 200A
40 else:
41 # UseMapsFromCOOL is default for standard running
42 afmArgs.update( UseMapsFromCOOL = True)
43 # However, for tests, this must be turned off. It is detected
44 # when UseDCS is set to False - UseDCS is directly an option for the field cache alg
45 if 'UseDCS' in kwargs and not kwargs['UseDCS']:
46 afmArgs['UseMapsFromCOOL'] = False
47 magFieldMapCondAlg = CompFactory.MagField.AtlasFieldMapCondAlg(**afmArgs)
48 result.addCondAlgo(magFieldMapCondAlg)
49
50 # AtlasFieldCacheCondAlg - for reading in current
51 afcArgs = {
52 "name": "AtlasFieldCacheCondAlg",
53 }
54 if flags.Common.isOnline:
55 afcArgs.update( UseDCS = False )
56 afcArgs.update( UseSoleCurrent = 7730 )
57 afcArgs.update( UseToroCurrent = 20400 )
58 afcArgs.update( LockMapCurrents = True )
59 # consider field off if current is below these values:
60 afcArgs.update( SoleMinCurrent = 160 ) # Standby current is 150A
61 afcArgs.update( ToroMinCurrent = 210 ) # Standby current is 200A
62 elif flags.Input.isMC:
63 if flags.BField.configuredSolenoidFieldScale>160/7730 and flags.BField.configuredSolenoidFieldScale<1:
64 afcArgs.update( UseDCS = False )
65 afcArgs.update( UseSoleCurrent = flags.BField.configuredSolenoidFieldScale * 7730 )
66 else:
67 afcArgs.update( UseDCS = True )
68 else:
69 afcArgs.update( UseDCS = True )
70 # For test, UseDCS is set to False
71 if 'UseDCS' in kwargs:
72 afcArgs['UseDCS'] = kwargs['UseDCS']
73 magFieldCacheCondAlg = CompFactory.MagField.AtlasFieldCacheCondAlg(**afcArgs)
74 result.addCondAlgo(magFieldCacheCondAlg)
75
76 return result
77

Variable Documentation

◆ acc

python.MagFieldServicesConfig.acc = AtlasFieldCacheCondAlgCfg(flags)

Definition at line 95 of file MagFieldServicesConfig.py.

◆ cfg

python.MagFieldServicesConfig.cfg = ComponentAccumulator()

Definition at line 93 of file MagFieldServicesConfig.py.

◆ f

python.MagFieldServicesConfig.f = open("MagneticFieldSvc.pkl","wb")

Definition at line 99 of file MagFieldServicesConfig.py.

◆ Files

python.MagFieldServicesConfig.Files

Definition at line 89 of file MagFieldServicesConfig.py.

◆ flags

python.MagFieldServicesConfig.flags = initConfigFlags()

Definition at line 88 of file MagFieldServicesConfig.py.

◆ isMC

python.MagFieldServicesConfig.isMC

Definition at line 90 of file MagFieldServicesConfig.py.