ATLAS Offline Software
JetCalibTool.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // JetCalibTool.cxx
8 // Implementation file for class JetCalibTool
10 
14 
15 JetCalibTool::JetCalibTool(const std::string& name)
16  : asg::AsgTool( name ){ }
17 
18 
19 
21 // Public methods:
23 
25  ATH_MSG_DEBUG ("Initializing " << name() );
26 
27  ATH_CHECK( m_calibSteps.retrieve());
28  if(!m_smearingTool.empty() ){
29  ATH_CHECK( m_smearingTool.retrieve());
30  }
31 
32  return StatusCode::SUCCESS;
33 }
34 
35 
37 
38  ATH_MSG_DEBUG("calibrating jet collection.");
39  for(const ToolHandle<IJetCalibStep>& cstep: m_calibSteps){
40  ATH_CHECK( cstep->calibrate(jets) );
41  }
42  return StatusCode::SUCCESS;
43 }
44 
45 
47 
48  if(m_smearingTool.empty()){
49  ATH_MSG_ERROR("No smearing tool configured !");
50  return StatusCode::FAILURE;
51  }
52  return m_smearingTool->getNominalResolutionData(jet, jcontext, resolution);
53 }
54 
56  if(m_smearingTool.empty()){
57  ATH_MSG_ERROR("No smearing tool configured !");
58  return StatusCode::FAILURE;
59  }
60  return m_smearingTool->getNominalResolutionMC(jet, jcontext, resolution);
61 }
62 
JetHelper::JetContext
Class JetContext Designed to read AOD information related to the event, N vertices,...
Definition: JetContext.h:24
JetCalibTool.h
asg
Definition: DataHandleTestTool.h:28
JetCalibTool::getNominalResolutionMC
virtual StatusCode getNominalResolutionMC(const xAOD::Jet &jet, const JetHelper::JetContext &, double &resolution) const override
Definition: JetCalibTool.cxx:55
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
JetCalibTool::m_smearingTool
ToolHandle< IJetCalibStep > m_smearingTool
Definition: JetCalibTool.h:52
JetCalibTool::m_calibSteps
ToolHandleArray< IJetCalibStep > m_calibSteps
Definition: JetCalibTool.h:50
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JetCalibTool::JetCalibTool
JetCalibTool(const std::string &name="JetCalibTool")
Constructor with parameters:
Definition: JetCalibTool.cxx:15
PathResolver.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetCalibTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetCalibTool.cxx:24
ReadDecorHandle.h
Handle class for reading a decoration on an object.
JetCalibTool::getNominalResolutionData
virtual StatusCode getNominalResolutionData(const xAOD::Jet &jet, const JetHelper::JetContext &, double &resolution) const override
Definition: JetCalibTool.cxx:46
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetCalibTool::calibrate
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
Definition: JetCalibTool.cxx:36