ATLAS Offline Software
InDetPriVxFinder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  InDetPriVxFinder.h - Description
7  -------------------
8  begin : 27-01-2004
9  authors : Andreas Wildauer (CERN PH-ATC), Fredrik Akesson (CERN PH-ATC)
10  email : andreas.wildauer@cern.ch, fredrik.akesson@cern.ch
11  changes :
12  2016-04-26 David Shope <david.richard.shope@cern.ch>
13  EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
14 
15  findVertex in m_VertexFinderTool will now always return an xAOD::VertexContainer,
16  even when using a TrackCollection or a TrackParticleBaseCollection
17  as input.
18 
19  ***************************************************************************/
20 
21 #ifndef INDETPRIVXFINDER_INDETPRIVXFINDER_H
22 #define INDETPRIVXFINDER_INDETPRIVXFINDER_H
24 #include "GaudiKernel/ToolHandle.h"
30 
34 
41 namespace InDet
42 {
43  class InDetPriVxFinder : public AthReentrantAlgorithm
44  {
45  public:
46  InDetPriVxFinder(const std::string &name, ISvcLocator *pSvcLocator);
47 
48  virtual ~InDetPriVxFinder() = default;
49 
50  // Gaudi algorithm hooks
51  virtual StatusCode initialize() override;
52  virtual StatusCode execute(const EventContext& ctx) const override;
53  virtual StatusCode finalize() override;
54 
55  private:
56 
57  //Monitoring of the vertex variables
58  void monitor_vertex( const std::string &prefix, const xAOD::Vertex& vertex ) const;
59 
60  SG::ReadHandleKey<TrackCollection> m_trkTracksName{this,"TrkTracksName","Tracks","Trk::Track Collection used in Vertexing"};
61  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_tracksName{this,"TracksName","InDetTrackParticles","xAOD::TrackParticle Collection used in Vertexing"};
62  SG::WriteHandleKey<xAOD::VertexContainer> m_vxCandidatesOutputName{this,"VxCandidatesOutputName","PrimaryVertices","Output Vertex Collection"};
63 
64  ToolHandle< IVertexFinder > m_VertexFinderTool{this, "VertexFinderTool", "", "Primary vertex finder tool"};
65  ToolHandle<Trk::IVertexMergingTool > m_VertexMergingTool{this, "VertexMergingTool", "", "Vertex merging tool"};
66  ToolHandle<Trk::IVertexCollectionSortingTool > m_VertexCollectionSortingTool{this, "VertexCollectionSortingTool", "", "Vertex collection sorting tool"};
67  ToolHandle<GenericMonitoringTool> m_monTool{this, "PriVxMonTool", "", "Monitoring tool"};
68 
69  BooleanProperty m_doVertexMerging{this, "doVertexMerging", false, "Do vertex merging"};
70  BooleanProperty m_doVertexSorting{this, "doVertexSorting", false, "Do vertex sorting"};
71  BooleanProperty m_useTrackParticles{this, "useTrackParticles", true, "Use track particles as input"};
72  };
73 }
74 #endif
IVertexCollectionSortingTool.h
InDet::InDetPriVxFinder::m_doVertexMerging
BooleanProperty m_doVertexMerging
Definition: InDetPriVxFinder.h:97
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetPriVxFinder::m_tracksName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksName
Definition: InDetPriVxFinder.h:89
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
InDet::InDetPriVxFinder::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: InDetPriVxFinder.cxx:82
InDet::InDetPriVxFinder::m_vxCandidatesOutputName
SG::WriteHandleKey< xAOD::VertexContainer > m_vxCandidatesOutputName
Definition: InDetPriVxFinder.h:90
IVertexFinder.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::InDetPriVxFinder::m_VertexFinderTool
ToolHandle< IVertexFinder > m_VertexFinderTool
Definition: InDetPriVxFinder.h:92
GenericMonitoringTool.h
InDet::InDetPriVxFinder::InDetPriVxFinder
InDetPriVxFinder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: InDetPriVxFinder.cxx:33
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
InDet::InDetPriVxFinder::m_useTrackParticles
BooleanProperty m_useTrackParticles
Definition: InDetPriVxFinder.h:99
InDet::InDetPriVxFinder::m_VertexMergingTool
ToolHandle< Trk::IVertexMergingTool > m_VertexMergingTool
Definition: InDetPriVxFinder.h:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackCollection.h
InDet::InDetPriVxFinder::m_doVertexSorting
BooleanProperty m_doVertexSorting
Definition: InDetPriVxFinder.h:98
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
InDet::InDetPriVxFinder::monitor_vertex
void monitor_vertex(const std::string &prefix, const xAOD::Vertex &vertex) const
Definition: InDetPriVxFinder.cxx:168
AthReentrantAlgorithm.h
InDet::InDetPriVxFinder::m_trkTracksName
SG::ReadHandleKey< TrackCollection > m_trkTracksName
Definition: InDetPriVxFinder.h:88
InDet::InDetPriVxFinder::initialize
virtual StatusCode initialize() override
Definition: InDetPriVxFinder.cxx:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDet::InDetPriVxFinder::finalize
virtual StatusCode finalize() override
Definition: InDetPriVxFinder.cxx:163
InDet::InDetPriVxFinder::~InDetPriVxFinder
virtual ~InDetPriVxFinder()=default
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
IVertexMergingTool.h
InDet::InDetPriVxFinder::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: InDetPriVxFinder.h:95
TrackParticleContainer.h
InDet::InDetPriVxFinder::m_VertexCollectionSortingTool
ToolHandle< Trk::IVertexCollectionSortingTool > m_VertexCollectionSortingTool
Definition: InDetPriVxFinder.h:94
VertexAuxContainer.h