ATLAS Offline Software
Functions
python.GeneratorAnalysisSequence Namespace Reference

Functions

def makeGeneratorAnalysisSequence (dataType, saveCutBookkeepers=False, runNumber=0, cutBookkeepersSystematics=False)
 

Function Documentation

◆ makeGeneratorAnalysisSequence()

def python.GeneratorAnalysisSequence.makeGeneratorAnalysisSequence (   dataType,
  saveCutBookkeepers = False,
  runNumber = 0,
  cutBookkeepersSystematics = False 
)
Create a generator analysis algorithm sequence

Keyword arguments:
  dataType -- The data type to run on ("mc" or "afii")
  saveCutBookkeepers -- save cut bokkeepers information into output file
  runNumber -- MC run number
  cutBookkeepersSystematics -- store CutBookkeepers systematics

Definition at line 7 of file GeneratorAnalysisSequence.py.

8  saveCutBookkeepers=False,
9  runNumber=0,
10  cutBookkeepersSystematics=False ):
11  """Create a generator analysis algorithm sequence
12 
13  Keyword arguments:
14  dataType -- The data type to run on ("mc" or "afii")
15  saveCutBookkeepers -- save cut bokkeepers information into output file
16  runNumber -- MC run number
17  cutBookkeepersSystematics -- store CutBookkeepers systematics
18  """
19 
20  if dataType not in ["mc", "afii"] :
21  raise ValueError ("invalid data type: " + dataType)
22 
23  if saveCutBookkeepers and not runNumber:
24  raise ValueError ("invalid run number: " + 0)
25 
26  # Create the analysis algorithm sequence object:
27  seq = AnaAlgSequence( "GeneratorAnalysisSequence" )
28 
29  # Set up the CutBookkeepers algorithm:
30  if saveCutBookkeepers:
31  alg = createAlgorithm('CP::AsgCutBookkeeperAlg', 'CutBookkeeperAlg')
32  alg.runNumber = runNumber
33  alg.enableSystematics = cutBookkeepersSystematics
34  addPrivateTool( alg, 'truthWeightTool', 'PMGTools::PMGTruthWeightTool' )
35  seq.append( alg, inputPropName = None )
36 
37  # Set up the weights algorithm:
38  alg = createAlgorithm( 'CP::PMGTruthWeightAlg', 'PMGTruthWeightAlg' )
39  addPrivateTool( alg, 'truthWeightTool', 'PMGTools::PMGTruthWeightTool' )
40  alg.decoration = 'generatorWeight_%SYS%'
41 
42  seq.append( alg, inputPropName = None )
43 
44  # Return the sequence:
45  return seq
python.GeneratorAnalysisSequence.makeGeneratorAnalysisSequence
def makeGeneratorAnalysisSequence(dataType, saveCutBookkeepers=False, runNumber=0, cutBookkeepersSystematics=False)
Definition: GeneratorAnalysisSequence.py:7
python.DualUseConfig.addPrivateTool
def addPrivateTool(alg, toolName, typeName)
Definition: DualUseConfig.py:180
python.DualUseConfig.createAlgorithm
def createAlgorithm(typeName, instanceName)
Definition: DualUseConfig.py:56