10 Configure the CondAlgsfor the ATLAS magnetic field.
15 from IOVDbSvc.IOVDbSvcConfig
import addFolders
22 result.merge(
addFolders(flags,[
'/GLOBAL/BField/Maps <noover/>'], detDb=db, className=
"CondAttrListCollection") )
24 if not flags.Common.isOnline:
25 result.merge(
addFolders(flags, [
'/EXT/DCS/MAGNETS/SENSORDATA'], detDb=
'DCS_OFL', className=
"CondAttrListCollection") )
30 "name":
"AtlasFieldMapCondAlg",
32 if flags.Common.isOnline:
34 afmArgs.update( UseMapsFromCOOL =
False )
36 afmArgs.update( LoadMapOnStart = flags.Trigger.doHLT
and flags.Trigger.Online.isPartition )
38 afmArgs.update( SoleMinCurrent = 160 )
39 afmArgs.update( ToroMinCurrent = 210 )
42 afmArgs.update( UseMapsFromCOOL =
True)
45 if 'UseDCS' in kwargs
and not kwargs[
'UseDCS']:
46 afmArgs[
'UseMapsFromCOOL'] =
False
47 magFieldMapCondAlg = CompFactory.MagField.AtlasFieldMapCondAlg(**afmArgs)
48 result.addCondAlgo(magFieldMapCondAlg)
52 "name":
"AtlasFieldCacheCondAlg",
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 )
60 afcArgs.update( SoleMinCurrent = 160 )
61 afcArgs.update( ToroMinCurrent = 210 )
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 )
67 afcArgs.update( UseDCS =
True )
69 afcArgs.update( UseDCS =
True )
71 if 'UseDCS' in kwargs:
72 afcArgs[
'UseDCS'] = kwargs[
'UseDCS']
73 magFieldCacheCondAlg = CompFactory.MagField.AtlasFieldCacheCondAlg(**afcArgs)
74 result.addCondAlgo(magFieldCacheCondAlg)