ATLAS Offline Software
TrkToLeptonPVTool.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 // TrkToLeptonPVTool.h - Description
6 //
7 /*
8  Tool to match a track to a vertex assumed to be a Primary Vertex.
9  This PV can be taken elsewhere or obtained with the tool itsels.
10  Example: check compatibility of a track to PV obtained with 2 energetic leptons from Z decay.
11  See README fro more details
12 
13  Author: Vadim Kostyukhin
14  e-mail: vadim.kostyukhin@cern.ch
15 */
16 #ifndef TrkToLeptonPVTool_H
17 #define TrkToLeptonPVTool_H
18 
19 #include <vector>
20 #include <utility>
21 #include <memory>
22 #include "GaudiKernel/ToolHandle.h"
23 #include "GaudiKernel/ServiceHandle.h"
27 //
28 
29 
30  class TrkToLeptonPVTool : public AthAlgTool, virtual public ITrkToLeptonPV
31  {
32 
33  public:
34  TrkToLeptonPVTool(const std::string& type, const std::string& name, const IInterface* parent);
35  virtual ~TrkToLeptonPVTool();
36 
37 
38  virtual StatusCode initialize() override;
39  virtual StatusCode finalize() override;
40 
41 
42  virtual std::unique_ptr<xAOD::Vertex> matchTrkToPV(const xAOD::TrackParticle *trk, const xAOD::Vertex * PV, const xAOD::EventInfo * =0) const override final;
43  virtual std::unique_ptr<xAOD::Vertex> npartVertex(const std::vector<const xAOD::TrackParticle*>&, const xAOD::EventInfo * =0) const override final;
44 //------------------------------------------------------------------------------------------------------------------
45 // Private data and functions
46 //
47 
48  private:
49 
50  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
51  ToolHandle< Trk::IVertexFitter > m_fitterSvc{this,"VertexFitter","Trk::TrkVKalVrtFitter/VertexFitterTool","Vertex Fitter tool instance"};
52 
53  };
54 
55 
56 #endif
TrkToLeptonPVTool
Definition: TrkToLeptonPVTool.h:31
TrkToLeptonPVTool::matchTrkToPV
virtual std::unique_ptr< xAOD::Vertex > matchTrkToPV(const xAOD::TrackParticle *trk, const xAOD::Vertex *PV, const xAOD::EventInfo *=0) const override final
Method to match any tracks to a known Primary Vertex.
Definition: TrkToLeptonPVTool.cxx:52
TrkToLeptonPVTool::finalize
virtual StatusCode finalize() override
Definition: TrkToLeptonPVTool.cxx:45
TrkToLeptonPVTool::TrkToLeptonPVTool
TrkToLeptonPVTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrkToLeptonPVTool.cxx:17
TrkToLeptonPVTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TrkToLeptonPVTool.h:50
TrkToLeptonPVTool::initialize
virtual StatusCode initialize() override
Definition: TrkToLeptonPVTool.cxx:31
TrkToLeptonPVTool::~TrkToLeptonPVTool
virtual ~TrkToLeptonPVTool()
Definition: TrkToLeptonPVTool.cxx:26
ITrkToLeptonPV
Definition: ITrkToLeptonPV.h:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrkToLeptonPVTool::m_fitterSvc
ToolHandle< Trk::IVertexFitter > m_fitterSvc
Definition: TrkToLeptonPVTool.h:51
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IVertexFitter.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
SG::ReadCondHandleKey< InDet::BeamSpotData >
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrkToLeptonPVTool::npartVertex
virtual std::unique_ptr< xAOD::Vertex > npartVertex(const std::vector< const xAOD::TrackParticle * > &, const xAOD::EventInfo *=0) const override final
Method to create a Primary Vertex using N(>=2) identified tracks (e.g.
Definition: TrkToLeptonPVTool.cxx:81
BeamSpotData.h
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
ITrkToLeptonPV.h