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
meta={
'role'
:
'container'
,
'choices'
:([
'TruthBoson'
,
'TruthBottom'
,
'TruthTop'
,
'TruthBSM'
],1)})
17
# Always skip on data
18
self.setOptionValue(
'skipOnData'
,
True
)
19
20
def
instanceName
(self) :
21
"""Return the instance name for this block"""
22
return
self.
containerName
23
24
def
makeAlgs
(self, config):
25
config.setSourceName (self.
containerName
, self.
containerName
)
26
27
# decorate the missing elements of the 4-vector so we can save it later
28
alg = config.createAlgorithm(
'CP::ParticleLevelPtEtaPhiDecoratorAlg'
,
29
'ParticleLevelPtEtaPhiEDecoratorResonances'
,
30
reentrant=
True
)
31
alg.particles = self.
containerName
32
33
outputVars = [
34
[
'pt'
,
'pt'
,
'float'
],
35
[
'eta'
,
'eta'
,
'float'
],
36
[
'phi'
,
'phi'
,
'float'
],
37
[
'm'
,
'm'
,
'float'
],
38
[
'classifierParticleType'
,
'type'
,
'unsigned'
],
39
[
'classifierParticleOrigin'
,
'origin'
,
'unsigned'
],
40
[
'pdgId'
,
'pdgId'
,
'int'
],
41
[
'status'
,
'status'
,
'int'
],
42
]
43
for
decoration, branch, auxType
in
outputVars:
44
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:25
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.instanceName
instanceName(self)
Definition
ParticleLevelResonancesConfig.py:20
ParticleLevelResonancesConfig.ParticleLevelResonancesBlock.makeAlgs
makeAlgs(self, config)
Definition
ParticleLevelResonancesConfig.py:24
Generated on
for ATLAS Offline Software by
1.17.0