ATLAS Offline Software
ClosebyUncertaintyComponent.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 namespace jet
9 {
10 
12 // //
13 // Constructor/destructor/initialization //
14 // //
16 
19 {
21 }
22 
24  : UncertaintyComponent(component)
25 {
26  ATH_MSG_DEBUG(Form("Creating ClosebyUncertaintyComponent named %s",m_uncHistName.Data()));
27 }
28 
30  : UncertaintyComponent(toCopy)
31 {
32  ATH_MSG_DEBUG(Form("Creating copy of ClosebyUncertaintyComponent named %s",m_uncHistName.Data()));
33 }
34 
36 {
37  return new ClosebyUncertaintyComponent(*this);
38 }
39 
40 
42 // //
43 // Validity and uncertainty retrieval //
44 // //
46 
48 {
50 }
51 
53 {
55 }
56 
58 {
59  static const SG::AuxElement::Accessor<float> accMinDR("MinDR");
60 
61  if (!accMinDR.isAvailable(jet))
62  {
63  ATH_MSG_ERROR("Failed to retrieve MinDR attribute from the jet");
64  return JESUNC_ERROR_CODE;
65  }
66  return accMinDR(jet);
67 }
68 
69 } // end jet namespace
70 
jet::UncertaintyComponent::m_energyScale
const float m_energyScale
Definition: UncertaintyComponent.h:55
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
jet::ClosebyUncertaintyComponent
Definition: ClosebyUncertaintyComponent.h:14
jet::ClosebyUncertaintyComponent::getValidityImpl
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: ClosebyUncertaintyComponent.cxx:47
jet::ComponentHelper
Definition: ConfigHelper.h:24
jet::UncertaintyComponent::m_uncHistName
const TString m_uncHistName
Definition: UncertaintyComponent.h:51
jet::ClosebyUncertaintyComponent::ClosebyUncertaintyComponent
ClosebyUncertaintyComponent(const ComponentHelper &component)
Definition: ClosebyUncertaintyComponent.cxx:23
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::ClosebyUncertaintyComponent::getUncertaintyImpl
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: ClosebyUncertaintyComponent.cxx:52
JESUNC_ERROR_CODE
#define JESUNC_ERROR_CODE
Definition: Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:23
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
jet::UncertaintyComponent::m_validHist
UncertaintyHistogram * m_validHist
Definition: UncertaintyComponent.h:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ClosebyUncertaintyComponent.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::ClosebyUncertaintyComponent::clone
virtual ClosebyUncertaintyComponent * clone() const
Definition: ClosebyUncertaintyComponent.cxx:35
jet::ClosebyUncertaintyComponent::getMinDR
float getMinDR(const xAOD::Jet &jet) const
Definition: ClosebyUncertaintyComponent.cxx:57
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
jet::UncertaintyComponent::m_uncHist
UncertaintyHistogram * m_uncHist
Definition: UncertaintyComponent.h:60