ATLAS Offline Software
Loading...
Searching...
No Matches
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
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Interaface class for xAOD/DAOD tools to match a track to a vertex assumed to be a Primary Vertex.
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.
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.
virtual StatusCode finalize() override
virtual StatusCode initialize() override
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
TrkToLeptonPVTool(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< Trk::IVertexFitter > m_fitterSvc
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.