diff -r 414e8d9913f2 configure.ac --- a/configure.ac Mon Apr 03 13:52:15 2017 +0200 +++ b/configure.ac Thu Apr 06 17:14:31 2017 +0200 @@ -136,11 +136,24 @@ AC_MSG_NOTICE([FastJet LIBADD = $FASTJETCONFIGLIBADD]) AC_SUBST(FASTJETCONFIGLIBADD) # Check for FastJet headers that require the --enable-all(cxx)plugins option -FASTJET_ERRMSG="Required FastJet plugin headers were not found: did you build FastJet with the --enable-allcxxplugins option?" +FASTJET_ERRMSG="" oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$FASTJETINCPATH" -AC_CHECK_HEADER([fastjet/D0RunIIConePlugin.hh], [], [AC_MSG_ERROR([$FASTJET_ERRMSG])]) -AC_CHECK_HEADER([fastjet/TrackJetPlugin.hh], [], [AC_MSG_ERROR([$FASTJET_ERRMSG])]) +AC_CHECK_HEADERS([fastjet/D0RunIIConePlugin.hh \ + fastjet/TrackJetPlugin.hh \ + fastjet/SISConePlugin.hh \ + fastjet/ATLASConePlugin.hh \ + fastjet/CMSIterativeConePlugin.hh \ + fastjet/CDFJetCluPlugin.hh \ + fastjet/CDFMidPointPlugin.hh \ + fastjet/D0RunIIConePlugin.hh \ + fastjet/TrackJetPlugin.hh \ + fastjet/JadePlugin.hh \ + fastjet/PxConePlugin.hh]) +if test x$ac_cv_header_FASTJET_D0RUNIICONEPLUGIN_HH = "xno" || \ + test x$ac_cv_header_FASTJET_TRACKJETPLUGIN_HH = "xno" ; then + AC_MSG_ERROR([Required FastJet plugin headers were not found: did you build FastJet with the --enable-allcxxplugins option?]) +fi CPPFLAGS=$oldCPPFLAGS diff -r 414e8d9913f2 include/Rivet/Projections/FastJets.hh --- a/include/Rivet/Projections/FastJets.hh Mon Apr 03 13:52:15 2017 +0200 +++ b/include/Rivet/Projections/FastJets.hh Thu Apr 06 17:14:31 2017 +0200 @@ -9,15 +9,6 @@ #include "Rivet/Projections/FinalState.hh" #include "Rivet/Tools/RivetFastJet.hh" -#include "fastjet/SISConePlugin.hh" -#include "fastjet/ATLASConePlugin.hh" -#include "fastjet/CMSIterativeConePlugin.hh" -#include "fastjet/CDFJetCluPlugin.hh" -#include "fastjet/CDFMidPointPlugin.hh" -#include "fastjet/D0RunIIConePlugin.hh" -#include "fastjet/TrackJetPlugin.hh" -#include "fastjet/JadePlugin.hh" -//#include "fastjet/PxConePlugin.hh" namespace Rivet { @@ -29,7 +20,7 @@ /// Wrapper enum for selected FastJet jet algorithms. /// @todo Move to JetAlg and alias here? enum JetAlgName { KT, CAM, SISCONE, ANTIKT, - // PXCONE, + PXCONE, ATLASCONE, CMSCONE, CDFJETCLU, CDFMIDPOINT, D0ILCONE, JADE, DURHAM, TRACKJET, GENKTEE }; @@ -227,6 +218,9 @@ return _jdef; } + static fastjet::JetDefinition::Plugin* makePlugin(JetAlgName alg, + double rparameter, + double seed_threshold); /// @brief Return the area definition. /// /// @warning May be null! diff -r 414e8d9913f2 m4/libtool.m4 --- a/m4/libtool.m4 Mon Apr 03 13:52:15 2017 +0200 +++ b/m4/libtool.m4 Thu Apr 06 17:14:31 2017 +0200 @@ -728,7 +728,6 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -2887,6 +2886,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3546,7 +3557,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4424,7 +4435,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4936,6 +4947,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4998,6 +5012,9 @@ openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5252,7 +5269,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5773,6 +5790,7 @@ if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5794,7 +5812,7 @@ esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else diff -r 414e8d9913f2 src/Analyses/CDF_2008_S7540469.cc --- a/src/Analyses/CDF_2008_S7540469.cc Mon Apr 03 13:52:15 2017 +0200 +++ b/src/Analyses/CDF_2008_S7540469.cc Thu Apr 06 17:14:31 2017 +0200 @@ -104,7 +104,7 @@ // Proceed to lepton dressing const PseudoJets pjs = mkPseudoJets(jetparts); - const auto jplugin = make_shared(0.7, 0.5, 1.0); + const auto jplugin = std::shared_ptr(FastJets::makePlugin(FastJets::CDFMIDPOINT,0.7,1)); const Jets jets_all = mkJets(fastjet::ClusterSequence(pjs, jplugin.get()).inclusive_jets()); const Jets jets_cut = sortByPt(filterBy(jets_all, Cuts::pT > 30*GeV && Cuts::abseta < 2.1)); // FastJets jetpro(FastJets::CDFMIDPOINT, 0.7); diff -r 414e8d9913f2 src/Analyses/OPAL_1993_S2692198.cc --- a/src/Analyses/OPAL_1993_S2692198.cc Mon Apr 03 13:52:15 2017 +0200 +++ b/src/Analyses/OPAL_1993_S2692198.cc Thu Apr 06 17:14:31 2017 +0200 @@ -4,7 +4,7 @@ #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Projections/FastJets.hh" -#include "fastjet/JadePlugin.hh" +// #include "fastjet/JadePlugin.hh" namespace Rivet { @@ -45,8 +45,8 @@ // Definition of the Durham algorithm fastjet::JetDefinition durham_def(fastjet::ee_kt_algorithm, fastjet::E_scheme, fastjet::Best); // Definition of the JADE algorithm - fastjet::JadePlugin jade; - fastjet::JetDefinition jade_def = fastjet::JetDefinition(&jade); + // fastjet::JadePlugin jade; + fastjet::JetDefinition jade_def = fastjet::JetDefinition(FastJets::makePlugin(FastJets::JADE,0,0)); // Now for the weird jet algorithm double evis = ptotal.mass(); vector input_particles; diff -r 414e8d9913f2 src/Analyses/STAR_2009_UE_HELEN.cc --- a/src/Analyses/STAR_2009_UE_HELEN.cc Mon Apr 03 13:52:15 2017 +0200 +++ b/src/Analyses/STAR_2009_UE_HELEN.cc Thu Apr 06 17:14:31 2017 +0200 @@ -5,7 +5,7 @@ #include "Rivet/Projections/MergedFinalState.hh" #include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/FastJets.hh" -#include "fastjet/SISConePlugin.hh" +// #include "fastjet/SISConePlugin.hh" namespace Rivet { diff -r 414e8d9913f2 src/Projections/FastJets.cc --- a/src/Projections/FastJets.cc Mon Apr 03 13:52:15 2017 +0200 +++ b/src/Projections/FastJets.cc Thu Apr 06 17:14:31 2017 +0200 @@ -5,6 +5,34 @@ #include "Rivet/Projections/HeavyHadrons.hh" #include "Rivet/Projections/TauFinder.hh" +#ifdef HAVE_FASTJET_SISCONEPLUGIN_HH +# include "fastjet/SISConePlugin.hh" +#endif +#ifdef HAVE_FASTJET_ATLASCONEPLUGIN_HH +# include "fastjet/ATLASConePlugin.hh" +#endif +#ifdef HAVE_FASTJET_CMSITERATIVECONEPLUGIN_HH +# include "fastjet/CMSIterativeConePlugin.hh" +#endif +#ifdef HAVE_FASTJET_CDFJETCLUPLUGIN_HH +# include "fastjet/CDFJetCluPlugin.hh" +#endif +#ifdef HAVE_FASTJET_CDFMIDPOINTPLUGIN_HH +# include "fastjet/CDFMidPointPlugin.hh" +#endif +#ifdef HAVE_FASTJET_D0RUNIICONEPLUGIN_HH +# include "fastjet/D0RunIIConePlugin.hh" +#endif +#ifdef HAVE_FASTJET_TRACKJETPLUGIN_HH +# include "fastjet/TrackJetPlugin.hh" +#endif +#ifdef HAVE_FASTJET_JADEPLUGIN_HH +# include "fastjet/JadePlugin.hh" +#endif +#ifdef HAVE_FASTJET_PXCONEPLUGIN_HH +# include "fastjet/PxConePlugin.hh" +#endif + namespace Rivet { @@ -18,53 +46,113 @@ // void FastJets::_init1(JetAlgName alg, double rparameter, double seed_threshold) { // _initBase(); - - void FastJets::_initJdef(JetAlgName alg, double rparameter, double seed_threshold) { - MSG_DEBUG("JetAlg = " << alg); - MSG_DEBUG("R parameter = " << rparameter); - MSG_DEBUG("Seed threshold = " << seed_threshold); - if (alg == KT) { - _jdef = fastjet::JetDefinition(fastjet::kt_algorithm, rparameter, fastjet::E_scheme); - } else if (alg == CAM) { - _jdef = fastjet::JetDefinition(fastjet::cambridge_algorithm, rparameter, fastjet::E_scheme); - } else if (alg == ANTIKT) { - _jdef = fastjet::JetDefinition(fastjet::antikt_algorithm, rparameter, fastjet::E_scheme); - } else if (alg == DURHAM) { - _jdef = fastjet::JetDefinition(fastjet::ee_kt_algorithm, fastjet::E_scheme); - } else if (alg == GENKTEE) { - _jdef = fastjet::JetDefinition(fastjet::ee_genkt_algorithm, rparameter, 1.); - } else { - // Plugins: - if (alg == SISCONE) { - const double OVERLAP_THRESHOLD = 0.75; - _plugin.reset(new fastjet::SISConePlugin(rparameter, OVERLAP_THRESHOLD)); - // } else if (alg == PXCONE) { - // string msg = "PxCone currently not supported, since FastJet doesn't install it by default. "; - // msg += "Please notify the Rivet authors if this behaviour should be changed."; - // throw Error(msg); - // _plugin.reset(new fastjet::PxConePlugin(rparameter)); - } else if (alg == ATLASCONE) { - const double OVERLAP_THRESHOLD = 0.5; - _plugin.reset(new fastjet::ATLASConePlugin(rparameter, seed_threshold, OVERLAP_THRESHOLD)); - } else if (alg == CMSCONE) { - _plugin.reset(new fastjet::CMSIterativeConePlugin(rparameter, seed_threshold)); - } else if (alg == CDFJETCLU) { - const double OVERLAP_THRESHOLD = 0.75; - _plugin.reset(new fastjet::CDFJetCluPlugin(rparameter, OVERLAP_THRESHOLD, seed_threshold)); - } else if (alg == CDFMIDPOINT) { - const double OVERLAP_THRESHOLD = 0.5; - _plugin.reset(new fastjet::CDFMidPointPlugin(rparameter, OVERLAP_THRESHOLD, seed_threshold)); - } else if (alg == D0ILCONE) { - const double min_jet_Et = 6.0; - _plugin.reset(new fastjet::D0RunIIConePlugin(rparameter, min_jet_Et)); - } else if (alg == JADE) { - _plugin.reset(new fastjet::JadePlugin()); - } else if (alg == TRACKJET) { - _plugin.reset(new fastjet::TrackJetPlugin(rparameter)); + fastjet::JetDefinition::Plugin* FastJets::makePlugin(JetAlgName alg, + double rparameter, + double seed_threshold) + { + // Plugins: + if (alg == SISCONE) { +#ifdef HAVE_FASTJET_SISCONEPLUGIN_HH + const double OVERLAP_THRESHOLD = 0.75; + return new fastjet::SISConePlugin(rparameter, OVERLAP_THRESHOLD); +#else + throw Error("SISConePlugin not available"); +#endif + } + if (alg == PXCONE) { +#ifdef HAVE_FASTJET_PXCONE_HH + return new fastjet::PxConePlugin(rparameter); +#else + string msg = "PxCone currently not supported, since FastJet doesn't install it by default. "; + msg += "Please notify the Rivet authors if this behaviour should be changed."; + throw Error(msg); +#endif + } + if (alg == ATLASCONE) { +#ifdef HAVE_FASTJET_ATLASCONEPLUGIN_HH + const double OVERLAP_THRESHOLD = 0.5; + return new fastjet::ATLASConePlugin(rparameter, seed_threshold, + OVERLAP_THRESHOLD); +#else + throw Error("ATLASConePlugin not available"); +#endif + } + if (alg == CMSCONE) { +#ifdef HAVE_FASTJET_CMSITERATIVECONEPLUGIN_HH + return new fastjet::CMSIterativeConePlugin(rparameter, seed_threshold); +#else + throw Error("CMSIterativeConePlugin not available"); +#endif + } + if (alg == CDFJETCLU) { +#ifdef HAVE_FASTJET_CDFJETCLUPLUGIN_HH + const double OVERLAP_THRESHOLD = 0.75; + return new fastjet::CDFJetCluPlugin(rparameter, OVERLAP_THRESHOLD, + seed_threshold); +#else + throw Error("CDFJetCluPlugin not available"); +#endif + } + if (alg == CDFMIDPOINT) { +#ifdef HAVE_FASTJET_CDFMIDPOINTPLUGIN_HH + const double OVERLAP_THRESHOLD = 0.5; + new fastjet::CDFMidPointPlugin(rparameter, OVERLAP_THRESHOLD, + seed_threshold); +#else + throw Error("CDFMidPointPlugin not available"); +#endif + } + if (alg == D0ILCONE) { +#ifdef HAVE_FASTJET_D0RUNIICONEPLUGIN_HH + const double min_jet_Et = 6.0; + return new fastjet::D0RunIIConePlugin(rparameter, min_jet_Et); +#else + throw Error("D0RunIIConePlugin not available"); +#endif + } + if (alg == JADE) { +#ifdef HAVE_FASTJET_JADEPLUGIN_HH + return new fastjet::JadePlugin(); +#else + throw Error("JadePlugin not available"); +#endif + } + if (alg == TRACKJET) { +#ifdef HAVE_FASTJET_TRACKJETPLUGIN_HH + return new fastjet::TrackJetPlugin(rparameter); +#else + throw Error("TrackJetPlugin not available"); +#endif + } + return 0; + } + void FastJets::_initJdef(JetAlgName alg, + double rparameter, + double seed_threshold) + { + MSG_DEBUG("JetAlg = " << alg); + MSG_DEBUG("R parameter = " << rparameter); + MSG_DEBUG("Seed threshold = " << seed_threshold); + if (alg == KT) + _jdef = fastjet::JetDefinition(fastjet::kt_algorithm, + rparameter, fastjet::E_scheme); + else if (alg == CAM) + _jdef = fastjet::JetDefinition(fastjet::cambridge_algorithm, + rparameter, fastjet::E_scheme); + else if (alg == ANTIKT) + _jdef = fastjet::JetDefinition(fastjet::antikt_algorithm, + rparameter, fastjet::E_scheme); + else if (alg == DURHAM) + _jdef = fastjet::JetDefinition(fastjet::ee_kt_algorithm, + fastjet::E_scheme); + if (alg == GENKTEE) + _jdef = fastjet::JetDefinition(fastjet::ee_genkt_algorithm, + rparameter, 1.); + else { + _plugin.reset(makePlugin(alg, rparameter, seed_threshold)); + _jdef = fastjet::JetDefinition(_plugin.get()); } - _jdef = fastjet::JetDefinition(_plugin.get()); } - } // void FastJets::_init2(fastjet::JetAlgorithm type,