ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TruthParticleLevelAnalysisAlgorithms
python
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
meta={
'role'
:
'container'
})
16
# Always skip on data
17
self.setOptionValue(
'skipOnData'
,
True
)
18
19
def
instanceName
(self) :
20
"""Return the instance name for this block"""
21
return
self.
containerName
22
23
def
makeAlgs
(self, config):
24
# decorate the energy and phi so we can save them later
25
alg = config.createAlgorithm(
'CP::ParticleLevelMissingETAlg'
,
26
'ParticleLevelMissingET'
,
27
reentrant=
True
)
28
alg.met = self.
containerName
29
30
config.setSourceName (self.
outputContainerName
, self.
containerName
, isMet=
True
)
31
if
config.wantCopy (self.
outputContainerName
):
32
alg = config.createAlgorithm(
'CP::AsgShallowCopyAlg'
,
'TruthMissingETShallowCopyAlg'
)
33
alg.input = config.readName (self.
outputContainerName
)
34
alg.output = config.copyName (self.
outputContainerName
)
35
36
config.addOutputVar (self.
outputContainerName
,
'met'
,
'met'
, noSys=
True
, auxType=
'float'
)
37
config.addOutputVar (self.
outputContainerName
,
'phi'
,
'phi'
, noSys=
True
, auxType=
'float'
)
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock
Definition
ParticleLevelMissingETConfig.py:6
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.__init__
__init__(self)
Definition
ParticleLevelMissingETConfig.py:9
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.instanceName
instanceName(self)
Definition
ParticleLevelMissingETConfig.py:19
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.outputContainerName
outputContainerName
Definition
ParticleLevelMissingETConfig.py:30
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.containerName
containerName
Definition
ParticleLevelMissingETConfig.py:30
ParticleLevelMissingETConfig.ParticleLevelMissingETBlock.makeAlgs
makeAlgs(self, config)
Definition
ParticleLevelMissingETConfig.py:23
Generated on
for ATLAS Offline Software by
1.17.0