ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TruthParticleLevelAnalysisAlgorithms
python
ParticleLevelResonancesConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
from
AnalysisAlgorithmsConfig.ConfigBlock
import
ConfigBlock
4
5
6
class
ParticleLevelResonancesBlock
(ConfigBlock):
7
"""ConfigBlock for particle-level truth resonances, i.e. unstable objects that """
8
"""would NOT be used to build a detector-level final state. This includes """
9
"""TruthBoson, TruthBottom, TruthTop, TruthBSM. Provides only basic functionalities, """
10
"""like storing the four-vector information, applying pT/eta selections, and thinning."""
11
12
def
__init__
(self):
13
super(ParticleLevelResonancesBlock, self).
__init__
()
14
self.addOption(
'containerName'
,
''
, type=str,
15
info=
'the name of the input truth container. Supported options: `TruthBoson`, `TruthBottom`, `TruthTop`, `TruthBSM`.'
)
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
config.setSourceName (self.
containerName
, self.
containerName
)
25
26
# decorate the missing elements of the 4-vector so we can save it later
27
alg = config.createAlgorithm(
'CP::ParticleLevelPtEtaPhiDecoratorAlg'
,
28
'ParticleLevelPtEtaPhiEDecoratorResonances'
,
29
reentrant=
True
)
30
alg.particles = self.
containerName
31
32
outputVars = [
33
[
'pt'
,
'pt'
,
'float'
],
34
[
'eta'
,
'eta'
,
'float'
],
35
[
'phi'
,
'phi'
,
'float'
],
36
[
'm'
,
'm'
,
'float'
],
37
[
'classifierParticleType'
,
'type'
,
'unsigned'
],
38
[
'classifierParticleOrigin'
,
'origin'
,
'unsigned'
],
39
[
'pdgId'
,
'pdgId'
,
'int'
],
40
[
'status'
,
'status'
,
'int'
],
41
]
42
for
decoration, branch, auxType
in
outputVars:
43
config.addOutputVar (self.
containerName
, decoration, branch, noSys=
True
, auxType=auxType)
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock
Definition
ParticleLevelResonancesConfig.py:6
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.__init__
__init__(self)
Definition
ParticleLevelResonancesConfig.py:12
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.containerName
containerName
Definition
ParticleLevelResonancesConfig.py:24
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.instanceName
instanceName(self)
Definition
ParticleLevelResonancesConfig.py:19
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.makeAlgs
makeAlgs(self, config)
Definition
ParticleLevelResonancesConfig.py:23
Generated on
for ATLAS Offline Software by
1.17.0