ATLAS Offline Software
Loading...
Searching...
No Matches
JetPtAssociationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// JetPtAssociationTool.h
6
7#ifndef JetMomentTools_JetPtAssociationTool_H
8#define JetMomentTools_JetPtAssociationTool_H
9
18
19#include "AsgTools/AsgTool.h"
25
27 virtual public IJetDecorator {
29
30public:
31
32 typedef std::vector<const xAOD::IParticle*> APVector;
33 typedef std::vector<unsigned> IndexVector;
34 typedef std::vector<float> FloatVector;
35
36public:
37
39 JetPtAssociationTool(const std::string& myname);
40
42 virtual StatusCode initialize() override;
43
47 virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
48
49private: // data
50
56 int ptfrac(const APVector& aps, const xAOD::JetContainer& jets, FloatVector& ptsums) const;
57
64 int match(const APVector& aps, const xAOD::Jet& jet, APVector& apvs, double& ptsum_constituents) const;
65
67 Gaudi::Property<std::string> m_aname{this, "AssociationName", "", "Key for association vector"};
68 Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "Input jet container"};
69 SG::ReadHandleKey<xAOD::JetContainer> m_matchingContainerName{this, "MatchingJetContainer", "", "Jet container to match to"};
70
71 SG::WriteDecorHandleKey<xAOD::JetContainer> m_assocFracKey{this, "AssociationFractionName", "AssociationFraction", "SG key for output AssociationFraction decoration"};
72 SG::WriteDecorHandleKey<xAOD::JetContainer> m_assocLinkKey{this, "AssociationLinkName", "AssociationLink", "SG key for output AssociationLink decoration"};
73};
74
75#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid from which a ReadHandle is made.
Interface for adding a decoration to a jet container.
std::vector< unsigned > IndexVector
JetPtAssociationTool(const std::string &myname)
Constructor from tool name.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_assocLinkKey
std::vector< float > FloatVector
int match(const APVector &aps, const xAOD::Jet &jet, APVector &apvs, double &ptsum_constituents) const
Return the vector of AP's that appear as constituents of the given jet.
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Inherited method to modify a jet.
virtual StatusCode initialize() override
Initialization.
Gaudi::Property< std::string > m_aname
Properties.
Gaudi::Property< std::string > m_jetContainerName
SG::WriteDecorHandleKey< xAOD::JetContainer > m_assocFracKey
std::vector< const xAOD::IParticle * > APVector
int ptfrac(const APVector &aps, const xAOD::JetContainer &jets, FloatVector &ptsums) const
Return the matched pT sum for each jet in a collection.
SG::ReadHandleKey< xAOD::JetContainer > m_matchingContainerName
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".