ATLAS Offline Software
VertexSelectionAlg.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef TRACKINGANALYSISALGORITHMS_VERTEXSELECTIONALG_H
6 #define TRACKINGANALYSISALGORITHMS_VERTEXSELECTIONALG_H
7 
8 // Framework include(s):
14 
15 // EDM include(s):
17 
18 // System include(s):
19 #include <string>
20 
21 namespace CP {
22 
31  class VertexSelectionAlg final : public EL::AnaAlgorithm {
32 
33  public:
36 
39 
41  virtual StatusCode initialize() override;
42 
44  virtual StatusCode execute() override;
45 
47  virtual StatusCode finalize() override;
48 
50 
51  private:
54 
56  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey {this, "VertexContainer", "PrimaryVertices", "Vertex container to check"};
58  Gaudi::Property<unsigned> m_minVertices {this, "MinVertices", 1, "Minimum number of vertices required"};
60  Gaudi::Property<unsigned> m_minTracks {this, "MinTracks", 0, "Minimum number of track particles required per vertex"};
61 
62  FilterReporterParams m_filterParams {this, "VertexSelection", "vertex selection"};
63 
65 
66  }; // class VertexSelectionAlg
67 
68 } // namespace CP
69 
70 #endif // TRACKINGANALYSISALGORITHMS_VERTEXSELECTIONALG_H
PropertyWrapper.h
CP::VertexSelectionAlg::m_minVertices
Gaudi::Property< unsigned > m_minVertices
Number of vertices required in the event.
Definition: VertexSelectionAlg.h:58
CP::VertexSelectionAlg::finalize
virtual StatusCode finalize() override
Function finalize the algorithm.
Definition: VertexSelectionAlg.cxx:26
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition: AnaAlgorithm.cxx:40
CP::VertexSelectionAlg
Algorithm meant to select events with "some" vertex requirements.
Definition: VertexSelectionAlg.h:31
FilterReporterParams
a handle for applying algorithm filter decisions
Definition: FilterReporterParams.h:58
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CP::VertexSelectionAlg::execute
virtual StatusCode execute() override
Function executing the algorithm.
Definition: VertexSelectionAlg.cxx:33
CP::VertexSelectionAlg::m_filterParams
FilterReporterParams m_filterParams
Definition: VertexSelectionAlg.h:62
CP::VertexSelectionAlg::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition: VertexSelectionAlg.cxx:12
ReadHandle.h
Handle class for reading from StoreGate.
CP::VertexSelectionAlg::m_minTracks
Gaudi::Property< unsigned > m_minTracks
Number of track particles required per vertex.
Definition: VertexSelectionAlg.h:60
VertexContainer.h
CP::VertexSelectionAlg::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Event store key of the vertex container.
Definition: VertexSelectionAlg.h:56
FilterReporterParams.h