the ConfigBlock for generator algorithms
Definition at line 280 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.GeneratorAnalysisBlock.__init__ |
( |
|
self | ) |
|
Definition at line 283 of file AsgAnalysisConfig.py.
284 super (GeneratorAnalysisBlock, self).__init__ ()
285 self.addOption (
'saveCutBookkeepers',
True, type=bool,
286 info=
"whether to save the cut bookkeepers information into the "
287 "output file. The default is True.")
288 self.addOption (
'runNumber',
None, type=int,
289 info=
"the MC runNumber (int). The default is None (autoconfigure "
291 self.addOption (
'cutBookkeepersSystematics',
None, type=bool,
292 info=
"whether to also save the cut bookkeepers systematics. The "
293 "default is None (follows the global systematics flag). Set to "
294 "False or True to override.")
295 self.addOption (
'histPattern',
None, type=str,
296 info=
"the histogram name pattern for the cut-bookkeeper histogram names")
297 self.addOption (
'streamName',
'ANALYSIS', type=str,
298 info=
"name of the output stream to save the cut bookkeeper in. "
299 "The default is ANALYSIS.")
◆ makeAlgs()
def python.AsgAnalysisConfig.GeneratorAnalysisBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 301 of file AsgAnalysisConfig.py.
301 def makeAlgs (self, config) :
303 if config.dataType()
is DataType.Data:
307 if self.runNumber
is None:
308 self.runNumber = config.runNumber()
310 if self.saveCutBookkeepers
and not self.runNumber:
311 raise ValueError (
"invalid run number: " +
str(self.runNumber))
314 if self.saveCutBookkeepers:
315 alg = config.createAlgorithm(
'CP::AsgCutBookkeeperAlg',
'CutBookkeeperAlg' + self.streamName)
316 alg.RootStreamName = self.streamName
317 alg.runNumber = self.runNumber
318 if self.cutBookkeepersSystematics:
319 alg.enableSystematics = self.cutBookkeepersSystematics
321 alg.enableSystematics =
not config.noSystematics()
323 alg.histPattern = self.histPattern
324 config.addPrivateTool(
'truthWeightTool',
'PMGTools::PMGTruthWeightTool' )
327 alg = config.createAlgorithm(
'CP::PMGTruthWeightAlg',
'PMGTruthWeightAlg' + self.streamName )
328 config.addPrivateTool(
'truthWeightTool',
'PMGTools::PMGTruthWeightTool' )
329 alg.decoration =
'generatorWeight_%SYS%'
330 config.addOutputVar (
'EventInfo',
'generatorWeight_%SYS%',
'weight_mc')
◆ runNumber
python.AsgAnalysisConfig.GeneratorAnalysisBlock.runNumber |
The documentation for this class was generated from the following file: