ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
EgammaAnalysisAlgorithms
Root
EgammaIsolationCorrectionAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
EgammaAnalysisAlgorithms/EgammaIsolationCorrectionAlg.h
>
14
15
//
16
// method implementations
17
//
18
19
namespace
CP
20
{
21
22
StatusCode EgammaIsolationCorrectionAlg ::
23
initialize ()
24
{
25
ANA_CHECK
(
m_isolationCorrectionTool
.retrieve());
26
ANA_CHECK
(
m_egammaHandle
.initialize (
m_systematicsList
));
27
ANA_CHECK
(
m_preselection
.initialize (
m_systematicsList
,
m_egammaHandle
,
SG::AllowEmpty
));
28
ANA_CHECK
(
m_systematicsList
.addSystematics (*
m_isolationCorrectionTool
));
29
ANA_CHECK
(
m_systematicsList
.initialize());
30
ANA_CHECK
(
m_outOfValidity
.initialize());
31
return
StatusCode::SUCCESS;
32
}
33
34
35
36
StatusCode EgammaIsolationCorrectionAlg ::
37
execute (
const
EventContext& ctx)
38
{
39
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
40
{
41
ANA_CHECK
(
m_isolationCorrectionTool
->applySystematicVariation (sys));
42
xAOD::EgammaContainer
*egammas =
nullptr
;
43
ANA_CHECK
(
m_egammaHandle
.getCopy (egammas, sys, ctx));
44
for
(
xAOD::Egamma
*
egamma
: *egammas)
45
{
46
if
(
m_preselection
.getBool (*
egamma
, sys))
47
{
48
ANA_CHECK_CORRECTION
(
m_outOfValidity
, *
egamma
,
m_isolationCorrectionTool
->applyCorrection (*
egamma
));
49
}
50
}
51
}
52
return
StatusCode::SUCCESS;
53
}
54
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
EgammaIsolationCorrectionAlg.h
ANA_CHECK_CORRECTION
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
Definition
OutOfValidityHelper.h:132
CP::EgammaIsolationCorrectionAlg::m_isolationCorrectionTool
ToolHandle< CP::IIsolationCorrectionTool > m_isolationCorrectionTool
the smearing tool
Definition
EgammaIsolationCorrectionAlg.h:37
CP::EgammaIsolationCorrectionAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
EgammaIsolationCorrectionAlg.h:41
CP::EgammaIsolationCorrectionAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
EgammaIsolationCorrectionAlg.h:50
CP::EgammaIsolationCorrectionAlg::m_outOfValidity
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
Definition
EgammaIsolationCorrectionAlg.h:55
CP::EgammaIsolationCorrectionAlg::m_egammaHandle
SysCopyHandle< xAOD::EgammaContainer > m_egammaHandle
the egamma collection we run on
Definition
EgammaIsolationCorrectionAlg.h:45
egamma
elec/gamma data class.
Definition
egamma.h:59
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
xAOD::Egamma
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition
Egamma.h:17
xAOD::EgammaContainer
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".
Definition
EgammaContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0