ATLAS Offline Software
HIVertexSelectionTool.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #pragma once
8 #ifndef HIEVENTUTILS_HIVERTEXSELECTIONTOOL_H
9 #define HIEVENTUTILS_HIVERTEXSELECTIONTOOL_H
10 
12 #include "AsgTools/AsgTool.h"
13 #include "AsgTools/ToolHandle.h"
15 
16 namespace HI {
17 
19  public asg::AsgTool {
23  public:
24 
25  HIVertexSelectionTool( const std::string& name );
27 
28  virtual StatusCode initialize() override;
29  virtual StatusCode finalize() override;
30  //R.Longo 13-10-2019 - Replacing PATCore/TAccept (inherited from 21.0 HI-equalization)
31  virtual const asg::AcceptInfo& getAcceptInfo() const override;
32  // we have to implement the IParticle function in order to inherit from IAsgSelectionTool
33  // it will throw an exception
34  virtual asg::AcceptData accept( const xAOD::IParticle* ) const override;
35  virtual asg::AcceptData accept( const xAOD::Vertex& ) const override;
36 
37  private:
39 
40  // configureable properties
41  bool m_requirePrimary = true;
42  double m_maxAbsZ = -1;
43 
44  ToolHandle< InDet::IInDetTrackSelectionTool > m_trkSelTool;
45  int m_minNtrk = -1;
46  double m_minRmsPt = -1.;
47  bool m_checkTracks = false; // an internal flag to indicate whether or not to loop over the vertex's track
48 
49  };
50 }
51 
52 
53 #endif // HIEVENTUTILS_HIVERTEXSELECTIONTOOL_H
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
HI::IHIVertexSelectionTool
Definition: IHIVertexSelectionTool.h:16
HI::HIVertexSelectionTool::m_maxAbsZ
double m_maxAbsZ
maximum |z| position of the vertex
Definition: HIVertexSelectionTool.h:42
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
HI::HIVertexSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *) const override
The main accept method: the actual cuts are applied here.
Definition: HIVertexSelectionTool.cxx:76
HI::HIVertexSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition: HIVertexSelectionTool.cxx:70
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
HI::HIVertexSelectionTool::m_accept
asg::AcceptInfo m_accept
Definition: HIVertexSelectionTool.h:38
asg::AcceptInfo
Definition: AcceptInfo.h:28
HI::HIVertexSelectionTool::m_trkSelTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkSelTool
track selection tool which can be optionally used for N_trk and sum pt cuts
Definition: HIVertexSelectionTool.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HI::HIVertexSelectionTool
Definition: HIVertexSelectionTool.h:19
HI::HIVertexSelectionTool::m_minNtrk
int m_minNtrk
Definition: HIVertexSelectionTool.h:45
IInDetTrackSelectionTool.h
HI::HIVertexSelectionTool::m_checkTracks
bool m_checkTracks
Definition: HIVertexSelectionTool.h:47
HI
Definition: HIEventDefs.h:14
HI::HIVertexSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HIVertexSelectionTool.cxx:29
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
HI::HIVertexSelectionTool::m_requirePrimary
bool m_requirePrimary
require the vertex to be of type PriVtx
Definition: HIVertexSelectionTool.h:41
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
HI::HIVertexSelectionTool::finalize
virtual StatusCode finalize() override
Definition: HIVertexSelectionTool.cxx:63
ToolHandle.h
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30
IHIVertexSelectionTool.h
HI::HIVertexSelectionTool::m_minRmsPt
double m_minRmsPt
Definition: HIVertexSelectionTool.h:46