ATLAS Offline Software
Functions | Variables
python.LuminosityCondAlgConfig Namespace Reference

Functions

def LuminosityCondAlgCfg (flags, useOnlineLumi=None, suffix=None)
 
def luminosityCondAlgMCCfg (flags, name, result)
 
def luminosityCondAlgRun2Cfg (flags, name, result)
 
def luminosityCondAlgRun1Cfg (flags, name, result)
 
def luminosityCondAlgOnlineCfg (flags, name, result)
 

Variables

 flags1 = initConfigFlags()
 
 Files
 
def acc1 = LuminosityCondAlgCfg (flags1)
 
 summariseProps
 
 flags2 = initConfigFlags()
 
 doExpressProcessing
 
def acc2 = LuminosityCondAlgCfg (flags2)
 
 flags3 = initConfigFlags()
 
 ProjectName
 
def acc3 = LuminosityCondAlgCfg (flags3)
 
 flags4 = initConfigFlags()
 
def acc4 = LuminosityCondAlgCfg (flags4)
 
 flags5 = initConfigFlags()
 
def acc5 = LuminosityCondAlgCfg (flags5)
 
 flags6 = initConfigFlags()
 
 useOnlineLumi
 
def acc6 = LuminosityCondAlgCfg (flags6)
 
 flags7 = initConfigFlags()
 
def acc7 = LuminosityCondAlgCfg (flags7, useOnlineLumi=True, suffix='Online')
 

Function Documentation

◆ LuminosityCondAlgCfg()

def python.LuminosityCondAlgConfig.LuminosityCondAlgCfg (   flags,
  useOnlineLumi = None,
  suffix = None 
)

Definition at line 17 of file LuminosityCondAlgConfig.py.

17 def LuminosityCondAlgCfg (flags, useOnlineLumi=None, suffix=None):
18  # This function, without the useOnlineLumi and suffix arguments, will set up a default configuration
19  # appropriate to the job; the conditions object will be called LuminosityCondData
20  # Can override whether it sets up the online lumi (but then you are strongly urged to use the suffix
21  # argument!)
22  # Suffix will allow you to make an object with a different name, e.g. LuminosityCondDataOnline
23  log = logging.getLogger ('LuminosityCondAlgCfg')
24  name = 'LuminosityCondAlg'
25  result = ComponentAccumulator()
26 
27  if suffix is None: suffix = ''
28  if useOnlineLumi is not None and suffix is None:
29  log.warning('useOnlineLumi argument is provided but not a suffix for the lumi object name. Is this really intended?')
30 
31  if flags.Input.isMC:
32  kwargs = luminosityCondAlgMCCfg (flags, name, result)
33  elif ((useOnlineLumi is None and flags.Common.useOnlineLumi)
34  or (useOnlineLumi is not None and useOnlineLumi)):
35  kwargs = luminosityCondAlgOnlineCfg (flags, name, result)
36  elif flags.IOVDb.DatabaseInstance == 'COMP200':
37  kwargs = luminosityCondAlgRun1Cfg (flags, name, result)
38  elif flags.IOVDb.DatabaseInstance == 'CONDBR2':
39  kwargs = luminosityCondAlgRun2Cfg (flags, name, result)
40 
41  else:
42  log.warning ("LuminosityCondAlgCfg can't resolve database instance = %s, assume Run2!" % flags.IOVDb.DatabaseInstance)
43  kwargs = luminosityCondAlgRun2Cfg (flags, name, result)
44 
45  if flags.Common.ProductionStep is ProductionStep.PileUpPretracking:
46  kwargs.setdefault("EventInfoKey", flags.Overlay.BkgPrefix + "EventInfo")
47  kwargs.setdefault("actualMuKey", flags.Overlay.BkgPrefix + "EventInfo.actualInteractionsPerCrossing")
48  kwargs.setdefault("averageMuKey", flags.Overlay.BkgPrefix + "EventInfo.averageInteractionsPerCrossing")
49 
50  LuminosityCondAlg=CompFactory.LuminosityCondAlg
51 
52  alg = LuminosityCondAlg (name,
53  LuminosityOutputKey = 'LuminosityCondData' + suffix,
54  **kwargs)
55 
56  result.addCondAlgo (alg)
57  return result
58 
59 

