ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
egammaD3PDMaker
python
egammaTruthD3PDObject.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
#
4
# @file egammaD3PDMaker/python/egammaTruthD3PDObject.py
5
# @author scott snyder <snyder@bnl.gov>
6
# @date Mar, 2011
7
# @brief Configure egtruth D3PD object.
8
#
9
# This is meant to reproduce the egtruth block from the CBNTs.
10
#
11
12
13
from
D3PDMakerCoreComps.D3PDObject
import
make_SGDataVector_D3PDObject
14
from
D3PDMakerConfig.D3PDMakerFlags
import
D3PDMakerFlags
15
from
D3PDMakerCoreComps.SimpleAssociation
import
SimpleAssociation
16
from
AthenaConfiguration.ComponentFactory
import
CompFactory
17
18
D3PD = CompFactory.D3PD
19
20
21
#FIXME:
22
egammaTruth_sgkey =
'egammaTruth'
23
24
25
egammaTruthD3PDObject = make_SGDataVector_D3PDObject \
26
(
'DataVector<xAOD::TruthParticle_v1>'
,
27
egammaTruth_sgkey,
28
'egtruth_'
,
29
'egammaTruthD3PDObject'
)
30
31
def
_egammaTruthAlgHook
(c, flags, acc, *args, **kw):
32
from
egammaD3PDAnalysis.egammaTruthParticleConfig \
33
import
egammaTruthParticleCfg
34
acc.merge (egammaTruthParticleCfg (flags))
35
return
36
egammaTruthD3PDObject.defineHook (_egammaTruthAlgHook)
37
38
egammaTruthD3PDObject.defineBlock (0,
'TruthKin'
,
39
D3PD.FourMomFillerTool
,
40
WriteM =
False
)
41
42
egammaTruthD3PDObject.defineBlock (0,
'TruthInfo'
,
43
# TruthD3PDMaker
44
D3PD.TruthParticleFillerTool
)
45
egammaTruthD3PDObject.defineBlock (
46
0,
'CaloPos'
,
47
D3PD.AuxDataFillerTool
,
48
AuxPrefix = D3PDMakerFlags.EgammaUserDataPrefix,
49
Vars = [
'etaCalo #Eta position of the impact of the track in calorimeter sampling 2'
,
50
'phiCalo #Phi position of the impact of the track in calorimeter sampling 2'
])
51
egammaTruthD3PDObject.defineBlock (
52
0,
'TruthIso'
,
53
D3PD.AuxDataFillerTool
,
54
AuxPrefix = D3PDMakerFlags.EgammaUserDataPrefix,
55
Vars = [
'Etcone20'
])
56
57
58
ProdVertexAssoc = SimpleAssociation \
59
(egammaTruthD3PDObject,
60
# TruthD3PDMaker
61
D3PD.TruthParticleProdVertexAssociationTool
,
62
level = 1,
63
prefix =
'vx_'
,
64
blockname =
'ProdVert'
)
65
ProdVertexAssoc.defineBlock (
66
1,
'ProdVertPos'
,
67
D3PD.AuxDataFillerTool
,
68
Vars = [
'x'
,
'y'
,
'z'
,
'uid'
])
69
D3PD::AuxDataFillerTool
Copy aux data to D3PD.
Definition
AuxDataFillerTool.h:35
D3PD::FourMomFillerTool
Block filler tool for a four-momentum.
Definition
FourMomFillerTool.h:56
D3PD::TruthParticleFillerTool
Definition
TruthParticleFillerTool.h:26
D3PD::TruthParticleProdVertexAssociationTool
Associate from a TruthParticle to its GenVertex production vertex.
Definition
TruthParticleProdVertexAssociationTool.h:33
python.egammaTruthD3PDObject._egammaTruthAlgHook
_egammaTruthAlgHook(c, flags, acc, *args, **kw)
Definition
egammaTruthD3PDObject.py:31
Generated on
for ATLAS Offline Software by
1.17.0