ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetUncertainties
Root
ELogMassEtaUncertaintyComponent.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetUncertainties/ELogMassEtaUncertaintyComponent.h
"
6
#include "
JetUncertainties/Helpers.h
"
7
8
namespace
jet
9
{
10
12
// //
13
// Constructor/destructor/initialization //
14
// //
16
17
ELogMassEtaUncertaintyComponent::ELogMassEtaUncertaintyComponent
(
const
std::string& name)
18
:
UncertaintyComponent
(
ComponentHelper
(name))
19
,
m_absEta
(false)
20
,
m_massDef
(
CompMassDef
::UNKNOWN)
21
{
22
JESUNC_NO_DEFAULT_CONSTRUCTOR
;
23
}
24
25
ELogMassEtaUncertaintyComponent::ELogMassEtaUncertaintyComponent
(
const
ComponentHelper
& component)
26
:
UncertaintyComponent
(component)
27
,
m_absEta
(
CompParametrization
::isAbsEta(component.parametrization))
28
,
m_massDef
(component.massDef)
29
{
30
ATH_MSG_DEBUG
(Form(
"Creating ELogMassEtaUncertaintyComponent named %s"
,
m_uncHistName
.Data()));
31
}
32
33
ELogMassEtaUncertaintyComponent::ELogMassEtaUncertaintyComponent
(
const
ELogMassEtaUncertaintyComponent
& toCopy)
34
:
UncertaintyComponent
(toCopy)
35
,
m_absEta
(toCopy.
m_absEta
)
36
,
m_massDef
(toCopy.
m_massDef
)
37
{
38
ATH_MSG_DEBUG
(Form(
"Creating copy of ELogMassEtaUncertaintyComponent named %s"
,
m_uncHistName
.Data()));
39
}
40
41
ELogMassEtaUncertaintyComponent
*
ELogMassEtaUncertaintyComponent::clone
()
const
42
{
43
return
new
ELogMassEtaUncertaintyComponent
(*
this
);
44
}
45
46
48
// //
49
// Validity and uncertainty retrieval //
50
// //
52
53
bool
ELogMassEtaUncertaintyComponent::getValidityImpl
(
const
xAOD::Jet
&
jet
,
const
xAOD::EventInfo
&)
const
54
{
55
double
MassOverE =
getMassOverE
(
jet
,
m_massDef
);
56
if
(!(MassOverE>0))
return
false
;
57
return
!
m_validHist
? true :
getValidBool
(
m_validHist
->getValue(
jet
.e()*
m_energyScale
,log(MassOverE),
m_absEta
? std::abs(
jet
.eta()) :
jet
.eta()));
58
}
59
60
double
ELogMassEtaUncertaintyComponent::getUncertaintyImpl
(
const
xAOD::Jet
&
jet
,
const
xAOD::EventInfo
&)
const
61
{
62
double
MassOverE =
getMassOverE
(
jet
,
m_massDef
);
63
if
(!(MassOverE>0))
return
JESUNC_ERROR_CODE
;
64
return
m_uncHist
->getValue(
jet
.e()*
m_energyScale
,log(MassOverE),
m_absEta
? std::abs(
jet
.eta()) :
jet
.eta());
65
}
66
67
}
// end jet namespace
68
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ELogMassEtaUncertaintyComponent.h
Helpers.h
JESUNC_ERROR_CODE
#define JESUNC_ERROR_CODE
Definition
Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:22
JESUNC_NO_DEFAULT_CONSTRUCTOR
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
Definition
Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:23
jet::ComponentHelper
Definition
ConfigHelper.h:24
jet::ELogMassEtaUncertaintyComponent::getUncertaintyImpl
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition
ELogMassEtaUncertaintyComponent.cxx:60
jet::ELogMassEtaUncertaintyComponent::ELogMassEtaUncertaintyComponent
ELogMassEtaUncertaintyComponent(const ComponentHelper &component)
Definition
ELogMassEtaUncertaintyComponent.cxx:25
jet::ELogMassEtaUncertaintyComponent::clone
virtual ELogMassEtaUncertaintyComponent * clone() const
Definition
ELogMassEtaUncertaintyComponent.cxx:41
jet::ELogMassEtaUncertaintyComponent::m_massDef
const CompMassDef::TypeEnum m_massDef
Definition
ELogMassEtaUncertaintyComponent.h:31
jet::ELogMassEtaUncertaintyComponent::getValidityImpl
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition
ELogMassEtaUncertaintyComponent.cxx:53
jet::ELogMassEtaUncertaintyComponent::m_absEta
const bool m_absEta
Definition
ELogMassEtaUncertaintyComponent.h:30
jet::UncertaintyComponent::m_energyScale
const float m_energyScale
Definition
UncertaintyComponent.h:55
jet::UncertaintyComponent::UncertaintyComponent
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
Definition
UncertaintyComponent.cxx:47
jet::UncertaintyComponent::getMassOverE
virtual double getMassOverE(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
Definition
UncertaintyComponent.cxx:360
jet::UncertaintyComponent::getValidBool
virtual bool getValidBool(const double validity) const
Definition
UncertaintyComponent.cxx:301
jet::UncertaintyComponent::m_uncHistName
const TString m_uncHistName
Definition
UncertaintyComponent.h:51
jet::UncertaintyComponent::m_validHist
UncertaintyHistogram * m_validHist
Definition
UncertaintyComponent.h:61
jet::UncertaintyComponent::m_uncHist
UncertaintyHistogram * m_uncHist
Definition
UncertaintyComponent.h:60
jet::CompMassDef
Definition
UncertaintyEnum.h:69
jet::CompParametrization
Definition
UncertaintyEnum.h:43
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0