ATLAS Offline Software
InnerDetector
InDetValidation
InDetTrackPerfMon
src
OfflineMuonDecoratorAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef INDETTRACKPERFMON_OFFLINEMUONDECORATORALG_H
6
#define INDETTRACKPERFMON_OFFLINEMUONDECORATORALG_H
7
16
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
18
20
#include "
xAODTracking/TrackParticleContainer.h
"
21
#include "
xAODMuon/MuonContainer.h
"
22
24
#include <string>
25
#include <vector>
26
28
#include "
SafeDecorator.h
"
29
30
31
namespace
IDTPM
{
32
33
class
OfflineMuonDecoratorAlg
:
34
public
AthReentrantAlgorithm
{
35
36
public
:
37
38
typedef
ElementLink<xAOD::MuonContainer>
ElementMuonLink_t
;
39
40
OfflineMuonDecoratorAlg
(
const
std::string&
name
, ISvcLocator* pSvcLocator );
41
42
virtual
~OfflineMuonDecoratorAlg
() =
default
;
43
44
virtual
StatusCode
initialize
()
override
;
45
46
virtual
StatusCode
execute
(
const
EventContext& ctx )
const override
;
47
48
private
:
49
50
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_offlineTrkParticlesName
{
51
this
,
"OfflineTrkParticleContainerName"
,
"InDetTrackParticles"
,
"Name of container of offline tracks"
};
52
53
StringProperty
m_prefix
{
this
,
"Prefix"
,
"LinkedMuon_"
,
"Decoration prefix to avoid clashes"
};
54
55
StatusCode
decorateMuonTrack
(
56
const
xAOD::TrackParticle
&
track
,
57
std::vector<
IDTPM::OptionalDecoration
<
xAOD::TrackParticleContainer
,
58
ElementMuonLink_t
> >& mu_decor,
59
const
xAOD::MuonContainer
& muons )
const
;
60
61
SG::ReadHandleKey<xAOD::MuonContainer>
m_muonsName
{
62
this
,
"MuonContainerName"
,
"Muons"
,
"Name of container of offline muons"
};
63
64
BooleanProperty
m_useCombinedMuonTracks
{
65
this
,
"useCombinedMuonTracks"
,
false
,
"Match combined muon track to muons instead of ID tracks"
};
66
67
enum
MuonDecorations
:
size_t
{
68
All
,
69
Tight
,
70
Medium
,
71
Loose
,
72
VeryLoose
,
73
NDecorations
74
};
75
76
const
std::vector< std::string >
m_decor_mu_names
{
77
"All"
,
78
"Tight"
,
79
"Medium"
,
80
"Loose"
,
81
"VeryLoose"
82
};
83
84
std::vector<
IDTPM::WriteKeyAccessorPair
<
xAOD::TrackParticleContainer
,
85
ElementMuonLink_t
> >
m_decor_mu
{};
86
87
};
88
89
}
// namespace IDTPM
90
91
#endif // > ! INDETTRACKPERFMON_OFFLINEMUONDECORATORALG_H
IDTPM::OfflineMuonDecoratorAlg::Medium
@ Medium
Definition:
OfflineMuonDecoratorAlg.h:70
IDTPM::OfflineMuonDecoratorAlg::ElementMuonLink_t
ElementLink< xAOD::MuonContainer > ElementMuonLink_t
Definition:
OfflineMuonDecoratorAlg.h:38
IDTPM::OfflineMuonDecoratorAlg::Tight
@ Tight
Definition:
OfflineMuonDecoratorAlg.h:69
IDTPM::OfflineMuonDecoratorAlg::~OfflineMuonDecoratorAlg
virtual ~OfflineMuonDecoratorAlg()=default
IDTPM::OfflineMuonDecoratorAlg::m_decor_mu
std::vector< IDTPM::WriteKeyAccessorPair< xAOD::TrackParticleContainer, ElementMuonLink_t > > m_decor_mu
Definition:
OfflineMuonDecoratorAlg.h:85
IDTPM::OfflineMuonDecoratorAlg::m_decor_mu_names
const std::vector< std::string > m_decor_mu_names
Definition:
OfflineMuonDecoratorAlg.h:76
xAOD::TrackParticleContainer
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Definition:
Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainer.h:14
SG::ReadHandleKey< xAOD::TrackParticleContainer >
IDTPM::OfflineMuonDecoratorAlg::NDecorations
@ NDecorations
Definition:
OfflineMuonDecoratorAlg.h:73
IDTPM::OfflineMuonDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition:
OfflineMuonDecoratorAlg.cxx:51
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition:
AthReentrantAlgorithm.h:83
IDTPM::OfflineMuonDecoratorAlg::m_offlineTrkParticlesName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_offlineTrkParticlesName
Definition:
OfflineMuonDecoratorAlg.h:50
IDTPM::OfflineMuonDecoratorAlg
Definition:
OfflineMuonDecoratorAlg.h:34
IDTPM::OfflineMuonDecoratorAlg::MuonDecorations
MuonDecorations
Definition:
OfflineMuonDecoratorAlg.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
IDTPM::OfflineMuonDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition:
OfflineMuonDecoratorAlg.cxx:26
AthReentrantAlgorithm.h
ElementLink
ElementLink implementation for ROOT usage.
Definition:
AthLinks/ElementLink.h:123
IDTPM::OfflineMuonDecoratorAlg::m_useCombinedMuonTracks
BooleanProperty m_useCombinedMuonTracks
Definition:
OfflineMuonDecoratorAlg.h:64
IDTPM::OfflineMuonDecoratorAlg::All
@ All
Definition:
OfflineMuonDecoratorAlg.h:68
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
IDTPM::OfflineMuonDecoratorAlg::OfflineMuonDecoratorAlg
OfflineMuonDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Local includes.
Definition:
OfflineMuonDecoratorAlg.cxx:17
MuonContainer.h
IDTPM::OfflineMuonDecoratorAlg::Loose
@ Loose
Definition:
OfflineMuonDecoratorAlg.h:71
SafeDecorator.h
Helper functions to perform safe decoration of xAOD objects in this package.
IDTPM::WriteKeyAccessorPair
std::pair< SG::WriteDecorHandleKey< ContainerType >, SG::AuxElement::ConstAccessor< VariableType > > WriteKeyAccessorPair
Useful declarations.
Definition:
SafeDecorator.h:38
IDTPM::OfflineMuonDecoratorAlg::decorateMuonTrack
StatusCode decorateMuonTrack(const xAOD::TrackParticle &track, std::vector< IDTPM::OptionalDecoration< xAOD::TrackParticleContainer, ElementMuonLink_t > > &mu_decor, const xAOD::MuonContainer &muons) const
Definition:
OfflineMuonDecoratorAlg.cxx:94
xAOD::track
@ track
Definition:
TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition:
TrackParticle_v1.h:43
IDTPM::OfflineMuonDecoratorAlg::m_prefix
StringProperty m_prefix
Definition:
OfflineMuonDecoratorAlg.h:53
IDTPM::OptionalDecoration
std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool > OptionalDecoration
Definition:
SafeDecorator.h:47
IDTPM
Athena include(s).
Definition:
IPlotsDefinitionSvc.h:25
IDTPM::OfflineMuonDecoratorAlg::VeryLoose
@ VeryLoose
Definition:
OfflineMuonDecoratorAlg.h:72
TrackParticleContainer.h
IDTPM::OfflineMuonDecoratorAlg::m_muonsName
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsName
Definition:
OfflineMuonDecoratorAlg.h:61
Generated on Sun Dec 22 2024 21:15:50 for ATLAS Offline Software by
1.8.18