ATLAS Offline Software
Loading...
Searching...
No Matches
JetTrackSumMomentsTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5// JetTrackSumMomentsTool.h
6
7#ifndef JETMOMENTTOOLS_JETTRACKSUMMOMENTSTOOL_H
8#define JETMOMENTTOOLS_JETTRACKSUMMOMENTSTOOL_H
9
10
21
22
23#include "AsgTools/ToolHandle.h"
24#include "AsgTools/AsgTool.h"
31
35#include "xAODTracking/Vertex.h"
37
38#include <vector>
39#include <string>
40
41
43 virtual public IJetDecorator {
45
46public:
47
48 // Constructor from tool name
49 JetTrackSumMomentsTool(const std::string& name);
50
51 // Initialization.
52 virtual StatusCode initialize() override;
53
54 // Inherited methods to modify a jet
55 // Calls moment and puts the results in the jet
56 virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
57
58 // Local method to return the vector track sums
59 std::pair<float,float>
61 const std::vector<const xAOD::TrackParticle*>&,
62 const jet::TrackVertexAssociation*) const;
63
64 // Local method to return the HS vertex - that of type PriVtx
66
67private:
68
69 Gaudi::Property<std::string> m_assocTracksName{this, "AssociatedTracks", "", "SG key for associated tracks container"};
70 Gaudi::Property<bool> m_requireTrackPV{this, "RequireTrackPV", true, "Require track to be from the primary vertex?"};
71 Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
72 ToolHandle<InDet::IInDetTrackSelectionTool> m_htsel{this, "TrackSelector", "", "Track selector"};
73 Gaudi::Property<bool> m_useOriginVertex = {this, "UseOriginVertex", false, "use origin vertex for each jet"};
74
75 SG::ReadHandleKey< xAOD::VertexContainer> m_vertexContainer_key{this, "VertexContainer", "", "Vertex container key"};
76 SG::ReadHandleKey<jet::TrackVertexAssociation> m_tva_key{this, "TrackVertexAssociation", "", "Track vertex association key"};
77
78 SG::WriteDecorHandleKey<xAOD::JetContainer> m_trackSumPtKey{this, "SumPtName", "TrackSumPt", "SG key for output track SumPt decoration"};
79 SG::WriteDecorHandleKey<xAOD::JetContainer> m_trackSumMassKey{this, "SumMassName", "TrackSumMass", "SG key for output track SumMass decoration"};
80};
81
82#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Interface for adding a decoration to a jet container.
SG::ReadHandleKey< jet::TrackVertexAssociation > m_tva_key
ToolHandle< InDet::IInDetTrackSelectionTool > m_htsel
const xAOD::Vertex * findHSVertex(const xAOD::VertexContainer *&) const
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_trackSumMassKey
Gaudi::Property< bool > m_requireTrackPV
Gaudi::Property< bool > m_useOriginVertex
Gaudi::Property< std::string > m_jetContainerName
SG::WriteDecorHandleKey< xAOD::JetContainer > m_trackSumPtKey
std::pair< float, float > getJetTrackSums(const xAOD::Vertex *, const std::vector< const xAOD::TrackParticle * > &, const jet::TrackVertexAssociation *) const
Gaudi::Property< std::string > m_assocTracksName
JetTrackSumMomentsTool(const std::string &name)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
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
Class to hold N-to-one aassociations between tracks and vertices.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".