ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
LeptonTaggers
LeptonTaggers
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
27
#include "
AthenaBaseComps/AthAlgorithm.h
"
28
#include "GaudiKernel/ToolHandle.h"
29
#include "
AthContainers/Accessor.h
"
30
#include "
StoreGate/ReadHandleKey.h
"
31
#include "
StoreGate/WriteHandleKey.h
"
32
#include "
StoreGate/WriteDecorHandleKey.h
"
33
34
// xAOD
35
#include "
xAODTracking/VertexContainer.h
"
36
37
// ROOT
38
#include "TStopwatch.h"
39
40
#include <optional>
41
42
namespace
Prompt
43
{
44
class
PrimaryVertexReFitter
:
public
AthAlgorithm
45
{
46
public
:
47
48
PrimaryVertexReFitter
(
const
std::string& name, ISvcLocator* pSvcLocator);
49
50
virtual
StatusCode
initialize
()
override
;
51
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
52
virtual
StatusCode
finalize
()
override
;
53
54
private
:
55
56
using
accessorFloat_t
=
SG::Accessor<float>
;
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
91
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_inDetTracksKey
{
92
this
,
"InDetTrackParticlesKey"
,
"InDetTrackParticles"
93
};
94
95
SG::ReadHandleKey<xAOD::IParticleContainer>
m_leptonContainerKey
{
96
this
,
97
"LeptonContainerName"
,
98
"lepContainerNameDefault"
,
"Name of lepton container"
99
};
100
SG::ReadHandleKey<xAOD::VertexContainer>
m_primaryVertexContainerKey
{
101
this
,
"PriVertexContainerName"
,
"PrimaryVertices"
,
102
"Name of primary vertex container"
103
};
104
SG::WriteHandleKey<xAOD::VertexContainer>
m_reFitPrimaryVertexKey
{
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
114
SG::WriteDecorHandleKey<xAOD::IParticleContainer>
m_lepRefittedVtxWithoutLeptonLinkName
115
{
this
,
"RefittedVtxWithoutLeptonLinkName"
,
m_leptonContainerKey
,
"default"
,
""
};
116
};
117
}
118
119
#endif
// PROMPT_PRIMARYVERTEXREFITTER_H
AthAlgorithm.h
Accessor.h
Helper class to provide type-safe access to aux data.
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
VertexContainer.h
VertexFittingTool.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
Prompt::PrimaryVertexReFitter::m_lepRefittedVtxWithoutLeptonLinkName
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_lepRefittedVtxWithoutLeptonLinkName
Definition
PrimaryVertexReFitter.h:115
Prompt::PrimaryVertexReFitter::m_primaryVertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexContainerKey
Definition
PrimaryVertexReFitter.h:100
Prompt::PrimaryVertexReFitter::m_timerExec
TStopwatch m_timerExec
Definition
PrimaryVertexReFitter.h:88
Prompt::PrimaryVertexReFitter::accessorFloat_t
SG::Accessor< float > accessorFloat_t
Definition
PrimaryVertexReFitter.h:56
Prompt::PrimaryVertexReFitter::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
PrimaryVertexReFitter.cxx:90
Prompt::PrimaryVertexReFitter::m_leptonContainerKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_leptonContainerKey
Definition
PrimaryVertexReFitter.h:95
Prompt::PrimaryVertexReFitter::m_normdistToRefittedPriVtx
std::optional< accessorFloat_t > m_normdistToRefittedPriVtx
Definition
PrimaryVertexReFitter.h:112
Prompt::PrimaryVertexReFitter::m_reFitPrimaryVertexKey
SG::WriteHandleKey< xAOD::VertexContainer > m_reFitPrimaryVertexKey
Definition
PrimaryVertexReFitter.h:104
Prompt::PrimaryVertexReFitter::m_distToRefittedPriVtx
std::optional< accessorFloat_t > m_distToRefittedPriVtx
Definition
PrimaryVertexReFitter.h:111
Prompt::PrimaryVertexReFitter::finalize
virtual StatusCode finalize() override
Definition
PrimaryVertexReFitter.cxx:74
Prompt::PrimaryVertexReFitter::PrimaryVertexReFitter
PrimaryVertexReFitter(const std::string &name, ISvcLocator *pSvcLocator)
Definition
PrimaryVertexReFitter.cxx:19
Prompt::PrimaryVertexReFitter::m_timerAll
TStopwatch m_timerAll
Definition
PrimaryVertexReFitter.h:87
Prompt::PrimaryVertexReFitter::m_distToRefittedPriVtxName
Gaudi::Property< std::string > m_distToRefittedPriVtxName
Definition
PrimaryVertexReFitter.h:80
Prompt::PrimaryVertexReFitter::m_printTime
Gaudi::Property< bool > m_printTime
Definition
PrimaryVertexReFitter.h:78
Prompt::PrimaryVertexReFitter::initialize
virtual StatusCode initialize() override
Definition
PrimaryVertexReFitter.cxx:24
Prompt::PrimaryVertexReFitter::m_normDistToRefittedPriVtxName
Gaudi::Property< std::string > m_normDistToRefittedPriVtxName
Definition
PrimaryVertexReFitter.h:83
Prompt::PrimaryVertexReFitter::decorateLepWithReFitPrimaryVertex
bool decorateLepWithReFitPrimaryVertex(const EventContext &ctx, const FittingInput &input, const xAOD::TrackParticle *tracklep, const std::vector< const xAOD::TrackParticle * > &tracks, xAOD::VertexContainer &refitVtxContainer)
Definition
PrimaryVertexReFitter.cxx:243
Prompt::PrimaryVertexReFitter::m_inDetTracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inDetTracksKey
Definition
PrimaryVertexReFitter.h:91
Prompt::PrimaryVertexReFitter::m_vertexFitterTool
ToolHandle< Prompt::VertexFittingTool > m_vertexFitterTool
Definition
PrimaryVertexReFitter.h:71
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition
Control/AthContainers/AthContainers/Accessor.h:68
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
Prompt
Definition
DecoratePLIT.h:29
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition
VertexContainer.h:14
Prompt::FittingInput
Definition
IVertexFittingTool.h:50
Generated on
for ATLAS Offline Software by
1.17.0