ATLAS Offline Software
JetCalibrationStep.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 /*
4 JetCalibrationStep
5 A base class for individual pieces of the jet calibration sequence
6 
7 Author: Bill Balunas (balunas@cern.ch)
8 */
9 
11 
13  asg::AsgMessaging(std::string(name)),
14  m_GeV(1000),
15  m_name(name)
16 {}
17 
19 = default;
20 
23  if ( m_jetStartScale.compare("Default") == 0 ) {
24  return StatusCode::SUCCESS;
25  } else if ( jet.getAttribute<xAOD::JetFourMom_t>(m_jetStartScale.c_str(),tmp) ) {
26  jet.setJetP4(tmp);
27  return StatusCode::SUCCESS;
28  }
29  ATH_MSG_WARNING("Jet does not have the requested momentum state: " << m_jetStartScale);
30  return StatusCode::FAILURE;
31 }
32 
34  ATH_MSG_ERROR("Nominal data resolution requested from a jet calibration step that doesn't define it.");
35  return StatusCode::FAILURE;
36 }
37 
39  ATH_MSG_ERROR("Nominal MC resolution requested from a jet calibration step that doesn't define it.");
40  return StatusCode::FAILURE;
41 }
JetCalibrationStep::~JetCalibrationStep
virtual ~JetCalibrationStep()
JetCalibrationStep::setStartP4
virtual StatusCode setStartP4(xAOD::Jet &jet) const
Definition: JetCalibrationStep.cxx:21
JetCalibrationStep::getNominalResolutionMC
virtual StatusCode getNominalResolutionMC(const xAOD::Jet &, double &) const
Definition: JetCalibrationStep.cxx:38
asg
Definition: DataHandleTestTool.h:28
JetCalibrationStep::JetCalibrationStep
JetCalibrationStep(const char *name="JetCalibrationStep")
Definition: JetCalibrationStep.cxx:12
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetCalibrationStep::getNominalResolutionData
virtual StatusCode getNominalResolutionData(const xAOD::Jet &, double &) const
Definition: JetCalibrationStep.cxx:33
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
JetCalibrationStep::m_jetStartScale
std::string m_jetStartScale
Definition: JetCalibrationStep.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
JetCalibrationStep.h