ATLAS Offline Software
ParticleLevelMissingETConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AnalysisAlgorithmsConfig.ConfigBlock import ConfigBlock
4 
5 
6 class ParticleLevelMissingETBlock(ConfigBlock):
7  """ConfigBlock for particle-level truth missing transverse energy"""
8 
9  def __init__(self):
10  super(ParticleLevelMissingETBlock, self).__init__()
11  self.addOption('containerName', 'MET_Truth', type=str,
12  info='the name of the input truth MET container')
13  self.addOption('outputContainerName', 'TruthMET', type=str,
14  info='the name of the output MET container')
15  # Always skip on data
16  self.setOptionValue('skipOnData', True)
17 
18  def makeAlgs(self, config):
19  # decorate the energy and phi so we can save them later
20  alg = config.createAlgorithm( 'CP::ParticleLevelMissingETAlg', 'ParticleLevelMissingET' + self.containerName )
21  alg.met = self.containerName
22 
23  config.setSourceName (self.outputContainerName, self.containerName, isMet=True)
24  if config.wantCopy (self.outputContainerName):
25  alg = config.createAlgorithm( 'CP::AsgShallowCopyAlg', 'TruthMissingETShallowCopyAlg' )
26  alg.input = config.readName (self.outputContainerName)
27  alg.output = config.copyName (self.outputContainerName)
28 
29  config.addOutputVar (self.outputContainerName, 'met', 'met', noSys=True)
30  config.addOutputVar (self.outputContainerName, 'phi', 'phi', noSys=True)
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock
Definition: ParticleLevelMissingETConfig.py:6
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.__init__
def __init__(self)
Definition: ParticleLevelMissingETConfig.py:9
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.makeAlgs
def makeAlgs(self, config)
Definition: ParticleLevelMissingETConfig.py:18