ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TauAnalysisAlgorithms
Root
TauSmearingAlg.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 <
TauAnalysisAlgorithms/TauSmearingAlg.h
>
14
15
//
16
// method implementations
17
//
18
19
namespace
CP
20
{
21
// do this accessor at the file level to ensure it gets constructed
22
// before we configure the output
23
static
const
SG::Accessor<char>
accTESCompatibility
(
"TESCompatibility"
);
24
25
StatusCode TauSmearingAlg ::
26
initialize ()
27
{
28
ANA_CHECK
(
m_smearingTool
.retrieve());
29
ANA_CHECK
(
m_tauHandle
.initialize (
m_systematicsList
));
30
ANA_CHECK
(
m_preselection
.initialize (
m_systematicsList
,
m_tauHandle
,
SG::AllowEmpty
));
31
ANA_CHECK
(
m_systematicsList
.addSystematics (*
m_smearingTool
));
32
ANA_CHECK
(
m_systematicsList
.initialize());
33
ANA_CHECK
(
m_outOfValidity
.initialize());
34
return
StatusCode::SUCCESS;
35
}
36
37
38
39
StatusCode TauSmearingAlg ::
40
execute (
const
EventContext& ctx)
41
{
42
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
43
{
44
ANA_CHECK
(
m_smearingTool
->applySystematicVariation (sys));
45
xAOD::TauJetContainer
*
taus
=
nullptr
;
46
ANA_CHECK
(
m_tauHandle
.getCopy (
taus
, sys, ctx));
47
for
(
xAOD::TauJet
*tau : *
taus
)
48
{
49
if
(
m_preselection
.getBool (*tau, sys))
50
{
51
ANA_CHECK_CORRECTION
(
m_outOfValidity
, *tau,
m_smearingTool
->applyCorrection (*tau));
52
}
else
{
53
accTESCompatibility
(*tau) =
char
(0);
54
}
55
}
56
}
57
return
StatusCode::SUCCESS;
58
}
59
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
taus
static Double_t taus
Definition
LArPhysWaveHECTool.cxx:37
ANA_CHECK_CORRECTION
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
Definition
OutOfValidityHelper.h:132
TauSmearingAlg.h
CP::TauSmearingAlg::m_smearingTool
ToolHandle< TauAnalysisTools::ITauSmearingTool > m_smearingTool
the smearing tool
Definition
TauSmearingAlg.h:36
CP::TauSmearingAlg::m_outOfValidity
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
Definition
TauSmearingAlg.h:54
CP::TauSmearingAlg::m_tauHandle
SysCopyHandle< xAOD::TauJetContainer > m_tauHandle
the tau collection we run on
Definition
TauSmearingAlg.h:44
CP::TauSmearingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
TauSmearingAlg.h:40
CP::TauSmearingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
TauSmearingAlg.h:49
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition
Control/AthContainers/AthContainers/Accessor.h:68
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::accTESCompatibility
static const SG::Accessor< char > accTESCompatibility("TESCompatibility")
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
xAOD::char
char
Definition
TrigDecision_v1.cxx:38
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
TauJet.h:17
xAOD::TauJetContainer
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
Definition
TauJetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0