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-2026 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
59 bool decorateLepWithReFitPrimaryVertex(const EventContext& ctx,
60 const FittingInput &input,
61 const xAOD::TrackParticle* tracklep,
62 const std::vector<const xAOD::TrackParticle*> &tracks,
63 xAOD::VertexContainer &refitVtxContainer);
64
65
66 private:
67
68 //
69 // Tools and services:
70 //
71 ToolHandle<Prompt::VertexFittingTool> m_vertexFitterTool {
72 this, "VertexFittingTool", "Prompt::VertexFittingTool/VertexFittingTool"
73 };
74
75 //
76 // Properties:
77 //
78 Gaudi::Property<bool> m_printTime {this, "PrintTime", false};
79
80 Gaudi::Property<std::string> m_distToRefittedPriVtxName {
81 this, "DistToRefittedPriVtxName", "default"
82 };
83 Gaudi::Property<std::string> m_normDistToRefittedPriVtxName {
84 this, "NormDistToRefittedPriVtxName", "default"
85 };
86
87 TStopwatch m_timerAll;
88 TStopwatch m_timerExec;
89
90 // Read/write handles
92 this, "InDetTrackParticlesKey", "InDetTrackParticles"
93 };
94
96 this,
97 "LeptonContainerName",
98 "lepContainerNameDefault", "Name of lepton container"
99 };
101 this, "PriVertexContainerName", "PrimaryVertices",
102 "Name of primary vertex container"
103 };
105 this, "ReFitPriVtxName", "default"
106 };
107
108 //
109 // Accessors/Decorators
110 //
111 std::optional<accessorFloat_t> m_distToRefittedPriVtx;
112 std::optional<accessorFloat_t> m_normdistToRefittedPriVtx;
113
116 };
117}
118
119#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 EventContext &ctx, 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".