ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
PMGTools
PMGTools
PMGDecayProductsSelectionTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
#ifndef PMG_TOOLS__PMG_DECAY_PRODUCTS_SELECTION_TOOL_H
10
#define PMG_TOOLS__PMG_DECAY_PRODUCTS_SELECTION_TOOL_H
11
12
#include <
AsgTools/AsgTool.h
>
13
#include <
PATCore/IAsgSelectionTool.h
>
14
#include <
xAODTruth/TruthParticle.h
>
15
#include <
xAODTruth/TruthParticleContainer.h
>
16
17
18
namespace
PMGTools
19
{
22
23
class
PMGDecayProductsSelectionTool
final
24
:
public
asg::AsgTool
,
virtual
public
IAsgSelectionTool
25
{
26
// Create a proper constructor for Athena
27
ASG_TOOL_CLASS
(
PMGDecayProductsSelectionTool
,
IAsgSelectionTool
)
28
29
30
31
public
:
32
PMGDecayProductsSelectionTool
(
const
std::string& name);
33
34
35
36
37
//
38
// inherited interface
39
//
40
41
virtual
StatusCode
initialize
()
override
;
42
43
virtual
const
asg::AcceptInfo
&
getAcceptInfo
()
const override
;
44
45
virtual
asg::AcceptData
accept
(
const
xAOD::IParticle
*
/*part*/
)
const override
;
46
47
48
49
//
50
// private interface
51
//
52
54
private
:
55
asg::AcceptData
hasRequiredInitialParent
(
const
xAOD::TruthParticle
*truthParticle,
asg::AcceptData
& acceptData)
const
;
56
58
private
:
59
size_t
getNParents
(
const
xAOD::TruthParticle
*truthParticle)
const
;
60
62
private
:
63
const
xAOD::TruthParticle
*
getParent
(
const
xAOD::TruthParticle
*truthParticle,
64
size_t
index
)
const
;
65
68
69
private
:
70
std::vector<int>
m_requiredParentPDGIDs
;
71
std::vector<int>
m_allowedIntermediatePDGIDs
;
72
74
75
private
:
77
int
m_truthParticleIndex
{ -1 };
79
int
m_requiredParentIndex
{ -1 };
80
82
private
:
83
asg::AcceptInfo
m_accept
;
84
86
private
:
87
std::unique_ptr<const SG::AuxElement::Accessor<std::vector<ElementLink<xAOD::TruthParticleContainer>>>>
m_parentsAccessor
{};
88
};
89
}
90
91
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
TruthParticleContainer.h
TruthParticle.h
IAsgSelectionTool.h
IAsgSelectionTool
Definition
IAsgSelectionTool.h:28
PMGTools::PMGDecayProductsSelectionTool::m_parentsAccessor
std::unique_ptr< const SG::AuxElement::Accessor< std::vector< ElementLink< xAOD::TruthParticleContainer > > > > m_parentsAccessor
common parents accessor
Definition
PMGDecayProductsSelectionTool.h:87
PMGTools::PMGDecayProductsSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition
PMGDecayProductsSelectionTool.cxx:73
PMGTools::PMGDecayProductsSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *) const override
The main accept method: the actual cuts are applied here.
Definition
PMGDecayProductsSelectionTool.cxx:81
PMGTools::PMGDecayProductsSelectionTool::getParent
const xAOD::TruthParticle * getParent(const xAOD::TruthParticle *truthParticle, size_t index) const
Helper function get a parent by index.
Definition
PMGDecayProductsSelectionTool.cxx:142
PMGTools::PMGDecayProductsSelectionTool::m_requiredParentPDGIDs
std::vector< int > m_requiredParentPDGIDs
tool properties
Definition
PMGDecayProductsSelectionTool.h:70
PMGTools::PMGDecayProductsSelectionTool::m_requiredParentIndex
int m_requiredParentIndex
Index for the required parent particles.
Definition
PMGDecayProductsSelectionTool.h:79
PMGTools::PMGDecayProductsSelectionTool::getNParents
size_t getNParents(const xAOD::TruthParticle *truthParticle) const
Helper function to get the number of parent particles.
Definition
PMGDecayProductsSelectionTool.cxx:127
PMGTools::PMGDecayProductsSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
PMGDecayProductsSelectionTool.cxx:37
PMGTools::PMGDecayProductsSelectionTool::m_truthParticleIndex
int m_truthParticleIndex
Index for the truth particle link.
Definition
PMGDecayProductsSelectionTool.h:77
PMGTools::PMGDecayProductsSelectionTool::m_accept
asg::AcceptInfo m_accept
the AcceptInfo we are using
Definition
PMGDecayProductsSelectionTool.h:83
PMGTools::PMGDecayProductsSelectionTool::PMGDecayProductsSelectionTool
PMGDecayProductsSelectionTool(const std::string &name)
standard constructor
Definition
PMGDecayProductsSelectionTool.cxx:27
PMGTools::PMGDecayProductsSelectionTool::hasRequiredInitialParent
asg::AcceptData hasRequiredInitialParent(const xAOD::TruthParticle *truthParticle, asg::AcceptData &acceptData) const
Helper function to check for required parent particles.
Definition
PMGDecayProductsSelectionTool.cxx:106
PMGTools::PMGDecayProductsSelectionTool::m_allowedIntermediatePDGIDs
std::vector< int > m_allowedIntermediatePDGIDs
Definition
PMGDecayProductsSelectionTool.h:71
asg::AcceptData
Definition
AcceptData.h:31
asg::AcceptInfo
Definition
AcceptInfo.h:28
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
PMGTools
Tool providing sample cross-sections and k-factors etc.
Definition
AnalysisCommon/PMGTools/PMGTools/IPMGSherpaVjetsSysTool.h:16
index
Definition
index.py:1
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
Generated on
for ATLAS Offline Software by
1.17.0