ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8namespace jet
9{
10
12// //
13// Constructor/destructor/initialization //
14// //
16
24
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
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
45
46
48// //
49// Validity and uncertainty retrieval //
50// //
52
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
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
#define ATH_MSG_DEBUG(x)
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
ELogMassEtaUncertaintyComponent(const ComponentHelper &component)
virtual ELogMassEtaUncertaintyComponent * clone() const
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
virtual double getMassOverE(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
virtual bool getValidBool(const double validity) const
UncertaintyHistogram * m_validHist
UncertaintyHistogram * m_uncHist
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.