ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
EventCommonD3PDMaker
python
DRIndexMultiAssociation.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 EventCommonD3PDMaker/python/DRIndexMultiAssociation.py
5
# @author scott snyder <snyder@bnl.gov>
6
# @author Ryan Reece <ryan.reece@cern.ch>
7
# @date Dec, 2009
8
# @brief Helper for setting up an association to objects within a DR cone,
9
# represented by indices.
10
#
11
12
13
from
D3PDMakerCoreComps.D3PDObject
import
D3PDObject
14
from
AthenaConfiguration.ComponentFactory
import
CompFactory
15
16
D3PD = CompFactory.D3PD
17
18
19
def
DRIndexMultiAssociation (parent,
20
type_name,
21
default_sgkey,
22
default_drcut,
23
prefix = '',
24
target = '',
25
level = 0,
26
blockname = None,
27
*args, **kw):
28
"""Helper for setting up an association to objects within a DR cone,
29
represented by indices.
30
"""
31
32
33
if
blockname
is
None
:
34
blockname = prefix +
'DRIndexMultiAssoc'
35
36
def
maker (name, prefix, object_name,
37
sgkey = default_sgkey,
38
getter = None,
39
assoc = None,
40
drcut = default_drcut):
41
42
if
not
getter:
43
getter =
D3PD.SGDataVectorGetterTool
\
44
(name +
'_Getter'
,
45
TypeName = type_name,
46
SGKey = sgkey)
47
if
not
assoc:
48
assoc =
D3PD.DRConeAssociationTool
(name +
'Assoc'
,
49
Getter = getter,
50
DRCut = drcut)
51
52
filler = D3PD.ContainedVectorMultiAssociationFillerTool \
53
(name,
54
Prefix = prefix,
55
Associator = assoc,
56
NrowName =
''
)
57
indexer =
D3PD.IndexFillerTool
\
58
(name +
'Index'
,
59
Target = target)
60
filler.BlockFillers += [indexer]
61
return
filler
62
63
64
obj = D3PDObject (maker, prefix)
65
parent.defineBlock (level, blockname, obj)
66
return
obj
D3PD::DRConeAssociationTool
Associate all particles within a DR cut.
Definition
DRConeAssociationTool.h:43
D3PD::IndexFillerTool
Fill an index of an object within a container.
Definition
IndexFillerTool.h:32
D3PD::SGDataVectorGetterTool
Getter tool to retrieve DataVector/List collections from StoreGate.
Definition
SGDataVectorGetterTool.h:55
Generated on
for ATLAS Offline Software by
1.17.0