ATLAS Offline Software
Loading...
Searching...
No Matches
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>
16
17
18namespace PMGTools
19{
22
24 : public asg::AsgTool, virtual public IAsgSelectionTool
25 {
26 // Create a proper constructor for Athena
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;
72
74
75 private:
80
82 private:
84
86 private:
87 std::unique_ptr<const SG::AuxElement::Accessor<std::vector<ElementLink<xAOD::TruthParticleContainer>>>> m_parentsAccessor{};
88 };
89}
90
91#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
std::unique_ptr< const SG::AuxElement::Accessor< std::vector< ElementLink< xAOD::TruthParticleContainer > > > > m_parentsAccessor
common parents accessor
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
virtual asg::AcceptData accept(const xAOD::IParticle *) const override
The main accept method: the actual cuts are applied here.
const xAOD::TruthParticle * getParent(const xAOD::TruthParticle *truthParticle, size_t index) const
Helper function get a parent by index.
std::vector< int > m_requiredParentPDGIDs
tool properties
int m_requiredParentIndex
Index for the required parent particles.
size_t getNParents(const xAOD::TruthParticle *truthParticle) const
Helper function to get the number of parent particles.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
int m_truthParticleIndex
Index for the truth particle link.
asg::AcceptInfo m_accept
the AcceptInfo we are using
PMGDecayProductsSelectionTool(const std::string &name)
standard constructor
asg::AcceptData hasRequiredInitialParent(const xAOD::TruthParticle *truthParticle, asg::AcceptData &acceptData) const
Helper function to check for required parent particles.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Class providing the definition of the 4-vector interface.
Tool providing sample cross-sections and k-factors etc.
Definition index.py:1
TruthParticle_v1 TruthParticle
Typedef to implementation.