◆ luminosityCondAlgMCCfg()

def python.LuminosityCondAlgConfig.luminosityCondAlgMCCfg (   flags,
  name,
  result 
)

Definition at line 60 of file LuminosityCondAlgConfig.py.

60 def luminosityCondAlgMCCfg (flags, name, result):
61  from DigitizationConfig.DigitizationParametersConfig import readDigitizationParameters
62  result.merge(readDigitizationParameters(flags))
63  return { 'LuminosityFolderInputKey' : '',
64  'DigitizationFolderInputKey' : '/Digitization/Parameters',
65  'OnlineLumiCalibrationInputKey' : '',
66  'BunchLumisInputKey' : '',
67  'BunchGroupInputKey' : '',
68  'FillParamsInputKey' : '',
69  'IsMC' : True }
70 
71 
72 # Configuration for offline default luminosity used in Run2

◆ luminosityCondAlgOnlineCfg()

def python.LuminosityCondAlgConfig.luminosityCondAlgOnlineCfg (   flags,
  name,
  result 
)

Definition at line 163 of file LuminosityCondAlgConfig.py.

163 def luminosityCondAlgOnlineCfg (flags, name, result):
164  log = logging.getLogger(name)
165 
166  kwargs = {}
167 
168  # Keep values for invalid data
169  kwargs['SkipInvalid'] = False
170 
171  if flags.IOVDb.DatabaseInstance == 'COMP200': # Run1
172  folder = "/TRIGGER/LUMI/LBLESTONL"
173  result.merge (addFolders (flags, folder, 'TRIGGER_ONL',
174  className = 'CondAttrListCollection'))
175 
176  else: # Run 2+
177  if flags.IOVDb.DatabaseInstance != 'CONDBR2':
178  log.warning("LuminosityCondAlgOnlineCfg can't resolve DatabaseInstance = %s, assuming CONDBR2!", flags.IOVDb.DatabaseInstance)
179 
180  folder = "/TRIGGER/LUMI/HLTPrefLumi"
181  result.merge (addFolders (flags, folder, 'TRIGGER_ONL',
182  className = 'CondAttrListCollection',
183  extensible = flags.Trigger.doHLT and flags.Trigger.Online.isPartition))
184 
185  kwargs['LuminosityFolderInputKey'] = folder
186  log.info ("Created online %s using folder %s" % (name, folder))
187 
188  # Need the calibration just to get the proper MuToLumi value
189  from CoolLumiUtilities.OnlineLumiCalibrationCondAlgConfig \
190  import OnlineLumiCalibrationCondAlgCfg
191  result.merge (OnlineLumiCalibrationCondAlgCfg(flags))
192  olalg = result.getCondAlgo ('OnlineLumiCalibrationCondAlg')
193  kwargs['OnlineLumiCalibrationInputKey'] = olalg.LumiCalibOutputKey
194 
195  # Other folder names should be blank.
196  kwargs['BunchLumisInputKey'] = ''
197  kwargs['BunchGroupInputKey'] = ''
198  kwargs['FillParamsInputKey'] = ''
199 
200  return kwargs
201 
202 

◆ luminosityCondAlgRun1Cfg()

def python.LuminosityCondAlgConfig.luminosityCondAlgRun1Cfg (   flags,
  name,
  result 
)

Definition at line 114 of file LuminosityCondAlgConfig.py.

