ATLAS Offline Software
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 
16 #include "AsgTools/IAsgTool.h"
18 #include "AsgTools/AsgTool.h"
20 #include "AthLinks/ElementLink.h"
21 
23 #include <string>
24 #include <vector>
25 
27 
28 namespace IDTPM {
29 
30  class TrackAnalysisCollections;
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 
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
IDTPM::VertexRoiSelectionTool::ASG_TOOL_CLASS
ASG_TOOL_CLASS(VertexRoiSelectionTool, IAsgTool)
IDTPM::VertexRoiSelectionTool::getVertices
std::vector< const V * > getVertices(const std::vector< const V * > &vvec, const TrigRoiDescriptor *r) const
vertex getter function (for offline tracks or truth particles)
Definition: VertexRoiSelectionTool.cxx:95
beamspotman.r
def r
Definition: beamspotman.py:676
IDTPM::VertexRoiSelectionTool::selectVerticesInRoI
StatusCode selectVerticesInRoI(TrackAnalysisCollections &trkAnaColls, const ElementLink< TrigRoiDescriptorCollection > &roiLink)
Main Vertex selection method.
Definition: VertexRoiSelectionTool.cxx:159
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
IDTPM::VertexRoiSelectionTool::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
TrigDecTool.
Definition: VertexRoiSelectionTool.h:76
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:46
IDTPM::VertexRoiSelectionTool::accept
bool accept(const V &v, const TrigRoiDescriptor *r) const
geometric RoI filters - for non-trigger veritices (e.g. offline, truth, etc.)
Definition: VertexRoiSelectionTool.cxx:56
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
TrigDecisionTool.h
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
IDTPM::VertexRoiSelectionTool::~VertexRoiSelectionTool
virtual ~VertexRoiSelectionTool()=default
Destructor.
IDTPM::VertexRoiSelectionTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition: VertexRoiSelectionTool.cxx:37
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IAsgTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.PyAthena.v
v
Definition: PyAthena.py:154
IDTPM::VertexRoiSelectionTool::getTrigVertices
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.
Definition: VertexRoiSelectionTool.cxx:127
TrigRoiDescriptorCollection
Definition: TrigRoiDescriptorCollection.h:21
IDTPM::VertexRoiSelectionTool::VertexRoiSelectionTool
VertexRoiSelectionTool(const std::string &name)
Constructor.
Definition: VertexRoiSelectionTool.cxx:29
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
AsgTool.h
IDTPM::VertexRoiSelectionTool::m_triggerVertexContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_triggerVertexContainerName
Trigger vertex container's name.
Definition: VertexRoiSelectionTool.h:72
IDTPM::VertexRoiSelectionTool
Definition: VertexRoiSelectionTool.h:34