ATLAS Offline Software
JetPullTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // JetPullTool.cxx
6 
9 
10 JetPullTool::JetPullTool(const std::string& name) :
12  declareProperty("UseEtaInsteadOfY", m_useEtaInsteadOfY = false);
13  declareProperty("IncludeTensorMoments", m_includeTensorMoments = false);
14 }
15 
16 int JetPullTool::modifyJet(xAOD::Jet &injet) const {
17 
18  fastjet::PseudoJet jet;
19  bool decorate = SetupDecoration(jet,injet);
20 
21  std::map<std::string,double> values;
22  values["PullMag"] = -999;
23  values["PullPhi"] = -999;
24  values["Pull_C00"] = -999;
25  values["Pull_C01"] = -999;
26  values["Pull_C10"] = -999;
27  values["Pull_C11"] = -999;
28 
29  if (decorate) {
31  values = pull.result(jet);
32  }
33 
34  injet.setAttribute(m_prefix+"PullMag", values["PullMag"]);
35  injet.setAttribute(m_prefix+"PullPhi", values["PullPhi"]);
36 
38  injet.setAttribute(m_prefix+"Pull_C00", values["Pull_C00"]);
39  injet.setAttribute(m_prefix+"Pull_C01", values["Pull_C01"]);
40  injet.setAttribute(m_prefix+"Pull_C10", values["Pull_C10"]);
41  injet.setAttribute(m_prefix+"Pull_C11", values["Pull_C11"]);
42  }
43 
44  return 0;
45 }
JetPullTool.h
Pull.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:797
python.DecoratorFactory.decorate
def decorate(hto4l_controller, decorator, **kwargs)
Definition: Hto4lControl/python/DecoratorFactory.py:5
JetPullTool::JetPullTool
JetPullTool(const std::string &name)
Definition: JetPullTool.cxx:10
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:264
xAOD::Jet_v1::setAttribute
void setAttribute(const std::string &name, const T &v)
JetSubStructureMomentToolsBase::m_prefix
std::string m_prefix
Definition: JetSubStructureMomentToolsBase.h:30
JetSubStructureMomentToolsBase::SetupDecoration
bool SetupDecoration(fastjet::PseudoJet &pseudojet, const xAOD::Jet &jet, bool requireJetStructure=false) const
Definition: JetSubStructureMomentToolsBase.cxx:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
JetPullTool::modifyJet
int modifyJet(xAOD::Jet &injet) const
Modify a single jet. This is obsolete and set to be removed.
Definition: JetPullTool.cxx:16
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetSubStructureUtils::Pull
Definition: Pull.h:11
JetSubStructureMomentToolsBase
Definition: JetSubStructureMomentToolsBase.h:18
JetPullTool::m_includeTensorMoments
bool m_includeTensorMoments
Definition: JetPullTool.h:24
JetPullTool::m_useEtaInsteadOfY
bool m_useEtaInsteadOfY
Definition: JetPullTool.h:23