ATLAS Offline Software
Loading...
Searching...
No Matches
PrimaryVertexReFitter.h
Go to the documentation of this file.
1// This is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef PROMPT_PRIMARYVERTEXREFITTER_H
8#define PROMPT_PRIMARYVERTEXREFITTER_H
9
10/**********************************************************************************
11 * @Package: LeptonTaggers
12 * @Class : PrimaryVertexReFitter
13 * @Author : Fudong He
14 * @Author : Rustem Ospanov
15 * @Author : Kees Benkendorfer
16 *
17 * @Brief :
18 *
19 * Decorate leptons with secondary vertex algorithem output
20 *
21 **********************************************************************************/
22
23// Local
24#include "VertexFittingTool.h"
25
26// Athena
28#include "GaudiKernel/ToolHandle.h"
33
34// xAOD
36
37// ROOT
38#include "TStopwatch.h"
39
40#include <optional>
41
42namespace Prompt
43{
45 {
46 public:
47
48 PrimaryVertexReFitter(const std::string& name, ISvcLocator* pSvcLocator);
49
50 virtual StatusCode initialize() override;
51 virtual StatusCode execute() override;
52 virtual StatusCode finalize() override;
53
54 private:
55
57
58
60 const xAOD::TrackParticle* tracklep,
61 const std::vector<const xAOD::TrackParticle*> &tracks,
62 xAOD::VertexContainer &refitVtxContainer);
63
64
65 private:
66
67 //
68 // Tools and services:
69 //
70 ToolHandle<Prompt::VertexFittingTool> m_vertexFitterTool {
71 this, "VertexFittingTool", "Prompt::VertexFittingTool/VertexFittingTool"
72 };
73
74 //
75 // Properties:
76 //
77 Gaudi::Property<bool> m_printTime {this, "PrintTime", false};
78
79 Gaudi::Property<std::string> m_distToRefittedPriVtxName {
80 this, "DistToRefittedPriVtxName", "default"
81 };
82 Gaudi::Property<std::string> m_normDistToRefittedPriVtxName {
83 this, "NormDistToRefittedPriVtxName", "default"
84 };
85
86 TStopwatch m_timerAll;
87 TStopwatch m_timerExec;
88
89 // Read/write handles
91 this, "InDetTrackParticlesKey", "InDetTrackParticles"
92 };
93
95 this,
96 "LeptonContainerName",
97 "lepContainerNameDefault", "Name of lepton container"
98 };
100 this, "PriVertexContainerName", "PrimaryVertices",
101 "Name of primary vertex container"
102 };
104 this, "ReFitPriVtxName", "default"
105 };
106
107 //
108 // Accessors/Decorators
109 //
110 std::optional<accessorFloat_t> m_distToRefittedPriVtx;
111 std::optional<accessorFloat_t> m_normdistToRefittedPriVtx;
112
115 };
116}
117
118#endif // PROMPT_PRIMARYVERTEXREFITTER_H
Helper class to provide type-safe access to aux data.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_lepRefittedVtxWithoutLeptonLinkName
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexContainerKey
SG::Accessor< float > accessorFloat_t
SG::ReadHandleKey< xAOD::IParticleContainer > m_leptonContainerKey
std::optional< accessorFloat_t > m_normdistToRefittedPriVtx
SG::WriteHandleKey< xAOD::VertexContainer > m_reFitPrimaryVertexKey
std::optional< accessorFloat_t > m_distToRefittedPriVtx
virtual StatusCode finalize() override
PrimaryVertexReFitter(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_distToRefittedPriVtxName
Gaudi::Property< bool > m_printTime
virtual StatusCode initialize() override
virtual StatusCode execute() override
Gaudi::Property< std::string > m_normDistToRefittedPriVtxName
bool decorateLepWithReFitPrimaryVertex(const FittingInput &input, const xAOD::TrackParticle *tracklep, const std::vector< const xAOD::TrackParticle * > &tracks, xAOD::VertexContainer &refitVtxContainer)
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inDetTracksKey
ToolHandle< Prompt::VertexFittingTool > m_vertexFitterTool
Helper class to provide type-safe access to aux data.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".