00001 #ifndef jetsubstructuremoments_substructurecalculator_header 00002 #define jetsubstructuremoments_substructurecalculator_header 00003 00004 #include <vector> 00005 #include <map> 00006 #include <string> 00007 #include "xAODJet/Jet.h" 00008 #include "fastjet/PseudoJet.hh" 00009 #include "fastjet/FunctionOfPseudoJet.hh" 00010 #include "JetEDM/JetConstituentFiller.h" 00011 00012 namespace JetSubStructureUtils { 00013 template<typename TOut> 00014 class SubstructureCalculator : 00015 public fastjet::FunctionOfPseudoJet<TOut> 00016 { 00017 public: 00018 using fastjet::FunctionOfPseudoJet<TOut>::result; 00019 00020 virtual TOut result(const xAOD::Jet &jet) const { 00021 std::vector<fastjet::PseudoJet> constit_pseudojets = 00022 jet::JetConstituentFiller::constituentPseudoJets(jet); 00023 fastjet::PseudoJet pjet = fastjet::join(constit_pseudojets); 00024 00025 return result(pjet); 00026 } 00027 }; 00028 } 00029 00030 #endif