ATLAS Offline Software
CenterOfMassShapesTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 
12 {
13 }
14 
16 
17  fastjet::PseudoJet jet;
18  bool decorate = SetupDecoration(jet,injet);
19 
20  std::map<std::string, double> res_t, res_fox, res_s;
21 
22  res_t["ThrustMin"] = -999;
23  res_t["ThrustMaj"] = -999;
24  res_fox["FoxWolfram0"] = -999;
25  res_fox["FoxWolfram1"] = -999;
26  res_fox["FoxWolfram2"] = -999;
27  res_fox["FoxWolfram3"] = -999;
28  res_fox["FoxWolfram4"] = -999;
29  res_s["Sphericity"] = -999;
30  res_s["Aplanarity"] = -999;
31 
32  if (decorate) {
36  res_t = t.result(jet);
37  res_fox = foxwolfram.result(jet);
38  res_s = sphericity.result(jet);
39 
40  }
41 
42  injet.setAttribute(m_prefix+"ThrustMin", res_t["ThrustMin"]);
43  injet.setAttribute(m_prefix+"ThrustMaj", res_t["ThrustMaj"]);
44 
45 
46  injet.setAttribute(m_prefix+"FoxWolfram0", res_fox["FoxWolfram0"]);
47  injet.setAttribute(m_prefix+"FoxWolfram1", res_fox["FoxWolfram1"]);
48  injet.setAttribute(m_prefix+"FoxWolfram2", res_fox["FoxWolfram2"]);
49  injet.setAttribute(m_prefix+"FoxWolfram3", res_fox["FoxWolfram3"]);
50  injet.setAttribute(m_prefix+"FoxWolfram4", res_fox["FoxWolfram4"]);
51 
52 
53  injet.setAttribute(m_prefix+"Sphericity", res_s["Sphericity"]);
54  injet.setAttribute(m_prefix+"Aplanarity", res_s["Aplanarity"]);
55 
56  return 0;
57 }
58 
JetSubStructureUtils::FoxWolfram
Definition: Reconstruction/Jet/JetSubStructureUtils/JetSubStructureUtils/FoxWolfram.h:11
JetSubStructureUtils::Thrust
Definition: Reconstruction/Jet/JetSubStructureUtils/JetSubStructureUtils/Thrust.h:11
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.DecoratorFactory.decorate
def decorate(hto4l_controller, decorator, **kwargs)
Definition: Hto4lControl/python/DecoratorFactory.py:5
Thrust.h
JetSubStructureUtils::SphericityTensor::result
virtual std::map< std::string, double > result(const fastjet::PseudoJet &jet) const
Definition: SphericityTensor.cxx:15
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
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:221
SphericityTensor.h
CenterOfMassShapesTool::CenterOfMassShapesTool
CenterOfMassShapesTool(const std::string &name)
Definition: CenterOfMassShapesTool.cxx:10
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetSubStructureUtils::SphericityTensor
Definition: SphericityTensor.h:11
FoxWolfram.h
JetSubStructureMomentToolsBase
Definition: JetSubStructureMomentToolsBase.h:18
JetSubStructureUtils::FoxWolfram::result
virtual std::map< std::string, double > result(const fastjet::PseudoJet &jet) const
Definition: Reconstruction/Jet/JetSubStructureUtils/Root/FoxWolfram.cxx:12
CenterOfMassShapesTool::modifyJet
int modifyJet(xAOD::Jet &injet) const
Modify a single jet. This is obsolete and set to be removed.
Definition: CenterOfMassShapesTool.cxx:15
CenterOfMassShapesTool.h