ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
MuonD3PDMaker
python
TruthMuonD3PDObject.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
# @file MuonD3PDMaker/python/TruthMuonD3PDObject.py
4
# $author Srivas Prasad <srivas.prasad@cern.ch>
5
# @date March 2010
6
# @brief dump true muons - modeled on Tau code
7
8
9
from
D3PDMakerCoreComps.D3PDObject
import
make_SGDataVector_D3PDObject
10
from
AthenaConfiguration.ComponentFactory
import
CompFactory
11
12
D3PD = CompFactory.D3PD
13
14
15
TruthMuonD3PDObject = make_SGDataVector_D3PDObject (
'DataVector<xAOD::TruthParticle_v1>'
,
16
'D3PDTruthMuons'
,
17
'muonTruth_'
,
18
'TruthMuonD3PDObject'
)
19
def
_truthMuonAlgHook
(c, flags, acc, *args,
20
TruthContainer = 'TruthParticles',
21
sgkey = None,
22
prefix = None,
23
**kw):
24
algname = prefix +
'TruthMuonsToSG'
25
26
from
TruthD3PDMaker.MCTruthClassifierConfig \
27
import
D3PDMCTruthClassifierCfg
28
acc.merge (D3PDMCTruthClassifierCfg (flags))
29
30
acc.addEventAlgo (
D3PD.TruthMuonsToSG
\
31
(algname,
32
TruthMuonContainer = sgkey,
33
TruthContainer = TruthContainer,
34
Classifier = acc.getPublicTool (
'D3PDMCTruthClassifier'
)))
35
return
36
TruthMuonD3PDObject.defineHook (_truthMuonAlgHook)
37
38
39
#-----------------------------------------------------------------------------
40
# Blocks
41
#-----------------------------------------------------------------------------
42
TruthMuonD3PDObject.defineBlock (0,
'Kinematics'
,
43
D3PD.FourMomFillerTool
,
44
WriteEt =
False
,
45
WritePt =
True
,
46
WriteEtaPhi =
True
)
47
TruthMuonD3PDObject.defineBlock (0,
'Info'
,
48
# TruthD3PDMaker
49
D3PD.TruthParticleFillerTool
,
50
PDGIDVariable =
'PDGID'
)
51
truthMuon = \
52
TruthMuonD3PDObject.defineBlock (0,
'Classification'
,
53
# TruthD3PDMaker
54
D3PD.TruthParticleClassificationFillerTool
)
55
def
_truthClassifierHook
(c, flags, acc, *args, **kw):
56
from
TruthD3PDMaker.MCTruthClassifierConfig \
57
import
D3PDMCTruthClassifierCfg
58
acc.merge (D3PDMCTruthClassifierCfg (flags))
59
c.Classifier = acc.getPublicTool (
'D3PDMCTruthClassifier'
)
60
return
61
truthMuon.defineHook (_truthClassifierHook)
62
63
TruthMuonD3PDObject.defineBlock(99,
"TruthHits"
,
64
D3PD.MuonTruthHitsFillerTool
)
65
D3PD::FourMomFillerTool
Block filler tool for a four-momentum.
Definition
FourMomFillerTool.h:56
D3PD::MuonTruthHitsFillerTool
Fill truth hit information for muons.
Definition
MuonTruthHitsFillerTool.h:32
D3PD::TruthMuonsToSG
Definition
TruthMuonsToSG.h:25
D3PD::TruthParticleClassificationFillerTool
Definition
TruthParticleClassificationFillerTool.h:29
D3PD::TruthParticleFillerTool
Definition
TruthParticleFillerTool.h:26
python.TruthMuonD3PDObject._truthClassifierHook
_truthClassifierHook(c, flags, acc, *args, **kw)
Definition
TruthMuonD3PDObject.py:55
python.TruthMuonD3PDObject._truthMuonAlgHook
_truthMuonAlgHook(c, flags, acc, *args, TruthContainer='TruthParticles', sgkey=None, prefix=None, **kw)
Definition
TruthMuonD3PDObject.py:23
Generated on
for ATLAS Offline Software by
1.17.0