ATLAS Offline Software
SubstructureCalculator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef jetsubstructuremoments_substructurecalculator_header
6 #define jetsubstructuremoments_substructurecalculator_header
7 
8 #include "xAODJet/Jet.h"
9 #include "fastjet/PseudoJet.hh"
10 #include "fastjet/FunctionOfPseudoJet.hh"
11 // #include "JetEDM/JetConstituentFiller.h"
12 
13 #include <vector>
14 #include <algorithm>
15 #include <iostream>
16 
17 namespace JetSubStructureUtils {
18  template<typename TOut>
20  public fastjet::FunctionOfPseudoJet<TOut>
21  {
22  public:
24 
25  virtual TOut result(const xAOD::Jet &jet) const {
26  // PS 4/18 master developent
27  // std::vector<fastjet::PseudoJet> constit_pseudojets =
28  // jet::JetConstituentFiller::constituentPseudoJets(jet);
29 
30  std::vector<fastjet::PseudoJet> constit_pseudojets;
31  std::transform(jet.getConstituents().begin(),
32  jet.getConstituents().end(),
33  std::back_inserter(constit_pseudojets),
34  [](const auto& c){
35  const xAOD::IParticle* ip = c->rawConstituent();
36  return
37  // fastjet::PseudoJet((c->rawConstituent())->p4());
38  fastjet::PseudoJet(ip->p4());
39  });
40 
41  fastjet::PseudoJet pjet = fastjet::join(constit_pseudojets);
42 
43  return result(pjet);
44  }
45  };
46 }
47 
48 #endif
Jet.h
get_generator_info.result
result
Definition: get_generator_info.py:21
JetSubStructureUtils
Definition: Angularity.h:10
JetSubStructureUtils::SubstructureCalculator::result
virtual TOut result(const xAOD::Jet &jet) const
Definition: SubstructureCalculator.h:25
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
python.compressB64.c
def c
Definition: compressB64.py:93
JetSubStructureUtils::SubstructureCalculator
Definition: SubstructureCalculator.h:21