ATLAS Offline Software
Reconstruction
Jet
JetUncertainties
Root
PtEtaUncertaintyComponent.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetUncertainties/PtEtaUncertaintyComponent.h
"
6
#include "
JetUncertainties/Helpers.h
"
7
8
namespace
jet
9
{
10
12
// //
13
// Constructor/destructor/initialization //
14
// //
16
17
PtEtaUncertaintyComponent::PtEtaUncertaintyComponent
(
const
std::string&
name
)
18
:
UncertaintyComponent
(
ComponentHelper
(
name
))
19
, m_absEta(false)
20
{
21
JESUNC_NO_DEFAULT_CONSTRUCTOR
;
22
}
23
24
PtEtaUncertaintyComponent::PtEtaUncertaintyComponent
(
const
ComponentHelper
& component)
25
:
UncertaintyComponent
(component)
26
, m_absEta(CompParametrization::
isAbsEta
(component.
parametrization
))
27
{
28
ATH_MSG_DEBUG
(Form(
"Creating PtEtaUncertaintyComponent named %s"
,
m_uncHistName
.Data()));
29
}
30
31
PtEtaUncertaintyComponent::PtEtaUncertaintyComponent
(
const
PtEtaUncertaintyComponent
& toCopy)
32
:
UncertaintyComponent
(toCopy)
33
, m_absEta(toCopy.m_absEta)
34
{
35
ATH_MSG_DEBUG
(Form(
"Creating copy of PtEtaUncertaintyComponent named %s"
,
m_uncHistName
.Data()));
36
}
37
38
PtEtaUncertaintyComponent
*
PtEtaUncertaintyComponent::clone
()
const
39
{
40
return
new
PtEtaUncertaintyComponent
(*
this
);
41
}
42
43
45
// //
46
// Validity and uncertainty retrieval //
47
// //
49
50
bool
PtEtaUncertaintyComponent::getValidityImpl
(
const
xAOD::Jet
&
jet
,
const
xAOD::EventInfo
&)
const
51
{
52
return
!
m_validHist
? true :
getValidBool
(
m_validHist
->
getValue
(
jet
.pt()*
m_energyScale
,
m_absEta
? fabs(
jet
.eta()) :
jet
.eta()));
53
}
54
55
double
PtEtaUncertaintyComponent::getUncertaintyImpl
(
const
xAOD::Jet
&
jet
,
const
xAOD::EventInfo
&)
const
56
{
57
return
m_uncHist
->
getValue
(
jet
.pt()*
m_energyScale
,
m_absEta
? fabs(
jet
.eta()) :
jet
.eta());
58
}
59
60
}
// end jet namespace
61
jet::UncertaintyComponent::m_energyScale
const float m_energyScale
Definition:
UncertaintyComponent.h:55
jet::ComponentHelper
Definition:
ConfigHelper.h:24
jet::UncertaintyComponent::m_uncHistName
const TString m_uncHistName
Definition:
UncertaintyComponent.h:51
jet::CompParametrization::isAbsEta
bool isAbsEta(const TypeEnum type)
Definition:
UncertaintyEnum.cxx:143
jet::PtEtaUncertaintyComponent::getValidityImpl
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition:
PtEtaUncertaintyComponent.cxx:50
jet::UncertaintyComponent::getValidBool
virtual bool getValidBool(const double validity) const
Definition:
UncertaintyComponent.cxx:301
jet::UncertaintyHistogram::getValue
double getValue(const double var1) const
Definition:
UncertaintyHistogram.cxx:141
Helpers.h
jet::UncertaintyComponent
Definition:
UncertaintyComponent.h:25
jet::PtEtaUncertaintyComponent::m_absEta
const bool m_absEta
Definition:
PtEtaUncertaintyComponent.h:30
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
jet::UncertaintyComponent::m_validHist
UncertaintyHistogram * m_validHist
Definition:
UncertaintyComponent.h:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
jet::PtEtaUncertaintyComponent
Definition:
PtEtaUncertaintyComponent.h:14
xAOD::EventInfo_v1
Class describing the basic event information.
Definition:
EventInfo_v1.h:43
JESUNC_NO_DEFAULT_CONSTRUCTOR
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
Definition:
Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:24
jet::PtEtaUncertaintyComponent::clone
virtual PtEtaUncertaintyComponent * clone() const
Definition:
PtEtaUncertaintyComponent.cxx:38
xAOD::Jet_v1
Class describing a jet.
Definition:
Jet_v1.h:57
jet::PtEtaUncertaintyComponent::getUncertaintyImpl
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition:
PtEtaUncertaintyComponent.cxx:55
jet::UncertaintyComponent::m_uncHist
UncertaintyHistogram * m_uncHist
Definition:
UncertaintyComponent.h:60
LArG4GenerateShowerLib.parametrization
parametrization
Definition:
LArG4GenerateShowerLib.py:19
PtEtaUncertaintyComponent.h
jet::PtEtaUncertaintyComponent::PtEtaUncertaintyComponent
PtEtaUncertaintyComponent(const ComponentHelper &component)
Definition:
PtEtaUncertaintyComponent.cxx:24
Generated on Sun Dec 22 2024 21:16:44 for ATLAS Offline Software by
1.8.18