114 def luminosityCondAlgRun1Cfg (flags, name, result):
115  log = logging.getLogger(name)
116 
117  kwargs = {}
118 
119  # Check if this is express stream or bulk
120  if flags.Common.doExpressProcessing:
121  lumiFolder = "/TRIGGER/LUMI/LBLESTONL"
122  result.merge (addFolders (flags, lumiFolder, 'TRIGGER_ONL',
123  className = 'CondAttrListCollection'))
124 
125  else:
126  lumiFolder = "/TRIGGER/OFLLUMI/LBLESTOFL"
127  result.merge (addFolders (flags, lumiFolder, 'TRIGGER_OFL',
128  className = 'CondAttrListCollection'))
129 
130  log.info ("configureLuminosityCondAlgRun1 requested %s", lumiFolder)
131  kwargs['LuminosityFolderInputKey'] = lumiFolder
132 
133  # Configure input conditions data.
134  from CoolLumiUtilities.FillParamsCondAlgConfig \
135  import FillParamsCondAlgCfg
136  result.merge (FillParamsCondAlgCfg (flags))
137  fpalg = result.getCondAlgo ('FillParamsCondAlg')
138  kwargs['FillParamsInputKey'] = fpalg.FillParamsOutputKey
139 
140  from CoolLumiUtilities.BunchLumisCondAlgConfig \
141  import BunchLumisCondAlgCfg
142  result.merge (BunchLumisCondAlgCfg (flags))
143  blalg = result.getCondAlgo ('BunchLumisCondAlg')
144  kwargs['BunchLumisInputKey'] = blalg.BunchLumisOutputKey
145 
146  from CoolLumiUtilities.BunchGroupCondAlgConfig \
147  import BunchGroupCondAlgCfg
148  result.merge (BunchGroupCondAlgCfg (flags))
149  bgalg = result.getCondAlgo ('BunchGroupCondAlg')
150  kwargs['BunchGroupInputKey'] = bgalg.BunchGroupOutputKey
151 
152  from CoolLumiUtilities.OnlineLumiCalibrationCondAlgConfig \
153  import OnlineLumiCalibrationCondAlgCfg
154  result.merge (OnlineLumiCalibrationCondAlgCfg (flags))
155  olalg = result.getCondAlgo ('OnlineLumiCalibrationCondAlg')
156  kwargs['OnlineLumiCalibrationInputKey'] = olalg.LumiCalibOutputKey
157 
158  return kwargs
159 
160 
161 
162 # Configuration for online luminosity.

◆ luminosityCondAlgRun2Cfg()

def python.LuminosityCondAlgConfig.luminosityCondAlgRun2Cfg (   flags,
  name,
  result 
)

Definition at line 73 of file LuminosityCondAlgConfig.py.

73 def luminosityCondAlgRun2Cfg (flags, name, result):
74  log = logging.getLogger(name)
75 
76  kwargs = {}
77 
78  # Check if this is express stream or bulk
79  if flags.Common.doExpressProcessing:
80  lumiFolder = "/TRIGGER/LUMI/OnlPrefLumi"
81  result.merge (addFolders (flags, lumiFolder, 'TRIGGER_ONL',
82  className = 'CondAttrListCollection'))
83 
84  else:
85  lumiFolder = "/TRIGGER/OFLLUMI/OflPrefLumi"
86  result.merge (addFolders (flags, lumiFolder, 'TRIGGER_OFL',
87  className = 'CondAttrListCollection'))
88 
89  log.info ("luminosityCondAlgRun2Config requested %s", lumiFolder)
90  kwargs['LuminosityFolderInputKey'] = lumiFolder
91 
92  log.info ("Created Run2 %s using folder %s" % (name, lumiFolder))
93 
94  # Need the calibration just to get the proper MuToLumi value
95  from CoolLumiUtilities.OnlineLumiCalibrationCondAlgConfig \
96  import OnlineLumiCalibrationCondAlgCfg
97  result.merge (OnlineLumiCalibrationCondAlgCfg(flags))
98  olalg = result.getCondAlgo ('OnlineLumiCalibrationCondAlg')
99  kwargs['OnlineLumiCalibrationInputKey'] = olalg.LumiCalibOutputKey
100 
101  # Other folder names should be blank.
102  kwargs['BunchLumisInputKey'] = ''
103  kwargs['BunchGroupInputKey'] = ''
104  kwargs['FillParamsInputKey'] = ''
105 
106  # if cosmics, suppress warnings.
107  if flags.Beam.Type is BeamType.Cosmics:
108  kwargs['ExpectInvalid'] = True
109 
110  return kwargs
111 
112 
113 # Configuration for offline default luminosity used in Run1

Variable Documentation

◆ acc1

def python.LuminosityCondAlgConfig.acc1 = LuminosityCondAlgCfg (flags1)

Definition at line 211 of file LuminosityCondAlgConfig.py.

◆ acc2

def python.LuminosityCondAlgConfig.acc2 = LuminosityCondAlgCfg (flags2)

Definition at line 221 of file LuminosityCondAlgConfig.py.

◆ acc3

