ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.AsgAnalysisConfig.GeneratorAnalysisBlock Class Reference
Inheritance diagram for python.AsgAnalysisConfig.GeneratorAnalysisBlock:
Collaboration diagram for python.AsgAnalysisConfig.GeneratorAnalysisBlock:

Public Member Functions

def __init__ (self)
 
def makeAlgs (self, config)
 

Public Attributes

 runNumber
 

Detailed Description

the ConfigBlock for generator algorithms

Definition at line 280 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.GeneratorAnalysisBlock.__init__ (   self)

Definition at line 283 of file AsgAnalysisConfig.py.

283  def __init__ (self) :
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 "
290  "from metadata).")
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.")
300 

Member Function Documentation

◆ makeAlgs()

def python.AsgAnalysisConfig.GeneratorAnalysisBlock.makeAlgs (   self,
  config 
)

Definition at line 301 of file AsgAnalysisConfig.py.

301  def makeAlgs (self, config) :
302 
303  if config.dataType() is DataType.Data:
304  # there are no generator weights in data!
305  return
306 
307  if self.runNumber is None:
308  self.runNumber = config.runNumber()
309 
310  if self.saveCutBookkeepers and not self.runNumber:
311  raise ValueError ("invalid run number: " + str(self.runNumber))
312 
313  # Set up the CutBookkeepers algorithm:
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
320  else:
321  alg.enableSystematics = not config.noSystematics()
322  if self.histPattern:
323  alg.histPattern = self.histPattern
324  config.addPrivateTool( 'truthWeightTool', 'PMGTools::PMGTruthWeightTool' )
325 
326  # Set up the weights algorithm:
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')
331 
332 

Member Data Documentation

◆ runNumber

python.AsgAnalysisConfig.GeneratorAnalysisBlock.runNumber

Definition at line 308 of file AsgAnalysisConfig.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11