ATLAS Offline Software
Loading...
Searching...
No Matches
VertexRoiSelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETTRACKPERFMON_VERTEXROISELECTIONTOOL_H
6#define INDETTRACKPERFMON_VERTEXROISELECTIONTOOL_H
7
15
17#include "AsgTools/IAsgTool.h"
18#include "AsgTools/AsgTool.h"
20#include "AthLinks/ElementLink.h"
21
23#include <string>
24#include <vector>
25
27
28namespace IDTPM {
29
31
33 public virtual asg::IAsgTool,
34 public asg::AsgTool {
35
36 public:
37
39
41 VertexRoiSelectionTool( const std::string& name );
42
44 virtual ~VertexRoiSelectionTool() = default;
45
47 virtual StatusCode initialize() override;
48
50 StatusCode selectVerticesInRoI(
51 TrackAnalysisCollections& trkAnaColls,
53
55 template< class V >
56 bool accept( const V& v, const TrigRoiDescriptor* r ) const;
57
59 template< class V >
60 std::vector< const V* > getVertices(
61 const std::vector< const V* >& vvec,
62 const TrigRoiDescriptor* r ) const;
63
65 std::vector< const xAOD::Vertex* > getTrigVertices(
66 const std::vector< const xAOD::Vertex* >& vvec,
67 const ElementLink< TrigRoiDescriptorCollection >& roiLink ) const;
68
69 private:
70
73 this, "TriggerVertexContainerName", "", "Name of container of trigger vertices" };
74
76 PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool {
77 this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", "" };
78
79 }; // class VertexRoiSelectionTool
80
81} // namespace IDTPM
82
83#endif // > !INDETTRACKPERFMON_VERTEXROISELECTIONTOOL_H
virtual StatusCode initialize() override
Initialize.
StatusCode selectVerticesInRoI(TrackAnalysisCollections &trkAnaColls, const ElementLink< TrigRoiDescriptorCollection > &roiLink)
Main Vertex selection method.
std::vector< const V * > getVertices(const std::vector< const V * > &vvec, const TrigRoiDescriptor *r) const
vertex getter function (for offline tracks or truth particles)
SG::ReadHandleKey< xAOD::VertexContainer > m_triggerVertexContainerName
Trigger vertex container's name.
bool accept(const V &v, const TrigRoiDescriptor *r) const
geometric RoI filters - for non-trigger veritices (e.g. offline, truth, etc.)
ASG_TOOL_CLASS(VertexRoiSelectionTool, IAsgTool)
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
TrigDecTool.
std::vector< const xAOD::Vertex * > getTrigVertices(const std::vector< const xAOD::Vertex * > &vvec, const ElementLink< TrigRoiDescriptorCollection > &roiLink) const
TrigDecTool- and EventView-based getter function for trigger vertices.
VertexRoiSelectionTool(const std::string &name)
Constructor.
virtual ~VertexRoiSelectionTool()=default
Destructor.
Property holding a SG store/key/clid from which a ReadHandle is made.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
int r
Definition globals.cxx:22
Athena include(s).