def python.LuminosityCondAlgConfig.acc3 = LuminosityCondAlgCfg (flags3)

Definition at line 231 of file LuminosityCondAlgConfig.py.

◆ acc4

def python.LuminosityCondAlgConfig.acc4 = LuminosityCondAlgCfg (flags4)

Definition at line 242 of file LuminosityCondAlgConfig.py.

◆ acc5

def python.LuminosityCondAlgConfig.acc5 = LuminosityCondAlgCfg (flags5)

Definition at line 251 of file LuminosityCondAlgConfig.py.

◆ acc6

def python.LuminosityCondAlgConfig.acc6 = LuminosityCondAlgCfg (flags6)

Definition at line 260 of file LuminosityCondAlgConfig.py.

◆ acc7

def python.LuminosityCondAlgConfig.acc7 = LuminosityCondAlgCfg (flags7, useOnlineLumi=True, suffix='Online')

Definition at line 268 of file LuminosityCondAlgConfig.py.

◆ doExpressProcessing

python.LuminosityCondAlgConfig.doExpressProcessing

Definition at line 219 of file LuminosityCondAlgConfig.py.

◆ Files

python.LuminosityCondAlgConfig.Files

Definition at line 209 of file LuminosityCondAlgConfig.py.

◆ flags1

python.LuminosityCondAlgConfig.flags1 = initConfigFlags()

Definition at line 208 of file LuminosityCondAlgConfig.py.

◆ flags2

python.LuminosityCondAlgConfig.flags2 = initConfigFlags()

Definition at line 217 of file LuminosityCondAlgConfig.py.

◆ flags3

python.LuminosityCondAlgConfig.flags3 = initConfigFlags()

Definition at line 227 of file LuminosityCondAlgConfig.py.

◆ flags4

python.LuminosityCondAlgConfig.flags4 = initConfigFlags()

Definition at line 237 of file LuminosityCondAlgConfig.py.

◆ flags5

python.LuminosityCondAlgConfig.flags5 = initConfigFlags()

Definition at line 248 of file LuminosityCondAlgConfig.py.

◆ flags6

python.LuminosityCondAlgConfig.flags6 = initConfigFlags()

Definition at line 256 of file LuminosityCondAlgConfig.py.

◆ flags7

python.LuminosityCondAlgConfig.flags7 = initConfigFlags()

Definition at line 265 of file LuminosityCondAlgConfig.py.

◆ ProjectName

python.LuminosityCondAlgConfig.ProjectName

Definition at line 229 of file LuminosityCondAlgConfig.py.

◆ summariseProps

python.LuminosityCondAlgConfig.summariseProps

Definition at line 212 of file LuminosityCondAlgConfig.py.

◆ useOnlineLumi

python.LuminosityCondAlgConfig.useOnlineLumi

Definition at line 258 of file LuminosityCondAlgConfig.py.

python.DigitizationParametersConfig.readDigitizationParameters
def readDigitizationParameters(flags)
Definition: DigitizationParametersConfig.py:85
python.LuminosityCondAlgConfig.luminosityCondAlgMCCfg
def luminosityCondAlgMCCfg(flags, name, result)
Definition: LuminosityCondAlgConfig.py:60
python.LuminosityCondAlgConfig.LuminosityCondAlgCfg
def LuminosityCondAlgCfg(flags, useOnlineLumi=None, suffix=None)
Definition: LuminosityCondAlgConfig.py:17
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.LuminosityCondAlgConfig.luminosityCondAlgOnlineCfg
def luminosityCondAlgOnlineCfg(flags, name, result)
Definition: LuminosityCondAlgConfig.py:163
python.OnlineLumiCalibrationCondAlgConfig.OnlineLumiCalibrationCondAlgCfg
def OnlineLumiCalibrationCondAlgCfg(flags)
Definition: OnlineLumiCalibrationCondAlgConfig.py:13
python.LuminosityCondAlgConfig.luminosityCondAlgRun1Cfg
def luminosityCondAlgRun1Cfg(flags, name, result)
Definition: LuminosityCondAlgConfig.py:114
python.LuminosityCondAlgConfig.luminosityCondAlgRun2Cfg
def luminosityCondAlgRun2Cfg(flags, name, result)
Definition: LuminosityCondAlgConfig.py:73