Warning, file /include/EICrecon/algorithms/reco/JetReconstruction.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #pragma once
0005
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/ReconstructedParticleCollection.h>
0008 #include <fastjet/AreaDefinition.hh>
0009 #include <fastjet/JetDefinition.hh>
0010 #include <map>
0011 #include <memory>
0012 #include <string>
0013 #include <string_view>
0014
0015 #include "JetReconstructionConfig.h"
0016
0017 #include "algorithms/interfaces/WithPodConfig.h"
0018
0019 namespace eicrecon {
0020
0021 template <typename InputT>
0022 using JetReconstructionAlgorithm =
0023 algorithms::Algorithm<algorithms::Input<typename InputT::collection_type>,
0024 algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0025
0026 template <typename InputT>
0027 class JetReconstruction : public JetReconstructionAlgorithm<InputT>,
0028 public WithPodConfig<JetReconstructionConfig> {
0029
0030 public:
0031 JetReconstruction(std::string_view name)
0032 : JetReconstructionAlgorithm<InputT>{
0033 name,
0034 {"inputReconstructedParticles"},
0035 {"outputReconstructedParticles"},
0036 "Performs jet reconstruction using a FastJet algorithm."} {}
0037
0038 public:
0039
0040 void init() final;
0041
0042
0043 void process(const typename eicrecon::JetReconstructionAlgorithm<InputT>::Input&,
0044 const typename eicrecon::JetReconstructionAlgorithm<InputT>::Output&) const final;
0045
0046 private:
0047
0048 std::unique_ptr<fastjet::JetDefinition> m_jet_def;
0049 std::unique_ptr<fastjet::AreaDefinition> m_area_def;
0050 std::unique_ptr<fastjet::JetDefinition::Plugin> m_jet_plugin;
0051
0052
0053 std::map<std::string, fastjet::JetAlgorithm> m_mapJetAlgo = {
0054 {"kt_algorithm", fastjet::JetAlgorithm::kt_algorithm},
0055 {"cambridge_algorithm", fastjet::JetAlgorithm::cambridge_algorithm},
0056 {"antikt_algorithm", fastjet::JetAlgorithm::antikt_algorithm},
0057 {"genkt_algorithm", fastjet::JetAlgorithm::genkt_algorithm},
0058 {"cambridge_for_passive_algorithm", fastjet::JetAlgorithm::cambridge_for_passive_algorithm},
0059 {"genkt_for_passive_algorithm", fastjet::JetAlgorithm::genkt_for_passive_algorithm},
0060 {"ee_kt_algorithm", fastjet::JetAlgorithm::ee_kt_algorithm},
0061 {"ee_genkt_algorithm", fastjet::JetAlgorithm::ee_genkt_algorithm},
0062 {"plugin_algorithm", fastjet::JetAlgorithm::plugin_algorithm}};
0063 std::map<std::string, fastjet::RecombinationScheme> m_mapRecombScheme = {
0064 {"E_scheme", fastjet::RecombinationScheme::E_scheme},
0065 {"pt_scheme", fastjet::RecombinationScheme::pt_scheme},
0066 {"pt2_scheme", fastjet::RecombinationScheme::pt2_scheme},
0067 {"Et_scheme", fastjet::RecombinationScheme::Et_scheme},
0068 {"Et2_scheme", fastjet::RecombinationScheme::Et2_scheme},
0069 {"BIpt_scheme", fastjet::RecombinationScheme::BIpt_scheme},
0070 {"BIpt2_scheme", fastjet::RecombinationScheme::BIpt2_scheme},
0071 {"WTA_pt_scheme", fastjet::RecombinationScheme::WTA_pt_scheme},
0072 {"WTA_modp_scheme", fastjet::RecombinationScheme::WTA_modp_scheme},
0073 {"external_scheme", fastjet::RecombinationScheme::external_scheme}};
0074 std::map<std::string, fastjet::AreaType> m_mapAreaType = {
0075 {"active_area", fastjet::AreaType::active_area},
0076 {"active_area_explicit_ghosts", fastjet::AreaType::active_area_explicit_ghosts},
0077 {"one_ghost_passive_area", fastjet::AreaType::one_ghost_passive_area},
0078 {"passive_area", fastjet::AreaType::passive_area},
0079 {"voronoi_area", fastjet::AreaType::voronoi_area}};
0080
0081
0082 const struct defaults {
0083 std::string jetAlgo;
0084 std::string recombScheme;
0085 std::string areaType;
0086 } m_defaultFastjetOpts = {"antikt_algorithm", "E_scheme", "active_area"};
0087
0088 };
0089
0090 }