ATLAS Offline Software
PhysicsAnalysis
Algorithms
TrackingAnalysisAlgorithms
Root
InDetTrackExtraVarDecoratorAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
#include <
TrackingAnalysisAlgorithms/InDetTrackExtraVarDecoratorAlg.h
>
8
9
namespace
CP
{
10
11
StatusCode
InDetTrackExtraVarDecoratorAlg::initialize
() {
12
13
ANA_CHECK
(
m_tracksHandle
.initialize (
m_systematicsList
));
14
ANA_CHECK
(
m_momentumDecor
.
initialize
(
m_systematicsList
,
m_tracksHandle
));
15
ANA_CHECK
(
m_etaDecor
.
initialize
(
m_systematicsList
,
m_tracksHandle
));
16
ANA_CHECK
(
m_chargeDecor
.
initialize
(
m_systematicsList
,
m_tracksHandle
));
17
ANA_CHECK
(
m_systematicsList
.
initialize
());
18
19
return
StatusCode::SUCCESS;
20
}
21
22
StatusCode
InDetTrackExtraVarDecoratorAlg::execute
() {
23
24
for
(
const
auto
&
sys
:
m_systematicsList
.
systematicsVector
()) {
25
26
const
xAOD::TrackParticleContainer
*tracks =
nullptr
;
27
ANA_CHECK
(
m_tracksHandle
.retrieve (tracks,
sys
));
28
29
for
(
const
xAOD::TrackParticle
*
track
: *tracks) {
30
m_momentumDecor
.
set
( *
track
,
track
->pt(),
sys
);
31
m_etaDecor
.
set
( *
track
,
track
->eta(),
sys
);
32
m_chargeDecor
.
set
( *
track
,
track
->charge(),
sys
);
33
}
34
35
}
36
37
return
StatusCode::SUCCESS;
38
}
39
40
}
// namespace
CP::SysWriteDecorHandle::set
void set(const SG::AuxElement &object, const T &value, const CP::SystematicSet &sys) const
set the object decoration for the given systematic
CP::InDetTrackExtraVarDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition:
InDetTrackExtraVarDecoratorAlg.cxx:11
CP::InDetTrackExtraVarDecoratorAlg::m_systematicsList
CP::SysListHandle m_systematicsList
Definition:
InDetTrackExtraVarDecoratorAlg.h:27
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition:
SysListHandle.cxx:96
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:25
mapkey::sys
@ sys
Definition:
TElectronEfficiencyCorrectionTool.cxx:42
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition:
SysListHandle.cxx:69
CP::InDetTrackExtraVarDecoratorAlg::m_momentumDecor
CP::SysWriteDecorHandle< float > m_momentumDecor
Definition:
InDetTrackExtraVarDecoratorAlg.h:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SysWriteDecorHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize this handle
CP::InDetTrackExtraVarDecoratorAlg::m_tracksHandle
CP::SysReadHandle< xAOD::TrackParticleContainer > m_tracksHandle
Definition:
InDetTrackExtraVarDecoratorAlg.h:28
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:795
InDetTrackExtraVarDecoratorAlg.h
CP::InDetTrackExtraVarDecoratorAlg::m_etaDecor
CP::SysWriteDecorHandle< float > m_etaDecor
Definition:
InDetTrackExtraVarDecoratorAlg.h:32
CP::InDetTrackExtraVarDecoratorAlg::execute
virtual StatusCode execute() override
Definition:
InDetTrackExtraVarDecoratorAlg.cxx:22
CP::InDetTrackExtraVarDecoratorAlg::m_chargeDecor
CP::SysWriteDecorHandle< float > m_chargeDecor
Definition:
InDetTrackExtraVarDecoratorAlg.h:34
xAOD::track
@ track
Definition:
TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition:
TrackParticle_v1.h:44
Generated on Thu Nov 6 2025 21:13:37 for ATLAS Offline Software by
1.8.18