From 932c8057c6c3bb23c6f9f597c82016dc097755ae Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sat, 15 Apr 2023 11:49:15 +0100 Subject: [PATCH 01/49] Upgrade fastjet from 3.3.2 to 3.4.0 (needed for rivet 3.1.7) --- cmake/backends.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 8b82cd0955..541178c613 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -1989,14 +1989,14 @@ endif() # Fastjet set(name "fastjet") -set(ver "3.3.2") -set(dl "http://fastjet.fr/repo/fastjet-3.3.2.tar.gz") -set(md5 "ca3708785c9194513717a54c1087bfb0") +set(ver "3.4.0") +set(dl "http://fastjet.fr/repo/fastjet-3.4.0.tar.gz") +set(md5 "69879b19006fb6dc7d0b98d01c5cd115") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") # OpenMP flags don't play nicely with clang and FastJet's antiquated libtoolized build system. string(REGEX REPLACE "-Xclang -fopenmp" "" FJ_C_FLAGS "${BACKEND_C_FLAGS}") string(REGEX REPLACE "-Xclang -fopenmp" "" FJ_CXX_FLAGS "${BACKEND_CXX_FLAGS}") -# FastJet 3.3.2 depends on std::auto_ptr which is removed in c++17, so we need to fall back to c++14 (or c++11) +# FastJet 3.4.0 depends on std::auto_ptr which is removed in c++17, so we need to fall back to c++14 (or c++11) string(REGEX REPLACE "-std=c\\+\\+17" "-std=c++14" FJ_CXX_FLAGS "${FJ_CXX_FLAGS}") string(REGEX REPLACE "-std=c\\+\\+17" "-std=c++14" FJ_C_FLAGS "${FJ_C_FLAGS}") set_compiler_warning("no-deprecated-declarations" FJ_CXX_FLAGS) @@ -2025,7 +2025,7 @@ set(dl "http://fastjet.hepforge.org/contrib/downloads/${name}-${ver}.tar.gz") set(md5 "b37674a8701af52b58ebced94a270877") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(fastjet_name "fastjet") -set(fastjet_ver "3.3.2") +set(fastjet_ver "3.4.0") set(fastjet_dir "${PROJECT_SOURCE_DIR}/Backends/installed/${fastjet_name}/${fastjet_ver}") set(FJCONTRIB_CXX_FLAGS ${FJ_CXX_FLAGS}) #set(FJCONTRIB_CXX_FLAGS ${BACKEND_CXX_FLAGS}) @@ -2061,7 +2061,7 @@ set(yoda_dir "${YODA_PATH}/local") set(hepmc_name "hepmc") set(hepmc_dir "${HEPMC_PATH}/local") set(fastjet_name "fastjet") -set(fastjet_ver "3.3.2") +set(fastjet_ver "3.4.0") set(fastjet_dir "${PROJECT_SOURCE_DIR}/Backends/installed/${fastjet_name}/${fastjet_ver}/local") set(fjcontrib_name "fjcontrib") set(fjcontrib_ver "1.041") From d41cde162fb2d91d015f43eaee0ed9416dc562ac Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sun, 16 Apr 2023 14:20:06 +0100 Subject: [PATCH 02/49] Update Rivet to 3.1.7 Still needs testing and possibly ironing out rivet config issues --- .../Backends/default_bossed_versions.hpp | 2 +- .../rivet/3.1.7/make_patch_rivet_3.1.7.sh | 20 ++ .../patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 292 ++++++++++++++++++ Backends/patches/rivet/3.1.7/touch_files.sh | 3 + Backends/scripts/BOSS/configs/rivet_3_1_7.py | 131 ++++++++ Backends/src/frontends/Rivet_3_1_7.cpp | 53 ++++ cmake/backends.cmake | 12 +- config/backend_locations.yaml.default | 2 +- 8 files changed, 510 insertions(+), 5 deletions(-) create mode 100755 Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh create mode 100644 Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif create mode 100755 Backends/patches/rivet/3.1.7/touch_files.sh create mode 100644 Backends/scripts/BOSS/configs/rivet_3_1_7.py create mode 100644 Backends/src/frontends/Rivet_3_1_7.cpp diff --git a/Backends/include/gambit/Backends/default_bossed_versions.hpp b/Backends/include/gambit/Backends/default_bossed_versions.hpp index 56d90d9a38..d6db97377e 100644 --- a/Backends/include/gambit/Backends/default_bossed_versions.hpp +++ b/Backends/include/gambit/Backends/default_bossed_versions.hpp @@ -30,6 +30,6 @@ #define Default_Pythia 8_212 #define Default_HepLike 2_0 #define Default_vevacious 1_0 -#define Default_Rivet 3_1_5 +#define Default_Rivet 3_1_7 // Defaults added by GUM (do not remove this comment). diff --git a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh new file mode 100755 index 0000000000..092c4918d3 --- /dev/null +++ b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh @@ -0,0 +1,20 @@ +cd ../../../downloaded +tar -xvf *rivet* +echo "diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc >> patch_rivet_3.1.7.dif +mv patch_rivet_3.1.7.dif ../patches/rivet/3.1.7/ +cd ../patches/rivet/3.1.7 diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif new file mode 100644 index 0000000000..038b577c12 --- /dev/null +++ b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif @@ -0,0 +1,292 @@ +diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in +--- Rivet-3.1.7/Makefile.in 2022-09-28 14:32:46.000000000 +0100 ++++ ../installed/rivet/3.1.7/Makefile.in 2023-04-14 14:55:04.096679845 +0100 +@@ -457,6 +457,20 @@ pkgconfigdir = $(libdir)/pkgconfig + dist_pkgconfig_DATA = rivet.pc + DEST = login.hepforge.org:rivet/downloads/ + all: all-recursive ++# Added by GAMBIT ++libRivet.so: ++ cd ${top_builddir}/src/Core/yamlcpp && ${MAKE} $(AM_MAKEFLAGS) librivet-yaml-cpp.la ++ cd ${top_builddir}/src/Core && ${MAKE} $(AM_MAKEFLAGS) libRivetCore.la ++ cd ${top_builddir}/src/Projections && ${MAKE} $(AM_MAKEFLAGS) libRivetProjections.la ++ cd ${top_builddir}/src/Tools && ${MAKE} $(AM_MAKEFLAGS) libRivetTools.la ++ cd ${top_builddir}/src/AnalysisTools && ${MAKE} $(AM_MAKEFLAGS) libRivetAnalysisTools.la ++ cd ${top_builddir}/src && ${MAKE} $(AM_MAKEFLAGS) libRivet.la ++ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) install ++ cd ${top_builddir}/pyext && ${MAKE} $(AM_MAKEFLAGS) install ++ mkdir -p ${libdir} ++ if test -e ${top_builddir}/src/.libs/libRivet.so ; then cp ${top_builddir}/src/.libs/libRivet.so ${libdir}/libRivet.so ; fi ++ if test -e ${top_builddir}/src/.libs/libRivet.dylib ; then cp ${top_builddir}/src/.libs/libRivet.dylib ${libdir}/libRivet.so ; fi ++ + + .SUFFIXES: + am--refresh: Makefile +@@ -529,6 +543,7 @@ mostlyclean-libtool: + + clean-libtool: + -rm -rf .libs _libs ++ -rm -rf ${libdir} + + distclean-libtool: + -rm -f libtool config.lt +diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in +--- Rivet-3.1.7/include/Rivet/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.7/include/Rivet/Makefile.in 2023-04-14 15:30:58.413175143 +0100 +@@ -381,6 +381,7 @@ nobase_dist_noinst_HEADERS = Tools/osdir + Math/eigen3/README.md + + # TODO: Move to Rivet/AnalysisTools header dir? ++# Modified by GAMBIT + nobase_pkginclude_HEADERS = Rivet.hh Run.hh Event.hh ParticleBase.hh \ + Particle.fhh Particle.hh Jet.fhh Jet.hh Projection.fhh \ + Projection.hh ProjectionApplier.hh ProjectionHandler.hh \ +@@ -763,7 +764,21 @@ nobase_pkginclude_HEADERS = Rivet.hh RunF5 + Math/eigen3/src/SparseCore/SparseDiagonalProduct.h \ + Math/eigen3/src/SparseCore/SparseMatrixBase.h \ + Math/eigen3/src/SparseCore/SparseRef.h Math/eigen3/Geometry \ +- Math/eigen3/SparseCore ++ Math/eigen3/SparseCore \ ++ ../gambit/Backends/backend_undefs.hpp \ ++ ../gambit/Backends/wrapperbase.hpp \ ++ ../gambit/Backends/abstracttypedefs.hh \ ++ ../gambit/Backends/BOSS_wrapperutils.hh \ ++ ../gambit/Backends/wrappertypedefs.hh \ ++ ../gambit/Backends/function_return_utils.hpp \ ++ ../gambit/Utils/cats.hpp \ ++ ../backend_types/Rivet_3_1_7/identification.hpp \ ++ ../backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh \ ++ ../backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh \ ++ ../backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh + all: all-am + + .SUFFIXES: +diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in +--- Rivet-3.1.7/src/Core/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.7/src/Core/Makefile.in 2023-04-14 16:18:03.244227378 +0100 +@@ -110,6 +110,7 @@ CONFIG_CLEAN_VPATH_FILES = + LTLIBRARIES = $(noinst_LTLIBRARIES) + libRivetCore_la_DEPENDENCIES = \ + $(builddir)/yamlcpp/librivet-yaml-cpp.la ++# Modified by GAMBIT + am_libRivetCore_la_OBJECTS = libRivetCore_la-Run.lo \ + libRivetCore_la-Event.lo libRivetCore_la-Jet.lo \ + libRivetCore_la-Particle.lo \ +@@ -118,7 +119,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor + libRivetCore_la-AnalysisLoader.lo \ + libRivetCore_la-AnalysisInfo.lo \ + libRivetCore_la-AnalysisHandler.lo \ +- libRivetCore_la-ProjectionHandler.lo ++ libRivetCore_la-ProjectionHandler.lo \ ++ libRivetCore_la-BOSS_wrapperutils.lo \ ++ libRivetCore_la-BOSS_AnalysisHandler.lo \ ++ libRivetCore_la-BOSS_factory_AnalysisHandler.lo \ ++ libRivetCore_la-BOSS_func_addAnalysisLibPath.lo \ ++ libRivetCore_la-BOSS_function_return_utils.lo + libRivetCore_la_OBJECTS = $(am_libRivetCore_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -442,11 +448,17 @@ top_srcdir = @top_srcdir@ + SUBDIRS = yamlcpp . + EXTRA_DIST = zstr + noinst_LTLIBRARIES = libRivetCore.la ++# Modified by GAMBIT + libRivetCore_la_SOURCES = \ + Run.cc Event.cc Jet.cc Particle.cc \ + ProjectionApplier.cc Projection.cc \ + Analysis.cc AnalysisLoader.cc AnalysisInfo.cc \ +- AnalysisHandler.cc ProjectionHandler.cc ++ AnalysisHandler.cc ProjectionHandler.cc \ ++ BOSS_wrapperutils.cc \ ++ BOSS_AnalysisHandler.cc \ ++ BOSS_factory_AnalysisHandler.cc \ ++ BOSS_func_addAnalysisLibPath.cc \ ++ BOSS_function_return_utils.cc + + libRivetCore_la_CPPFLAGS = -I$(srcdir)/yamlcpp -DYAML_NAMESPACE=RIVET_YAML $(AM_CPPFLAGS) + libRivetCore_la_LIBADD = $(builddir)/yamlcpp/librivet-yaml-cpp.la +@@ -515,6 +527,12 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionApplier.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionHandler.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Run.Plo@am__quote@ # am--include-marker ++# Added by GAMBIT ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ + + $(am__depfiles_remade): + @$(MKDIR_P) $(@D) +@@ -529,6 +547,42 @@ am--depfiles: $(am__depfiles_remade) + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + ++# Added by GAMBIT ++libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++ ++libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++ ++libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++ + .cc.obj: + @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@@ -620,6 +674,42 @@ libRivetCore_la-ProjectionHandler.lo: Pr + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-ProjectionHandler.lo `test -f 'ProjectionHandler.cc' || echo '$(srcdir)/'`ProjectionHandler.cc + ++# Added by GAMBIT ++libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++ ++libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++ ++libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++ + mostlyclean-libtool: + -rm -f *.lo + +diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh +--- Rivet-3.1.7/include/Rivet/AnalysisHandler.hh 2022-05-05 15:06:25.000000000 +0100 ++++ ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh 2023-04-14 14:55:04.096679845 +0100 +@@ -27,10 +27,10 @@ namespace Rivet { + AnalysisHandler(const string& runname=""); + + /// The copy constructor is deleted, so it can never be called. +- AnalysisHandler(const AnalysisHandler&) = delete; ++ //AnalysisHandler(const AnalysisHandler&) = delete; // Commented by GAMBIT + + /// The assignment operator is deleted, so it can never be called. +- AnalysisHandler& operator=(const AnalysisHandler&) = delete; ++ //AnalysisHandler& operator=(const AnalysisHandler&) = delete; // Commented by GAMBIT + + /// The destructor is not virtual, as this class should not be inherited from. + ~AnalysisHandler(); +@@ -281,6 +281,9 @@ namespace Rivet { + /// Write all analyses' plots (via getData) to the named file. + void writeData(const string& filename) const; + ++ // Added by GAMBIT, Dummy function to force BOSS to add the headers for the YODA::AnalysisObject type ++ void dummy(YODA::AnalysisObject*) const; ++ + /// @brief Configure the AnalysisObject dump rate and destination. + /// + /// Tell Rivet to dump intermediate result to a file named @a +diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh +--- Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh 2022-05-05 12:26:28.000000000 +0100 ++++ ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh 2023-04-14 14:55:04.096679845 +0100 +@@ -8,7 +8,7 @@ + #include + + +-#ifdef RIVET_ENABLE_HEPMC_3 ++//#ifdef RIVET_ENABLE_HEPMC_3 // Commented by GAMBIT + + #include "HepMC3/HepMC3.h" + #include "HepMC3/Relatives.h" +@@ -34,7 +34,8 @@ namespace Rivet { + using PdfInfo = RivetHepMC::GenPdfInfo; + } + +-#else // HEPMC_2 ++// Commented by GAMBIT ++/*#else // HEPMC_2 + + #include "HepMC/GenEvent.h" + #include "HepMC/GenParticle.h" +@@ -75,7 +76,7 @@ namespace Rivet { + using PdfInfo = RivetHepMC::PdfInfo; + } + +-#endif ++#endif*/ + + + namespace Rivet { +diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c +--- Rivet-3.1.7/src/Core/AnalysisHandler.cc 2022-07-26 09:34:20.000000000 +0100 ++++ ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc 2023-04-14 14:55:04.100679799 +0100 +@@ -123,7 +123,8 @@ namespace Rivet { + if (num_anas_requested > 0 && analysisNames().empty()) { + MSG_ERROR("All analyses were incompatible with the first event's beams\n" + << "Exiting, since this probably wasn't intentional!"); +- exit(1); ++ //exit(1); // Commented by GAMBIT ++ throw std::runtime_error("All analyses were incompatible with the first event's beams\n"); // Added by GAMBIT + } + + // Warn if any analysis' status is not unblemished +@@ -1087,6 +1088,12 @@ namespace Rivet { + + } + ++ // Added by GAMBIT, dummy function to force BOSS to add the headers for the YODA::AnalysisObject type ++ void AnalysisHandler::dummy(YODA::AnalysisObject* object) const { ++ ++ // Nothing to do here ++ ++ } + + string AnalysisHandler::runName() const { + return _runname; diff --git a/Backends/patches/rivet/3.1.7/touch_files.sh b/Backends/patches/rivet/3.1.7/touch_files.sh new file mode 100755 index 0000000000..845fed1c18 --- /dev/null +++ b/Backends/patches/rivet/3.1.7/touch_files.sh @@ -0,0 +1,3 @@ +for dir in $Rivet_dirs; do for file in "$dir"/*lo; do [ -e "$file" ] && touch $file; done; done +for dir in $Rivet_dirs; do for file in "$dir"/*la; do [ -e "$file" ] && touch $file; done; done +echo "Reseting library modification times" diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_7.py b/Backends/scripts/BOSS/configs/rivet_3_1_7.py new file mode 100644 index 0000000000..696021af76 --- /dev/null +++ b/Backends/scripts/BOSS/configs/rivet_3_1_7.py @@ -0,0 +1,131 @@ +################################### +# # +# Configuration module for BOSS # +# # +################################### + + +# ~~~~~ CASTXML options ~~~~~ + +# See CastXML documentation for details on these options: +# +# https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst +# + +# +# *** Special note for OS X *** +# +# BOSS will most likely fail if 'g++' points to the Clang compiler. +# Install GNU g++ and point the castxml_cc variable below the GNU +# g++ executable. +# + +castxml_cc_id = 'gnu' # Reference compiler: 'gnu', 'gnu-c', 'msvc', 'msvc-c' +castxml_cc = 'g++' # Name a specific compiler: 'g++', 'cl', ... +castxml_cc_opt = '-std=c++14' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') + + +# ~~~~~ GAMBIT-specific options ~~~~~ + +gambit_backend_name = 'Rivet' +gambit_backend_version = '3.1.7' +gambit_backend_reference = 'Bierlich:2019rhm' +gambit_base_namespace = '' + + +# ~~~~~ Information about the external code ~~~~~ + +# Use either absolute paths or paths relative to the main BOSS directory. + +input_files = [ + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/AnalysisHandler.hh', + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/Tools/RivetPaths.hh' +] +include_paths = [ + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include', + '../../../contrib/HepMC3-3.2.5/local/include', + '../../../contrib/YODA-1.9.7/local/include', + '../../../Backends/installed/fastjet/3.4.0/local/include' +] +base_paths = ['../../../Backends/installed/rivet/'+gambit_backend_version] + +header_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/include' +src_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/src/Core' + +load_classes = [ + 'Rivet::AnalysisHandler' +] + +load_functions = [ + 'Rivet::addAnalysisLibPath(const std::string&)' +] + +ditch = [ + 'Rivet::AnalysisHandler::stripOptions', + 'Rivet::AnalysisHandler::getPreload' +] + + +auto_detect_stdlib_paths = False + + +load_parent_classes = False +wrap_inherited_members = False + + +header_extension = '.hh' +source_extension = '.cc' + +indent = 3 + + +# ~~~~~ Information about other known types ~~~~~ + +# Dictionary key: type name +# Dictionary value: header file with containing type declaration. +# +# Example: +# known_classes = {"SomeNamespace::KnownClassOne" : "path_to_header/KnownClassOne.hpp", +# "AnotherNamespace::KnownClassTwo" : "path_to_header/KnownClassTwo.hpp" } + +known_classes = { + "HepMC3::GenEvent" : "HepMC3/GenEvent.h", + "YODA::AnalysisObject" : "YODA/AnalysisObject.h" +} + + +# ~~~~~ Declarations to be added to the frontend header file ~~~~~ + +convenience_functions = [] + +ini_function_in_header = False + + +# ~~~~~ Pragma directives for the inclusion of BOSSed classes in GAMBIT ~~~~~ + +# The listed pragma directives will be added before/after including the +# the BOSS-generated headers in GAMBIT. + +pragmas_begin = [ + '#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp"', # Contains pragmas to suppress warnings from YODA and HepMC +] + +pragmas_end = [ + '#include "gambit/Utils/end_ignore_warnings.hpp"', # Restores the warning settings +] + + +# ~~~~~ Extra code to surround BOSS-generated code included in GAMBIT ~~~~~ + +# The listed code will be added at the top/bottom in the frontend header file +# and in the loaded_types.hpp header. + +surround_code_begin = ''' +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC +''' + +surround_code_end = ''' +#endif +#endif +''' diff --git a/Backends/src/frontends/Rivet_3_1_7.cpp b/Backends/src/frontends/Rivet_3_1_7.cpp new file mode 100644 index 0000000000..24815c481f --- /dev/null +++ b/Backends/src/frontends/Rivet_3_1_7.cpp @@ -0,0 +1,53 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Frontend source for the rivet backend. +/// +/// Actual implementation of rivet ini function. +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author Tomek Procter +/// (t.procter.1@research.gla.ac.uk) +/// \date 2021 July +/// \date 2023 April +/// ********************************************* + +#include "gambit/Backends/frontend_macros.hpp" + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Backends/frontends/Rivet_3_1_7.hpp" +#include "gambit/Utils/util_functions.hpp" + + +BE_INI_FUNCTION +{ + // Scan-level initialisation + static bool scan_level = true; + if (scan_level) + { + std::string rivet_analyses_dir = std::string(GAMBIT_DIR)+ + "/Backends/installed/rivet/3.1.7/analyses"; + + //Check if the rivet_analyses_dir if it actually exists: if it + //doesn't then installation probably hasn't installed properly. + if (Utils::file_exists(rivet_analyses_dir)) + { + addAnalysisLibPath(rivet_analyses_dir); + } + else + { + backend_error().raise(LOCAL_INFO, "Rivet analysis directory does not exist."); + } + } + scan_level = false; +} +END_BE_INI_FUNCTION + +#endif +#endif diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 541178c613..af8985b4ff 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2051,10 +2051,10 @@ endif() # Rivet set(name "rivet") -set(ver "3.1.5") +set(ver "3.1.7") set(Rivet_ver "${ver}") set(dl "https://rivet.hepforge.org/downloads/?f=Rivet-${ver}.tar.gz") -set(md5 "7f3397b16386c0bfcb49420c2eb395b1") +set(md5 "328b371eb644fe616b1e2b03b2cf99d3") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(yoda_name "yoda") set(yoda_dir "${YODA_PATH}/local") @@ -2112,10 +2112,16 @@ if(NOT ditched_${name}_${ver}) SOURCE_DIR ${dir} BUILD_IN_SOURCE 1 PATCH_COMMAND patch -p1 < ${patch} - CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} -with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} + CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} -with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking + COMMAND pwd + COMMAND echo 2116 COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh + COMMAND pwd + COMMAND echo 2118 COMMAND sh -c "cat ${patch_dir}/touch_files.sh" >> touch_files.sh + COMMAND echo 2120 COMMAND chmod u+x touch_files.sh + COMMAND echo 2122 COMMAND ./touch_files.sh BUILD_COMMAND ${MAKE_PARALLEL} libRivet.so INSTALL_COMMAND "" diff --git a/config/backend_locations.yaml.default b/config/backend_locations.yaml.default index c1c510d47f..8887964de1 100644 --- a/config/backend_locations.yaml.default +++ b/config/backend_locations.yaml.default @@ -127,7 +127,7 @@ pbarlike: 1.0: ./Backends/installed/pbarlike/1.0/pbarlike-gambit-interface.py Rivet: - 3.1.5: ./Backends/installed/rivet/3.1.5/local/lib/libRivet.so + 3.1.7: ./Backends/installed/rivet/3.1.7/local/lib/libRivet.so SUSY_HIT: 1.5: ./Backends/installed/susyhit/1.5/libsusyhit.so From 08bffb2443a30fac88e7c676143cb46850129483 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sun, 16 Apr 2023 15:06:25 +0100 Subject: [PATCH 03/49] Add BOSS generated Rivet 3.1.7 files --- .../Rivet_3_1_7/abstract_AnalysisHandler.hh | 206 +++++++++ .../forward_decls_abstract_classes.hh | 24 ++ .../forward_decls_wrapper_classes.hh | 22 + .../Rivet_3_1_7/identification.hpp | 12 + .../Rivet_3_1_7/loaded_types.hpp | 27 ++ .../Rivet_3_1_7/wrapper_AnalysisHandler.hh | 9 + .../wrapper_AnalysisHandler_decl.hh | 190 +++++++++ .../wrapper_AnalysisHandler_def.hh | 402 ++++++++++++++++++ .../gambit/Backends/frontends/Rivet_3_1_7.hpp | 51 +++ 9 files changed, 943 insertions(+) create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh create mode 100644 Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh new file mode 100644 index 0000000000..43e9acff91 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh @@ -0,0 +1,206 @@ +#ifndef __abstract_AnalysisHandler_Rivet_3_1_7_hh__ +#define __abstract_AnalysisHandler_Rivet_3_1_7_hh__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "gambit/Backends/abstractbase.hpp" +#include "forward_decls_abstract_classes.hh" +#include "forward_decls_wrapper_classes.hh" +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class Abstract_AnalysisHandler : public virtual AbstractBase + { + public: + + virtual ::std::string runName() const =0; + + virtual long unsigned int numEvents() const =0; + + virtual double sumW() const =0; + + virtual double sumW2() const =0; + + virtual const ::std::vector& weightNames() const =0; + + virtual long unsigned int numWeights() const =0; + + virtual bool haveNamedWeights() const =0; + + virtual void setWeightNames(const HepMC3::GenEvent&) =0; + + virtual long unsigned int defaultWeightIndex() const =0; + + virtual void setWeightCap(const double) =0; + + virtual void setNLOSmearing(double) =0; + + virtual void skipMultiWeights(bool) =0; + + virtual void skipMultiWeights__BOSS() =0; + + virtual void selectMultiWeights(std::string) =0; + + virtual void selectMultiWeights__BOSS() =0; + + virtual void deselectMultiWeights(std::string) =0; + + virtual void deselectMultiWeights__BOSS() =0; + + virtual void setNominalWeightName(std::string) =0; + + virtual void setNominalWeightName__BOSS() =0; + + virtual void setCrossSection(const std::vector>&, bool) =0; + + virtual void setCrossSection__BOSS(const std::vector>&) =0; + + virtual void setCrossSection(const std::pair&, bool) =0; + + virtual void setCrossSection__BOSS(const std::pair&) =0; + + virtual void setCrossSection(double, double, bool) =0; + + virtual void setCrossSection__BOSS(double, double) =0; + + virtual double nominalCrossSection() const =0; + + virtual ::std::pair beamIds() const =0; + + virtual double sqrtS() const =0; + + virtual void checkBeams(bool) =0; + + virtual void checkBeams__BOSS() =0; + + virtual void setIgnoreBeams(bool) =0; + + virtual void setIgnoreBeams__BOSS() =0; + + virtual ::std::vector analysisNames() const =0; + + virtual ::std::vector stdAnalysisNames() const =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&) =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map) =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&) =0; + + virtual Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&) =0; + + virtual Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&) =0; + + virtual void init(const HepMC3::GenEvent&) =0; + + virtual void analyze(const HepMC3::GenEvent&) =0; + + virtual void analyze(const HepMC3::GenEvent*) =0; + + virtual void finalize() =0; + + virtual void readData(std::istream&, const std::string&, bool) =0; + + virtual void readData__BOSS(std::istream&, const std::string&) =0; + + virtual void readData(const std::string&, bool) =0; + + virtual void readData__BOSS(const std::string&) =0; + + virtual ::std::vector> getYodaAOs(bool) const =0; + + virtual ::std::vector> getYodaAOs__BOSS() const =0; + + virtual void writeData(std::ostream&, const std::string&) const =0; + + virtual void writeData(const std::string&) const =0; + + virtual void dummy(YODA::AnalysisObject*) const =0; + + virtual void setAODump(const std::string&, int) =0; + + virtual void setNoAODump() =0; + + virtual void dump(const std::string&, int) =0; + + virtual void mergeYodas(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&, bool) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&) =0; + + virtual void merge__BOSS(Rivet::Abstract_AnalysisHandler&) =0; + + public: + virtual void pointer_assign__BOSS(Abstract_AnalysisHandler*) =0; + virtual Abstract_AnalysisHandler* pointer_copy__BOSS() =0; + + private: + AnalysisHandler* wptr; + bool delete_wrapper; + public: + AnalysisHandler* get_wptr() { return wptr; } + void set_wptr(AnalysisHandler* wptr_in) { wptr = wptr_in; } + bool get_delete_wrapper() { return delete_wrapper; } + void set_delete_wrapper(bool del_wrp_in) { delete_wrapper = del_wrp_in; } + + public: + Abstract_AnalysisHandler() + { + wptr = 0; + delete_wrapper = false; + } + + Abstract_AnalysisHandler(const Abstract_AnalysisHandler&) + { + wptr = 0; + delete_wrapper = false; + } + + Abstract_AnalysisHandler& operator=(const Abstract_AnalysisHandler&) { return *this; } + + virtual void init_wrapper() =0; + + AnalysisHandler* get_init_wptr() + { + init_wrapper(); + return wptr; + } + + AnalysisHandler& get_init_wref() + { + init_wrapper(); + return *wptr; + } + + virtual ~Abstract_AnalysisHandler() =0; + }; + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + + +#endif /* __abstract_AnalysisHandler_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh new file mode 100644 index 0000000000..87bd534116 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh @@ -0,0 +1,24 @@ +#ifndef __forward_decls_abstract_classes_Rivet_3_1_7_hh__ +#define __forward_decls_abstract_classes_Rivet_3_1_7_hh__ + + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class Abstract_AnalysisHandler; + } + + + + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __forward_decls_abstract_classes_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh new file mode 100644 index 0000000000..08c71dc4ec --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh @@ -0,0 +1,22 @@ +#ifndef __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ +#define __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ + + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class AnalysisHandler; + } + + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp new file mode 100644 index 0000000000..8d0bac9b4e --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp @@ -0,0 +1,12 @@ +// Identify backend and set macro flags + +#include "gambit/Utils/cats.hpp" + +#define BACKENDNAME Rivet +#define BACKENDLANG CXX +#define VERSION 3.1.7 +#define SAFE_VERSION 3_1_7 +#define REFERENCE Bierlich:2019rhm + +#undef DO_CLASSLOADING +#define DO_CLASSLOADING 1 diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp new file mode 100644 index 0000000000..3cbb8e7e6c --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp @@ -0,0 +1,27 @@ +#ifndef __loaded_types_Rivet_3_1_7_hpp__ +#define __loaded_types_Rivet_3_1_7_hpp__ 1 + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp" +#include "wrapper_AnalysisHandler.hh" +#include "identification.hpp" +#include "gambit/Utils/end_ignore_warnings.hpp" + +// Indicate which types are provided by this backend, and what the symbols of their factories are. +#define Rivet_3_1_7_all_data \ + (( /*class*/(Rivet)(AnalysisHandler), /*constructors*/(("Factory_AnalysisHandler_0__BOSS_1",(const std::string&))) (("Factory_AnalysisHandler_1__BOSS_2",())) )) \ + +// If the default version has been loaded, set it as default. +#if ALREADY_LOADED(CAT_3(BACKENDNAME,_,CAT(Default_,BACKENDNAME))) + SET_DEFAULT_VERSION_FOR_LOADING_TYPES(BACKENDNAME,SAFE_VERSION,CAT(Default_,BACKENDNAME)) +#endif + +// Undefine macros to avoid conflict with other backends. +#include "gambit/Backends/backend_undefs.hpp" + +#endif +#endif + +#endif /* __loaded_types_Rivet_3_1_7_hpp__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh new file mode 100644 index 0000000000..e20c957446 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh @@ -0,0 +1,9 @@ +#ifndef __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ +#define __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ + + +#include "wrapper_AnalysisHandler_decl.hh" +#include "wrapper_AnalysisHandler_def.hh" + + +#endif /* __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh new file mode 100644 index 0000000000..a35f3bfb16 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh @@ -0,0 +1,190 @@ +#ifndef __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ +#define __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ + +#include +#include +#include +#include +#include +#include +#include +#include "forward_decls_wrapper_classes.hh" +#include "gambit/Backends/wrapperbase.hpp" +#include "abstract_AnalysisHandler.hh" +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + namespace Rivet + { + + class AnalysisHandler : public WrapperBase + { + // Member variables: + public: + // -- Static factory pointers: + static Abstract_AnalysisHandler* (*__factory0)(const std::string&); + static Abstract_AnalysisHandler* (*__factory1)(); + + // -- Other member variables: + + // Member functions: + public: + ::std::string runName() const; + + long unsigned int numEvents() const; + + double sumW() const; + + double sumW2() const; + + const ::std::vector& weightNames() const; + + long unsigned int numWeights() const; + + bool haveNamedWeights() const; + + void setWeightNames(const HepMC3::GenEvent& ge); + + long unsigned int defaultWeightIndex() const; + + void setWeightCap(const double maxWeight); + + void setNLOSmearing(double frac); + + void skipMultiWeights(bool ignore); + + void skipMultiWeights(); + + void selectMultiWeights(std::string patterns); + + void selectMultiWeights(); + + void deselectMultiWeights(std::string patterns); + + void deselectMultiWeights(); + + void setNominalWeightName(std::string name); + + void setNominalWeightName(); + + void setCrossSection(const std::vector>& xsecs, bool isUserSupplied); + + void setCrossSection(const std::vector>& xsecs); + + void setCrossSection(const std::pair& xsec, bool isUserSupplied); + + void setCrossSection(const std::pair& xsec); + + void setCrossSection(double xsec, double xsecerr, bool isUserSupplied); + + void setCrossSection(double xsec, double xsecerr); + + double nominalCrossSection() const; + + ::std::pair beamIds() const; + + double sqrtS() const; + + void checkBeams(bool check); + + void checkBeams(); + + void setIgnoreBeams(bool ignore); + + void setIgnoreBeams(); + + ::std::vector analysisNames() const; + + ::std::vector stdAnalysisNames() const; + + Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname); + + Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname, std::map pars); + + Rivet::AnalysisHandler& addAnalyses(const std::vector& analysisnames); + + Rivet::AnalysisHandler& removeAnalysis(const std::string& analysisname); + + Rivet::AnalysisHandler& removeAnalyses(const std::vector& analysisnames); + + void init(const HepMC3::GenEvent& event); + + void analyze(const HepMC3::GenEvent& event); + + void analyze(const HepMC3::GenEvent* event); + + void finalize(); + + void readData(std::istream& istr, const std::string& fmt, bool preload); + + void readData(std::istream& istr, const std::string& fmt); + + void readData(const std::string& filename, bool preload); + + void readData(const std::string& filename); + + ::std::vector> getYodaAOs(bool includeraw) const; + + ::std::vector> getYodaAOs() const; + + void writeData(std::ostream& ostr, const std::string& fmt) const; + + void writeData(const std::string& filename) const; + + void dummy(YODA::AnalysisObject* arg_1) const; + + void setAODump(const std::string& dumpfile, int period); + + void setNoAODump(); + + void dump(const std::string& dumpfile, int period); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts); + + void mergeYodas(const std::vector& aofiles); + + void merge(Rivet::AnalysisHandler& other); + + + // Wrappers for original constructors: + public: + AnalysisHandler(const std::string& runname); + AnalysisHandler(); + + // Special pointer-based constructor: + AnalysisHandler(Abstract_AnalysisHandler* in); + + // Copy constructor: + AnalysisHandler(const AnalysisHandler& in); + + // Assignment operator: + AnalysisHandler& operator=(const AnalysisHandler& in); + + // Destructor: + ~AnalysisHandler(); + + // Returns correctly casted pointer to Abstract class: + Abstract_AnalysisHandler* get_BEptr() const; + + }; + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh new file mode 100644 index 0000000000..93414b49bf --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh @@ -0,0 +1,402 @@ +#ifndef __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ +#define __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ + +#include +#include +#include +#include +#include +#include +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + namespace Rivet + { + + // Member functions: + inline ::std::string AnalysisHandler::runName() const + { + return get_BEptr()->runName(); + } + + inline long unsigned int AnalysisHandler::numEvents() const + { + return get_BEptr()->numEvents(); + } + + inline double AnalysisHandler::sumW() const + { + return get_BEptr()->sumW(); + } + + inline double AnalysisHandler::sumW2() const + { + return get_BEptr()->sumW2(); + } + + inline const ::std::vector& AnalysisHandler::weightNames() const + { + return get_BEptr()->weightNames(); + } + + inline long unsigned int AnalysisHandler::numWeights() const + { + return get_BEptr()->numWeights(); + } + + inline bool AnalysisHandler::haveNamedWeights() const + { + return get_BEptr()->haveNamedWeights(); + } + + inline void AnalysisHandler::setWeightNames(const HepMC3::GenEvent& ge) + { + get_BEptr()->setWeightNames(ge); + } + + inline long unsigned int AnalysisHandler::defaultWeightIndex() const + { + return get_BEptr()->defaultWeightIndex(); + } + + inline void AnalysisHandler::setWeightCap(const double maxWeight) + { + get_BEptr()->setWeightCap(maxWeight); + } + + inline void AnalysisHandler::setNLOSmearing(double frac) + { + get_BEptr()->setNLOSmearing(frac); + } + + inline void AnalysisHandler::skipMultiWeights(bool ignore) + { + get_BEptr()->skipMultiWeights(ignore); + } + + inline void AnalysisHandler::skipMultiWeights() + { + get_BEptr()->skipMultiWeights__BOSS(); + } + + inline void AnalysisHandler::selectMultiWeights(std::string patterns) + { + get_BEptr()->selectMultiWeights(patterns); + } + + inline void AnalysisHandler::selectMultiWeights() + { + get_BEptr()->selectMultiWeights__BOSS(); + } + + inline void AnalysisHandler::deselectMultiWeights(std::string patterns) + { + get_BEptr()->deselectMultiWeights(patterns); + } + + inline void AnalysisHandler::deselectMultiWeights() + { + get_BEptr()->deselectMultiWeights__BOSS(); + } + + inline void AnalysisHandler::setNominalWeightName(std::string name) + { + get_BEptr()->setNominalWeightName(name); + } + + inline void AnalysisHandler::setNominalWeightName() + { + get_BEptr()->setNominalWeightName__BOSS(); + } + + inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsecs, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs) + { + get_BEptr()->setCrossSection__BOSS(xsecs); + } + + inline void AnalysisHandler::setCrossSection(const std::pair& xsec, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsec, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(const std::pair& xsec) + { + get_BEptr()->setCrossSection__BOSS(xsec); + } + + inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsec, xsecerr, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr) + { + get_BEptr()->setCrossSection__BOSS(xsec, xsecerr); + } + + inline double AnalysisHandler::nominalCrossSection() const + { + return get_BEptr()->nominalCrossSection(); + } + + inline ::std::pair AnalysisHandler::beamIds() const + { + return get_BEptr()->beamIds(); + } + + inline double AnalysisHandler::sqrtS() const + { + return get_BEptr()->sqrtS(); + } + + inline void AnalysisHandler::checkBeams(bool check) + { + get_BEptr()->checkBeams(check); + } + + inline void AnalysisHandler::checkBeams() + { + get_BEptr()->checkBeams__BOSS(); + } + + inline void AnalysisHandler::setIgnoreBeams(bool ignore) + { + get_BEptr()->setIgnoreBeams(ignore); + } + + inline void AnalysisHandler::setIgnoreBeams() + { + get_BEptr()->setIgnoreBeams__BOSS(); + } + + inline ::std::vector AnalysisHandler::analysisNames() const + { + return get_BEptr()->analysisNames(); + } + + inline ::std::vector AnalysisHandler::stdAnalysisNames() const + { + return get_BEptr()->stdAnalysisNames(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname) + { + return get_BEptr()->addAnalysis__BOSS(analysisname).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname, std::map pars) + { + return get_BEptr()->addAnalysis__BOSS(analysisname, pars).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalyses(const std::vector& analysisnames) + { + return get_BEptr()->addAnalyses__BOSS(analysisnames).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalysis(const std::string& analysisname) + { + return get_BEptr()->removeAnalysis__BOSS(analysisname).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalyses(const std::vector& analysisnames) + { + return get_BEptr()->removeAnalyses__BOSS(analysisnames).get_init_wref(); + } + + inline void AnalysisHandler::init(const HepMC3::GenEvent& event) + { + get_BEptr()->init(event); + } + + inline void AnalysisHandler::analyze(const HepMC3::GenEvent& event) + { + get_BEptr()->analyze(event); + } + + inline void AnalysisHandler::analyze(const HepMC3::GenEvent* event) + { + get_BEptr()->analyze(event); + } + + inline void AnalysisHandler::finalize() + { + get_BEptr()->finalize(); + } + + inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt, bool preload) + { + get_BEptr()->readData(istr, fmt, preload); + } + + inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt) + { + get_BEptr()->readData__BOSS(istr, fmt); + } + + inline void AnalysisHandler::readData(const std::string& filename, bool preload) + { + get_BEptr()->readData(filename, preload); + } + + inline void AnalysisHandler::readData(const std::string& filename) + { + get_BEptr()->readData__BOSS(filename); + } + + inline ::std::vector> AnalysisHandler::getYodaAOs(bool includeraw) const + { + return get_BEptr()->getYodaAOs(includeraw); + } + + inline ::std::vector> AnalysisHandler::getYodaAOs() const + { + return get_BEptr()->getYodaAOs__BOSS(); + } + + inline void AnalysisHandler::writeData(std::ostream& ostr, const std::string& fmt) const + { + get_BEptr()->writeData(ostr, fmt); + } + + inline void AnalysisHandler::writeData(const std::string& filename) const + { + get_BEptr()->writeData(filename); + } + + inline void AnalysisHandler::dummy(YODA::AnalysisObject* arg_1) const + { + get_BEptr()->dummy(arg_1); + } + + inline void AnalysisHandler::setAODump(const std::string& dumpfile, int period) + { + get_BEptr()->setAODump(dumpfile, period); + } + + inline void AnalysisHandler::setNoAODump() + { + get_BEptr()->setNoAODump(); + } + + inline void AnalysisHandler::dump(const std::string& dumpfile, int period) + { + get_BEptr()->dump(dumpfile, period); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv) + { + get_BEptr()->mergeYodas(aofiles, delopts, addopts, matches, unmatches, equiv); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches, unmatches); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles) + { + get_BEptr()->mergeYodas__BOSS(aofiles); + } + + inline void AnalysisHandler::merge(Rivet::AnalysisHandler& other) + { + get_BEptr()->merge__BOSS(*other.get_BEptr()); + } + + + // Wrappers for original constructors: + inline AnalysisHandler::AnalysisHandler(const std::string& runname) : + WrapperBase(__factory0(runname)) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + inline AnalysisHandler::AnalysisHandler() : + WrapperBase(__factory1()) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Special pointer-based constructor: + inline AnalysisHandler::AnalysisHandler(Abstract_AnalysisHandler* in) : + WrapperBase(in) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Copy constructor: + inline AnalysisHandler::AnalysisHandler(const AnalysisHandler& in) : + WrapperBase(in.get_BEptr()->pointer_copy__BOSS()) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Assignment operator: + inline AnalysisHandler& AnalysisHandler::operator=(const AnalysisHandler& in) + { + if (this != &in) + { + get_BEptr()->pointer_assign__BOSS(in.get_BEptr()); + } + return *this; + } + + + // Destructor: + inline AnalysisHandler::~AnalysisHandler() + { + if (get_BEptr() != 0) + { + get_BEptr()->set_delete_wrapper(false); + if (can_delete_BEptr()) + { + delete BEptr; + BEptr = 0; + } + } + set_delete_BEptr(false); + } + + // Returns correctly casted pointer to Abstract class: + inline Abstract_AnalysisHandler* Rivet::AnalysisHandler::get_BEptr() const + { + return dynamic_cast(BEptr); + } + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp b/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp new file mode 100644 index 0000000000..3412d23c9a --- /dev/null +++ b/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp @@ -0,0 +1,51 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Frontend header generated by BOSS for GAMBIT backend Rivet 3.1.7. +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author The GAMBIT Collaboration +/// +/// ********************************************* + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp" + +LOAD_LIBRARY + +namespace Gambit +{ + namespace Backends + { + namespace Rivet_3_1_7 + { + namespace Rivet + { + typedef ::Rivet_3_1_7::Rivet::AnalysisHandler AnalysisHandler; + } + } + } +} + +// Functions +BE_FUNCTION(addAnalysisLibPath, void, (const std::string&), ("addAnalysisLibPath__BOSS_3","_addAnalysisLibPath__BOSS_3"), "addAnalysisLibPath") +// Variables + +// Initialisation function (dependencies) + +// Convenience functions (registration) + + +// Convenience functions (definitions) + +// End +#include "gambit/Backends/backend_undefs.hpp" + +#endif +#endif From 325549387d19677c2864055049b5a299dca92b50 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Mon, 17 Apr 2023 12:00:33 +0100 Subject: [PATCH 04/49] Remove debug messages --- cmake/backends.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index af8985b4ff..fe9b32d3bd 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2114,14 +2114,10 @@ if(NOT ditched_${name}_${ver}) PATCH_COMMAND patch -p1 < ${patch} CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} -with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking COMMAND pwd - COMMAND echo 2116 COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh COMMAND pwd - COMMAND echo 2118 COMMAND sh -c "cat ${patch_dir}/touch_files.sh" >> touch_files.sh - COMMAND echo 2120 COMMAND chmod u+x touch_files.sh - COMMAND echo 2122 COMMAND ./touch_files.sh BUILD_COMMAND ${MAKE_PARALLEL} libRivet.so INSTALL_COMMAND "" From 06fe3f43d2a9fe39c30e91c9f07966838ff97bec Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Mon, 17 Apr 2023 20:32:21 +0100 Subject: [PATCH 05/49] Fix typo --- Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif index 038b577c12..e37b064d41 100644 --- a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif +++ b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif @@ -264,7 +264,7 @@ diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1. namespace Rivet { -diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c +diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc --- Rivet-3.1.7/src/Core/AnalysisHandler.cc 2022-07-26 09:34:20.000000000 +0100 +++ ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc 2023-04-14 14:55:04.100679799 +0100 @@ -123,7 +123,8 @@ namespace Rivet { From 8f76b48a0ab93f6a53cd012743d1562ddcb521bf Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 18 Apr 2023 14:07:29 +0100 Subject: [PATCH 06/49] Remove CMS_2018_I1663958 from rivet make patch - fixed in rivet 3.1.7 --- Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh index 092c4918d3..4b6c5c198e 100755 --- a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh +++ b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh @@ -14,7 +14,5 @@ echo "diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1. diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.7.dif echo "diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in" >> patch_rivet_3.1.7.dif diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.7/analyses/pluginCMS/CMS_2018_I1663958.cc >> patch_rivet_3.1.7.dif mv patch_rivet_3.1.7.dif ../patches/rivet/3.1.7/ cd ../patches/rivet/3.1.7 From ea64176335b8784e172bef767e7075be1190d259 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 18 Apr 2023 15:23:16 +0100 Subject: [PATCH 07/49] Fix typo --- cmake/backends.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index fe9b32d3bd..23c2418305 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2112,7 +2112,7 @@ if(NOT ditched_${name}_${ver}) SOURCE_DIR ${dir} BUILD_IN_SOURCE 1 PATCH_COMMAND patch -p1 < ${patch} - CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} -with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking + CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking COMMAND pwd COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh COMMAND pwd From b9014db0e8f460a03356d7b5639f032e856cef45 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 18 Apr 2023 15:23:58 +0100 Subject: [PATCH 08/49] Clear up debug statements --- cmake/backends.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 23c2418305..57dd30dee2 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2113,9 +2113,7 @@ if(NOT ditched_${name}_${ver}) BUILD_IN_SOURCE 1 PATCH_COMMAND patch -p1 < ${patch} CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking - COMMAND pwd COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh - COMMAND pwd COMMAND sh -c "cat ${patch_dir}/touch_files.sh" >> touch_files.sh COMMAND chmod u+x touch_files.sh COMMAND ./touch_files.sh From c83a079c816bbc468f10a9e39f92080837a3f88b Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 18 Apr 2023 15:54:51 +0100 Subject: [PATCH 09/49] Fix dif to make dependency tracking work --- .../patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 126 ++++++++---------- 1 file changed, 52 insertions(+), 74 deletions(-) diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif index e37b064d41..a672c07eff 100644 --- a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif +++ b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif @@ -66,16 +66,8 @@ diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/includ .SUFFIXES: diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in --- Rivet-3.1.7/src/Core/Makefile.in 2022-09-28 14:33:10.000000000 +0100 -+++ ../installed/rivet/3.1.7/src/Core/Makefile.in 2023-04-14 16:18:03.244227378 +0100 -@@ -110,6 +110,7 @@ CONFIG_CLEAN_VPATH_FILES = - LTLIBRARIES = $(noinst_LTLIBRARIES) - libRivetCore_la_DEPENDENCIES = \ - $(builddir)/yamlcpp/librivet-yaml-cpp.la -+# Modified by GAMBIT - am_libRivetCore_la_OBJECTS = libRivetCore_la-Run.lo \ - libRivetCore_la-Event.lo libRivetCore_la-Jet.lo \ - libRivetCore_la-Particle.lo \ -@@ -118,7 +119,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor ++++ ../installed/rivet/3.1.7/src/Core/Makefile.in 2023-04-18 15:47:59.480540099 +0100 +@@ -118,7 +118,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor libRivetCore_la-AnalysisLoader.lo \ libRivetCore_la-AnalysisInfo.lo \ libRivetCore_la-AnalysisHandler.lo \ @@ -89,12 +81,19 @@ diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Ma libRivetCore_la_OBJECTS = $(am_libRivetCore_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -@@ -442,11 +448,17 @@ top_srcdir = @top_srcdir@ - SUBDIRS = yamlcpp . - EXTRA_DIST = zstr - noinst_LTLIBRARIES = libRivetCore.la -+# Modified by GAMBIT - libRivetCore_la_SOURCES = \ +@@ -143,6 +148,11 @@ am__depfiles_remade = ./$(DEPDIR)/libRiv + ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo \ + ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo \ + ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo \ + ./$(DEPDIR)/libRivetCore_la-Event.Plo \ + ./$(DEPDIR)/libRivetCore_la-Jet.Plo \ + ./$(DEPDIR)/libRivetCore_la-Particle.Plo \ +@@ -446,7 +456,12 @@ libRivetCore_la_SOURCES = \ Run.cc Event.cc Jet.cc Particle.cc \ ProjectionApplier.cc Projection.cc \ Analysis.cc AnalysisLoader.cc AnalysisInfo.cc \ @@ -108,67 +107,22 @@ diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Ma libRivetCore_la_CPPFLAGS = -I$(srcdir)/yamlcpp -DYAML_NAMESPACE=RIVET_YAML $(AM_CPPFLAGS) libRivetCore_la_LIBADD = $(builddir)/yamlcpp/librivet-yaml-cpp.la -@@ -515,6 +527,12 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionApplier.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionHandler.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Run.Plo@am__quote@ # am--include-marker -+# Added by GAMBIT -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ - - $(am__depfiles_remade): - @$(MKDIR_P) $(@D) -@@ -529,6 +547,42 @@ am--depfiles: $(am__depfiles_remade) - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< - -+# Added by GAMBIT -+libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+ -+libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+ -+libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+ - .cc.obj: - @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@@ -620,6 +674,42 @@ libRivetCore_la-ProjectionHandler.lo: Pr +@@ -508,6 +523,11 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Event.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Jet.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Particle.Plo@am__quote@ # am--include-marker +@@ -620,6 +640,41 @@ libRivetCore_la-ProjectionHandler.lo: Pr @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-ProjectionHandler.lo `test -f 'ProjectionHandler.cc' || echo '$(srcdir)/'`ProjectionHandler.cc -+# Added by GAMBIT +libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo @@ -207,6 +161,30 @@ diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Ma mostlyclean-libtool: -rm -f *.lo +@@ -828,6 +883,11 @@ distclean: distclean-recursive + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo +@@ -884,6 +944,11 @@ maintainer-clean: maintainer-clean-recur + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh --- Rivet-3.1.7/include/Rivet/AnalysisHandler.hh 2022-05-05 15:06:25.000000000 +0100 +++ ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh 2023-04-14 14:55:04.096679845 +0100 From 530839f52d534ba3b2c10a1293318dc7751d2931 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 18 Apr 2023 16:42:27 +0100 Subject: [PATCH 10/49] Use new --enable-analyses rivet configure option to simplify hack to only build LHC rivet analyses --- Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh | 2 -- Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 5 +++-- cmake/backends.cmake | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh index 4b6c5c198e..d4ca084980 100755 --- a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh +++ b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh @@ -12,7 +12,5 @@ echo "diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rive diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.7.dif echo "diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.7.dif diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in >> patch_rivet_3.1.7.dif mv patch_rivet_3.1.7.dif ../patches/rivet/3.1.7/ cd ../patches/rivet/3.1.7 diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif index a672c07eff..4e3300cfab 100644 --- a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif +++ b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif @@ -1,7 +1,7 @@ diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in --- Rivet-3.1.7/Makefile.in 2022-09-28 14:32:46.000000000 +0100 +++ ../installed/rivet/3.1.7/Makefile.in 2023-04-14 14:55:04.096679845 +0100 -@@ -457,6 +457,20 @@ pkgconfigdir = $(libdir)/pkgconfig +@@ -457,6 +457,21 @@ pkgconfigdir = $(libdir)/pkgconfig dist_pkgconfig_DATA = rivet.pc DEST = login.hepforge.org:rivet/downloads/ all: all-recursive @@ -15,6 +15,7 @@ diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in + cd ${top_builddir}/src && ${MAKE} $(AM_MAKEFLAGS) libRivet.la + cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) install + cd ${top_builddir}/pyext && ${MAKE} $(AM_MAKEFLAGS) install ++ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) RivetATLASAnalyses.so RivetCMSAnalyses.so RivetLHCbAnalyses.so + mkdir -p ${libdir} + if test -e ${top_builddir}/src/.libs/libRivet.so ; then cp ${top_builddir}/src/.libs/libRivet.so ${libdir}/libRivet.so ; fi + if test -e ${top_builddir}/src/.libs/libRivet.dylib ; then cp ${top_builddir}/src/.libs/libRivet.dylib ${libdir}/libRivet.so ; fi @@ -22,7 +23,7 @@ diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in .SUFFIXES: am--refresh: Makefile -@@ -529,6 +543,7 @@ mostlyclean-libtool: +@@ -529,6 +544,7 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 57dd30dee2..8a79d7b69d 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2112,7 +2112,7 @@ if(NOT ditched_${name}_${ver}) SOURCE_DIR ${dir} BUILD_IN_SOURCE 1 PATCH_COMMAND patch -p1 < ${patch} - CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --disable-dependency-tracking + CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --enable-analyses=False COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh COMMAND sh -c "cat ${patch_dir}/touch_files.sh" >> touch_files.sh COMMAND chmod u+x touch_files.sh From 32a3c14a57029a19277824b45919f97d372bb846 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 19 Apr 2023 21:30:07 +0100 Subject: [PATCH 11/49] Go back to old approach of not building unneccessary analyses --- .../rivet/3.1.7/make_patch_rivet_3.1.7.sh | 2 + .../patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 44 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh index d4ca084980..28fff3010f 100755 --- a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh +++ b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh @@ -10,6 +10,8 @@ echo "diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh >> patch_rivet_3.1.7.dif echo "diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh" >> patch_rivet_3.1.7.dif diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.7.dif +echo "diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in" >> patch_rivet_3.1.7.dif +diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in >> patch_rivet_3.1.7.dif echo "diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.7.dif diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.7.dif mv patch_rivet_3.1.7.dif ../patches/rivet/3.1.7/ diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif index 4e3300cfab..cf98c7c3ca 100644 --- a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif +++ b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif @@ -243,6 +243,50 @@ diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1. namespace Rivet { +diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in +--- Rivet-3.1.7/analyses/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.7/analyses/Makefile.in 2023-04-19 21:07:06.580845603 +0100 +@@ -329,10 +329,10 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = -Wno-portability +-PLUGIN_DIRS = $(shell ls -d $(srcdir)/plugin*) ++PLUGIN_DIRS = $(shell ls -d $(srcdir)/pluginCMS $(srcdir)/pluginATLAS $(srcdir)/pluginLHCb) + PLUGIN_NAMES = $(notdir $(subst plugin,,$(PLUGIN_DIRS))) + PLUGIN_LIBS = $(patsubst %,Rivet%Analyses.so,$(PLUGIN_NAMES)) +-PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/plugin*/*.*) ++PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/pluginCMS/*.* $(abs_srcdir)/pluginATLAS/*.* $(abs_srcdir)/pluginLHCb/*.*) + CLEANFILES = $(PLUGIN_LIBS) + EXTRA_DIST = $(PLUGIN_DIRS) examples + all: all-am +@@ -449,8 +449,8 @@ distclean-generic: + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +-@ENABLE_ANALYSES_FALSE@install-data-local: + @ENABLE_ANALYSES_FALSE@install-exec-local: ++@ENABLE_ANALYSES_FALSE@install-data-local: + @ENABLE_ANALYSES_FALSE@uninstall-local: + clean: clean-am + +@@ -567,7 +567,7 @@ RivetTristanAnalyses.so: $(filter-out $( + + @ENABLE_ANALYSES_TRUE@all-local: $(PLUGIN_LIBS) $(PLUGIN_DATAFILES) + @ENABLE_ANALYSES_TRUE@ mkdir -p $(builddir)/data +-@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/plugin*; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done ++@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/pluginCMS $(abs_srcdir)/pluginATLAS $(abs_srcdir)/pluginLHCb; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done + + @ENABLE_ANALYSES_TRUE@install-exec-local: $(PLUGIN_LIBS) + @ENABLE_ANALYSES_TRUE@ $(MKDIR_P) $(DESTDIR)$(libdir)/Rivet +@@ -576,7 +576,7 @@ RivetTristanAnalyses.so: $(filter-out $( + @ENABLE_ANALYSES_TRUE@install-data-local: $(PLUGIN_DATAFILES) + @ENABLE_ANALYSES_TRUE@ @echo "Installing analysis data files..." + @ENABLE_ANALYSES_TRUE@ $(mkdir_p) $(DESTDIR)$(pkgdatadir) +-@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/plugin* $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done ++@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/pluginCMS $(srcdir)/pluginLHCb $(srcdir)/pluginATLAS $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done + + @ENABLE_ANALYSES_TRUE@uninstall-local: + @ENABLE_ANALYSES_TRUE@ cd $(DESTDIR)$(libdir) && rm -f $(PLUGIN_LIBS) diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc --- Rivet-3.1.7/src/Core/AnalysisHandler.cc 2022-07-26 09:34:20.000000000 +0100 +++ ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc 2023-04-14 14:55:04.100679799 +0100 From e01f1bbd022e6a79cdfdb2fd866bcb9a67eae901 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 19 Apr 2023 21:35:53 +0100 Subject: [PATCH 12/49] remove --enable-analyses=False from rivet configure --- cmake/backends.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 8a79d7b69d..4ab2e537d7 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2112,7 +2112,7 @@ if(NOT ditched_${name}_${ver}) SOURCE_DIR ${dir} BUILD_IN_SOURCE 1 PATCH_COMMAND patch -p1 < ${patch} - CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} --enable-analyses=False + CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CFLAGS=${Rivet_C_FLAGS} CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${Rivet_CXX_FLAGS} LDFLAGS=${Rivet_LD_FLAGS} CPPFLAGS=${Rivet_CPP_FLAGS} PYTHON=${PYTHON_EXECUTABLE} --with-yoda=${yoda_dir} --with-hepmc3=${hepmc_dir} --with-fastjet=${fastjet_dir} --prefix=${dir}/local --enable-shared=yes --enable-static=no --libdir=${dir}/local/lib --enable-pyext=${pyext} COMMAND ${CMAKE_COMMAND} -E echo "Rivet_dirs=\"${Rivet_dirs}\"" > touch_files.sh COMMAND sh -c "cat ${patch_dir}/touch_files.sh" >> touch_files.sh COMMAND chmod u+x touch_files.sh From 0ac43724aa9d05ecc1fb02be620f1e6dc5182405 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 19 Apr 2023 21:59:07 +0100 Subject: [PATCH 13/49] Remove last vestiges of rivet 3.1.5 --- .../rivet/3.1.5/make_patch_rivet_3.1.5.sh | 20 -- .../patches/rivet/3.1.5/patch_rivet_3.1.5.dif | 287 ------------------ Backends/patches/rivet/3.1.5/touch_files.sh | 3 - 3 files changed, 310 deletions(-) delete mode 100755 Backends/patches/rivet/3.1.5/make_patch_rivet_3.1.5.sh delete mode 100644 Backends/patches/rivet/3.1.5/patch_rivet_3.1.5.dif delete mode 100755 Backends/patches/rivet/3.1.5/touch_files.sh diff --git a/Backends/patches/rivet/3.1.5/make_patch_rivet_3.1.5.sh b/Backends/patches/rivet/3.1.5/make_patch_rivet_3.1.5.sh deleted file mode 100755 index f5eed2e926..0000000000 --- a/Backends/patches/rivet/3.1.5/make_patch_rivet_3.1.5.sh +++ /dev/null @@ -1,20 +0,0 @@ -cd ../../../downloaded -tar -xvf *rivet* -echo "diff -rupN Rivet-3.1.5/Makefile.in ../installed/rivet/3.1.5/Makefile.in" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/Makefile.in ../installed/rivet/3.1.5/Makefile.in >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/include/Rivet/Makefile.in ../installed/rivet/3.1.5/include/Rivet/Makefile.in" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/include/Rivet/Makefile.in ../installed/rivet/3.1.5/include/Rivet/Makefile.in >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/src/Core/Makefile.in ../installed/rivet/3.1.5/src/Core/Makefile.in" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/src/Core/Makefile.in ../installed/rivet/3.1.5/src/Core/Makefile.in >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.5/include/Rivet/AnalysisHandler.hh" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.5/include/Rivet/AnalysisHandler.hh >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.5/include/Rivet/Tools/RivetHepMC.hh" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.5/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.5/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.5/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/analyses/Makefile.in ../installed/rivet/3.1.5/analyses/Makefile.in" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/analyses/Makefile.in ../installed/rivet/3.1.5/analyses/Makefile.in >> patch_rivet_3.1.5.dif -echo "diff -rupN Rivet-3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc" >> patch_rivet_3.1.5.dif -diff -rupN Rivet-3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc >> patch_rivet_3.1.5.dif -mv patch_rivet_3.1.5.dif ../patches/rivet/3.1.5/ -cd ../patches/rivet/3.1.5 diff --git a/Backends/patches/rivet/3.1.5/patch_rivet_3.1.5.dif b/Backends/patches/rivet/3.1.5/patch_rivet_3.1.5.dif deleted file mode 100644 index 037efbfe11..0000000000 --- a/Backends/patches/rivet/3.1.5/patch_rivet_3.1.5.dif +++ /dev/null @@ -1,287 +0,0 @@ -diff -rupN Rivet-3.1.5/Makefile.in ../installed/rivet/3.1.5/Makefile.in ---- Rivet-3.1.5/Makefile.in 2021-11-05 18:37:59.000000000 +0100 -+++ ../installed/rivet/3.1.5/Makefile.in 2023-02-22 16:18:38.813232777 +0100 -@@ -455,6 +455,20 @@ pkgconfigdir = $(libdir)/pkgconfig - dist_pkgconfig_DATA = rivet.pc - DEST = login.hepforge.org:rivet/downloads/ - all: all-recursive -+# Added by GAMBIT -+libRivet.so: -+ cd ${top_builddir}/src/Core/yamlcpp && ${MAKE} $(AM_MAKEFLAGS) librivet-yaml-cpp.la -+ cd ${top_builddir}/src/Core && ${MAKE} $(AM_MAKEFLAGS) libRivetCore.la -+ cd ${top_builddir}/src/Projections && ${MAKE} $(AM_MAKEFLAGS) libRivetProjections.la -+ cd ${top_builddir}/src/Tools && ${MAKE} $(AM_MAKEFLAGS) libRivetTools.la -+ cd ${top_builddir}/src/AnalysisTools && ${MAKE} $(AM_MAKEFLAGS) libRivetAnalysisTools.la -+ cd ${top_builddir}/src && ${MAKE} $(AM_MAKEFLAGS) libRivet.la -+ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) install -+ cd ${top_builddir}/pyext && ${MAKE} $(AM_MAKEFLAGS) install -+ mkdir -p ${libdir} -+ if test -e ${top_builddir}/src/.libs/libRivet.so ; then cp ${top_builddir}/src/.libs/libRivet.so ${libdir}/libRivet.so ; fi -+ if test -e ${top_builddir}/src/.libs/libRivet.dylib ; then cp ${top_builddir}/src/.libs/libRivet.dylib ${libdir}/libRivet.so ; fi -+ - - .SUFFIXES: - am--refresh: Makefile -@@ -527,6 +541,7 @@ mostlyclean-libtool: - - clean-libtool: - -rm -rf .libs _libs -+ -rm -rf ${libdir} - - distclean-libtool: - -rm -f libtool config.lt -diff -rupN Rivet-3.1.5/include/Rivet/Makefile.in ../installed/rivet/3.1.5/include/Rivet/Makefile.in ---- Rivet-3.1.5/include/Rivet/Makefile.in 2021-11-05 18:38:00.000000000 +0100 -+++ ../installed/rivet/3.1.5/include/Rivet/Makefile.in 2023-02-22 16:05:03.433033018 +0100 -@@ -381,6 +381,7 @@ nobase_dist_noinst_HEADERS = Tools/osdir - Math/eigen3/README.md - - # TODO: Move to Rivet/AnalysisTools header dir? -+# Modified by GAMBIT - nobase_pkginclude_HEADERS = Rivet.hh Run.hh Event.hh ParticleBase.hh \ - Particle.fhh Particle.hh Jet.fhh Jet.hh Projection.fhh \ - Projection.hh ProjectionApplier.hh ProjectionHandler.hh \ -@@ -623,7 +624,23 @@ nobase_pkginclude_HEADERS = Rivet.hh Run - Math/eigen3/src/QR/HouseholderQR.h \ - Math/eigen3/src/SVD/BDCSVD.h Math/eigen3/src/SVD/JacobiSVD.h \ - Math/eigen3/src/SVD/SVDBase.h \ -- Math/eigen3/src/SVD/UpperBidiagonalization.h Math/eigen3/SVD -+ Math/eigen3/src/SVD/UpperBidiagonalization.h Math/eigen3/SVD \ -+ ../gambit/Backends/abstractbase.hpp \ -+ ../gambit/Backends/backend_undefs.hpp \ -+ ../gambit/Backends/wrapperbase.hpp \ -+ ../gambit/Backends/abstracttypedefs.hh \ -+ ../gambit/Backends/BOSS_wrapperutils.hh \ -+ ../gambit/Backends/wrappertypedefs.hh \ -+ ../gambit/Backends/function_return_utils.hpp \ -+ ../gambit/Utils/cats.hpp \ -+ ../backend_types/Rivet_3_1_5/identification.hpp \ -+ ../backend_types/Rivet_3_1_5/forward_decls_abstract_classes.hh \ -+ ../backend_types/Rivet_3_1_5/forward_decls_wrapper_classes.hh \ -+ ../backend_types/Rivet_3_1_5/abstract_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_5/wrapper_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_decl.hh \ -+ ../backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_def.hh -+ - all: all-am - - .SUFFIXES: -diff -rupN Rivet-3.1.5/src/Core/Makefile.in ../installed/rivet/3.1.5/src/Core/Makefile.in ---- Rivet-3.1.5/src/Core/Makefile.in 2021-11-05 18:38:00.000000000 +0100 -+++ ../installed/rivet/3.1.5/src/Core/Makefile.in 2023-02-22 16:05:03.433033018 +0100 -@@ -110,6 +110,7 @@ CONFIG_CLEAN_VPATH_FILES = - LTLIBRARIES = $(noinst_LTLIBRARIES) - libRivetCore_la_DEPENDENCIES = \ - $(builddir)/yamlcpp/librivet-yaml-cpp.la -+# Modified by GAMBIT - am_libRivetCore_la_OBJECTS = libRivetCore_la-Run.lo \ - libRivetCore_la-Event.lo libRivetCore_la-Jet.lo \ - libRivetCore_la-Particle.lo \ -@@ -118,7 +119,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor - libRivetCore_la-AnalysisLoader.lo \ - libRivetCore_la-AnalysisInfo.lo \ - libRivetCore_la-AnalysisHandler.lo \ -- libRivetCore_la-ProjectionHandler.lo -+ libRivetCore_la-ProjectionHandler.lo \ -+ libRivetCore_la-BOSS_wrapperutils.lo \ -+ libRivetCore_la-BOSS_AnalysisHandler.lo \ -+ libRivetCore_la-BOSS_factory_AnalysisHandler.lo \ -+ libRivetCore_la-BOSS_func_addAnalysisLibPath.lo \ -+ libRivetCore_la-BOSS_function_return_utils.lo - libRivetCore_la_OBJECTS = $(am_libRivetCore_la_OBJECTS) - AM_V_lt = $(am__v_lt_@AM_V@) - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -@@ -431,11 +437,17 @@ top_srcdir = @top_srcdir@ - SUBDIRS = yamlcpp - EXTRA_DIST = zstr - noinst_LTLIBRARIES = libRivetCore.la -+# Modified by GAMBIT - libRivetCore_la_SOURCES = \ - Run.cc Event.cc Jet.cc Particle.cc \ - ProjectionApplier.cc Projection.cc \ - Analysis.cc AnalysisLoader.cc AnalysisInfo.cc \ -- AnalysisHandler.cc ProjectionHandler.cc -+ AnalysisHandler.cc ProjectionHandler.cc \ -+ BOSS_wrapperutils.cc \ -+ BOSS_AnalysisHandler.cc \ -+ BOSS_factory_AnalysisHandler.cc \ -+ BOSS_func_addAnalysisLibPath.cc \ -+ BOSS_function_return_utils.cc - - libRivetCore_la_CPPFLAGS = -I$(srcdir)/yamlcpp -DYAML_NAMESPACE=RIVET_YAML $(AM_CPPFLAGS) - libRivetCore_la_LIBADD = $(builddir)/yamlcpp/librivet-yaml-cpp.la -@@ -504,6 +516,12 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionApplier.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-ProjectionHandler.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Run.Plo@am__quote@ -+# Added by GAMBIT -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ - - .cc.o: - @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -603,6 +621,42 @@ libRivetCore_la-ProjectionHandler.lo: Pr - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-ProjectionHandler.lo `test -f 'ProjectionHandler.cc' || echo '$(srcdir)/'`ProjectionHandler.cc - -+# Added by GAMBIT -+libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+ -+libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+ -+libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+ - mostlyclean-libtool: - -rm -f *.lo - -diff -rupN Rivet-3.1.5/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.5/include/Rivet/AnalysisHandler.hh ---- Rivet-3.1.5/include/Rivet/AnalysisHandler.hh 2021-04-27 21:21:47.000000000 +0200 -+++ ../installed/rivet/3.1.5/include/Rivet/AnalysisHandler.hh 2023-02-22 16:05:03.433033018 +0100 -@@ -27,10 +27,10 @@ namespace Rivet { - AnalysisHandler(const string& runname=""); - - /// The copy constructor is deleted, so it can never be called. -- AnalysisHandler(const AnalysisHandler&) = delete; -+ //AnalysisHandler(const AnalysisHandler&) = delete; // Commented by GAMBIT - - /// The assignment operator is deleted, so it can never be called. -- AnalysisHandler& operator=(const AnalysisHandler&) = delete; -+ //AnalysisHandler& operator=(const AnalysisHandler&) = delete; // Commented by GAMBIT - - /// The destructor is not virtual, as this class should not be inherited from. - ~AnalysisHandler(); -@@ -267,6 +267,9 @@ namespace Rivet { - /// Write all analyses' plots (via getData) to the named file. - void writeData(const string& filename) const; - -+ // Added by GAMBIT, Dummy function to force BOSS to add the headers for the YODA::AnalysisObject type -+ void dummy(YODA::AnalysisObject*) const; -+ - /// @brief Configure the AnalysisObject dump rate and destination. - /// - /// Tell Rivet to dump intermediate result to a file named @a -diff -rupN Rivet-3.1.5/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.5/include/Rivet/Tools/RivetHepMC.hh ---- Rivet-3.1.5/include/Rivet/Tools/RivetHepMC.hh 2020-04-07 16:43:14.000000000 +0200 -+++ ../installed/rivet/3.1.5/include/Rivet/Tools/RivetHepMC.hh 2023-02-22 16:05:03.433033018 +0100 -@@ -8,7 +8,7 @@ - #include - - --#ifdef RIVET_ENABLE_HEPMC_3 -+//#ifdef RIVET_ENABLE_HEPMC_3 // Commented by GAMBIT - - #include "HepMC3/HepMC3.h" - #include "HepMC3/Relatives.h" -@@ -34,7 +34,8 @@ namespace Rivet { - using PdfInfo = RivetHepMC::GenPdfInfo; - } - --#else // HEPMC_2 -+// Commented by GAMBIT -+/*#else // HEPMC_2 - - #include "HepMC/GenEvent.h" - #include "HepMC/GenParticle.h" -@@ -75,7 +76,7 @@ namespace Rivet { - using PdfInfo = RivetHepMC::PdfInfo; - } - --#endif -+#endif*/ - - - namespace Rivet { -diff -rupN Rivet-3.1.5/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.5/src/Core/AnalysisHandler.c ---- Rivet-3.1.5/src/Core/AnalysisHandler.cc 2021-07-11 23:34:05.000000000 +0200 -+++ ../installed/rivet/3.1.5/src/Core/AnalysisHandler.cc 2023-02-22 16:05:03.433033018 +0100 -@@ -121,7 +121,8 @@ namespace Rivet { - if (num_anas_requested > 0 && analysisNames().empty()) { - MSG_ERROR("All analyses were incompatible with the first event's beams\n" - << "Exiting, since this probably wasn't intentional!"); -- exit(1); -+ //exit(1); // Commented by GAMBIT -+ throw std::runtime_error("All analyses were incompatible with the first event's beams\n"); // Added by GAMBIT - } - - // Warn if any analysis' status is not unblemished -@@ -916,6 +917,12 @@ namespace Rivet { - - } - -+ // Added by GAMBIT, dummy function to force BOSS to add the headers for the YODA::AnalysisObject type -+ void AnalysisHandler::dummy(YODA::AnalysisObject* object) const { -+ -+ // Nothing to do here -+ -+ } - - string AnalysisHandler::runName() const { - return _runname; -diff -rupN Rivet-3.1.5/analyses/Makefile.in ../installed/rivet/3.1.5/analyses/Makefile.in ---- Rivet-3.1.5/analyses/Makefile.in 2021-11-05 18:37:59.000000000 +0100 -+++ ../installed/rivet/3.1.5/analyses/Makefile.in 2023-02-22 16:05:03.437033017 +0100 -@@ -329,12 +329,16 @@ top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - AUTOMAKE_OPTIONS = -Wno-portability --@ENABLE_ANALYSES_TRUE@PLUGIN_DIRS = $(shell ls -d $(srcdir)/plugin*) -+#@ENABLE_ANALYSES_TRUE@PLUGIN_DIRS = $(shell ls -d $(srcdir)/plugin*) # Commented by GAMBIT -+@ENABLE_ANALYSES_TRUE@PLUGIN_DIRS = $(shell ls -d $(srcdir)/pluginATLAS $(srcdir)/pluginCMS) # Added by GAMBIT - @ENABLE_ANALYSES_TRUE@PLUGIN_NAMES = $(notdir $(subst plugin,,$(PLUGIN_DIRS))) - @ENABLE_ANALYSES_TRUE@PLUGIN_LIBS = $(patsubst %,Rivet%Analyses.so,$(PLUGIN_NAMES)) --@ENABLE_ANALYSES_TRUE@PLUGIN_INFOFILES = $(shell ls $(abs_srcdir)/plugin*/*.info) --@ENABLE_ANALYSES_TRUE@PLUGIN_PLOTFILES = $(shell ls $(abs_srcdir)/plugin*/*.plot) --@ENABLE_ANALYSES_TRUE@PLUGIN_YODAFILES = $(shell ls $(abs_srcdir)/plugin*/*.yoda*) -+#@ENABLE_ANALYSES_TRUE@PLUGIN_INFOFILES = $(shell ls $(abs_srcdir)/plugin*/*.info) # Commented by GAMBIT -+@ENABLE_ANALYSES_TRUE@PLUGIN_INFOFILES = $(shell ls $(abs_srcdir)/pluginATLAS/*.info $(abs_srcdir)/pluginCMS/*.info) # Added by GAMBIT -+#@ENABLE_ANALYSES_TRUE@PLUGIN_PLOTFILES = $(shell ls $(abs_srcdir)/plugin*/*.plot) # Commented by GAMBIT -+@ENABLE_ANALYSES_TRUE@PLUGIN_PLOTFILES = $(shell ls $(abs_srcdir)/pluginATLAS/*.plot $(abs_srcdir)/pluginCMS/*.plot) # Added by GAMBIT -+#@ENABLE_ANALYSES_TRUE@PLUGIN_YODAFILES = $(shell ls $(abs_srcdir)/plugin*/*.yoda*) # Commented by GAMBIT -+@ENABLE_ANALYSES_TRUE@PLUGIN_YODAFILES = $(shell ls $(abs_srcdir)/pluginATLAS/*.yoda* $(abs_srcdir)/pluginCMS/*.yoda*) # Added by GAMBIT - @ENABLE_ANALYSES_TRUE@PLUGIN_DATAFILES = $(PLUGIN_INFOFILES) $(PLUGIN_PLOTFILES) $(PLUGIN_YODAFILES) - @ENABLE_ANALYSES_TRUE@CLEANFILES = $(PLUGIN_LIBS) - @ENABLE_ANALYSES_TRUE@EXTRA_DIST = $(PLUGIN_DIRS) -diff -rupN Rivet-3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc ../installed/rivet/3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc ---- Rivet-3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc 2021-11-08 21:05:48.000000000 +0100 -+++ ../installed/rivet/3.1.5/analyses/pluginCMS/CMS_2018_I1663958.cc 2023-02-22 16:05:03.437033017 +0100 -@@ -120,7 +120,7 @@ namespace Rivet { - - const Particles& photons = apply(event, "MyPhotons").particles(Cuts::abseta < 2.4 && Cuts::pT > 15*GeV); - for (const Particle& ph : photons) { -- double isolation = sum(filter_select(isopars, deltaRLess(ph, 0.4)), pT, 0.); -+ double isolation = sum(filter_select(isopars, deltaRLess(ph, 0.4)), Kin::pT, 0.); - isolation = isolation/ph.pt() - 1.; - if (isolation > 0.25) continue; - additionalobjects += ph; diff --git a/Backends/patches/rivet/3.1.5/touch_files.sh b/Backends/patches/rivet/3.1.5/touch_files.sh deleted file mode 100755 index 845fed1c18..0000000000 --- a/Backends/patches/rivet/3.1.5/touch_files.sh +++ /dev/null @@ -1,3 +0,0 @@ -for dir in $Rivet_dirs; do for file in "$dir"/*lo; do [ -e "$file" ] && touch $file; done; done -for dir in $Rivet_dirs; do for file in "$dir"/*la; do [ -e "$file" ] && touch $file; done; done -echo "Reseting library modification times" From a706c5a2b9b0be9e0e9fb434077f6b3f9ad04ac8 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Mon, 8 May 2023 00:53:19 +0100 Subject: [PATCH 14/49] Update rivet to 3.1.8 --- .../Rivet_3_1_8/abstract_AnalysisHandler.hh | 206 +++++++++ .../forward_decls_abstract_classes.hh | 24 ++ .../forward_decls_wrapper_classes.hh | 22 + .../Rivet_3_1_8/identification.hpp | 12 + .../Rivet_3_1_8/loaded_types.hpp | 27 ++ .../Rivet_3_1_8/wrapper_AnalysisHandler.hh | 9 + .../wrapper_AnalysisHandler_decl.hh | 190 ++++++++ .../wrapper_AnalysisHandler_def.hh | 402 +++++++++++++++++ .../gambit/Backends/frontends/Rivet_3_1_8.hpp | 51 +++ .../rivet/3.1.8/make_patch_rivet_3.1.8.sh | 18 + .../patches/rivet/3.1.8/patch_rivet_3.1.8.dif | 404 ++++++++++++++++++ Backends/patches/rivet/3.1.8/touch_files.sh | 3 + Backends/scripts/BOSS/configs/rivet_3_1_8.py | 131 ++++++ Backends/src/frontends/Rivet_3_1_8.cpp | 53 +++ cmake/backends.cmake | 8 +- 15 files changed, 1556 insertions(+), 4 deletions(-) create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_abstract_classes.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_wrapper_classes.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/identification.hpp create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/loaded_types.hpp create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_decl.hh create mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_def.hh create mode 100644 Backends/include/gambit/Backends/frontends/Rivet_3_1_8.hpp create mode 100755 Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh create mode 100644 Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif create mode 100755 Backends/patches/rivet/3.1.8/touch_files.sh create mode 100644 Backends/scripts/BOSS/configs/rivet_3_1_8.py create mode 100644 Backends/src/frontends/Rivet_3_1_8.cpp diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh new file mode 100644 index 0000000000..b84e8ac4a9 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh @@ -0,0 +1,206 @@ +#ifndef __abstract_AnalysisHandler_Rivet_3_1_8_hh__ +#define __abstract_AnalysisHandler_Rivet_3_1_8_hh__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "gambit/Backends/abstractbase.hpp" +#include "forward_decls_abstract_classes.hh" +#include "forward_decls_wrapper_classes.hh" +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class Abstract_AnalysisHandler : public virtual AbstractBase + { + public: + + virtual ::std::string runName() const =0; + + virtual long unsigned int numEvents() const =0; + + virtual double sumW() const =0; + + virtual double sumW2() const =0; + + virtual const ::std::vector& weightNames() const =0; + + virtual long unsigned int numWeights() const =0; + + virtual bool haveNamedWeights() const =0; + + virtual void setWeightNames(const HepMC3::GenEvent&) =0; + + virtual long unsigned int defaultWeightIndex() const =0; + + virtual void setWeightCap(const double) =0; + + virtual void setNLOSmearing(double) =0; + + virtual void skipMultiWeights(bool) =0; + + virtual void skipMultiWeights__BOSS() =0; + + virtual void selectMultiWeights(std::string) =0; + + virtual void selectMultiWeights__BOSS() =0; + + virtual void deselectMultiWeights(std::string) =0; + + virtual void deselectMultiWeights__BOSS() =0; + + virtual void setNominalWeightName(std::string) =0; + + virtual void setNominalWeightName__BOSS() =0; + + virtual void setCrossSection(const std::vector>&, bool) =0; + + virtual void setCrossSection__BOSS(const std::vector>&) =0; + + virtual void setCrossSection(const std::pair&, bool) =0; + + virtual void setCrossSection__BOSS(const std::pair&) =0; + + virtual void setCrossSection(double, double, bool) =0; + + virtual void setCrossSection__BOSS(double, double) =0; + + virtual double nominalCrossSection() const =0; + + virtual ::std::pair beamIds() const =0; + + virtual double sqrtS() const =0; + + virtual void checkBeams(bool) =0; + + virtual void checkBeams__BOSS() =0; + + virtual void setIgnoreBeams(bool) =0; + + virtual void setIgnoreBeams__BOSS() =0; + + virtual ::std::vector analysisNames() const =0; + + virtual ::std::vector stdAnalysisNames() const =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&) =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map) =0; + + virtual Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&) =0; + + virtual Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&) =0; + + virtual Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&) =0; + + virtual void init(const HepMC3::GenEvent&) =0; + + virtual void analyze(const HepMC3::GenEvent&) =0; + + virtual void analyze(const HepMC3::GenEvent*) =0; + + virtual void finalize() =0; + + virtual void readData(std::istream&, const std::string&, bool) =0; + + virtual void readData__BOSS(std::istream&, const std::string&) =0; + + virtual void readData(const std::string&, bool) =0; + + virtual void readData__BOSS(const std::string&) =0; + + virtual ::std::vector> getYodaAOs(bool) const =0; + + virtual ::std::vector> getYodaAOs__BOSS() const =0; + + virtual void writeData(std::ostream&, const std::string&) const =0; + + virtual void writeData(const std::string&) const =0; + + virtual void dummy(YODA::AnalysisObject*) const =0; + + virtual void setAODump(const std::string&, int) =0; + + virtual void setNoAODump() =0; + + virtual void dump(const std::string&, int) =0; + + virtual void mergeYodas(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&, bool) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&, const std::vector&) =0; + + virtual void mergeYodas__BOSS(const std::vector&) =0; + + virtual void merge__BOSS(Rivet::Abstract_AnalysisHandler&) =0; + + public: + virtual void pointer_assign__BOSS(Abstract_AnalysisHandler*) =0; + virtual Abstract_AnalysisHandler* pointer_copy__BOSS() =0; + + private: + AnalysisHandler* wptr; + bool delete_wrapper; + public: + AnalysisHandler* get_wptr() { return wptr; } + void set_wptr(AnalysisHandler* wptr_in) { wptr = wptr_in; } + bool get_delete_wrapper() { return delete_wrapper; } + void set_delete_wrapper(bool del_wrp_in) { delete_wrapper = del_wrp_in; } + + public: + Abstract_AnalysisHandler() + { + wptr = 0; + delete_wrapper = false; + } + + Abstract_AnalysisHandler(const Abstract_AnalysisHandler&) + { + wptr = 0; + delete_wrapper = false; + } + + Abstract_AnalysisHandler& operator=(const Abstract_AnalysisHandler&) { return *this; } + + virtual void init_wrapper() =0; + + AnalysisHandler* get_init_wptr() + { + init_wrapper(); + return wptr; + } + + AnalysisHandler& get_init_wref() + { + init_wrapper(); + return *wptr; + } + + virtual ~Abstract_AnalysisHandler() =0; + }; + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + + +#endif /* __abstract_AnalysisHandler_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_abstract_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_abstract_classes.hh new file mode 100644 index 0000000000..01264ebfb1 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_abstract_classes.hh @@ -0,0 +1,24 @@ +#ifndef __forward_decls_abstract_classes_Rivet_3_1_8_hh__ +#define __forward_decls_abstract_classes_Rivet_3_1_8_hh__ + + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class Abstract_AnalysisHandler; + } + + + + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __forward_decls_abstract_classes_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_wrapper_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_wrapper_classes.hh new file mode 100644 index 0000000000..e37c114288 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/forward_decls_wrapper_classes.hh @@ -0,0 +1,22 @@ +#ifndef __forward_decls_wrapper_classes_Rivet_3_1_8_hh__ +#define __forward_decls_wrapper_classes_Rivet_3_1_8_hh__ + + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + + namespace Rivet + { + class AnalysisHandler; + } + + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __forward_decls_wrapper_classes_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/identification.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/identification.hpp new file mode 100644 index 0000000000..af5a1e7975 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/identification.hpp @@ -0,0 +1,12 @@ +// Identify backend and set macro flags + +#include "gambit/Utils/cats.hpp" + +#define BACKENDNAME Rivet +#define BACKENDLANG CXX +#define VERSION 3.1.8 +#define SAFE_VERSION 3_1_8 +#define REFERENCE Bierlich:2019rhm + +#undef DO_CLASSLOADING +#define DO_CLASSLOADING 1 diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/loaded_types.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/loaded_types.hpp new file mode 100644 index 0000000000..77b62470ee --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/loaded_types.hpp @@ -0,0 +1,27 @@ +#ifndef __loaded_types_Rivet_3_1_8_hpp__ +#define __loaded_types_Rivet_3_1_8_hpp__ 1 + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp" +#include "wrapper_AnalysisHandler.hh" +#include "identification.hpp" +#include "gambit/Utils/end_ignore_warnings.hpp" + +// Indicate which types are provided by this backend, and what the symbols of their factories are. +#define Rivet_3_1_8_all_data \ + (( /*class*/(Rivet)(AnalysisHandler), /*constructors*/(("Factory_AnalysisHandler_0__BOSS_1",(const std::string&))) (("Factory_AnalysisHandler_1__BOSS_2",())) )) \ + +// If the default version has been loaded, set it as default. +#if ALREADY_LOADED(CAT_3(BACKENDNAME,_,CAT(Default_,BACKENDNAME))) + SET_DEFAULT_VERSION_FOR_LOADING_TYPES(BACKENDNAME,SAFE_VERSION,CAT(Default_,BACKENDNAME)) +#endif + +// Undefine macros to avoid conflict with other backends. +#include "gambit/Backends/backend_undefs.hpp" + +#endif +#endif + +#endif /* __loaded_types_Rivet_3_1_8_hpp__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler.hh new file mode 100644 index 0000000000..447ecacc6f --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler.hh @@ -0,0 +1,9 @@ +#ifndef __wrapper_AnalysisHandler_Rivet_3_1_8_hh__ +#define __wrapper_AnalysisHandler_Rivet_3_1_8_hh__ + + +#include "wrapper_AnalysisHandler_decl.hh" +#include "wrapper_AnalysisHandler_def.hh" + + +#endif /* __wrapper_AnalysisHandler_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_decl.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_decl.hh new file mode 100644 index 0000000000..86321a7ef8 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_decl.hh @@ -0,0 +1,190 @@ +#ifndef __wrapper_AnalysisHandler_decl_Rivet_3_1_8_hh__ +#define __wrapper_AnalysisHandler_decl_Rivet_3_1_8_hh__ + +#include +#include +#include +#include +#include +#include +#include +#include "forward_decls_wrapper_classes.hh" +#include "gambit/Backends/wrapperbase.hpp" +#include "abstract_AnalysisHandler.hh" +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + namespace Rivet + { + + class AnalysisHandler : public WrapperBase + { + // Member variables: + public: + // -- Static factory pointers: + static Abstract_AnalysisHandler* (*__factory0)(const std::string&); + static Abstract_AnalysisHandler* (*__factory1)(); + + // -- Other member variables: + + // Member functions: + public: + ::std::string runName() const; + + long unsigned int numEvents() const; + + double sumW() const; + + double sumW2() const; + + const ::std::vector& weightNames() const; + + long unsigned int numWeights() const; + + bool haveNamedWeights() const; + + void setWeightNames(const HepMC3::GenEvent& ge); + + long unsigned int defaultWeightIndex() const; + + void setWeightCap(const double maxWeight); + + void setNLOSmearing(double frac); + + void skipMultiWeights(bool ignore); + + void skipMultiWeights(); + + void selectMultiWeights(std::string patterns); + + void selectMultiWeights(); + + void deselectMultiWeights(std::string patterns); + + void deselectMultiWeights(); + + void setNominalWeightName(std::string name); + + void setNominalWeightName(); + + void setCrossSection(const std::vector>& xsecs, bool isUserSupplied); + + void setCrossSection(const std::vector>& xsecs); + + void setCrossSection(const std::pair& xsec, bool isUserSupplied); + + void setCrossSection(const std::pair& xsec); + + void setCrossSection(double xsec, double xsecerr, bool isUserSupplied); + + void setCrossSection(double xsec, double xsecerr); + + double nominalCrossSection() const; + + ::std::pair beamIds() const; + + double sqrtS() const; + + void checkBeams(bool check); + + void checkBeams(); + + void setIgnoreBeams(bool ignore); + + void setIgnoreBeams(); + + ::std::vector analysisNames() const; + + ::std::vector stdAnalysisNames() const; + + Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname); + + Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname, std::map pars); + + Rivet::AnalysisHandler& addAnalyses(const std::vector& analysisnames); + + Rivet::AnalysisHandler& removeAnalysis(const std::string& analysisname); + + Rivet::AnalysisHandler& removeAnalyses(const std::vector& analysisnames); + + void init(const HepMC3::GenEvent& event); + + void analyze(const HepMC3::GenEvent& event); + + void analyze(const HepMC3::GenEvent* event); + + void finalize(); + + void readData(std::istream& istr, const std::string& fmt, bool preload); + + void readData(std::istream& istr, const std::string& fmt); + + void readData(const std::string& filename, bool preload); + + void readData(const std::string& filename); + + ::std::vector> getYodaAOs(bool includeraw) const; + + ::std::vector> getYodaAOs() const; + + void writeData(std::ostream& ostr, const std::string& fmt) const; + + void writeData(const std::string& filename) const; + + void dummy(YODA::AnalysisObject* arg_1) const; + + void setAODump(const std::string& dumpfile, int period); + + void setNoAODump(); + + void dump(const std::string& dumpfile, int period); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts); + + void mergeYodas(const std::vector& aofiles, const std::vector& delopts); + + void mergeYodas(const std::vector& aofiles); + + void merge(Rivet::AnalysisHandler& other); + + + // Wrappers for original constructors: + public: + AnalysisHandler(const std::string& runname); + AnalysisHandler(); + + // Special pointer-based constructor: + AnalysisHandler(Abstract_AnalysisHandler* in); + + // Copy constructor: + AnalysisHandler(const AnalysisHandler& in); + + // Assignment operator: + AnalysisHandler& operator=(const AnalysisHandler& in); + + // Destructor: + ~AnalysisHandler(); + + // Returns correctly casted pointer to Abstract class: + Abstract_AnalysisHandler* get_BEptr() const; + + }; + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __wrapper_AnalysisHandler_decl_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_def.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_def.hh new file mode 100644 index 0000000000..deccff8bb3 --- /dev/null +++ b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_def.hh @@ -0,0 +1,402 @@ +#ifndef __wrapper_AnalysisHandler_def_Rivet_3_1_8_hh__ +#define __wrapper_AnalysisHandler_def_Rivet_3_1_8_hh__ + +#include +#include +#include +#include +#include +#include +#include "HepMC3/GenEvent.h" +#include "YODA/AnalysisObject.h" + +#include "identification.hpp" + +namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) +{ + + namespace Rivet + { + + // Member functions: + inline ::std::string AnalysisHandler::runName() const + { + return get_BEptr()->runName(); + } + + inline long unsigned int AnalysisHandler::numEvents() const + { + return get_BEptr()->numEvents(); + } + + inline double AnalysisHandler::sumW() const + { + return get_BEptr()->sumW(); + } + + inline double AnalysisHandler::sumW2() const + { + return get_BEptr()->sumW2(); + } + + inline const ::std::vector& AnalysisHandler::weightNames() const + { + return get_BEptr()->weightNames(); + } + + inline long unsigned int AnalysisHandler::numWeights() const + { + return get_BEptr()->numWeights(); + } + + inline bool AnalysisHandler::haveNamedWeights() const + { + return get_BEptr()->haveNamedWeights(); + } + + inline void AnalysisHandler::setWeightNames(const HepMC3::GenEvent& ge) + { + get_BEptr()->setWeightNames(ge); + } + + inline long unsigned int AnalysisHandler::defaultWeightIndex() const + { + return get_BEptr()->defaultWeightIndex(); + } + + inline void AnalysisHandler::setWeightCap(const double maxWeight) + { + get_BEptr()->setWeightCap(maxWeight); + } + + inline void AnalysisHandler::setNLOSmearing(double frac) + { + get_BEptr()->setNLOSmearing(frac); + } + + inline void AnalysisHandler::skipMultiWeights(bool ignore) + { + get_BEptr()->skipMultiWeights(ignore); + } + + inline void AnalysisHandler::skipMultiWeights() + { + get_BEptr()->skipMultiWeights__BOSS(); + } + + inline void AnalysisHandler::selectMultiWeights(std::string patterns) + { + get_BEptr()->selectMultiWeights(patterns); + } + + inline void AnalysisHandler::selectMultiWeights() + { + get_BEptr()->selectMultiWeights__BOSS(); + } + + inline void AnalysisHandler::deselectMultiWeights(std::string patterns) + { + get_BEptr()->deselectMultiWeights(patterns); + } + + inline void AnalysisHandler::deselectMultiWeights() + { + get_BEptr()->deselectMultiWeights__BOSS(); + } + + inline void AnalysisHandler::setNominalWeightName(std::string name) + { + get_BEptr()->setNominalWeightName(name); + } + + inline void AnalysisHandler::setNominalWeightName() + { + get_BEptr()->setNominalWeightName__BOSS(); + } + + inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsecs, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs) + { + get_BEptr()->setCrossSection__BOSS(xsecs); + } + + inline void AnalysisHandler::setCrossSection(const std::pair& xsec, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsec, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(const std::pair& xsec) + { + get_BEptr()->setCrossSection__BOSS(xsec); + } + + inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr, bool isUserSupplied) + { + get_BEptr()->setCrossSection(xsec, xsecerr, isUserSupplied); + } + + inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr) + { + get_BEptr()->setCrossSection__BOSS(xsec, xsecerr); + } + + inline double AnalysisHandler::nominalCrossSection() const + { + return get_BEptr()->nominalCrossSection(); + } + + inline ::std::pair AnalysisHandler::beamIds() const + { + return get_BEptr()->beamIds(); + } + + inline double AnalysisHandler::sqrtS() const + { + return get_BEptr()->sqrtS(); + } + + inline void AnalysisHandler::checkBeams(bool check) + { + get_BEptr()->checkBeams(check); + } + + inline void AnalysisHandler::checkBeams() + { + get_BEptr()->checkBeams__BOSS(); + } + + inline void AnalysisHandler::setIgnoreBeams(bool ignore) + { + get_BEptr()->setIgnoreBeams(ignore); + } + + inline void AnalysisHandler::setIgnoreBeams() + { + get_BEptr()->setIgnoreBeams__BOSS(); + } + + inline ::std::vector AnalysisHandler::analysisNames() const + { + return get_BEptr()->analysisNames(); + } + + inline ::std::vector AnalysisHandler::stdAnalysisNames() const + { + return get_BEptr()->stdAnalysisNames(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname) + { + return get_BEptr()->addAnalysis__BOSS(analysisname).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname, std::map pars) + { + return get_BEptr()->addAnalysis__BOSS(analysisname, pars).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::addAnalyses(const std::vector& analysisnames) + { + return get_BEptr()->addAnalyses__BOSS(analysisnames).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalysis(const std::string& analysisname) + { + return get_BEptr()->removeAnalysis__BOSS(analysisname).get_init_wref(); + } + + inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalyses(const std::vector& analysisnames) + { + return get_BEptr()->removeAnalyses__BOSS(analysisnames).get_init_wref(); + } + + inline void AnalysisHandler::init(const HepMC3::GenEvent& event) + { + get_BEptr()->init(event); + } + + inline void AnalysisHandler::analyze(const HepMC3::GenEvent& event) + { + get_BEptr()->analyze(event); + } + + inline void AnalysisHandler::analyze(const HepMC3::GenEvent* event) + { + get_BEptr()->analyze(event); + } + + inline void AnalysisHandler::finalize() + { + get_BEptr()->finalize(); + } + + inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt, bool preload) + { + get_BEptr()->readData(istr, fmt, preload); + } + + inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt) + { + get_BEptr()->readData__BOSS(istr, fmt); + } + + inline void AnalysisHandler::readData(const std::string& filename, bool preload) + { + get_BEptr()->readData(filename, preload); + } + + inline void AnalysisHandler::readData(const std::string& filename) + { + get_BEptr()->readData__BOSS(filename); + } + + inline ::std::vector> AnalysisHandler::getYodaAOs(bool includeraw) const + { + return get_BEptr()->getYodaAOs(includeraw); + } + + inline ::std::vector> AnalysisHandler::getYodaAOs() const + { + return get_BEptr()->getYodaAOs__BOSS(); + } + + inline void AnalysisHandler::writeData(std::ostream& ostr, const std::string& fmt) const + { + get_BEptr()->writeData(ostr, fmt); + } + + inline void AnalysisHandler::writeData(const std::string& filename) const + { + get_BEptr()->writeData(filename); + } + + inline void AnalysisHandler::dummy(YODA::AnalysisObject* arg_1) const + { + get_BEptr()->dummy(arg_1); + } + + inline void AnalysisHandler::setAODump(const std::string& dumpfile, int period) + { + get_BEptr()->setAODump(dumpfile, period); + } + + inline void AnalysisHandler::setNoAODump() + { + get_BEptr()->setNoAODump(); + } + + inline void AnalysisHandler::dump(const std::string& dumpfile, int period) + { + get_BEptr()->dump(dumpfile, period); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv) + { + get_BEptr()->mergeYodas(aofiles, delopts, addopts, matches, unmatches, equiv); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches, unmatches); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts) + { + get_BEptr()->mergeYodas__BOSS(aofiles, delopts); + } + + inline void AnalysisHandler::mergeYodas(const std::vector& aofiles) + { + get_BEptr()->mergeYodas__BOSS(aofiles); + } + + inline void AnalysisHandler::merge(Rivet::AnalysisHandler& other) + { + get_BEptr()->merge__BOSS(*other.get_BEptr()); + } + + + // Wrappers for original constructors: + inline AnalysisHandler::AnalysisHandler(const std::string& runname) : + WrapperBase(__factory0(runname)) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + inline AnalysisHandler::AnalysisHandler() : + WrapperBase(__factory1()) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Special pointer-based constructor: + inline AnalysisHandler::AnalysisHandler(Abstract_AnalysisHandler* in) : + WrapperBase(in) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Copy constructor: + inline AnalysisHandler::AnalysisHandler(const AnalysisHandler& in) : + WrapperBase(in.get_BEptr()->pointer_copy__BOSS()) + { + get_BEptr()->set_wptr(this); + get_BEptr()->set_delete_wrapper(false); + } + + // Assignment operator: + inline AnalysisHandler& AnalysisHandler::operator=(const AnalysisHandler& in) + { + if (this != &in) + { + get_BEptr()->pointer_assign__BOSS(in.get_BEptr()); + } + return *this; + } + + + // Destructor: + inline AnalysisHandler::~AnalysisHandler() + { + if (get_BEptr() != 0) + { + get_BEptr()->set_delete_wrapper(false); + if (can_delete_BEptr()) + { + delete BEptr; + BEptr = 0; + } + } + set_delete_BEptr(false); + } + + // Returns correctly casted pointer to Abstract class: + inline Abstract_AnalysisHandler* Rivet::AnalysisHandler::get_BEptr() const + { + return dynamic_cast(BEptr); + } + } + +} + + +#include "gambit/Backends/backend_undefs.hpp" + +#endif /* __wrapper_AnalysisHandler_def_Rivet_3_1_8_hh__ */ diff --git a/Backends/include/gambit/Backends/frontends/Rivet_3_1_8.hpp b/Backends/include/gambit/Backends/frontends/Rivet_3_1_8.hpp new file mode 100644 index 0000000000..b9c9284986 --- /dev/null +++ b/Backends/include/gambit/Backends/frontends/Rivet_3_1_8.hpp @@ -0,0 +1,51 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Frontend header generated by BOSS for GAMBIT backend Rivet 3.1.8. +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author The GAMBIT Collaboration +/// +/// ********************************************* + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Backends/backend_types/Rivet_3_1_8/identification.hpp" + +LOAD_LIBRARY + +namespace Gambit +{ + namespace Backends + { + namespace Rivet_3_1_8 + { + namespace Rivet + { + typedef ::Rivet_3_1_8::Rivet::AnalysisHandler AnalysisHandler; + } + } + } +} + +// Functions +BE_FUNCTION(addAnalysisLibPath, void, (const std::string&), ("addAnalysisLibPath__BOSS_3","_addAnalysisLibPath__BOSS_3"), "addAnalysisLibPath") +// Variables + +// Initialisation function (dependencies) + +// Convenience functions (registration) + + +// Convenience functions (definitions) + +// End +#include "gambit/Backends/backend_undefs.hpp" + +#endif +#endif diff --git a/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh b/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh new file mode 100755 index 0000000000..59e52e4c57 --- /dev/null +++ b/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh @@ -0,0 +1,18 @@ +cd ../../../downloaded +tar -xvf *rivet* +echo "diff -rupN Rivet-3.1.8/Makefile.in ../installed/rivet/3.1.8/Makefile.in" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/Makefile.in ../installed/rivet/3.1.8/Makefile.in >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/include/Rivet/Makefile.in" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/include/Rivet/Makefile.in >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/src/Core/Makefile.in ../installed/rivet/3.1.8/src/Core/Makefile.in" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/src/Core/Makefile.in ../installed/rivet/3.1.8/src/Core/Makefile.in >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.8.dif +mv patch_rivet_3.1.8.dif ../patches/rivet/3.1.8/ +cd ../patches/rivet/3.1.8 diff --git a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif new file mode 100644 index 0000000000..2dc96a9522 --- /dev/null +++ b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif @@ -0,0 +1,404 @@ +diff -rupN Rivet-3.1.8/Makefile.in ../installed/rivet/3.1.8/Makefile.in +--- Rivet-3.1.8/Makefile.in 2023-04-27 13:14:13.000000000 +0100 ++++ ../installed/rivet/3.1.8/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +@@ -457,6 +457,21 @@ pkgconfigdir = $(libdir)/pkgconfig + dist_pkgconfig_DATA = rivet.pc + DEST = login.hepforge.org:rivet/downloads/ + all: all-recursive ++# Added by GAMBIT ++libRivet.so: ++ cd ${top_builddir}/src/Core/yamlcpp && ${MAKE} $(AM_MAKEFLAGS) librivet-yaml-cpp.la ++ cd ${top_builddir}/src/Core && ${MAKE} $(AM_MAKEFLAGS) libRivetCore.la ++ cd ${top_builddir}/src/Projections && ${MAKE} $(AM_MAKEFLAGS) libRivetProjections.la ++ cd ${top_builddir}/src/Tools && ${MAKE} $(AM_MAKEFLAGS) libRivetTools.la ++ cd ${top_builddir}/src/AnalysisTools && ${MAKE} $(AM_MAKEFLAGS) libRivetAnalysisTools.la ++ cd ${top_builddir}/src && ${MAKE} $(AM_MAKEFLAGS) libRivet.la ++ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) install ++ cd ${top_builddir}/pyext && ${MAKE} $(AM_MAKEFLAGS) install ++ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) RivetATLASAnalyses.so RivetCMSAnalyses.so RivetLHCbAnalyses.so ++ mkdir -p ${libdir} ++ if test -e ${top_builddir}/src/.libs/libRivet.so ; then cp ${top_builddir}/src/.libs/libRivet.so ${libdir}/libRivet.so ; fi ++ if test -e ${top_builddir}/src/.libs/libRivet.dylib ; then cp ${top_builddir}/src/.libs/libRivet.dylib ${libdir}/libRivet.so ; fi ++ + + .SUFFIXES: + am--refresh: Makefile +@@ -529,6 +544,7 @@ mostlyclean-libtool: + + clean-libtool: + -rm -rf .libs _libs ++ -rm -rf ${libdir} + + distclean-libtool: + -rm -f libtool config.lt +diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/include/Rivet/Makefile.in +--- Rivet-3.1.8/include/Rivet/Makefile.in 2023-04-27 13:14:13.000000000 +0100 ++++ ../installed/rivet/3.1.8/include/Rivet/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +@@ -381,6 +381,7 @@ nobase_dist_noinst_HEADERS = Tools/osdir + Math/eigen3/README.md + + # TODO: Move to Rivet/AnalysisTools header dir? ++# Modified by GAMBIT + nobase_pkginclude_HEADERS = Rivet.hh Run.hh Event.hh ParticleBase.hh \ + Particle.fhh Particle.hh Jet.fhh Jet.hh Projection.fhh \ + Projection.hh ProjectionApplier.hh ProjectionHandler.hh \ +@@ -763,7 +764,21 @@ nobase_pkginclude_HEADERS = Rivet.hh Run + Math/eigen3/src/SparseCore/SparseDiagonalProduct.h \ + Math/eigen3/src/SparseCore/SparseMatrixBase.h \ + Math/eigen3/src/SparseCore/SparseRef.h Math/eigen3/Geometry \ +- Math/eigen3/SparseCore ++ Math/eigen3/SparseCore \ ++ ../gambit/Backends/backend_undefs.hpp \ ++ ../gambit/Backends/wrapperbase.hpp \ ++ ../gambit/Backends/abstracttypedefs.hh \ ++ ../gambit/Backends/BOSS_wrapperutils.hh \ ++ ../gambit/Backends/wrappertypedefs.hh \ ++ ../gambit/Backends/function_return_utils.hpp \ ++ ../gambit/Utils/cats.hpp \ ++ ../backend_types/Rivet_3_1_7/identification.hpp \ ++ ../backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh \ ++ ../backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh \ ++ ../backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh \ ++ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh + all: all-am + + .SUFFIXES: +diff -rupN Rivet-3.1.8/src/Core/Makefile.in ../installed/rivet/3.1.8/src/Core/Makefile.in +--- Rivet-3.1.8/src/Core/Makefile.in 2023-04-27 13:14:13.000000000 +0100 ++++ ../installed/rivet/3.1.8/src/Core/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +@@ -118,7 +118,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor + libRivetCore_la-AnalysisLoader.lo \ + libRivetCore_la-AnalysisInfo.lo \ + libRivetCore_la-AnalysisHandler.lo \ +- libRivetCore_la-ProjectionHandler.lo ++ libRivetCore_la-ProjectionHandler.lo \ ++ libRivetCore_la-BOSS_wrapperutils.lo \ ++ libRivetCore_la-BOSS_AnalysisHandler.lo \ ++ libRivetCore_la-BOSS_factory_AnalysisHandler.lo \ ++ libRivetCore_la-BOSS_func_addAnalysisLibPath.lo \ ++ libRivetCore_la-BOSS_function_return_utils.lo + libRivetCore_la_OBJECTS = $(am_libRivetCore_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -143,6 +148,11 @@ am__depfiles_remade = ./$(DEPDIR)/libRiv + ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo \ + ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo \ + ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo \ ++ ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo \ + ./$(DEPDIR)/libRivetCore_la-Event.Plo \ + ./$(DEPDIR)/libRivetCore_la-Jet.Plo \ + ./$(DEPDIR)/libRivetCore_la-Particle.Plo \ +@@ -446,7 +456,12 @@ libRivetCore_la_SOURCES = \ + Run.cc Event.cc Jet.cc Particle.cc \ + ProjectionApplier.cc Projection.cc \ + Analysis.cc AnalysisLoader.cc AnalysisInfo.cc \ +- AnalysisHandler.cc ProjectionHandler.cc ++ AnalysisHandler.cc ProjectionHandler.cc \ ++ BOSS_wrapperutils.cc \ ++ BOSS_AnalysisHandler.cc \ ++ BOSS_factory_AnalysisHandler.cc \ ++ BOSS_func_addAnalysisLibPath.cc \ ++ BOSS_function_return_utils.cc + + libRivetCore_la_CPPFLAGS = -I$(srcdir)/yamlcpp -DYAML_NAMESPACE=RIVET_YAML $(AM_CPPFLAGS) + libRivetCore_la_LIBADD = $(builddir)/yamlcpp/librivet-yaml-cpp.la +@@ -508,6 +523,11 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Event.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Jet.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Particle.Plo@am__quote@ # am--include-marker +@@ -620,6 +640,41 @@ libRivetCore_la-ProjectionHandler.lo: Pr + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-ProjectionHandler.lo `test -f 'ProjectionHandler.cc' || echo '$(srcdir)/'`ProjectionHandler.cc + ++libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc ++ ++libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc ++ ++libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc ++ ++libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc ++ + mostlyclean-libtool: + -rm -f *.lo + +@@ -828,6 +883,11 @@ distclean: distclean-recursive + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo +@@ -884,6 +944,11 @@ maintainer-clean: maintainer-clean-recur + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo ++ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo +diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh +--- Rivet-3.1.8/include/Rivet/AnalysisHandler.hh 2023-02-10 22:47:38.000000000 +0000 ++++ ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh 2023-05-08 00:07:10.756879163 +0100 +@@ -1,3 +1,6 @@ ++#ifndef __boss__AnalysisHandler_Rivet_3_1_8_hh__ ++#define __boss__AnalysisHandler_Rivet_3_1_8_hh__ ++ + // -*- C++ -*- + #ifndef RIVET_RivetHandler_HH + #define RIVET_RivetHandler_HH +@@ -20,17 +23,23 @@ namespace Rivet { + /// A class which handles a number of analysis objects to be applied to + /// generated events. An {@link Analysis}' AnalysisHandler is also responsible + /// for handling the final writing-out of histograms. +- class AnalysisHandler { ++ } ++ #define ENUMS_DECLARED ++ #include "backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh" ++ #include "gambit/Backends/abstracttypedefs.hh" ++ #include "gambit/Backends/wrappertypedefs.hh" ++ namespace Rivet { ++ class AnalysisHandler : public virtual Abstract_AnalysisHandler { + public: + + /// Preferred constructor, with optional run name. + AnalysisHandler(const string& runname=""); + + /// The copy constructor is deleted, so it can never be called. +- AnalysisHandler(const AnalysisHandler&) = delete; ++ //AnalysisHandler(const AnalysisHandler&) = delete; // Commented by GAMBIT + + /// The assignment operator is deleted, so it can never be called. +- AnalysisHandler& operator=(const AnalysisHandler&) = delete; ++ //AnalysisHandler& operator=(const AnalysisHandler&) = delete; // Commented by GAMBIT + + /// The destructor is not virtual, as this class should not be inherited from. + ~AnalysisHandler(); +@@ -281,6 +290,9 @@ namespace Rivet { + /// Write all analyses' plots (via getData) to the named file. + void writeData(const string& filename) const; + ++ // Added by GAMBIT, Dummy function to force BOSS to add the headers for the YODA::AnalysisObject type ++ void dummy(YODA::AnalysisObject*) const; ++ + /// @brief Configure the AnalysisObject dump rate and destination. + /// + /// Tell Rivet to dump intermediate result to a file named @a +@@ -470,9 +482,66 @@ namespace Rivet { + + /// @} + +- }; ++ ++ public: ++ Abstract_AnalysisHandler* pointer_copy__BOSS(); ++ ++ using Abstract_AnalysisHandler::pointer_assign__BOSS; ++ void pointer_assign__BOSS(Abstract_AnalysisHandler* in); ++ ++ ++ public: ++ void skipMultiWeights__BOSS(); ++ ++ void selectMultiWeights__BOSS(); ++ ++ void deselectMultiWeights__BOSS(); ++ ++ void setNominalWeightName__BOSS(); ++ ++ void setCrossSection__BOSS(const std::vector>&); ++ ++ void setCrossSection__BOSS(const std::pair&); ++ ++ void setCrossSection__BOSS(double, double); ++ ++ void checkBeams__BOSS(); ++ ++ void setIgnoreBeams__BOSS(); ++ ++ Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&); ++ ++ Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map); ++ ++ Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&); ++ ++ Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&); ++ ++ Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&); ++ ++ void readData__BOSS(std::istream&, const std::string&); ++ ++ void readData__BOSS(const std::string&); ++ ++ std::vector> getYodaAOs__BOSS() const; ++ ++ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&); ++ ++ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&); ++ ++ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&); ++ ++ void mergeYodas__BOSS(const std::vector&, const std::vector&); ++ ++ void mergeYodas__BOSS(const std::vector&); ++ ++ void merge__BOSS(Rivet::Abstract_AnalysisHandler&); ++ ++}; + + + } + + #endif ++ ++#endif /* __boss__AnalysisHandler_Rivet_3_1_8_hh__ */ +diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh +--- Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh 2023-02-08 22:26:17.000000000 +0000 ++++ ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh 2023-05-08 00:03:51.115107634 +0100 +@@ -8,7 +8,7 @@ + #include + + +-#ifdef RIVET_ENABLE_HEPMC_3 ++//#ifdef RIVET_ENABLE_HEPMC_3 // Commented by GAMBIT + + #include "HepMC3/HepMC3.h" + #include "HepMC3/Relatives.h" +@@ -34,7 +34,8 @@ namespace Rivet { + using PdfInfo = RivetHepMC::GenPdfInfo; + } + +-#else // HEPMC_2 ++// Commented by GAMBIT ++/*#else // HEPMC_2 + + #include "HepMC/GenEvent.h" + #include "HepMC/GenParticle.h" +@@ -75,7 +76,7 @@ namespace Rivet { + using PdfInfo = RivetHepMC::PdfInfo; + } + +-#endif ++#endif*/ + + + namespace Rivet { +diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in +--- Rivet-3.1.8/analyses/Makefile.in 2023-04-27 13:14:13.000000000 +0100 ++++ ../installed/rivet/3.1.8/analyses/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +@@ -329,10 +329,10 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = -Wno-portability +-PLUGIN_DIRS = $(shell ls -d $(srcdir)/plugin*) ++PLUGIN_DIRS = $(shell ls -d $(srcdir)/pluginCMS $(srcdir)/pluginATLAS $(srcdir)/pluginLHCb) + PLUGIN_NAMES = $(notdir $(subst plugin,,$(PLUGIN_DIRS))) + PLUGIN_LIBS = $(patsubst %,Rivet%Analyses.so,$(PLUGIN_NAMES)) +-PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/plugin*/*.*) ++PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/pluginCMS/*.* $(abs_srcdir)/pluginATLAS/*.* $(abs_srcdir)/pluginLHCb/*.*) + CLEANFILES = $(PLUGIN_LIBS) + EXTRA_DIST = $(PLUGIN_DIRS) examples + all: all-am +@@ -449,8 +449,8 @@ distclean-generic: + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +-@ENABLE_ANALYSES_FALSE@install-data-local: + @ENABLE_ANALYSES_FALSE@install-exec-local: ++@ENABLE_ANALYSES_FALSE@install-data-local: + @ENABLE_ANALYSES_FALSE@uninstall-local: + clean: clean-am + +@@ -567,7 +567,7 @@ RivetTristanAnalyses.so: $(filter-out $( + + @ENABLE_ANALYSES_TRUE@all-local: $(PLUGIN_LIBS) $(PLUGIN_DATAFILES) + @ENABLE_ANALYSES_TRUE@ mkdir -p $(builddir)/data +-@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/plugin*; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done ++@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/pluginCMS $(abs_srcdir)/pluginATLAS $(abs_srcdir)/pluginLHCb; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done + + @ENABLE_ANALYSES_TRUE@install-exec-local: $(PLUGIN_LIBS) + @ENABLE_ANALYSES_TRUE@ $(MKDIR_P) $(DESTDIR)$(libdir)/Rivet +@@ -576,7 +576,7 @@ RivetTristanAnalyses.so: $(filter-out $( + @ENABLE_ANALYSES_TRUE@install-data-local: $(PLUGIN_DATAFILES) + @ENABLE_ANALYSES_TRUE@ @echo "Installing analysis data files..." + @ENABLE_ANALYSES_TRUE@ $(mkdir_p) $(DESTDIR)$(pkgdatadir) +-@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/plugin* $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done ++@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/pluginCMS $(srcdir)/pluginLHCb $(srcdir)/pluginATLAS $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done + + @ENABLE_ANALYSES_TRUE@uninstall-local: + @ENABLE_ANALYSES_TRUE@ cd $(DESTDIR)$(libdir) && rm -f $(PLUGIN_LIBS) +diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.c +--- Rivet-3.1.8/src/Core/AnalysisHandler.cc 2023-03-14 09:14:42.000000000 +0000 ++++ ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc 2023-05-08 00:03:51.115107634 +0100 +@@ -123,7 +123,8 @@ namespace Rivet { + if (num_anas_requested > 0 && analysisNames().empty()) { + MSG_ERROR("All analyses were incompatible with the first event's beams\n" + << "Exiting, since this probably wasn't intentional!"); +- exit(1); ++ //exit(1); // Commented by GAMBIT ++ throw std::runtime_error("All analyses were incompatible with the first event's beams\n"); // Added by GAMBIT + } + + // Warn if any analysis' status is not unblemished +@@ -1097,6 +1098,12 @@ namespace Rivet { + + } + ++ // Added by GAMBIT, dummy function to force BOSS to add the headers for the YODA::AnalysisObject type ++ void AnalysisHandler::dummy(YODA::AnalysisObject* object) const { ++ ++ // Nothing to do here ++ ++ } + + string AnalysisHandler::runName() const { + return _runname; diff --git a/Backends/patches/rivet/3.1.8/touch_files.sh b/Backends/patches/rivet/3.1.8/touch_files.sh new file mode 100755 index 0000000000..845fed1c18 --- /dev/null +++ b/Backends/patches/rivet/3.1.8/touch_files.sh @@ -0,0 +1,3 @@ +for dir in $Rivet_dirs; do for file in "$dir"/*lo; do [ -e "$file" ] && touch $file; done; done +for dir in $Rivet_dirs; do for file in "$dir"/*la; do [ -e "$file" ] && touch $file; done; done +echo "Reseting library modification times" diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_8.py b/Backends/scripts/BOSS/configs/rivet_3_1_8.py new file mode 100644 index 0000000000..36d30fc5fc --- /dev/null +++ b/Backends/scripts/BOSS/configs/rivet_3_1_8.py @@ -0,0 +1,131 @@ +################################### +# # +# Configuration module for BOSS # +# # +################################### + + +# ~~~~~ CASTXML options ~~~~~ + +# See CastXML documentation for details on these options: +# +# https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst +# + +# +# *** Special note for OS X *** +# +# BOSS will most likely fail if 'g++' points to the Clang compiler. +# Install GNU g++ and point the castxml_cc variable below the GNU +# g++ executable. +# + +castxml_cc_id = 'gnu' # Reference compiler: 'gnu', 'gnu-c', 'msvc', 'msvc-c' +castxml_cc = 'g++' # Name a specific compiler: 'g++', 'cl', ... +castxml_cc_opt = '-std=c++17' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') + + +# ~~~~~ GAMBIT-specific options ~~~~~ + +gambit_backend_name = 'Rivet' +gambit_backend_version = '3.1.8' +gambit_backend_reference = 'Bierlich:2019rhm' +gambit_base_namespace = '' + + +# ~~~~~ Information about the external code ~~~~~ + +# Use either absolute paths or paths relative to the main BOSS directory. + +input_files = [ + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/AnalysisHandler.hh', + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/Tools/RivetPaths.hh' +] +include_paths = [ + '../../../Backends/installed/rivet/'+gambit_backend_version+'/include', + '../../../contrib/HepMC3-3.2.5/local/include', + '../../../contrib/YODA-1.9.7/local/include', + '../../../Backends/installed/fastjet/3.4.0/local/include' +] +base_paths = ['../../../Backends/installed/rivet/'+gambit_backend_version] + +header_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/include' +src_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/src/Core' + +load_classes = [ + 'Rivet::AnalysisHandler' +] + +load_functions = [ + 'Rivet::addAnalysisLibPath(const std::string&)' +] + +ditch = [ + 'Rivet::AnalysisHandler::stripOptions', + 'Rivet::AnalysisHandler::getPreload' +] + + +auto_detect_stdlib_paths = False + + +load_parent_classes = False +wrap_inherited_members = False + + +header_extension = '.hh' +source_extension = '.cc' + +indent = 2 + + +# ~~~~~ Information about other known types ~~~~~ + +# Dictionary key: type name +# Dictionary value: header file with containing type declaration. +# +# Example: +# known_classes = {"SomeNamespace::KnownClassOne" : "path_to_header/KnownClassOne.hpp", +# "AnotherNamespace::KnownClassTwo" : "path_to_header/KnownClassTwo.hpp" } + +known_classes = { + "HepMC3::GenEvent" : "HepMC3/GenEvent.h", + "YODA::AnalysisObject" : "YODA/AnalysisObject.h" +} + + +# ~~~~~ Declarations to be added to the frontend header file ~~~~~ + +convenience_functions = [] + +ini_function_in_header = False + + +# ~~~~~ Pragma directives for the inclusion of BOSSed classes in GAMBIT ~~~~~ + +# The listed pragma directives will be added before/after including the +# the BOSS-generated headers in GAMBIT. + +pragmas_begin = [ + '#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp"', # Contains pragmas to suppress warnings from YODA and HepMC +] + +pragmas_end = [ + '#include "gambit/Utils/end_ignore_warnings.hpp"', # Restores the warning settings +] + + +# ~~~~~ Extra code to surround BOSS-generated code included in GAMBIT ~~~~~ + +# The listed code will be added at the top/bottom in the frontend header file +# and in the loaded_types.hpp header. + +surround_code_begin = ''' +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC +''' + +surround_code_end = ''' +#endif +#endif +''' diff --git a/Backends/src/frontends/Rivet_3_1_8.cpp b/Backends/src/frontends/Rivet_3_1_8.cpp new file mode 100644 index 0000000000..8d2fb64a52 --- /dev/null +++ b/Backends/src/frontends/Rivet_3_1_8.cpp @@ -0,0 +1,53 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Frontend source for the rivet backend. +/// +/// Actual implementation of rivet ini function. +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author Tomek Procter +/// (t.procter.1@research.gla.ac.uk) +/// \date 2021 July +/// \date 2023 April, May +/// ********************************************* + +#include "gambit/Backends/frontend_macros.hpp" + +#ifndef EXCLUDE_YODA +#ifndef EXCLUDE_HEPMC + +#include "gambit/Backends/frontends/Rivet_3_1_8.hpp" +#include "gambit/Utils/util_functions.hpp" + + +BE_INI_FUNCTION +{ + // Scan-level initialisation + static bool scan_level = true; + if (scan_level) + { + std::string rivet_analyses_dir = std::string(GAMBIT_DIR)+ + "/Backends/installed/rivet/3.1.8/analyses"; + + //Check if the rivet_analyses_dir if it actually exists: if it + //doesn't then installation probably hasn't installed properly. + if (Utils::file_exists(rivet_analyses_dir)) + { + addAnalysisLibPath(rivet_analyses_dir); + } + else + { + backend_error().raise(LOCAL_INFO, "Rivet analysis directory does not exist."); + } + } + scan_level = false; +} +END_BE_INI_FUNCTION + +#endif +#endif diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 4ab2e537d7..79f61c19de 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2051,10 +2051,10 @@ endif() # Rivet set(name "rivet") -set(ver "3.1.7") +set(ver "3.1.8") set(Rivet_ver "${ver}") set(dl "https://rivet.hepforge.org/downloads/?f=Rivet-${ver}.tar.gz") -set(md5 "328b371eb644fe616b1e2b03b2cf99d3") +set(md5 "e60c75562572905ed9984c67ada1241b") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(yoda_name "yoda") set(yoda_dir "${YODA_PATH}/local") @@ -2087,8 +2087,8 @@ endif() set(patch_dir "${PROJECT_SOURCE_DIR}/Backends/patches/${name}/${ver}") set(patch "${patch_dir}/patch_${name}_${ver}.dif") -## Rivet needs to be compiled with c++14 or c++17, otherwise it will fail to compile -set(ditch_if_absent "HepMC;YODA;c++14") +## Rivet needs to be compiled with c++17, otherwise it will fail to compile +set(ditch_if_absent "HepMC;YODA;c++17") ## If cython is not installed disable the python extension gambit_find_python_module(cython) if(PY_cython_FOUND) From c806258246e57c67ab6cf54c640e7d58e375b5b9 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 09:32:09 +0200 Subject: [PATCH 15/49] Fix 3.1.8 rivet patch --- .../patches/rivet/3.1.8/patch_rivet_3.1.8.dif | 129 +++--------------- Backends/scripts/BOSS/configs/rivet_3_1_8.py | 2 +- 2 files changed, 21 insertions(+), 110 deletions(-) diff --git a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif index 2dc96a9522..4acfceacf0 100644 --- a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif +++ b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif @@ -1,6 +1,6 @@ diff -rupN Rivet-3.1.8/Makefile.in ../installed/rivet/3.1.8/Makefile.in ---- Rivet-3.1.8/Makefile.in 2023-04-27 13:14:13.000000000 +0100 -+++ ../installed/rivet/3.1.8/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +--- Rivet-3.1.8/Makefile.in 2022-09-28 14:32:46.000000000 +0100 ++++ ../installed/rivet/3.1.8/Makefile.in 2023-04-14 14:55:04.096679845 +0100 @@ -457,6 +457,21 @@ pkgconfigdir = $(libdir)/pkgconfig dist_pkgconfig_DATA = rivet.pc DEST = login.hepforge.org:rivet/downloads/ @@ -32,8 +32,8 @@ diff -rupN Rivet-3.1.8/Makefile.in ../installed/rivet/3.1.8/Makefile.in distclean-libtool: -rm -f libtool config.lt diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/include/Rivet/Makefile.in ---- Rivet-3.1.8/include/Rivet/Makefile.in 2023-04-27 13:14:13.000000000 +0100 -+++ ../installed/rivet/3.1.8/include/Rivet/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +--- Rivet-3.1.8/include/Rivet/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.8/include/Rivet/Makefile.in 2023-04-14 15:30:58.413175143 +0100 @@ -381,6 +381,7 @@ nobase_dist_noinst_HEADERS = Tools/osdir Math/eigen3/README.md @@ -42,7 +42,7 @@ diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/includ nobase_pkginclude_HEADERS = Rivet.hh Run.hh Event.hh ParticleBase.hh \ Particle.fhh Particle.hh Jet.fhh Jet.hh Projection.fhh \ Projection.hh ProjectionApplier.hh ProjectionHandler.hh \ -@@ -763,7 +764,21 @@ nobase_pkginclude_HEADERS = Rivet.hh Run +@@ -763,7 +764,21 @@ nobase_pkginclude_HEADERS = Rivet.hh RunF5 Math/eigen3/src/SparseCore/SparseDiagonalProduct.h \ Math/eigen3/src/SparseCore/SparseMatrixBase.h \ Math/eigen3/src/SparseCore/SparseRef.h Math/eigen3/Geometry \ @@ -66,8 +66,8 @@ diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/includ .SUFFIXES: diff -rupN Rivet-3.1.8/src/Core/Makefile.in ../installed/rivet/3.1.8/src/Core/Makefile.in ---- Rivet-3.1.8/src/Core/Makefile.in 2023-04-27 13:14:13.000000000 +0100 -+++ ../installed/rivet/3.1.8/src/Core/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +--- Rivet-3.1.8/src/Core/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.8/src/Core/Makefile.in 2023-04-18 15:47:59.480540099 +0100 @@ -118,7 +118,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor libRivetCore_la-AnalysisLoader.lo \ libRivetCore_la-AnalysisInfo.lo \ @@ -185,32 +185,11 @@ diff -rupN Rivet-3.1.8/src/Core/Makefile.in ../installed/rivet/3.1.8/src/Core/Ma + -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo + -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh ---- Rivet-3.1.8/include/Rivet/AnalysisHandler.hh 2023-02-10 22:47:38.000000000 +0000 -+++ ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh 2023-05-08 00:07:10.756879163 +0100 -@@ -1,3 +1,6 @@ -+#ifndef __boss__AnalysisHandler_Rivet_3_1_8_hh__ -+#define __boss__AnalysisHandler_Rivet_3_1_8_hh__ -+ - // -*- C++ -*- - #ifndef RIVET_RivetHandler_HH - #define RIVET_RivetHandler_HH -@@ -20,17 +23,23 @@ namespace Rivet { - /// A class which handles a number of analysis objects to be applied to - /// generated events. An {@link Analysis}' AnalysisHandler is also responsible - /// for handling the final writing-out of histograms. -- class AnalysisHandler { -+ } -+ #define ENUMS_DECLARED -+ #include "backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh" -+ #include "gambit/Backends/abstracttypedefs.hh" -+ #include "gambit/Backends/wrappertypedefs.hh" -+ namespace Rivet { -+ class AnalysisHandler : public virtual Abstract_AnalysisHandler { - public: - - /// Preferred constructor, with optional run name. +--- Rivet-3.1.8/include/Rivet/AnalysisHandler.hh 2022-05-05 15:06:25.000000000 +0100 ++++ ../installed/rivet/3.1.8/include/Rivet/AnalysisHandler.hh 2023-04-14 14:55:04.096679845 +0100 +@@ -27,10 +27,10 @@ namespace Rivet { AnalysisHandler(const string& runname=""); /// The copy constructor is deleted, so it can never be called. @@ -223,7 +202,7 @@ diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8 /// The destructor is not virtual, as this class should not be inherited from. ~AnalysisHandler(); -@@ -281,6 +290,9 @@ namespace Rivet { +@@ -281,6 +281,9 @@ namespace Rivet { /// Write all analyses' plots (via getData) to the named file. void writeData(const string& filename) const; @@ -233,77 +212,9 @@ diff -rupN Rivet-3.1.8/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.8 /// @brief Configure the AnalysisObject dump rate and destination. /// /// Tell Rivet to dump intermediate result to a file named @a -@@ -470,9 +482,66 @@ namespace Rivet { - - /// @} - -- }; -+ -+ public: -+ Abstract_AnalysisHandler* pointer_copy__BOSS(); -+ -+ using Abstract_AnalysisHandler::pointer_assign__BOSS; -+ void pointer_assign__BOSS(Abstract_AnalysisHandler* in); -+ -+ -+ public: -+ void skipMultiWeights__BOSS(); -+ -+ void selectMultiWeights__BOSS(); -+ -+ void deselectMultiWeights__BOSS(); -+ -+ void setNominalWeightName__BOSS(); -+ -+ void setCrossSection__BOSS(const std::vector>&); -+ -+ void setCrossSection__BOSS(const std::pair&); -+ -+ void setCrossSection__BOSS(double, double); -+ -+ void checkBeams__BOSS(); -+ -+ void setIgnoreBeams__BOSS(); -+ -+ Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&); -+ -+ Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map); -+ -+ Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&); -+ -+ Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&); -+ -+ Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&); -+ -+ void readData__BOSS(std::istream&, const std::string&); -+ -+ void readData__BOSS(const std::string&); -+ -+ std::vector> getYodaAOs__BOSS() const; -+ -+ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&); -+ -+ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&); -+ -+ void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&); -+ -+ void mergeYodas__BOSS(const std::vector&, const std::vector&); -+ -+ void mergeYodas__BOSS(const std::vector&); -+ -+ void merge__BOSS(Rivet::Abstract_AnalysisHandler&); -+ -+}; - - - } - - #endif -+ -+#endif /* __boss__AnalysisHandler_Rivet_3_1_8_hh__ */ diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh ---- Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh 2023-02-08 22:26:17.000000000 +0000 -+++ ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh 2023-05-08 00:03:51.115107634 +0100 +--- Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh 2022-05-05 12:26:28.000000000 +0100 ++++ ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh 2023-04-14 14:55:04.096679845 +0100 @@ -8,7 +8,7 @@ #include @@ -333,8 +244,8 @@ diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1. namespace Rivet { diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in ---- Rivet-3.1.8/analyses/Makefile.in 2023-04-27 13:14:13.000000000 +0100 -+++ ../installed/rivet/3.1.8/analyses/Makefile.in 2023-05-08 00:03:51.115107634 +0100 +--- Rivet-3.1.8/analyses/Makefile.in 2022-09-28 14:33:10.000000000 +0100 ++++ ../installed/rivet/3.1.8/analyses/Makefile.in 2023-04-19 21:07:06.580845603 +0100 @@ -329,10 +329,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -376,9 +287,9 @@ diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Ma @ENABLE_ANALYSES_TRUE@uninstall-local: @ENABLE_ANALYSES_TRUE@ cd $(DESTDIR)$(libdir) && rm -f $(PLUGIN_LIBS) -diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.c ---- Rivet-3.1.8/src/Core/AnalysisHandler.cc 2023-03-14 09:14:42.000000000 +0000 -+++ ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc 2023-05-08 00:03:51.115107634 +0100 +diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc +--- Rivet-3.1.8/src/Core/AnalysisHandler.cc 2022-07-26 09:34:20.000000000 +0100 ++++ ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc 2023-04-14 14:55:04.100679799 +0100 @@ -123,7 +123,8 @@ namespace Rivet { if (num_anas_requested > 0 && analysisNames().empty()) { MSG_ERROR("All analyses were incompatible with the first event's beams\n" @@ -389,7 +300,7 @@ diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/ } // Warn if any analysis' status is not unblemished -@@ -1097,6 +1098,12 @@ namespace Rivet { +@@ -1087,6 +1088,12 @@ namespace Rivet { } diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_8.py b/Backends/scripts/BOSS/configs/rivet_3_1_8.py index 36d30fc5fc..dd3164a3c9 100644 --- a/Backends/scripts/BOSS/configs/rivet_3_1_8.py +++ b/Backends/scripts/BOSS/configs/rivet_3_1_8.py @@ -22,7 +22,7 @@ castxml_cc_id = 'gnu' # Reference compiler: 'gnu', 'gnu-c', 'msvc', 'msvc-c' castxml_cc = 'g++' # Name a specific compiler: 'g++', 'cl', ... -castxml_cc_opt = '-std=c++17' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') +castxml_cc_opt = '-std=c++14' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') # ~~~~~ GAMBIT-specific options ~~~~~ From 04295b924c9b3c8b62045b79c6d8a7f3a379bb90 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 10:18:56 +0200 Subject: [PATCH 16/49] Clean out stuff from old rivet versions --- .../Rivet_3_1_5/abstract_AnalysisHandler.hh | 193 --------- .../forward_decls_abstract_classes.hh | 24 -- .../forward_decls_wrapper_classes.hh | 22 - .../Rivet_3_1_5/identification.hpp | 12 - .../Rivet_3_1_5/loaded_types.hpp | 27 -- .../Rivet_3_1_5/wrapper_AnalysisHandler.hh | 9 - .../wrapper_AnalysisHandler_decl.hh | 177 -------- .../wrapper_AnalysisHandler_def.hh | 371 ---------------- .../Rivet_3_1_7/abstract_AnalysisHandler.hh | 206 --------- .../forward_decls_abstract_classes.hh | 24 -- .../forward_decls_wrapper_classes.hh | 22 - .../Rivet_3_1_7/identification.hpp | 12 - .../Rivet_3_1_7/loaded_types.hpp | 27 -- .../Rivet_3_1_7/wrapper_AnalysisHandler.hh | 9 - .../wrapper_AnalysisHandler_decl.hh | 190 --------- .../wrapper_AnalysisHandler_def.hh | 402 ------------------ .../gambit/Backends/frontends/Rivet_3_1_5.hpp | 51 --- .../gambit/Backends/frontends/Rivet_3_1_7.hpp | 51 --- Backends/src/frontends/Rivet_3_1_5.cpp | 52 --- Backends/src/frontends/Rivet_3_1_7.cpp | 53 --- 20 files changed, 1934 deletions(-) delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/abstract_AnalysisHandler.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_abstract_classes.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_wrapper_classes.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/identification.hpp delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/loaded_types.hpp delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_decl.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_def.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh delete mode 100644 Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh delete mode 100644 Backends/include/gambit/Backends/frontends/Rivet_3_1_5.hpp delete mode 100644 Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp delete mode 100644 Backends/src/frontends/Rivet_3_1_5.cpp delete mode 100644 Backends/src/frontends/Rivet_3_1_7.cpp diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/abstract_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/abstract_AnalysisHandler.hh deleted file mode 100644 index adaf69705b..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/abstract_AnalysisHandler.hh +++ /dev/null @@ -1,193 +0,0 @@ -#ifndef __abstract_AnalysisHandler_Rivet_3_1_5_hh__ -#define __abstract_AnalysisHandler_Rivet_3_1_5_hh__ - -#include -#include -#include -#include -#include -#include -#include -#include "gambit/Backends/abstractbase.hpp" -#include "forward_decls_abstract_classes.hh" -#include "forward_decls_wrapper_classes.hh" -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class Abstract_AnalysisHandler : public virtual AbstractBase - { - public: - - virtual ::std::string runName() const =0; - - virtual long unsigned int numEvents() const =0; - - virtual double sumW() const =0; - - virtual double sumW2() const =0; - - virtual const ::std::vector& weightNames() const =0; - - virtual long unsigned int numWeights() const =0; - - virtual bool haveNamedWeights() const =0; - - virtual void setWeightNames(const HepMC3::GenEvent&) =0; - - virtual long unsigned int defaultWeightIndex() const =0; - - virtual void setWeightCap(const double) =0; - - virtual void setNLOSmearing(double) =0; - - virtual void skipMultiWeights(bool) =0; - - virtual void skipMultiWeights__BOSS() =0; - - virtual void selectMultiWeights(std::string) =0; - - virtual void selectMultiWeights__BOSS() =0; - - virtual void deselectMultiWeights(std::string) =0; - - virtual void deselectMultiWeights__BOSS() =0; - - virtual void setNominalWeightName(std::string) =0; - - virtual void setNominalWeightName__BOSS() =0; - - virtual void setCrossSection(const std::pair&, bool) =0; - - virtual void setCrossSection__BOSS(const std::pair&) =0; - - virtual void setCrossSection(double, double, bool) =0; - - virtual void setCrossSection__BOSS(double, double) =0; - - virtual double nominalCrossSection() const =0; - - virtual ::std::pair beamIds() const =0; - - virtual double sqrtS() const =0; - - virtual void checkBeams(bool) =0; - - virtual void checkBeams__BOSS() =0; - - virtual void setIgnoreBeams(bool) =0; - - virtual void setIgnoreBeams__BOSS() =0; - - virtual ::std::vector analysisNames() const =0; - - virtual ::std::vector stdAnalysisNames() const =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&) =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map) =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&) =0; - - virtual Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&) =0; - - virtual Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&) =0; - - virtual void init(const HepMC3::GenEvent&) =0; - - virtual void analyze(const HepMC3::GenEvent&) =0; - - virtual void analyze(const HepMC3::GenEvent*) =0; - - virtual void finalize() =0; - - virtual void readData(const std::string&) =0; - - virtual ::std::vector> getYodaAOs(bool) const =0; - - virtual ::std::vector> getYodaAOs__BOSS() const =0; - - virtual void writeData(std::ostream&, const std::string&) const =0; - - virtual void writeData(const std::string&) const =0; - - virtual void dummy(YODA::AnalysisObject*) const =0; - - virtual void setAODump(const std::string&, int) =0; - - virtual void setNoAODump() =0; - - virtual void dump(const std::string&, int) =0; - - virtual void mergeYodas(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&, bool) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&) =0; - - public: - virtual void pointer_assign__BOSS(Abstract_AnalysisHandler*) =0; - virtual Abstract_AnalysisHandler* pointer_copy__BOSS() =0; - - private: - AnalysisHandler* wptr; - bool delete_wrapper; - public: - AnalysisHandler* get_wptr() { return wptr; } - void set_wptr(AnalysisHandler* wptr_in) { wptr = wptr_in; } - bool get_delete_wrapper() { return delete_wrapper; } - void set_delete_wrapper(bool del_wrp_in) { delete_wrapper = del_wrp_in; } - - public: - Abstract_AnalysisHandler() - { - wptr = 0; - delete_wrapper = false; - } - - Abstract_AnalysisHandler(const Abstract_AnalysisHandler&) - { - wptr = 0; - delete_wrapper = false; - } - - Abstract_AnalysisHandler& operator=(const Abstract_AnalysisHandler&) { return *this; } - - virtual void init_wrapper() =0; - - AnalysisHandler* get_init_wptr() - { - init_wrapper(); - return wptr; - } - - AnalysisHandler& get_init_wref() - { - init_wrapper(); - return *wptr; - } - - virtual ~Abstract_AnalysisHandler() =0; - }; - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - - -#endif /* __abstract_AnalysisHandler_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_abstract_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_abstract_classes.hh deleted file mode 100644 index fb4cf08d2c..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_abstract_classes.hh +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __forward_decls_abstract_classes_Rivet_3_1_5_hh__ -#define __forward_decls_abstract_classes_Rivet_3_1_5_hh__ - - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class Abstract_AnalysisHandler; - } - - - - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __forward_decls_abstract_classes_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_wrapper_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_wrapper_classes.hh deleted file mode 100644 index d36596258a..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/forward_decls_wrapper_classes.hh +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __forward_decls_wrapper_classes_Rivet_3_1_5_hh__ -#define __forward_decls_wrapper_classes_Rivet_3_1_5_hh__ - - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class AnalysisHandler; - } - - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __forward_decls_wrapper_classes_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/identification.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/identification.hpp deleted file mode 100644 index aa1d8d3137..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/identification.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// Identify backend and set macro flags - -#include "gambit/Utils/cats.hpp" - -#define BACKENDNAME Rivet -#define BACKENDLANG CXX -#define VERSION 3.1.5 -#define SAFE_VERSION 3_1_5 -#define REFERENCE Bierlich:2019rhm - -#undef DO_CLASSLOADING -#define DO_CLASSLOADING 1 diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/loaded_types.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/loaded_types.hpp deleted file mode 100644 index 16d6990376..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/loaded_types.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __loaded_types_Rivet_3_1_5_hpp__ -#define __loaded_types_Rivet_3_1_5_hpp__ 1 - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp" -#include "wrapper_AnalysisHandler.hh" -#include "identification.hpp" -#include "gambit/Utils/end_ignore_warnings.hpp" - -// Indicate which types are provided by this backend, and what the symbols of their factories are. -#define Rivet_3_1_5_all_data \ - (( /*class*/(Rivet)(AnalysisHandler), /*constructors*/(("Factory_AnalysisHandler_0__BOSS_1",(const std::string&))) (("Factory_AnalysisHandler_1__BOSS_2",())) )) \ - -// If the default version has been loaded, set it as default. -#if ALREADY_LOADED(CAT_3(BACKENDNAME,_,CAT(Default_,BACKENDNAME))) - SET_DEFAULT_VERSION_FOR_LOADING_TYPES(BACKENDNAME,SAFE_VERSION,CAT(Default_,BACKENDNAME)) -#endif - -// Undefine macros to avoid conflict with other backends. -#include "gambit/Backends/backend_undefs.hpp" - -#endif -#endif - -#endif /* __loaded_types_Rivet_3_1_5_hpp__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler.hh deleted file mode 100644 index 3fc0afa295..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler.hh +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_Rivet_3_1_5_hh__ -#define __wrapper_AnalysisHandler_Rivet_3_1_5_hh__ - - -#include "wrapper_AnalysisHandler_decl.hh" -#include "wrapper_AnalysisHandler_def.hh" - - -#endif /* __wrapper_AnalysisHandler_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_decl.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_decl.hh deleted file mode 100644 index fe0ab26cdc..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_decl.hh +++ /dev/null @@ -1,177 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_decl_Rivet_3_1_5_hh__ -#define __wrapper_AnalysisHandler_decl_Rivet_3_1_5_hh__ - -#include -#include -#include -#include -#include -#include -#include "forward_decls_wrapper_classes.hh" -#include "gambit/Backends/wrapperbase.hpp" -#include "abstract_AnalysisHandler.hh" -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - namespace Rivet - { - - class AnalysisHandler : public WrapperBase - { - // Member variables: - public: - // -- Static factory pointers: - static Abstract_AnalysisHandler* (*__factory0)(const std::string&); - static Abstract_AnalysisHandler* (*__factory1)(); - - // -- Other member variables: - - // Member functions: - public: - ::std::string runName() const; - - long unsigned int numEvents() const; - - double sumW() const; - - double sumW2() const; - - const ::std::vector& weightNames() const; - - long unsigned int numWeights() const; - - bool haveNamedWeights() const; - - void setWeightNames(const HepMC3::GenEvent& ge); - - long unsigned int defaultWeightIndex() const; - - void setWeightCap(const double maxWeight); - - void setNLOSmearing(double frac); - - void skipMultiWeights(bool ignore); - - void skipMultiWeights(); - - void selectMultiWeights(std::string patterns); - - void selectMultiWeights(); - - void deselectMultiWeights(std::string patterns); - - void deselectMultiWeights(); - - void setNominalWeightName(std::string name); - - void setNominalWeightName(); - - void setCrossSection(const std::pair& xsec, bool isUserSupplied); - - void setCrossSection(const std::pair& xsec); - - void setCrossSection(double xsec, double xsecerr, bool isUserSupplied); - - void setCrossSection(double xsec, double xsecerr); - - double nominalCrossSection() const; - - ::std::pair beamIds() const; - - double sqrtS() const; - - void checkBeams(bool check); - - void checkBeams(); - - void setIgnoreBeams(bool ignore); - - void setIgnoreBeams(); - - ::std::vector analysisNames() const; - - ::std::vector stdAnalysisNames() const; - - Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname); - - Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname, std::map pars); - - Rivet::AnalysisHandler& addAnalyses(const std::vector& analysisnames); - - Rivet::AnalysisHandler& removeAnalysis(const std::string& analysisname); - - Rivet::AnalysisHandler& removeAnalyses(const std::vector& analysisnames); - - void init(const HepMC3::GenEvent& event); - - void analyze(const HepMC3::GenEvent& event); - - void analyze(const HepMC3::GenEvent* event); - - void finalize(); - - void readData(const std::string& filename); - - ::std::vector> getYodaAOs(bool includeraw) const; - - ::std::vector> getYodaAOs() const; - - void writeData(std::ostream& ostr, const std::string& fmt) const; - - void writeData(const std::string& filename) const; - - void dummy(YODA::AnalysisObject* arg_1) const; - - void setAODump(const std::string& dumpfile, int period); - - void setNoAODump(); - - void dump(const std::string& dumpfile, int period); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts); - - void mergeYodas(const std::vector& aofiles); - - - // Wrappers for original constructors: - public: - AnalysisHandler(const std::string& runname); - AnalysisHandler(); - - // Special pointer-based constructor: - AnalysisHandler(Abstract_AnalysisHandler* in); - - // Copy constructor: - AnalysisHandler(const AnalysisHandler& in); - - // Assignment operator: - AnalysisHandler& operator=(const AnalysisHandler& in); - - // Destructor: - ~AnalysisHandler(); - - // Returns correctly casted pointer to Abstract class: - Abstract_AnalysisHandler* get_BEptr() const; - - }; - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __wrapper_AnalysisHandler_decl_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_def.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_def.hh deleted file mode 100644 index 0c969cd868..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_5/wrapper_AnalysisHandler_def.hh +++ /dev/null @@ -1,371 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_def_Rivet_3_1_5_hh__ -#define __wrapper_AnalysisHandler_def_Rivet_3_1_5_hh__ - -#include -#include -#include -#include -#include -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - namespace Rivet - { - - // Member functions: - inline ::std::string AnalysisHandler::runName() const - { - return get_BEptr()->runName(); - } - - inline long unsigned int AnalysisHandler::numEvents() const - { - return get_BEptr()->numEvents(); - } - - inline double AnalysisHandler::sumW() const - { - return get_BEptr()->sumW(); - } - - inline double AnalysisHandler::sumW2() const - { - return get_BEptr()->sumW2(); - } - - inline const ::std::vector& AnalysisHandler::weightNames() const - { - return get_BEptr()->weightNames(); - } - - inline long unsigned int AnalysisHandler::numWeights() const - { - return get_BEptr()->numWeights(); - } - - inline bool AnalysisHandler::haveNamedWeights() const - { - return get_BEptr()->haveNamedWeights(); - } - - inline void AnalysisHandler::setWeightNames(const HepMC3::GenEvent& ge) - { - get_BEptr()->setWeightNames(ge); - } - - inline long unsigned int AnalysisHandler::defaultWeightIndex() const - { - return get_BEptr()->defaultWeightIndex(); - } - - inline void AnalysisHandler::setWeightCap(const double maxWeight) - { - get_BEptr()->setWeightCap(maxWeight); - } - - inline void AnalysisHandler::setNLOSmearing(double frac) - { - get_BEptr()->setNLOSmearing(frac); - } - - inline void AnalysisHandler::skipMultiWeights(bool ignore) - { - get_BEptr()->skipMultiWeights(ignore); - } - - inline void AnalysisHandler::skipMultiWeights() - { - get_BEptr()->skipMultiWeights__BOSS(); - } - - inline void AnalysisHandler::selectMultiWeights(std::string patterns) - { - get_BEptr()->selectMultiWeights(patterns); - } - - inline void AnalysisHandler::selectMultiWeights() - { - get_BEptr()->selectMultiWeights__BOSS(); - } - - inline void AnalysisHandler::deselectMultiWeights(std::string patterns) - { - get_BEptr()->deselectMultiWeights(patterns); - } - - inline void AnalysisHandler::deselectMultiWeights() - { - get_BEptr()->deselectMultiWeights__BOSS(); - } - - inline void AnalysisHandler::setNominalWeightName(std::string name) - { - get_BEptr()->setNominalWeightName(name); - } - - inline void AnalysisHandler::setNominalWeightName() - { - get_BEptr()->setNominalWeightName__BOSS(); - } - - inline void AnalysisHandler::setCrossSection(const std::pair& xsec, bool isUserSupplied) - { - get_BEptr()->setCrossSection(xsec, isUserSupplied); - } - - inline void AnalysisHandler::setCrossSection(const std::pair& xsec) - { - get_BEptr()->setCrossSection__BOSS(xsec); - } - - inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr, bool isUserSupplied) - { - get_BEptr()->setCrossSection(xsec, xsecerr, isUserSupplied); - } - - inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr) - { - get_BEptr()->setCrossSection__BOSS(xsec, xsecerr); - } - - inline double AnalysisHandler::nominalCrossSection() const - { - return get_BEptr()->nominalCrossSection(); - } - - inline ::std::pair AnalysisHandler::beamIds() const - { - return get_BEptr()->beamIds(); - } - - inline double AnalysisHandler::sqrtS() const - { - return get_BEptr()->sqrtS(); - } - - inline void AnalysisHandler::checkBeams(bool check) - { - get_BEptr()->checkBeams(check); - } - - inline void AnalysisHandler::checkBeams() - { - get_BEptr()->checkBeams__BOSS(); - } - - inline void AnalysisHandler::setIgnoreBeams(bool ignore) - { - get_BEptr()->setIgnoreBeams(ignore); - } - - inline void AnalysisHandler::setIgnoreBeams() - { - get_BEptr()->setIgnoreBeams__BOSS(); - } - - inline ::std::vector AnalysisHandler::analysisNames() const - { - return get_BEptr()->analysisNames(); - } - - inline ::std::vector AnalysisHandler::stdAnalysisNames() const - { - return get_BEptr()->stdAnalysisNames(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname) - { - return get_BEptr()->addAnalysis__BOSS(analysisname).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname, std::map pars) - { - return get_BEptr()->addAnalysis__BOSS(analysisname, pars).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalyses(const std::vector& analysisnames) - { - return get_BEptr()->addAnalyses__BOSS(analysisnames).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalysis(const std::string& analysisname) - { - return get_BEptr()->removeAnalysis__BOSS(analysisname).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalyses(const std::vector& analysisnames) - { - return get_BEptr()->removeAnalyses__BOSS(analysisnames).get_init_wref(); - } - - inline void AnalysisHandler::init(const HepMC3::GenEvent& event) - { - get_BEptr()->init(event); - } - - inline void AnalysisHandler::analyze(const HepMC3::GenEvent& event) - { - get_BEptr()->analyze(event); - } - - inline void AnalysisHandler::analyze(const HepMC3::GenEvent* event) - { - get_BEptr()->analyze(event); - } - - inline void AnalysisHandler::finalize() - { - get_BEptr()->finalize(); - } - - inline void AnalysisHandler::readData(const std::string& filename) - { - get_BEptr()->readData(filename); - } - - inline ::std::vector> AnalysisHandler::getYodaAOs(bool includeraw) const - { - return get_BEptr()->getYodaAOs(includeraw); - } - - inline ::std::vector> AnalysisHandler::getYodaAOs() const - { - return get_BEptr()->getYodaAOs__BOSS(); - } - - inline void AnalysisHandler::writeData(std::ostream& ostr, const std::string& fmt) const - { - get_BEptr()->writeData(ostr, fmt); - } - - inline void AnalysisHandler::writeData(const std::string& filename) const - { - get_BEptr()->writeData(filename); - } - - inline void AnalysisHandler::dummy(YODA::AnalysisObject* arg_1) const - { - get_BEptr()->dummy(arg_1); - } - - inline void AnalysisHandler::setAODump(const std::string& dumpfile, int period) - { - get_BEptr()->setAODump(dumpfile, period); - } - - inline void AnalysisHandler::setNoAODump() - { - get_BEptr()->setNoAODump(); - } - - inline void AnalysisHandler::dump(const std::string& dumpfile, int period) - { - get_BEptr()->dump(dumpfile, period); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv) - { - get_BEptr()->mergeYodas(aofiles, delopts, addopts, matches, unmatches, equiv); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches, unmatches); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles) - { - get_BEptr()->mergeYodas__BOSS(aofiles); - } - - - // Wrappers for original constructors: - inline AnalysisHandler::AnalysisHandler(const std::string& runname) : - WrapperBase(__factory0(runname)) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - inline AnalysisHandler::AnalysisHandler() : - WrapperBase(__factory1()) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Special pointer-based constructor: - inline AnalysisHandler::AnalysisHandler(Abstract_AnalysisHandler* in) : - WrapperBase(in) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Copy constructor: - inline AnalysisHandler::AnalysisHandler(const AnalysisHandler& in) : - WrapperBase(in.get_BEptr()->pointer_copy__BOSS()) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Assignment operator: - inline AnalysisHandler& AnalysisHandler::operator=(const AnalysisHandler& in) - { - if (this != &in) - { - get_BEptr()->pointer_assign__BOSS(in.get_BEptr()); - } - return *this; - } - - - // Destructor: - inline AnalysisHandler::~AnalysisHandler() - { - if (get_BEptr() != 0) - { - get_BEptr()->set_delete_wrapper(false); - if (can_delete_BEptr()) - { - delete BEptr; - BEptr = 0; - } - } - set_delete_BEptr(false); - } - - // Returns correctly casted pointer to Abstract class: - inline Abstract_AnalysisHandler* Rivet::AnalysisHandler::get_BEptr() const - { - return dynamic_cast(BEptr); - } - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __wrapper_AnalysisHandler_def_Rivet_3_1_5_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh deleted file mode 100644 index 43e9acff91..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh +++ /dev/null @@ -1,206 +0,0 @@ -#ifndef __abstract_AnalysisHandler_Rivet_3_1_7_hh__ -#define __abstract_AnalysisHandler_Rivet_3_1_7_hh__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "gambit/Backends/abstractbase.hpp" -#include "forward_decls_abstract_classes.hh" -#include "forward_decls_wrapper_classes.hh" -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class Abstract_AnalysisHandler : public virtual AbstractBase - { - public: - - virtual ::std::string runName() const =0; - - virtual long unsigned int numEvents() const =0; - - virtual double sumW() const =0; - - virtual double sumW2() const =0; - - virtual const ::std::vector& weightNames() const =0; - - virtual long unsigned int numWeights() const =0; - - virtual bool haveNamedWeights() const =0; - - virtual void setWeightNames(const HepMC3::GenEvent&) =0; - - virtual long unsigned int defaultWeightIndex() const =0; - - virtual void setWeightCap(const double) =0; - - virtual void setNLOSmearing(double) =0; - - virtual void skipMultiWeights(bool) =0; - - virtual void skipMultiWeights__BOSS() =0; - - virtual void selectMultiWeights(std::string) =0; - - virtual void selectMultiWeights__BOSS() =0; - - virtual void deselectMultiWeights(std::string) =0; - - virtual void deselectMultiWeights__BOSS() =0; - - virtual void setNominalWeightName(std::string) =0; - - virtual void setNominalWeightName__BOSS() =0; - - virtual void setCrossSection(const std::vector>&, bool) =0; - - virtual void setCrossSection__BOSS(const std::vector>&) =0; - - virtual void setCrossSection(const std::pair&, bool) =0; - - virtual void setCrossSection__BOSS(const std::pair&) =0; - - virtual void setCrossSection(double, double, bool) =0; - - virtual void setCrossSection__BOSS(double, double) =0; - - virtual double nominalCrossSection() const =0; - - virtual ::std::pair beamIds() const =0; - - virtual double sqrtS() const =0; - - virtual void checkBeams(bool) =0; - - virtual void checkBeams__BOSS() =0; - - virtual void setIgnoreBeams(bool) =0; - - virtual void setIgnoreBeams__BOSS() =0; - - virtual ::std::vector analysisNames() const =0; - - virtual ::std::vector stdAnalysisNames() const =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&) =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalysis__BOSS(const std::string&, std::map) =0; - - virtual Rivet::Abstract_AnalysisHandler& addAnalyses__BOSS(const std::vector&) =0; - - virtual Rivet::Abstract_AnalysisHandler& removeAnalysis__BOSS(const std::string&) =0; - - virtual Rivet::Abstract_AnalysisHandler& removeAnalyses__BOSS(const std::vector&) =0; - - virtual void init(const HepMC3::GenEvent&) =0; - - virtual void analyze(const HepMC3::GenEvent&) =0; - - virtual void analyze(const HepMC3::GenEvent*) =0; - - virtual void finalize() =0; - - virtual void readData(std::istream&, const std::string&, bool) =0; - - virtual void readData__BOSS(std::istream&, const std::string&) =0; - - virtual void readData(const std::string&, bool) =0; - - virtual void readData__BOSS(const std::string&) =0; - - virtual ::std::vector> getYodaAOs(bool) const =0; - - virtual ::std::vector> getYodaAOs__BOSS() const =0; - - virtual void writeData(std::ostream&, const std::string&) const =0; - - virtual void writeData(const std::string&) const =0; - - virtual void dummy(YODA::AnalysisObject*) const =0; - - virtual void setAODump(const std::string&, int) =0; - - virtual void setNoAODump() =0; - - virtual void dump(const std::string&, int) =0; - - virtual void mergeYodas(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&, bool) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&, const std::vector&) =0; - - virtual void mergeYodas__BOSS(const std::vector&) =0; - - virtual void merge__BOSS(Rivet::Abstract_AnalysisHandler&) =0; - - public: - virtual void pointer_assign__BOSS(Abstract_AnalysisHandler*) =0; - virtual Abstract_AnalysisHandler* pointer_copy__BOSS() =0; - - private: - AnalysisHandler* wptr; - bool delete_wrapper; - public: - AnalysisHandler* get_wptr() { return wptr; } - void set_wptr(AnalysisHandler* wptr_in) { wptr = wptr_in; } - bool get_delete_wrapper() { return delete_wrapper; } - void set_delete_wrapper(bool del_wrp_in) { delete_wrapper = del_wrp_in; } - - public: - Abstract_AnalysisHandler() - { - wptr = 0; - delete_wrapper = false; - } - - Abstract_AnalysisHandler(const Abstract_AnalysisHandler&) - { - wptr = 0; - delete_wrapper = false; - } - - Abstract_AnalysisHandler& operator=(const Abstract_AnalysisHandler&) { return *this; } - - virtual void init_wrapper() =0; - - AnalysisHandler* get_init_wptr() - { - init_wrapper(); - return wptr; - } - - AnalysisHandler& get_init_wref() - { - init_wrapper(); - return *wptr; - } - - virtual ~Abstract_AnalysisHandler() =0; - }; - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - - -#endif /* __abstract_AnalysisHandler_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh deleted file mode 100644 index 87bd534116..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __forward_decls_abstract_classes_Rivet_3_1_7_hh__ -#define __forward_decls_abstract_classes_Rivet_3_1_7_hh__ - - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class Abstract_AnalysisHandler; - } - - - - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __forward_decls_abstract_classes_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh deleted file mode 100644 index 08c71dc4ec..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ -#define __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ - - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - - namespace Rivet - { - class AnalysisHandler; - } - - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __forward_decls_wrapper_classes_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp deleted file mode 100644 index 8d0bac9b4e..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// Identify backend and set macro flags - -#include "gambit/Utils/cats.hpp" - -#define BACKENDNAME Rivet -#define BACKENDLANG CXX -#define VERSION 3.1.7 -#define SAFE_VERSION 3_1_7 -#define REFERENCE Bierlich:2019rhm - -#undef DO_CLASSLOADING -#define DO_CLASSLOADING 1 diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp deleted file mode 100644 index 3cbb8e7e6c..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/loaded_types.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __loaded_types_Rivet_3_1_7_hpp__ -#define __loaded_types_Rivet_3_1_7_hpp__ 1 - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp" -#include "wrapper_AnalysisHandler.hh" -#include "identification.hpp" -#include "gambit/Utils/end_ignore_warnings.hpp" - -// Indicate which types are provided by this backend, and what the symbols of their factories are. -#define Rivet_3_1_7_all_data \ - (( /*class*/(Rivet)(AnalysisHandler), /*constructors*/(("Factory_AnalysisHandler_0__BOSS_1",(const std::string&))) (("Factory_AnalysisHandler_1__BOSS_2",())) )) \ - -// If the default version has been loaded, set it as default. -#if ALREADY_LOADED(CAT_3(BACKENDNAME,_,CAT(Default_,BACKENDNAME))) - SET_DEFAULT_VERSION_FOR_LOADING_TYPES(BACKENDNAME,SAFE_VERSION,CAT(Default_,BACKENDNAME)) -#endif - -// Undefine macros to avoid conflict with other backends. -#include "gambit/Backends/backend_undefs.hpp" - -#endif -#endif - -#endif /* __loaded_types_Rivet_3_1_7_hpp__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh deleted file mode 100644 index e20c957446..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ -#define __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ - - -#include "wrapper_AnalysisHandler_decl.hh" -#include "wrapper_AnalysisHandler_def.hh" - - -#endif /* __wrapper_AnalysisHandler_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh deleted file mode 100644 index a35f3bfb16..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh +++ /dev/null @@ -1,190 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ -#define __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ - -#include -#include -#include -#include -#include -#include -#include -#include "forward_decls_wrapper_classes.hh" -#include "gambit/Backends/wrapperbase.hpp" -#include "abstract_AnalysisHandler.hh" -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - namespace Rivet - { - - class AnalysisHandler : public WrapperBase - { - // Member variables: - public: - // -- Static factory pointers: - static Abstract_AnalysisHandler* (*__factory0)(const std::string&); - static Abstract_AnalysisHandler* (*__factory1)(); - - // -- Other member variables: - - // Member functions: - public: - ::std::string runName() const; - - long unsigned int numEvents() const; - - double sumW() const; - - double sumW2() const; - - const ::std::vector& weightNames() const; - - long unsigned int numWeights() const; - - bool haveNamedWeights() const; - - void setWeightNames(const HepMC3::GenEvent& ge); - - long unsigned int defaultWeightIndex() const; - - void setWeightCap(const double maxWeight); - - void setNLOSmearing(double frac); - - void skipMultiWeights(bool ignore); - - void skipMultiWeights(); - - void selectMultiWeights(std::string patterns); - - void selectMultiWeights(); - - void deselectMultiWeights(std::string patterns); - - void deselectMultiWeights(); - - void setNominalWeightName(std::string name); - - void setNominalWeightName(); - - void setCrossSection(const std::vector>& xsecs, bool isUserSupplied); - - void setCrossSection(const std::vector>& xsecs); - - void setCrossSection(const std::pair& xsec, bool isUserSupplied); - - void setCrossSection(const std::pair& xsec); - - void setCrossSection(double xsec, double xsecerr, bool isUserSupplied); - - void setCrossSection(double xsec, double xsecerr); - - double nominalCrossSection() const; - - ::std::pair beamIds() const; - - double sqrtS() const; - - void checkBeams(bool check); - - void checkBeams(); - - void setIgnoreBeams(bool ignore); - - void setIgnoreBeams(); - - ::std::vector analysisNames() const; - - ::std::vector stdAnalysisNames() const; - - Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname); - - Rivet::AnalysisHandler& addAnalysis(const std::string& analysisname, std::map pars); - - Rivet::AnalysisHandler& addAnalyses(const std::vector& analysisnames); - - Rivet::AnalysisHandler& removeAnalysis(const std::string& analysisname); - - Rivet::AnalysisHandler& removeAnalyses(const std::vector& analysisnames); - - void init(const HepMC3::GenEvent& event); - - void analyze(const HepMC3::GenEvent& event); - - void analyze(const HepMC3::GenEvent* event); - - void finalize(); - - void readData(std::istream& istr, const std::string& fmt, bool preload); - - void readData(std::istream& istr, const std::string& fmt); - - void readData(const std::string& filename, bool preload); - - void readData(const std::string& filename); - - ::std::vector> getYodaAOs(bool includeraw) const; - - ::std::vector> getYodaAOs() const; - - void writeData(std::ostream& ostr, const std::string& fmt) const; - - void writeData(const std::string& filename) const; - - void dummy(YODA::AnalysisObject* arg_1) const; - - void setAODump(const std::string& dumpfile, int period); - - void setNoAODump(); - - void dump(const std::string& dumpfile, int period); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts); - - void mergeYodas(const std::vector& aofiles, const std::vector& delopts); - - void mergeYodas(const std::vector& aofiles); - - void merge(Rivet::AnalysisHandler& other); - - - // Wrappers for original constructors: - public: - AnalysisHandler(const std::string& runname); - AnalysisHandler(); - - // Special pointer-based constructor: - AnalysisHandler(Abstract_AnalysisHandler* in); - - // Copy constructor: - AnalysisHandler(const AnalysisHandler& in); - - // Assignment operator: - AnalysisHandler& operator=(const AnalysisHandler& in); - - // Destructor: - ~AnalysisHandler(); - - // Returns correctly casted pointer to Abstract class: - Abstract_AnalysisHandler* get_BEptr() const; - - }; - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __wrapper_AnalysisHandler_decl_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh b/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh deleted file mode 100644 index 93414b49bf..0000000000 --- a/Backends/include/gambit/Backends/backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh +++ /dev/null @@ -1,402 +0,0 @@ -#ifndef __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ -#define __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ - -#include -#include -#include -#include -#include -#include -#include "HepMC3/GenEvent.h" -#include "YODA/AnalysisObject.h" - -#include "identification.hpp" - -namespace CAT_3(BACKENDNAME,_,SAFE_VERSION) -{ - - namespace Rivet - { - - // Member functions: - inline ::std::string AnalysisHandler::runName() const - { - return get_BEptr()->runName(); - } - - inline long unsigned int AnalysisHandler::numEvents() const - { - return get_BEptr()->numEvents(); - } - - inline double AnalysisHandler::sumW() const - { - return get_BEptr()->sumW(); - } - - inline double AnalysisHandler::sumW2() const - { - return get_BEptr()->sumW2(); - } - - inline const ::std::vector& AnalysisHandler::weightNames() const - { - return get_BEptr()->weightNames(); - } - - inline long unsigned int AnalysisHandler::numWeights() const - { - return get_BEptr()->numWeights(); - } - - inline bool AnalysisHandler::haveNamedWeights() const - { - return get_BEptr()->haveNamedWeights(); - } - - inline void AnalysisHandler::setWeightNames(const HepMC3::GenEvent& ge) - { - get_BEptr()->setWeightNames(ge); - } - - inline long unsigned int AnalysisHandler::defaultWeightIndex() const - { - return get_BEptr()->defaultWeightIndex(); - } - - inline void AnalysisHandler::setWeightCap(const double maxWeight) - { - get_BEptr()->setWeightCap(maxWeight); - } - - inline void AnalysisHandler::setNLOSmearing(double frac) - { - get_BEptr()->setNLOSmearing(frac); - } - - inline void AnalysisHandler::skipMultiWeights(bool ignore) - { - get_BEptr()->skipMultiWeights(ignore); - } - - inline void AnalysisHandler::skipMultiWeights() - { - get_BEptr()->skipMultiWeights__BOSS(); - } - - inline void AnalysisHandler::selectMultiWeights(std::string patterns) - { - get_BEptr()->selectMultiWeights(patterns); - } - - inline void AnalysisHandler::selectMultiWeights() - { - get_BEptr()->selectMultiWeights__BOSS(); - } - - inline void AnalysisHandler::deselectMultiWeights(std::string patterns) - { - get_BEptr()->deselectMultiWeights(patterns); - } - - inline void AnalysisHandler::deselectMultiWeights() - { - get_BEptr()->deselectMultiWeights__BOSS(); - } - - inline void AnalysisHandler::setNominalWeightName(std::string name) - { - get_BEptr()->setNominalWeightName(name); - } - - inline void AnalysisHandler::setNominalWeightName() - { - get_BEptr()->setNominalWeightName__BOSS(); - } - - inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs, bool isUserSupplied) - { - get_BEptr()->setCrossSection(xsecs, isUserSupplied); - } - - inline void AnalysisHandler::setCrossSection(const std::vector>& xsecs) - { - get_BEptr()->setCrossSection__BOSS(xsecs); - } - - inline void AnalysisHandler::setCrossSection(const std::pair& xsec, bool isUserSupplied) - { - get_BEptr()->setCrossSection(xsec, isUserSupplied); - } - - inline void AnalysisHandler::setCrossSection(const std::pair& xsec) - { - get_BEptr()->setCrossSection__BOSS(xsec); - } - - inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr, bool isUserSupplied) - { - get_BEptr()->setCrossSection(xsec, xsecerr, isUserSupplied); - } - - inline void AnalysisHandler::setCrossSection(double xsec, double xsecerr) - { - get_BEptr()->setCrossSection__BOSS(xsec, xsecerr); - } - - inline double AnalysisHandler::nominalCrossSection() const - { - return get_BEptr()->nominalCrossSection(); - } - - inline ::std::pair AnalysisHandler::beamIds() const - { - return get_BEptr()->beamIds(); - } - - inline double AnalysisHandler::sqrtS() const - { - return get_BEptr()->sqrtS(); - } - - inline void AnalysisHandler::checkBeams(bool check) - { - get_BEptr()->checkBeams(check); - } - - inline void AnalysisHandler::checkBeams() - { - get_BEptr()->checkBeams__BOSS(); - } - - inline void AnalysisHandler::setIgnoreBeams(bool ignore) - { - get_BEptr()->setIgnoreBeams(ignore); - } - - inline void AnalysisHandler::setIgnoreBeams() - { - get_BEptr()->setIgnoreBeams__BOSS(); - } - - inline ::std::vector AnalysisHandler::analysisNames() const - { - return get_BEptr()->analysisNames(); - } - - inline ::std::vector AnalysisHandler::stdAnalysisNames() const - { - return get_BEptr()->stdAnalysisNames(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname) - { - return get_BEptr()->addAnalysis__BOSS(analysisname).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalysis(const std::string& analysisname, std::map pars) - { - return get_BEptr()->addAnalysis__BOSS(analysisname, pars).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::addAnalyses(const std::vector& analysisnames) - { - return get_BEptr()->addAnalyses__BOSS(analysisnames).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalysis(const std::string& analysisname) - { - return get_BEptr()->removeAnalysis__BOSS(analysisname).get_init_wref(); - } - - inline Rivet::AnalysisHandler& AnalysisHandler::removeAnalyses(const std::vector& analysisnames) - { - return get_BEptr()->removeAnalyses__BOSS(analysisnames).get_init_wref(); - } - - inline void AnalysisHandler::init(const HepMC3::GenEvent& event) - { - get_BEptr()->init(event); - } - - inline void AnalysisHandler::analyze(const HepMC3::GenEvent& event) - { - get_BEptr()->analyze(event); - } - - inline void AnalysisHandler::analyze(const HepMC3::GenEvent* event) - { - get_BEptr()->analyze(event); - } - - inline void AnalysisHandler::finalize() - { - get_BEptr()->finalize(); - } - - inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt, bool preload) - { - get_BEptr()->readData(istr, fmt, preload); - } - - inline void AnalysisHandler::readData(std::istream& istr, const std::string& fmt) - { - get_BEptr()->readData__BOSS(istr, fmt); - } - - inline void AnalysisHandler::readData(const std::string& filename, bool preload) - { - get_BEptr()->readData(filename, preload); - } - - inline void AnalysisHandler::readData(const std::string& filename) - { - get_BEptr()->readData__BOSS(filename); - } - - inline ::std::vector> AnalysisHandler::getYodaAOs(bool includeraw) const - { - return get_BEptr()->getYodaAOs(includeraw); - } - - inline ::std::vector> AnalysisHandler::getYodaAOs() const - { - return get_BEptr()->getYodaAOs__BOSS(); - } - - inline void AnalysisHandler::writeData(std::ostream& ostr, const std::string& fmt) const - { - get_BEptr()->writeData(ostr, fmt); - } - - inline void AnalysisHandler::writeData(const std::string& filename) const - { - get_BEptr()->writeData(filename); - } - - inline void AnalysisHandler::dummy(YODA::AnalysisObject* arg_1) const - { - get_BEptr()->dummy(arg_1); - } - - inline void AnalysisHandler::setAODump(const std::string& dumpfile, int period) - { - get_BEptr()->setAODump(dumpfile, period); - } - - inline void AnalysisHandler::setNoAODump() - { - get_BEptr()->setNoAODump(); - } - - inline void AnalysisHandler::dump(const std::string& dumpfile, int period) - { - get_BEptr()->dump(dumpfile, period); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches, bool equiv) - { - get_BEptr()->mergeYodas(aofiles, delopts, addopts, matches, unmatches, equiv); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches, const std::vector& unmatches) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches, unmatches); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts, const std::vector& matches) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts, matches); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts, const std::vector& addopts) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts, addopts); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles, const std::vector& delopts) - { - get_BEptr()->mergeYodas__BOSS(aofiles, delopts); - } - - inline void AnalysisHandler::mergeYodas(const std::vector& aofiles) - { - get_BEptr()->mergeYodas__BOSS(aofiles); - } - - inline void AnalysisHandler::merge(Rivet::AnalysisHandler& other) - { - get_BEptr()->merge__BOSS(*other.get_BEptr()); - } - - - // Wrappers for original constructors: - inline AnalysisHandler::AnalysisHandler(const std::string& runname) : - WrapperBase(__factory0(runname)) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - inline AnalysisHandler::AnalysisHandler() : - WrapperBase(__factory1()) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Special pointer-based constructor: - inline AnalysisHandler::AnalysisHandler(Abstract_AnalysisHandler* in) : - WrapperBase(in) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Copy constructor: - inline AnalysisHandler::AnalysisHandler(const AnalysisHandler& in) : - WrapperBase(in.get_BEptr()->pointer_copy__BOSS()) - { - get_BEptr()->set_wptr(this); - get_BEptr()->set_delete_wrapper(false); - } - - // Assignment operator: - inline AnalysisHandler& AnalysisHandler::operator=(const AnalysisHandler& in) - { - if (this != &in) - { - get_BEptr()->pointer_assign__BOSS(in.get_BEptr()); - } - return *this; - } - - - // Destructor: - inline AnalysisHandler::~AnalysisHandler() - { - if (get_BEptr() != 0) - { - get_BEptr()->set_delete_wrapper(false); - if (can_delete_BEptr()) - { - delete BEptr; - BEptr = 0; - } - } - set_delete_BEptr(false); - } - - // Returns correctly casted pointer to Abstract class: - inline Abstract_AnalysisHandler* Rivet::AnalysisHandler::get_BEptr() const - { - return dynamic_cast(BEptr); - } - } - -} - - -#include "gambit/Backends/backend_undefs.hpp" - -#endif /* __wrapper_AnalysisHandler_def_Rivet_3_1_7_hh__ */ diff --git a/Backends/include/gambit/Backends/frontends/Rivet_3_1_5.hpp b/Backends/include/gambit/Backends/frontends/Rivet_3_1_5.hpp deleted file mode 100644 index 864b8e56c5..0000000000 --- a/Backends/include/gambit/Backends/frontends/Rivet_3_1_5.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Frontend header generated by BOSS for GAMBIT backend Rivet 3.1.5. -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author The GAMBIT Collaboration -/// -/// ********************************************* - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Backends/backend_types/Rivet_3_1_5/identification.hpp" - -LOAD_LIBRARY - -namespace Gambit -{ - namespace Backends - { - namespace Rivet_3_1_5 - { - namespace Rivet - { - typedef ::Rivet_3_1_5::Rivet::AnalysisHandler AnalysisHandler; - } - } - } -} - -// Functions -BE_FUNCTION(addAnalysisLibPath, void, (const std::string&), ("addAnalysisLibPath__BOSS_3","_addAnalysisLibPath__BOSS_3"), "addAnalysisLibPath") -// Variables - -// Initialisation function (dependencies) - -// Convenience functions (registration) - - -// Convenience functions (definitions) - -// End -#include "gambit/Backends/backend_undefs.hpp" - -#endif -#endif diff --git a/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp b/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp deleted file mode 100644 index 3412d23c9a..0000000000 --- a/Backends/include/gambit/Backends/frontends/Rivet_3_1_7.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Frontend header generated by BOSS for GAMBIT backend Rivet 3.1.7. -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author The GAMBIT Collaboration -/// -/// ********************************************* - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Backends/backend_types/Rivet_3_1_7/identification.hpp" - -LOAD_LIBRARY - -namespace Gambit -{ - namespace Backends - { - namespace Rivet_3_1_7 - { - namespace Rivet - { - typedef ::Rivet_3_1_7::Rivet::AnalysisHandler AnalysisHandler; - } - } - } -} - -// Functions -BE_FUNCTION(addAnalysisLibPath, void, (const std::string&), ("addAnalysisLibPath__BOSS_3","_addAnalysisLibPath__BOSS_3"), "addAnalysisLibPath") -// Variables - -// Initialisation function (dependencies) - -// Convenience functions (registration) - - -// Convenience functions (definitions) - -// End -#include "gambit/Backends/backend_undefs.hpp" - -#endif -#endif diff --git a/Backends/src/frontends/Rivet_3_1_5.cpp b/Backends/src/frontends/Rivet_3_1_5.cpp deleted file mode 100644 index 6d40e1e5fc..0000000000 --- a/Backends/src/frontends/Rivet_3_1_5.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Frontend source for the rivet backend. -/// -/// Actual implementation of rivet ini function. -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author Tomek Procter -/// (t.procter.1@research.gla.ac.uk) -/// \date 2021 July -/// ********************************************* - -#include "gambit/Backends/frontend_macros.hpp" - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Backends/frontends/Rivet_3_1_5.hpp" -#include "gambit/Utils/util_functions.hpp" - - -BE_INI_FUNCTION -{ - // Scan-level initialisation - static bool scan_level = true; - if (scan_level) - { - std::string rivet_analyses_dir = std::string(GAMBIT_DIR)+ - "/Backends/installed/rivet/3.1.5/analyses"; - - //Check if the rivet_analyses_dir if it actually exists: if it - //doesn't then installation probably hasn't installed properly. - if (Utils::file_exists(rivet_analyses_dir)) - { - addAnalysisLibPath(rivet_analyses_dir); - } - else - { - backend_error().raise(LOCAL_INFO, "Rivet analysis directory does not exist."); - } - } - scan_level = false; -} -END_BE_INI_FUNCTION - -#endif -#endif diff --git a/Backends/src/frontends/Rivet_3_1_7.cpp b/Backends/src/frontends/Rivet_3_1_7.cpp deleted file mode 100644 index 24815c481f..0000000000 --- a/Backends/src/frontends/Rivet_3_1_7.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Frontend source for the rivet backend. -/// -/// Actual implementation of rivet ini function. -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author Tomek Procter -/// (t.procter.1@research.gla.ac.uk) -/// \date 2021 July -/// \date 2023 April -/// ********************************************* - -#include "gambit/Backends/frontend_macros.hpp" - -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC - -#include "gambit/Backends/frontends/Rivet_3_1_7.hpp" -#include "gambit/Utils/util_functions.hpp" - - -BE_INI_FUNCTION -{ - // Scan-level initialisation - static bool scan_level = true; - if (scan_level) - { - std::string rivet_analyses_dir = std::string(GAMBIT_DIR)+ - "/Backends/installed/rivet/3.1.7/analyses"; - - //Check if the rivet_analyses_dir if it actually exists: if it - //doesn't then installation probably hasn't installed properly. - if (Utils::file_exists(rivet_analyses_dir)) - { - addAnalysisLibPath(rivet_analyses_dir); - } - else - { - backend_error().raise(LOCAL_INFO, "Rivet analysis directory does not exist."); - } - } - scan_level = false; -} -END_BE_INI_FUNCTION - -#endif -#endif From 593856cbfe09f15ce7d927cdce9ddd4421cfca6f Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 11:03:56 +0200 Subject: [PATCH 17/49] update backend_locations to rivet 3.1.8 --- config/backend_locations.yaml.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/backend_locations.yaml.default b/config/backend_locations.yaml.default index 8887964de1..be0be908ff 100644 --- a/config/backend_locations.yaml.default +++ b/config/backend_locations.yaml.default @@ -127,7 +127,7 @@ pbarlike: 1.0: ./Backends/installed/pbarlike/1.0/pbarlike-gambit-interface.py Rivet: - 3.1.7: ./Backends/installed/rivet/3.1.7/local/lib/libRivet.so + 3.1.8: ./Backends/installed/rivet/3.1.8/local/lib/libRivet.so SUSY_HIT: 1.5: ./Backends/installed/susyhit/1.5/libsusyhit.so From c89c1f821b35d391a0e191f3be8d54239d4a0e94 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 12:19:21 +0200 Subject: [PATCH 18/49] Finally properly fix rivet 3.1.8 patch --- Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif index 4acfceacf0..1361fcfed1 100644 --- a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif +++ b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif @@ -55,13 +55,13 @@ diff -rupN Rivet-3.1.8/include/Rivet/Makefile.in ../installed/rivet/3.1.8/includ + ../gambit/Backends/wrappertypedefs.hh \ + ../gambit/Backends/function_return_utils.hpp \ + ../gambit/Utils/cats.hpp \ -+ ../backend_types/Rivet_3_1_7/identification.hpp \ -+ ../backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh \ -+ ../backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh \ -+ ../backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh ++ ../backend_types/Rivet_3_1_8/identification.hpp \ ++ ../backend_types/Rivet_3_1_8/forward_decls_abstract_classes.hh \ ++ ../backend_types/Rivet_3_1_8/forward_decls_wrapper_classes.hh \ ++ ../backend_types/Rivet_3_1_8/abstract_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_8/wrapper_AnalysisHandler.hh \ ++ ../backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_decl.hh \ ++ ../backend_types/Rivet_3_1_8/wrapper_AnalysisHandler_def.hh all: all-am .SUFFIXES: From bc8e0d029308620fcf3c07ac1754ccd74ff7abc1 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 12:33:55 +0200 Subject: [PATCH 19/49] Remove one last rivet 3.1.7 hangover --- Backends/include/gambit/Backends/default_bossed_versions.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backends/include/gambit/Backends/default_bossed_versions.hpp b/Backends/include/gambit/Backends/default_bossed_versions.hpp index d6db97377e..9b9604bc61 100644 --- a/Backends/include/gambit/Backends/default_bossed_versions.hpp +++ b/Backends/include/gambit/Backends/default_bossed_versions.hpp @@ -30,6 +30,6 @@ #define Default_Pythia 8_212 #define Default_HepLike 2_0 #define Default_vevacious 1_0 -#define Default_Rivet 3_1_7 +#define Default_Rivet 3_1_8 // Defaults added by GUM (do not remove this comment). From 5c5c42a75c40da8e7b8b006f181e33b853fd4332 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Thu, 11 May 2023 08:40:38 +0200 Subject: [PATCH 20/49] adjust backends.cmake for weird rivet 3.1.8 install behaviour --- cmake/backends.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 79f61c19de..72ef9b7bf8 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2088,12 +2088,14 @@ endif() set(patch_dir "${PROJECT_SOURCE_DIR}/Backends/patches/${name}/${ver}") set(patch "${patch_dir}/patch_${name}_${ver}.dif") ## Rivet needs to be compiled with c++17, otherwise it will fail to compile -set(ditch_if_absent "HepMC;YODA;c++17") +set(ditch_if_absent "HepMC;YODA;c++14") ## If cython is not installed disable the python extension gambit_find_python_module(cython) if(PY_cython_FOUND) set(pyext yes) + #Note weird extra pypath due to weird behaviour of 3.1.8 on some operating systems. set(Rivet_PY_PATH "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}/local/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages") + set(Rivet_alt_PY_PATH "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}/local/local/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages") set(Rivet_LIB "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}/local/lib/libRivet.so") message(" Backends depending on Rivet's python extension will be enabled.") else() @@ -2153,6 +2155,7 @@ if(NOT ditched_${name}_${ver}) COMMAND ${CMAKE_COMMAND} -E echo "import os" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${YODA_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${Rivet_PY_PATH}')" >> ${init_file} + COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${Rivet_alt_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${dir}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_ROOT\"]='${dir}'" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "from ctypes import *" >> ${init_file} From aab7c6e9f4ffcac64beeb0c863db4ef0fbb7d9c3 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Thu, 11 May 2023 13:16:50 +0200 Subject: [PATCH 21/49] patch rivet config to allow rpath of fjcontrib --- .../patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh | 5 ++++- Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh b/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh index 59e52e4c57..679f9a975d 100755 --- a/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh +++ b/Backends/patches/rivet/3.1.8/make_patch_rivet_3.1.8.sh @@ -12,7 +12,10 @@ echo "diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rive diff -rupN Rivet-3.1.8/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.8/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.8.dif echo "diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in" >> patch_rivet_3.1.8.dif diff -rupN Rivet-3.1.8/analyses/Makefile.in ../installed/rivet/3.1.8/analyses/Makefile.in >> patch_rivet_3.1.8.dif -echo "diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc" >> patch_rivet_3.1.8.dif diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.8.dif +echo "diff -rupN Rivet-3.1.8/configure ../installed/rivet/3.1.8/configure" >> patch_rivet_3.1.8.dif +diff -rupN Rivet-3.1.8/configure ../installed/rivet/3.1.8/configure >> patch_rivet_3.1.8.dif + mv patch_rivet_3.1.8.dif ../patches/rivet/3.1.8/ cd ../patches/rivet/3.1.8 diff --git a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif index 1361fcfed1..d822fdf485 100644 --- a/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif +++ b/Backends/patches/rivet/3.1.8/patch_rivet_3.1.8.dif @@ -313,3 +313,15 @@ diff -rupN Rivet-3.1.8/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.8/src/ string AnalysisHandler::runName() const { return _runname; +diff -rupN Rivet-3.1.8/configure ../installed/rivet/3.1.8/configure +--- Rivet-3.1.8/configure 2023-04-27 14:14:13.000000000 +0200 ++++ ../installed/rivet/3.1.8/configure 2023-05-11 12:18:52.365835672 +0200 +@@ -21243,7 +21243,7 @@ printf "%s\n" "$fjversion" >&6; } + if test "$fjmajor" -lt 3 -o "$fjminor" -lt 2 ; then #< only works for v3.x + as_fn_error $? "FastJet version 3.2.0 or later is required" "$LINENO" 5 + fi +- FASTJETLIBADD="$($FJCONFIG --libs --plugins --rpath=no)" ++ FASTJETLIBADD="$($FJCONFIG --libs --plugins)" + else + FASTJETLIBADD="-L$FASTJETLIBPATH -l$FASTJETLIBNAME -lfastjetplugins" + fi From 7280949eb275cc6cb62ba79acc7db9eb3a4401a0 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Fri, 5 May 2023 15:06:16 +0100 Subject: [PATCH 22/49] Update backends cmake to download & build contur 2.4.1 --- cmake/backends.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 72ef9b7bf8..75e5e65f7b 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2129,9 +2129,9 @@ endif() # Contur set(name "contur") -set(ver "2.1.1") +set(ver "2.4.1") set(dl "https://gitlab.com/hepcedar/${name}/-/archive/${name}-${ver}/${name}-${name}-${ver}.tar.gz") -set(md5 "ecb91229775b62e5d71c8089d78b2ff6") +set(md5 "c8d988c279b333794f4b66c9b19025de") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(contur_dir "${dir}/contur") set(init_file ${contur_dir}/init_by_GAMBIT.py) @@ -2168,7 +2168,7 @@ if(NOT ditched_${name}_${ver}) COMMAND ${CMAKE_COMMAND} -E echo "addAnalysisLibPath(\"${dir}/data/Rivet\")" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "addAnalysisDataPath(\"${dir}/data/Rivet\")" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "addAnalysisDataPath(\"${dir}/data/Theory\")" >> ${init_file} - BUILD_COMMAND ${MAKE_PARALLEL} "data/DB/analyses.db" + BUILD_COMMAND cd ${dir}/data/DB && ${MAKE_PARALLEL} "analyses.db" && cd - INSTALL_COMMAND "" ) endif() From 96782b2e8dd830a622273307046c59469bad4332 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sun, 7 May 2023 11:33:58 +0100 Subject: [PATCH 23/49] Update contur init_by_GAMBIT to set new required env variables --- cmake/backends.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 75e5e65f7b..05be03a5f3 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2137,7 +2137,7 @@ set(contur_dir "${dir}/contur") set(init_file ${contur_dir}/init_by_GAMBIT.py) set(Rivet_name "rivet") set(ditch_if_absent "Python;SQLITE3;YODA;HepMC;Rivet") -set(required_modules "cython;configobj;pandas;matplotlib;") +set(required_modules "cython;configobj;pandas;matplotlib;pathos") set(patch "${PROJECT_SOURCE_DIR}/Backends/patches/${name}/${ver}/patch_${name}_${ver}.dif") check_ditch_status(${name} ${ver} ${dir} ${ditch_if_absent}) if(NOT ditched_${name}_${ver}) @@ -2158,6 +2158,8 @@ if(NOT ditched_${name}_${ver}) COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${Rivet_alt_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${dir}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_ROOT\"]='${dir}'" >> ${init_file} + COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_DATA_PATH\"]='${dir}'" >> ${init_file} + COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_USER_DIR\"]='${dir}/../contur_users'" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "from ctypes import *" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "cdll.LoadLibrary(\"${Rivet_LIB}\")" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "from run import run_analysis" >> ${init_file} From 37430dbb5bfcaaa3382ce7b49b1e2940deae2df1 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 10 May 2023 10:11:26 +0200 Subject: [PATCH 24/49] Create all the files necessarry for contur 2.4.1 --- .../Backends/frontends/Contur_2_4_1.hpp | 43 ++++++ .../contur/2.4.1/patch_contur_2.4.1.dif | 27 ++++ Backends/src/frontends/Contur_2_4_1.cpp | 125 ++++++++++++++++++ cmake/backends.cmake | 2 +- config/backend_locations.yaml.default | 2 +- 5 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp create mode 100644 Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif create mode 100644 Backends/src/frontends/Contur_2_4_1.cpp diff --git a/Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp b/Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp new file mode 100644 index 0000000000..e2b7f1f9f6 --- /dev/null +++ b/Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp @@ -0,0 +1,43 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Fronted header for the Contur backend +/// +/// Compile-time registration of available +/// functions and variables from this backend. +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author Tomas Gonzalo +/// (tomas.gonzalo@monash.edu) +/// \date 2019 Oct, 2020 Mar +/// \date 2021 Mar +/// +/// \author Tomasz Procter +/// (t.procter.1@research.gla.ac.uk) +/// \date 2021 June +/// \date 2023 May +/// +/// ********************************************* + +#define BACKENDNAME Contur +#define BACKENDLANG Python3 +#define VERSION 2.4.1 +#define SAFE_VERSION 2_4_1 +#define REFERENCE Butterworth:2016sqg + +LOAD_LIBRARY + +#ifdef HAVE_PYBIND11 + + BE_CONV_FUNCTION(Contur_LogLike_from_stream, Contur_output, (std::shared_ptr, std::vector&), "Contur_Measurements") + BE_CONV_FUNCTION(Contur_LogLike_from_file, Contur_output, (str &, std::vector&), "Contur_Measurements") + BE_CONV_FUNCTION(Contur_get_analyses_from_beam, void, (std::vector&, std::string&), "Contur_GetAnalyses") + +#endif + +// Undefine macros to avoid conflict with other backends +#include "gambit/Backends/backend_undefs.hpp" diff --git a/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif b/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif new file mode 100644 index 0000000000..4dbae7d177 --- /dev/null +++ b/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif @@ -0,0 +1,27 @@ +diff -rupN contur-2.4.1_original/contur/util/utils.py contur-2.4.1_patched/contur/util/utils.py +--- contur-2.4.1_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 ++++ contur-2.4.1_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 +@@ -16,12 +16,17 @@ import logging + + import scipy.stats as spstat + +-## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option +-try: +- from tqdm import tqdm as progress_bar +-except ImportError: +- def progress_bar(iterable, **kwargs): +- return iterable ++# GAMBIT patch to avoid importing tqdm below ++def progress_bar(iterable, **kwargs): ++ return iterable ++ ++# ## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option ++# try: ++# from tqdm import tqdm as progress_bar ++# except ImportError: ++# def progress_bar(iterable, **kwargs): ++# return iterable ++ + + def mkoutdir(outdir): + """ diff --git a/Backends/src/frontends/Contur_2_4_1.cpp b/Backends/src/frontends/Contur_2_4_1.cpp new file mode 100644 index 0000000000..9b275cf474 --- /dev/null +++ b/Backends/src/frontends/Contur_2_4_1.cpp @@ -0,0 +1,125 @@ +// GAMBIT: Global and Modular BSM Inference Tool +// ********************************************* +/// \file +/// +/// Fronted source for the Contur backend +/// +/// ********************************************* +/// +/// Authors (add name and date if you modify): +/// +/// \author Tomas Gonzalo +/// (tomas.gonzalo@monash.edu) +/// \date 2019 Oct +/// +/// \author Tomasz Procter +/// (t.procter.1@research.gla.ac.uk) +/// \date 2021 June +/// \date 2023 May +/// +/// \author Anders Kvellestad +/// (anders.kvellestad@fys.uio.no) +/// \date 2023 Feb +/// +/// ********************************************* + +#include "gambit/Backends/frontend_macros.hpp" +#include "gambit/Backends/frontends/Contur_2_4_1.hpp" + +#ifdef HAVE_PYBIND11 + + using namespace pybind11::literals; + + BE_NAMESPACE + { + + // Helper function for setting some default arguments for Contur. + // Used by the functions Contur_LogLike_from_stream and Contur_LogLike_from_file below. + void Contur_add_GAMBIT_default_args(pybind11::dict& args_dict) + { + args_dict[pybind11::cast("QUIET")] = pybind11::bool_(true); + args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")] = pybind11::list(); + args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("LLR"); + args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("Pool_LLR"); + args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("Pool_tags"); + } + + + Contur_output Contur_LogLike_from_stream(std::shared_ptr yodastream, std::vector& contur_yaml_args) + { + cerr << "Getting Contur Loglike from stream" << endl; + //Convert C++ ostringstream to python StringIO + pybind11::str InputString = pybind11::cast(yodastream->str()); + pybind11::object yoda_string_IO = Contur.attr("StringIO")(InputString); + yoda_string_IO.attr("seek")(pybind11::int_(pybind11::cast(0))); + + cerr << "Done transforming input yoda" << endl; + // Get default settings for Contur run and add a couple of our own as defaults for GAMBIT + pybind11::dict args_dict = + ((Contur.attr("arg_utils").attr("get_argparser")(pybind11::cast("analysis"))).attr( + "parse_args")(pybind11::cast(contur_yaml_args))).attr("__dict__"); + args_dict[pybind11::cast("YODASTREAM")] = yoda_string_IO; + + cerr << "Done getting the args dict" << endl; + + Contur_add_GAMBIT_default_args(args_dict); + + //Return the contur output. + return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); + } + + + Contur_output Contur_LogLike_from_file(str& YODA_filename, std::vector& contur_yaml_args) + { + // Get default settings for Contur run and add a couple of our own as defaults for GAMBIT + pybind11::dict args_dict = + ((Contur.attr("arg_utils").attr("get_argparser")(pybind11::cast("analysis"))).attr( + "parse_args")(pybind11::cast(contur_yaml_args))).attr("__dict__"); + args_dict[pybind11::cast("YODASTREAM")] = YODA_filename; + + Contur_add_GAMBIT_default_args(args_dict); + + //Run contur, get a LLR and return it + return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); + } + + + //Appends all analyses at given beamString (e.g. 13TeV) that contur knows about to the lit of analyses + //to study. + void Contur_get_analyses_from_beam(std::vector& analyses, std::string& beamString) + { + std::vector obtained_analyses; + pybind11::list beams; + pybind11::object theBeam; + bool beamFound = false; + #pragma omp critical + { + beams = Contur.attr("static_db").attr("get_beams")(); + } + for (size_t i = 0; i <= pybind11::len(beams); ++i){ + if (beams[i].attr("id")().cast() == beamString){ + theBeam = beams[i]; + beamFound = true; + break; + } + } + if (! beamFound ){ + // TODO: give appropriate warning + return; + } + # pragma omp critical + { + obtained_analyses = Contur.attr("static_db").attr("getAnalyses")(pybind11::none(), beamString).cast>(); + } + for (std::string analysis : obtained_analyses){ + analyses.push_back(analysis); + } + } + } + END_BE_NAMESPACE + +#endif + +BE_INI_FUNCTION +{} +END_BE_INI_FUNCTION diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 05be03a5f3..3911a57b88 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2159,7 +2159,7 @@ if(NOT ditched_${name}_${ver}) COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${dir}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_ROOT\"]='${dir}'" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_DATA_PATH\"]='${dir}'" >> ${init_file} - COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_USER_DIR\"]='${dir}/../contur_users'" >> ${init_file} + COMMAND ${CMAKE_COMMAND} -E echo "os.environ[\"CONTUR_USER_DIR\"]='${dir}/data/DB'" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "from ctypes import *" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "cdll.LoadLibrary(\"${Rivet_LIB}\")" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "from run import run_analysis" >> ${init_file} diff --git a/config/backend_locations.yaml.default b/config/backend_locations.yaml.default index be0be908ff..2d726382b9 100644 --- a/config/backend_locations.yaml.default +++ b/config/backend_locations.yaml.default @@ -29,7 +29,7 @@ classy: exo_2.7.2: ./Backends/installed/classy/exo_2.7.2/lib/classy_exo_2_7_2.py Contur: - 2.1.1: ./Backends/installed/contur/2.1.1/contur/init_by_GAMBIT.py + 2.4.1: ./Backends/installed/contur/2.4.1/contur/init_by_GAMBIT.py DarkAges: 1.2.0: ./Backends/installed/darkages/1.2.0/DarkAges_1_2_0 From e3fc21f2c40f9a0467d738360d35ba6f827ad9c6 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Thu, 11 May 2023 19:33:40 +0200 Subject: [PATCH 25/49] Patch contur db so it doesn't crash if there are no rivet LEP analyses --- .../contur/2.4.1/patch_contur_2.4.1.dif | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif b/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif index 4dbae7d177..750d5e991e 100644 --- a/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif +++ b/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif @@ -25,3 +25,35 @@ diff -rupN contur-2.4.1_original/contur/util/utils.py contur-2.4.1_patched/contu def mkoutdir(outdir): """ +diff -rupN contur-2.4.1_original/data/DB/analyses.sql contur-2.4.1_patched/data/DB/analyses.sql +--- contur-2.4.1_original/data/DB/analyses.sql 2023-03-13 19:06:38.000000000 +0100 ++++ contur-2.4.1_patched/data/DB/analyses.sql 2023-05-11 19:26:58.885611301 +0200 +@@ -182,8 +182,8 @@ INSERT INTO analysis_pool VALUES('ATLAS_ + -- LEP + -- Hadronic Z decay in EE collisions + -- INSERT INTO analysis_pool VALUES('DELPHI_em_ep_91_2_LLJET', 'em_ep_91_2', 'hadronic z decay to two leptons'); +-INSERT INTO analysis_pool VALUES('OPAL_912_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); +-INSERT INTO analysis_pool VALUES('OPAL_912_JETS_GAMMA', 'em_ep_91_2', 'z decay to hadronic and photon final states'); ++-- INSERT INTO analysis_pool VALUES('OPAL_912_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); ++-- INSERT INTO analysis_pool VALUES('OPAL_912_JETS_GAMMA', 'em_ep_91_2', 'z decay to hadronic and photon final states'); + -- INSERT INTO analysis_pool VALUES('ALEPH_em_ep_91_2_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); + -- INSERT INTO analysis_pool VALUES('L3_em_ep_91_2_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); + +@@ -498,14 +498,14 @@ INSERT INTO analysis VALUES('CMS_2020_I1 + + -- LEP Z decays + -- INSERT INTO analysis VALUES('DELPHI_1994_I375963', 0.0405, 'DELPHI_em_ep_91_2_LLJET'); -- dimuons +-INSERT INTO analysis VALUES('OPAL_1992_I321190', 'pb', 'OPAL_912_JETS'); -- Charged Particle Multiplicities of hadronic final states ++-- INSERT INTO analysis VALUES('OPAL_1992_I321190', 'pb', 'OPAL_912_JETS'); -- Charged Particle Multiplicities of hadronic final states + -- INSERT INTO analysis VALUES('ALEPH_2001_I555653', 160, 'ALEPH_em_ep_91_2'); -- tau polarization (lots of different decay modes?) + -- INSERT INTO analysis VALUES('ALEPH_1996_I421984', 132, 'ALEPH_em_ep_91_2_JETS'); -- tau decays with eta and omega mesons + -- INSERT INTO analysis VALUES('L3_1994_I374698', 35, 'L3_em_ep_91_2_JETS'); -- particle identification and multiple decay modes? + -- INSERT INTO analysis VALUES('L3_1997_I427107', 112, 'L3_em_ep_91_2_JETS'); -- eta' and omega meson production rates + -- INSERT INTO analysis VALUES('L3_1998_I467929', 149, 'l3_em_ep_91_2_JETS'); -- multiple different final states? +-INSERT INTO analysis VALUES('OPAL_1993_S2692198', 'pb', 'OPAL_912_JETS_GAMMA'); -- photon production from quarks (rivet routine dodgy) +-INSERT INTO analysis VALUES('OPAL_1994_S2927284', 'pb', 'OPAL_912_JETS'); -- meson and hadron production rates ++-- INSERT INTO analysis VALUES('OPAL_1993_S2692198', 'pb', 'OPAL_912_JETS_GAMMA'); -- photon production from quarks (rivet routine dodgy) ++-- INSERT INTO analysis VALUES('OPAL_1994_S2927284', 'pb', 'OPAL_912_JETS'); -- meson and hadron production rates + -- INSERT INTO analysis VALUES('OPAL_1995_I393503', 45.9, 'OPAL_em_ep_91_2_JETS'); -- K0 particle identification? + -- INSERT INTO analysis VALUES('OPAL_1998_S3780481', 177, 'OPAL_em_ep_91_2_JETS'); -- qqbar fragmentation functions + -- INSERT INTO analysis VALUES('OPAL_2001_I554583', 151, 'OPAL_em_ep_91_2_JETS'); -- tau polarization (lots of decay modes?) \ No newline at end of file From 253440e00dadb17b7b2a50c40f49551afe90b38b Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sat, 13 May 2023 13:02:15 +0200 Subject: [PATCH 26/49] Changes to backend types/functions for contur 2.4.1 (nearly but not quite working) --- .../gambit/Backends/backend_types/Contur.hpp | 84 +++++++++++++++++-- Backends/src/backend_types/Contur.cpp | 33 ++++++-- Backends/src/frontends/Contur_2_4_1.cpp | 17 ++-- ColliderBit/src/ColliderBit_measurements.cpp | 34 ++++++-- 4 files changed, 140 insertions(+), 28 deletions(-) diff --git a/Backends/include/gambit/Backends/backend_types/Contur.hpp b/Backends/include/gambit/Backends/backend_types/Contur.hpp index 5f6e58d238..8269dd5155 100644 --- a/Backends/include/gambit/Backends/backend_types/Contur.hpp +++ b/Backends/include/gambit/Backends/backend_types/Contur.hpp @@ -31,9 +31,9 @@ namespace Gambit { // Class that manages the input dictionary for Contur - class Contur_output + class Contur_subOutput { - friend Contur_output merge_contur_outputs(const Contur_output& output1, const Contur_output& output2); + friend Contur_subOutput merge_contur_suboutputs(const Contur_subOutput& output1, const Contur_subOutput& output2); public: //Three member objects: @@ -42,7 +42,7 @@ map_str_str pool_tags; //Default constructor - used if no events produced - Contur_output() + Contur_subOutput() { LLR = 0.0; pool_LLR = {}; @@ -50,8 +50,9 @@ } //Constructor using the pybind11::dict we get from contur: - Contur_output(pybind11::dict input_dict) + Contur_subOutput(pybind11::dict input_dict) { + pybind11::print(input_dict); //Eliminating the factor of -2 for the GAMBIT LLR definition LLR = -0.5*input_dict.attr("get")("LLR").cast(); pool_LLR = input_dict.attr("get")("Pool_LLR").cast(); @@ -61,10 +62,12 @@ pool.second=-0.5*pool.second; } pool_tags = input_dict.attr("get")("Pool_tags").cast(); + pybind11::print("Number of Pool LLR's is: ", pool_LLR.size()); + pybind11::print("Number of Pool tags is: ", pool_tags.size()); } //Constructor with all parts supplied: for the friend merge function - Contur_output(const double newLLR, const map_str_dbl& newPool_LLR, const map_str_str& newPool_tags) + Contur_subOutput(const double newLLR, const map_str_dbl& newPool_LLR, const map_str_str& newPool_tags) { LLR = newLLR; pool_LLR = newPool_LLR; @@ -73,9 +76,80 @@ //Automatic destructor should be fine, no need to define + //Print the object and all its data in an easy to read format. + void print_Contur_subOutput_debug(std::ostream&outstream = std::cout) const; + + }; + + class Contur_output + { + friend Contur_output merge_contur_outputs(const Contur_output& output1, const Contur_output& output2); + + public: + const std::vector _bkg_types = {"SMBG", "DATABG", "EXP"}; + std::map outputs; + + //Default constructor - used if no events produced + Contur_output() + { + cout << "\n\n\nCALLING CONTUR OUTPUT DEFAULT CONSTRUCTOR:\n\n\n"; + for (const str& bkg : _bkg_types){ + outputs[bkg] = Contur_subOutput(); + } + } + + //Constructor using the pybind11::dict we get from contur: + Contur_output(pybind11::dict input_dict) + { + cout << "\nCALLING Contur_output pybind11::dict constructor" << endl; + for (const str& bkg : _bkg_types){ + outputs[bkg] = Contur_subOutput(input_dict.attr("get")(bkg)); + pybind11::print("LLRs: ", outputs.at(bkg).pool_LLR.size()); + pybind11::print("Tags: ", outputs.at(bkg).pool_tags.size()); + } + } + + Contur_output(const Contur_output& copy){ + cout << "\n\n\nCALLING CONTUR OUTPUT COPY CONSTRUCTOR:\n"; + for (const str & bkg : _bkg_types){ + cout << "For bkg "< LLRpair : outputs.at(bkg).pool_LLR){ + pybind11::print("Pool is: ", LLRpair.first ); + return_map[LLRpair.first + "_" + bkg] = LLRpair.second; + } + } + return return_map; + } + + map_str_str pool_tags() const { + map_str_str return_map; + for (const str & bkg : _bkg_types){ + for (const std::pair LLRpair : outputs.at(bkg).pool_tags){ + return_map[LLRpair.first + "_" + bkg] = LLRpair.second; + } + } + return return_map; + } }; //For running Contur multiple times with different settings. diff --git a/Backends/src/backend_types/Contur.cpp b/Backends/src/backend_types/Contur.cpp index 2841239918..22bafedae8 100644 --- a/Backends/src/backend_types/Contur.cpp +++ b/Backends/src/backend_types/Contur.cpp @@ -23,24 +23,33 @@ namespace Gambit #ifdef HAVE_PYBIND11 - void Contur_output::print_Contur_output_debug(std::ostream&outstream) const + void Contur_subOutput::print_Contur_subOutput_debug(std::ostream&outstream) const { - outstream << "\nContur Output Object.\n\tLLR is: " << - LLR << "\n\tPool LLR's:"; + outstream << "\n\tContur subOutput Object.\n\t\tLLR is: " << + LLR << "\n\t\tPool LLR's:"; for (auto pool : pool_LLR) { - outstream << "\n\t\t" << pool.first << ": " << pool.second; + outstream << "\n\t\t\t" << pool.first << ": " << pool.second; } - outstream << "\n\tPool Histotags:"; + outstream << "\n\t\tPool Histotags:"; for (auto pool : pool_tags) { - outstream << "\n\t\t" << pool.first << ": " << pool.second; + outstream << "\n\t\t\t" << pool.first << ": " << pool.second; } outstream << std::endl; } - Contur_output merge_contur_outputs(const Contur_output& output1, const Contur_output& output2) + void Contur_output::print_Contur_output_debug(std::ostream&outstream) const + { + outstream << "\nContur Output Object.\n"; + for (const str & bkg : _bkg_types){ + outstream << "\t" << bkg << ":"; + outputs.at(bkg).print_Contur_subOutput_debug(outstream); + } + } + + Contur_subOutput merge_contur_subOutputs(const Contur_subOutput& output1, const Contur_subOutput& output2) { map_str_str new_pool_tags {}; map_str_dbl new_pool_LLR {}; @@ -65,7 +74,15 @@ namespace Gambit } //Return the object - return Contur_output(output1.LLR + output2.LLR, new_pool_LLR, new_pool_tags); + return Contur_subOutput(output1.LLR + output2.LLR, new_pool_LLR, new_pool_tags); + } + + Contur_output merge_contur_outputs(const Contur_output& output1, const Contur_output& output2){ + Contur_output out; + for (const str & bkg : output1._bkg_types){ + out.outputs[bkg] = merge_contur_subOutputs(output1.outputs.at(bkg), output2.outputs.at(bkg)); + } + return out; } //This assumes that the same contur instances belong in each run. If this isn't the case, something very bad has gone wrong! diff --git a/Backends/src/frontends/Contur_2_4_1.cpp b/Backends/src/frontends/Contur_2_4_1.cpp index 9b275cf474..a2d36812cc 100644 --- a/Backends/src/frontends/Contur_2_4_1.cpp +++ b/Backends/src/frontends/Contur_2_4_1.cpp @@ -64,6 +64,8 @@ Contur_add_GAMBIT_default_args(args_dict); + cerr << "Have set final args" << endl; + //Return the contur output. return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); } @@ -88,7 +90,6 @@ //to study. void Contur_get_analyses_from_beam(std::vector& analyses, std::string& beamString) { - std::vector obtained_analyses; pybind11::list beams; pybind11::object theBeam; bool beamFound = false; @@ -97,23 +98,25 @@ beams = Contur.attr("static_db").attr("get_beams")(); } for (size_t i = 0; i <= pybind11::len(beams); ++i){ - if (beams[i].attr("id")().cast() == beamString){ + if (beams[i].attr("id").cast() == beamString){ theBeam = beams[i]; beamFound = true; break; } } if (! beamFound ){ - // TODO: give appropriate warning + // TODO: give appropriate warning that we're returning an empty vector. + analyses = {}; return; } # pragma omp critical { - obtained_analyses = Contur.attr("static_db").attr("getAnalyses")(pybind11::none(), beamString).cast>(); - } - for (std::string analysis : obtained_analyses){ - analyses.push_back(analysis); + pybind11::list anaObjectList = Contur.attr("static_db").attr("get_analyses")(pybind11::none(), pybind11::none(), theBeam); + for (const pybind11::handle anaObject : anaObjectList){ + analyses.push_back(anaObject.attr("name").cast()); + } } + } } END_BE_NAMESPACE diff --git a/ColliderBit/src/ColliderBit_measurements.cpp b/ColliderBit/src/ColliderBit_measurements.cpp index 9e632c5101..722dba8879 100644 --- a/ColliderBit/src/ColliderBit_measurements.cpp +++ b/ColliderBit/src/ColliderBit_measurements.cpp @@ -15,6 +15,7 @@ /// \author Tomasz Procter /// (t.procter.1@research.gla.ac.uk) /// \date June 2021 +/// \date May 2023 /// /// ********************************************* @@ -300,6 +301,7 @@ namespace Gambit } else if (*Loop::iteration == COLLIDER_FINALIZE) { + cout << "STARTING COLLIDER FINALISE LOOP" << endl; Contur_output temp_result; std::shared_ptr yodastream = *Dep::Rivet_measurements; @@ -318,6 +320,7 @@ namespace Gambit { ///Call contur temp_result = BEreq::Contur_Measurements(std::move(yodastream), yaml_contur_options); + cout << "\ntemp result n LLRs[DATABG] ("<<__LINE__<<")= " << temp_result.outputs.at("DATABG").pool_LLR.size() << endl; } } results.push_back(temp_result); @@ -326,6 +329,7 @@ namespace Gambit std::cout << "\n\nSINGLE COLLIDER CCONTUR OBTAINED: "; temp_result.print_Contur_output_debug(); #endif + cout << "\nEND OF COLLIDER FINALISE LOOP" << endl; } else if (*Loop::iteration == BASE_FINALIZE) { @@ -450,8 +454,13 @@ namespace Gambit void Contur_LHC_measurements_LogLike(double &result) { using namespace Pipes::Contur_LHC_measurements_LogLike; + //Which background type to use in the calculation. + const static string background_type = runOptions->getValueOrDef("DATABG", "background"); + if (background_type != "DATABG" && background_type != "SMBG" && background_type != "EXP"){ + ColliderBit_error().raise(LOCAL_INFO, "Requested Contur Background type does not exist"); + } Contur_output contur_likelihood_object = *Dep::LHC_measurements; - result = contur_likelihood_object.LLR; + result = contur_likelihood_object.outputs.at(background_type).LLR; } // Extracts the likelihood value for every set of contur settings from a map @@ -463,7 +472,9 @@ namespace Gambit for (auto Contur_name : contur_likelihood_object) { - result[Contur_name.first + "_LLR"] = Contur_name.second.LLR; + for (const str & bkg : Contur_name.second._bkg_types){ + result[Contur_name.first + "_" + bkg + "_LLR"] = Contur_name.second.outputs.at(bkg).LLR; + } } } @@ -473,19 +484,26 @@ namespace Gambit using namespace Pipes::Multi_Contur_LHC_measurements_LogLike_single; Multi_Contur_output contur_likelihood_object = *Dep::LHC_measurements; static const std::string which_as_LLR = runOptions->getValueOrDef("Contur", "Use_as_likelihood"); - result = contur_likelihood_object[which_as_LLR].LLR; + static const string background_type = runOptions->getValueOrDef("DATABG", "background"); + if (background_type != "DATABG" && background_type != "SMBG" && background_type != "EXP"){ + ColliderBit_error().raise(LOCAL_INFO, "Requested Contur Background type does not exist"); + } + result = contur_likelihood_object[which_as_LLR].outputs.at(background_type).LLR; } // Extracts the likelihood contribution from each contur pool from Contur_output void Contur_LHC_measurements_LogLike_perPool(map_str_dbl &result) { + std::cout << "\nperPool\n" << std::endl; using namespace Pipes::Contur_LHC_measurements_LogLike_perPool; std::stringstream summary_line; summary_line << "LHC Contur LogLikes per pool: "; - result = (*Dep::LHC_measurements).pool_LLR; + result = (*Dep::LHC_measurements).pool_LLR(); + cout << __FILE__ << ": " << __LINE__ << ": pool_LLR size: " << result.size() << endl; for( auto const& entry : result) { + cout << entry.first << ":" << entry.second << ", "; summary_line << entry.first << ":" << entry.second << ", "; } logger() << LogTags::debug << summary_line.str() << EOM; @@ -501,7 +519,7 @@ namespace Gambit Multi_Contur_output contur_likelihood_object = *Dep::LHC_measurements; for (const auto& contur_output_instance : contur_likelihood_object) { - for (auto const& pool_LLR_entry : contur_output_instance.second.pool_LLR) + for (auto const& pool_LLR_entry : contur_output_instance.second.pool_LLR()) { result[pool_LLR_entry.first + "_" + contur_output_instance.first] = pool_LLR_entry.second; } @@ -517,10 +535,10 @@ namespace Gambit // Note map_str_str will not print to hdf5! Use for ASCII debug only. void Contur_LHC_measurements_histotags_perPool(map_str_str &result) { - using namespace Pipes::Contur_LHC_measurements_LogLike_perPool; + using namespace Pipes::Contur_LHC_measurements_histotags_perPool; std::stringstream summary_line; summary_line << "LHC Contur LogLikes per pool: "; - result = (*Dep::LHC_measurements).pool_tags; + result = (*Dep::LHC_measurements).pool_tags(); for( auto const& entry : result) { @@ -542,7 +560,7 @@ namespace Gambit Multi_Contur_output contur_likelihood_object = *Dep::LHC_measurements; for (const auto& contur_output_instance : contur_likelihood_object) { - for (auto const& pool_LLR_entry : contur_output_instance.second.pool_tags) + for (auto const& pool_LLR_entry : contur_output_instance.second.pool_tags()) { result[pool_LLR_entry.first + "_" + contur_output_instance.first] = pool_LLR_entry.second; } From 4d8bd1b148dc581d0cec219be9e6666cb5b1b45c Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sat, 13 May 2023 13:04:58 +0200 Subject: [PATCH 27/49] Removing Contur 2.1.1 stuff --- .../Backends/frontends/Contur_2_1_1.hpp | 42 -------- .../contur/2.1.1/patch_contur_2.1.1.dif | 38 ------- Backends/src/frontends/Contur_2_1_1.cpp | 102 ------------------ 3 files changed, 182 deletions(-) delete mode 100644 Backends/include/gambit/Backends/frontends/Contur_2_1_1.hpp delete mode 100644 Backends/patches/contur/2.1.1/patch_contur_2.1.1.dif delete mode 100644 Backends/src/frontends/Contur_2_1_1.cpp diff --git a/Backends/include/gambit/Backends/frontends/Contur_2_1_1.hpp b/Backends/include/gambit/Backends/frontends/Contur_2_1_1.hpp deleted file mode 100644 index e2ee802032..0000000000 --- a/Backends/include/gambit/Backends/frontends/Contur_2_1_1.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Fronted header for the Contur backend -/// -/// Compile-time registration of available -/// functions and variables from this backend. -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author Tomas Gonzalo -/// (tomas.gonzalo@monash.edu) -/// \date 2019 Oct, 2020 Mar -/// \date 2021 Mar -/// -/// \author Tomasz Procter -/// (t.procter.1@research.gla.ac.uk) -/// \date 2021 June -/// -/// ********************************************* - -#define BACKENDNAME Contur -#define BACKENDLANG Python3 -#define VERSION 2.1.1 -#define SAFE_VERSION 2_1_1 -#define REFERENCE Butterworth:2016sqg - -LOAD_LIBRARY - -#ifdef HAVE_PYBIND11 - - BE_CONV_FUNCTION(Contur_LogLike_from_stream, Contur_output, (std::shared_ptr, std::vector&), "Contur_Measurements") - BE_CONV_FUNCTION(Contur_LogLike_from_file, Contur_output, (str &, std::vector&), "Contur_Measurements") - BE_CONV_FUNCTION(Contur_get_analyses_from_beam, void, (std::vector&, std::string&), "Contur_GetAnalyses") - -#endif - -// Undefine macros to avoid conflict with other backends -#include "gambit/Backends/backend_undefs.hpp" diff --git a/Backends/patches/contur/2.1.1/patch_contur_2.1.1.dif b/Backends/patches/contur/2.1.1/patch_contur_2.1.1.dif deleted file mode 100644 index 124b8f2480..0000000000 --- a/Backends/patches/contur/2.1.1/patch_contur_2.1.1.dif +++ /dev/null @@ -1,38 +0,0 @@ -diff -rupN contur-2.1.1_original/contur/data/build_covariance.py contur-2.1.1_patched/contur/data/build_covariance.py ---- contur-2.1.1_original/contur/data/build_covariance.py 2021-09-26 16:58:41.000000000 +0200 -+++ contur-2.1.1_patched/contur/data/build_covariance.py 2023-02-20 16:46:47.086196512 +0100 -@@ -37,6 +37,7 @@ class CovarianceBuilder(object): - errMap_values[ibin]=0 - ibin=ibin+1 - for source in self.ao.variations(): -+ source = source.encode("utf-8") # GAMBIT patch - if len(source)>0 and not b"stat" in source and not b"Uncor" in source and not b"uncor" in source: - systErrs = np.zeros(self.nbins) - fracErrs = np.zeros(self.nbins) -diff -rupN contur-2.1.1_original/contur/util/utils.py contur-2.1.1_patched/contur/util/utils.py ---- contur-2.1.1_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 -+++ contur-2.1.1_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 -@@ -16,12 +16,17 @@ import logging - - import scipy.stats as spstat - --## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option --try: -- from tqdm import tqdm as progress_bar --except ImportError: -- def progress_bar(iterable, **kwargs): -- return iterable -+# GAMBIT patch to avoid importing tqdm below -+def progress_bar(iterable, **kwargs): -+ return iterable -+ -+# ## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option -+# try: -+# from tqdm import tqdm as progress_bar -+# except ImportError: -+# def progress_bar(iterable, **kwargs): -+# return iterable -+ - - def mkoutdir(outdir): - """ diff --git a/Backends/src/frontends/Contur_2_1_1.cpp b/Backends/src/frontends/Contur_2_1_1.cpp deleted file mode 100644 index 5b12e833fa..0000000000 --- a/Backends/src/frontends/Contur_2_1_1.cpp +++ /dev/null @@ -1,102 +0,0 @@ -// GAMBIT: Global and Modular BSM Inference Tool -// ********************************************* -/// \file -/// -/// Fronted source for the Contur backend -/// -/// ********************************************* -/// -/// Authors (add name and date if you modify): -/// -/// \author Tomas Gonzalo -/// (tomas.gonzalo@monash.edu) -/// \date 2019 Oct -/// -/// \author Tomasz Procter -/// (t.procter.1@research.gla.ac.uk) -/// \date 2021 June -/// -/// \author Anders Kvellestad -/// (anders.kvellestad@fys.uio.no) -/// \date 2023 Feb -/// -/// ********************************************* - -#include "gambit/Backends/frontend_macros.hpp" -#include "gambit/Backends/frontends/Contur_2_1_1.hpp" - -#ifdef HAVE_PYBIND11 - - using namespace pybind11::literals; - - BE_NAMESPACE - { - - // Helper function for setting some default arguments for Contur. - // Used by the functions Contur_LogLike_from_stream and Contur_LogLike_from_file below. - void Contur_add_GAMBIT_default_args(pybind11::dict& args_dict) - { - args_dict[pybind11::cast("QUIET")] = pybind11::bool_(true); - args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")] = pybind11::list(); - args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("LLR"); - args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("Pool_LLR"); - args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("Pool_tags"); - } - - - Contur_output Contur_LogLike_from_stream(std::shared_ptr yodastream, std::vector& contur_yaml_args) - { - //Convert C++ ostringstream to python StringIO - pybind11::str InputString = pybind11::cast(yodastream->str()); - pybind11::object yoda_string_IO = Contur.attr("StringIO")(InputString); - yoda_string_IO.attr("seek")(pybind11::int_(pybind11::cast(0))); - - // Get default settings for Contur run and add a couple of our own as defaults for GAMBIT - pybind11::dict args_dict = - ((Contur.attr("arg_utils").attr("get_argparser")(pybind11::cast("analysis"))).attr( - "parse_args")(pybind11::cast(contur_yaml_args))).attr("__dict__"); - args_dict[pybind11::cast("YODASTREAM")] = yoda_string_IO; - - Contur_add_GAMBIT_default_args(args_dict); - - //Return the contur output. - return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); - } - - - Contur_output Contur_LogLike_from_file(str& YODA_filename, std::vector& contur_yaml_args) - { - // Get default settings for Contur run and add a couple of our own as defaults for GAMBIT - pybind11::dict args_dict = - ((Contur.attr("arg_utils").attr("get_argparser")(pybind11::cast("analysis"))).attr( - "parse_args")(pybind11::cast(contur_yaml_args))).attr("__dict__"); - args_dict[pybind11::cast("YODASTREAM")] = YODA_filename; - - Contur_add_GAMBIT_default_args(args_dict); - - //Run contur, get a LLR and return it - return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); - } - - - //Appends all analyses at given beamString (e.g. 13TeV) that contur knows about to the lit of analyses - //to study. - void Contur_get_analyses_from_beam(std::vector& analyses, std::string& beamString) - { - std::vector obtained_analyses; - # pragma omp critical - { - obtained_analyses = Contur.attr("static_db").attr("getAnalyses")(pybind11::none(), beamString).cast>(); - } - for (std::string analysis : obtained_analyses){ - analyses.push_back(analysis); - } - } - } - END_BE_NAMESPACE - -#endif - -BE_INI_FUNCTION -{} -END_BE_INI_FUNCTION From 277c10b2deada0286ea247e6140e3dcf22164713 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sat, 13 May 2023 23:49:31 +0200 Subject: [PATCH 28/49] Fix Contur_output constructor problem --- .../gambit/Backends/backend_types/Contur.hpp | 34 +++---------------- ColliderBit/src/ColliderBit_measurements.cpp | 10 ++---- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/Backends/include/gambit/Backends/backend_types/Contur.hpp b/Backends/include/gambit/Backends/backend_types/Contur.hpp index 8269dd5155..093fb44d35 100644 --- a/Backends/include/gambit/Backends/backend_types/Contur.hpp +++ b/Backends/include/gambit/Backends/backend_types/Contur.hpp @@ -44,15 +44,14 @@ //Default constructor - used if no events produced Contur_subOutput() { - LLR = 0.0; - pool_LLR = {}; - pool_tags = {}; + LLR = 0.0; + pool_LLR = {}; + pool_tags = {}; } //Constructor using the pybind11::dict we get from contur: Contur_subOutput(pybind11::dict input_dict) { - pybind11::print(input_dict); //Eliminating the factor of -2 for the GAMBIT LLR definition LLR = -0.5*input_dict.attr("get")("LLR").cast(); pool_LLR = input_dict.attr("get")("Pool_LLR").cast(); @@ -62,8 +61,6 @@ pool.second=-0.5*pool.second; } pool_tags = input_dict.attr("get")("Pool_tags").cast(); - pybind11::print("Number of Pool LLR's is: ", pool_LLR.size()); - pybind11::print("Number of Pool tags is: ", pool_tags.size()); } //Constructor with all parts supplied: for the friend merge function @@ -78,7 +75,6 @@ //Print the object and all its data in an easy to read format. void print_Contur_subOutput_debug(std::ostream&outstream = std::cout) const; - }; class Contur_output @@ -86,13 +82,12 @@ friend Contur_output merge_contur_outputs(const Contur_output& output1, const Contur_output& output2); public: - const std::vector _bkg_types = {"SMBG", "DATABG", "EXP"}; + std::vector _bkg_types = {"SMBG", "DATABG", "EXP"}; std::map outputs; //Default constructor - used if no events produced Contur_output() { - cout << "\n\n\nCALLING CONTUR OUTPUT DEFAULT CONSTRUCTOR:\n\n\n"; for (const str& bkg : _bkg_types){ outputs[bkg] = Contur_subOutput(); } @@ -101,27 +96,10 @@ //Constructor using the pybind11::dict we get from contur: Contur_output(pybind11::dict input_dict) { - cout << "\nCALLING Contur_output pybind11::dict constructor" << endl; for (const str& bkg : _bkg_types){ outputs[bkg] = Contur_subOutput(input_dict.attr("get")(bkg)); - pybind11::print("LLRs: ", outputs.at(bkg).pool_LLR.size()); - pybind11::print("Tags: ", outputs.at(bkg).pool_tags.size()); - } - } - - Contur_output(const Contur_output& copy){ - cout << "\n\n\nCALLING CONTUR OUTPUT COPY CONSTRUCTOR:\n"; - for (const str & bkg : _bkg_types){ - cout << "For bkg "< LLRpair : outputs.at(bkg).pool_LLR){ - pybind11::print("Pool is: ", LLRpair.first ); return_map[LLRpair.first + "_" + bkg] = LLRpair.second; } } return return_map; } + // TODO: returning a map is probably not super efficient but it fits the existing syntax. map_str_str pool_tags() const { map_str_str return_map; for (const str & bkg : _bkg_types){ diff --git a/ColliderBit/src/ColliderBit_measurements.cpp b/ColliderBit/src/ColliderBit_measurements.cpp index 722dba8879..0846fdef5d 100644 --- a/ColliderBit/src/ColliderBit_measurements.cpp +++ b/ColliderBit/src/ColliderBit_measurements.cpp @@ -301,7 +301,6 @@ namespace Gambit } else if (*Loop::iteration == COLLIDER_FINALIZE) { - cout << "STARTING COLLIDER FINALISE LOOP" << endl; Contur_output temp_result; std::shared_ptr yodastream = *Dep::Rivet_measurements; @@ -319,17 +318,15 @@ namespace Gambit #pragma omp critical { ///Call contur - temp_result = BEreq::Contur_Measurements(std::move(yodastream), yaml_contur_options); - cout << "\ntemp result n LLRs[DATABG] ("<<__LINE__<<")= " << temp_result.outputs.at("DATABG").pool_LLR.size() << endl; + Contur_output altOut = BEreq::Contur_Measurements(std::move(yodastream), yaml_contur_options); + temp_result = altOut; } } results.push_back(temp_result); #ifdef COLLIDERBIT_DEBUG - std::cout << "\n\nSINGLE COLLIDER CCONTUR OBTAINED: "; temp_result.print_Contur_output_debug(); #endif - cout << "\nEND OF COLLIDER FINALISE LOOP" << endl; } else if (*Loop::iteration == BASE_FINALIZE) { @@ -494,16 +491,13 @@ namespace Gambit // Extracts the likelihood contribution from each contur pool from Contur_output void Contur_LHC_measurements_LogLike_perPool(map_str_dbl &result) { - std::cout << "\nperPool\n" << std::endl; using namespace Pipes::Contur_LHC_measurements_LogLike_perPool; std::stringstream summary_line; summary_line << "LHC Contur LogLikes per pool: "; result = (*Dep::LHC_measurements).pool_LLR(); - cout << __FILE__ << ": " << __LINE__ << ": pool_LLR size: " << result.size() << endl; for( auto const& entry : result) { - cout << entry.first << ":" << entry.second << ", "; summary_line << entry.first << ":" << entry.second << ", "; } logger() << LogTags::debug << summary_line.str() << EOM; From 25cbe80e9c87de06d9bfea744115e0872ff70561 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Sun, 14 May 2023 12:13:49 +0200 Subject: [PATCH 29/49] More tidying of debug commits --- Backends/src/backend_types/Contur.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Backends/src/backend_types/Contur.cpp b/Backends/src/backend_types/Contur.cpp index 22bafedae8..e80d562b70 100644 --- a/Backends/src/backend_types/Contur.cpp +++ b/Backends/src/backend_types/Contur.cpp @@ -13,6 +13,7 @@ /// \author Tomasz Procter /// (t.procter.1@research.gla.ac.uk) /// \date 2021 October +/// \date 2023 May /// /// ********************************************* From 983c9d4c8c4548dc2b157d2efc80a7a880feaca8 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 30 May 2023 09:59:22 +0200 Subject: [PATCH 30/49] Tidy up debug mess --- Backends/src/frontends/Contur_2_4_1.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Backends/src/frontends/Contur_2_4_1.cpp b/Backends/src/frontends/Contur_2_4_1.cpp index a2d36812cc..4437152431 100644 --- a/Backends/src/frontends/Contur_2_4_1.cpp +++ b/Backends/src/frontends/Contur_2_4_1.cpp @@ -47,25 +47,19 @@ Contur_output Contur_LogLike_from_stream(std::shared_ptr yodastream, std::vector& contur_yaml_args) { - cerr << "Getting Contur Loglike from stream" << endl; //Convert C++ ostringstream to python StringIO pybind11::str InputString = pybind11::cast(yodastream->str()); pybind11::object yoda_string_IO = Contur.attr("StringIO")(InputString); yoda_string_IO.attr("seek")(pybind11::int_(pybind11::cast(0))); - cerr << "Done transforming input yoda" << endl; // Get default settings for Contur run and add a couple of our own as defaults for GAMBIT pybind11::dict args_dict = ((Contur.attr("arg_utils").attr("get_argparser")(pybind11::cast("analysis"))).attr( "parse_args")(pybind11::cast(contur_yaml_args))).attr("__dict__"); args_dict[pybind11::cast("YODASTREAM")] = yoda_string_IO; - cerr << "Done getting the args dict" << endl; - Contur_add_GAMBIT_default_args(args_dict); - cerr << "Have set final args" << endl; - //Return the contur output. return Contur_output(Contur.attr("run_analysis").attr("main")(args_dict)); } From cb338153a31217d1a78774d5d3a01ba30a259b28 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 30 May 2023 10:11:17 +0200 Subject: [PATCH 31/49] Expunging stuff from old rivet versions --- .../rivet/3.1.7/make_patch_rivet_3.1.7.sh | 18 - .../patches/rivet/3.1.7/patch_rivet_3.1.7.dif | 315 ------------------ Backends/patches/rivet/3.1.7/touch_files.sh | 3 - Backends/scripts/BOSS/configs/rivet_3_1_5.py | 131 -------- Backends/scripts/BOSS/configs/rivet_3_1_7.py | 131 -------- cmake/backends.cmake | 2 +- 6 files changed, 1 insertion(+), 599 deletions(-) delete mode 100755 Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh delete mode 100644 Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif delete mode 100755 Backends/patches/rivet/3.1.7/touch_files.sh delete mode 100644 Backends/scripts/BOSS/configs/rivet_3_1_5.py delete mode 100644 Backends/scripts/BOSS/configs/rivet_3_1_7.py diff --git a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh b/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh deleted file mode 100755 index 28fff3010f..0000000000 --- a/Backends/patches/rivet/3.1.7/make_patch_rivet_3.1.7.sh +++ /dev/null @@ -1,18 +0,0 @@ -cd ../../../downloaded -tar -xvf *rivet* -echo "diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in >> patch_rivet_3.1.7.dif -echo "diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.c" >> patch_rivet_3.1.7.dif -diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc >> patch_rivet_3.1.7.dif -mv patch_rivet_3.1.7.dif ../patches/rivet/3.1.7/ -cd ../patches/rivet/3.1.7 diff --git a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif b/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif deleted file mode 100644 index cf98c7c3ca..0000000000 --- a/Backends/patches/rivet/3.1.7/patch_rivet_3.1.7.dif +++ /dev/null @@ -1,315 +0,0 @@ -diff -rupN Rivet-3.1.7/Makefile.in ../installed/rivet/3.1.7/Makefile.in ---- Rivet-3.1.7/Makefile.in 2022-09-28 14:32:46.000000000 +0100 -+++ ../installed/rivet/3.1.7/Makefile.in 2023-04-14 14:55:04.096679845 +0100 -@@ -457,6 +457,21 @@ pkgconfigdir = $(libdir)/pkgconfig - dist_pkgconfig_DATA = rivet.pc - DEST = login.hepforge.org:rivet/downloads/ - all: all-recursive -+# Added by GAMBIT -+libRivet.so: -+ cd ${top_builddir}/src/Core/yamlcpp && ${MAKE} $(AM_MAKEFLAGS) librivet-yaml-cpp.la -+ cd ${top_builddir}/src/Core && ${MAKE} $(AM_MAKEFLAGS) libRivetCore.la -+ cd ${top_builddir}/src/Projections && ${MAKE} $(AM_MAKEFLAGS) libRivetProjections.la -+ cd ${top_builddir}/src/Tools && ${MAKE} $(AM_MAKEFLAGS) libRivetTools.la -+ cd ${top_builddir}/src/AnalysisTools && ${MAKE} $(AM_MAKEFLAGS) libRivetAnalysisTools.la -+ cd ${top_builddir}/src && ${MAKE} $(AM_MAKEFLAGS) libRivet.la -+ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) install -+ cd ${top_builddir}/pyext && ${MAKE} $(AM_MAKEFLAGS) install -+ cd ${top_builddir}/analyses && ${MAKE} $(AM_MAKEFLAGS) RivetATLASAnalyses.so RivetCMSAnalyses.so RivetLHCbAnalyses.so -+ mkdir -p ${libdir} -+ if test -e ${top_builddir}/src/.libs/libRivet.so ; then cp ${top_builddir}/src/.libs/libRivet.so ${libdir}/libRivet.so ; fi -+ if test -e ${top_builddir}/src/.libs/libRivet.dylib ; then cp ${top_builddir}/src/.libs/libRivet.dylib ${libdir}/libRivet.so ; fi -+ - - .SUFFIXES: - am--refresh: Makefile -@@ -529,6 +544,7 @@ mostlyclean-libtool: - - clean-libtool: - -rm -rf .libs _libs -+ -rm -rf ${libdir} - - distclean-libtool: - -rm -f libtool config.lt -diff -rupN Rivet-3.1.7/include/Rivet/Makefile.in ../installed/rivet/3.1.7/include/Rivet/Makefile.in ---- Rivet-3.1.7/include/Rivet/Makefile.in 2022-09-28 14:33:10.000000000 +0100 -+++ ../installed/rivet/3.1.7/include/Rivet/Makefile.in 2023-04-14 15:30:58.413175143 +0100 -@@ -381,6 +381,7 @@ nobase_dist_noinst_HEADERS = Tools/osdir - Math/eigen3/README.md - - # TODO: Move to Rivet/AnalysisTools header dir? -+# Modified by GAMBIT - nobase_pkginclude_HEADERS = Rivet.hh Run.hh Event.hh ParticleBase.hh \ - Particle.fhh Particle.hh Jet.fhh Jet.hh Projection.fhh \ - Projection.hh ProjectionApplier.hh ProjectionHandler.hh \ -@@ -763,7 +764,21 @@ nobase_pkginclude_HEADERS = Rivet.hh RunF5 - Math/eigen3/src/SparseCore/SparseDiagonalProduct.h \ - Math/eigen3/src/SparseCore/SparseMatrixBase.h \ - Math/eigen3/src/SparseCore/SparseRef.h Math/eigen3/Geometry \ -- Math/eigen3/SparseCore -+ Math/eigen3/SparseCore \ -+ ../gambit/Backends/backend_undefs.hpp \ -+ ../gambit/Backends/wrapperbase.hpp \ -+ ../gambit/Backends/abstracttypedefs.hh \ -+ ../gambit/Backends/BOSS_wrapperutils.hh \ -+ ../gambit/Backends/wrappertypedefs.hh \ -+ ../gambit/Backends/function_return_utils.hpp \ -+ ../gambit/Utils/cats.hpp \ -+ ../backend_types/Rivet_3_1_7/identification.hpp \ -+ ../backend_types/Rivet_3_1_7/forward_decls_abstract_classes.hh \ -+ ../backend_types/Rivet_3_1_7/forward_decls_wrapper_classes.hh \ -+ ../backend_types/Rivet_3_1_7/abstract_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_decl.hh \ -+ ../backend_types/Rivet_3_1_7/wrapper_AnalysisHandler_def.hh - all: all-am - - .SUFFIXES: -diff -rupN Rivet-3.1.7/src/Core/Makefile.in ../installed/rivet/3.1.7/src/Core/Makefile.in ---- Rivet-3.1.7/src/Core/Makefile.in 2022-09-28 14:33:10.000000000 +0100 -+++ ../installed/rivet/3.1.7/src/Core/Makefile.in 2023-04-18 15:47:59.480540099 +0100 -@@ -118,7 +118,12 @@ am_libRivetCore_la_OBJECTS = libRivetCor - libRivetCore_la-AnalysisLoader.lo \ - libRivetCore_la-AnalysisInfo.lo \ - libRivetCore_la-AnalysisHandler.lo \ -- libRivetCore_la-ProjectionHandler.lo -+ libRivetCore_la-ProjectionHandler.lo \ -+ libRivetCore_la-BOSS_wrapperutils.lo \ -+ libRivetCore_la-BOSS_AnalysisHandler.lo \ -+ libRivetCore_la-BOSS_factory_AnalysisHandler.lo \ -+ libRivetCore_la-BOSS_func_addAnalysisLibPath.lo \ -+ libRivetCore_la-BOSS_function_return_utils.lo - libRivetCore_la_OBJECTS = $(am_libRivetCore_la_OBJECTS) - AM_V_lt = $(am__v_lt_@AM_V@) - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -@@ -143,6 +148,11 @@ am__depfiles_remade = ./$(DEPDIR)/libRiv - ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo \ - ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo \ - ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo \ -+ ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo \ -+ ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo \ -+ ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo \ -+ ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo \ -+ ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo \ - ./$(DEPDIR)/libRivetCore_la-Event.Plo \ - ./$(DEPDIR)/libRivetCore_la-Jet.Plo \ - ./$(DEPDIR)/libRivetCore_la-Particle.Plo \ -@@ -446,7 +456,12 @@ libRivetCore_la_SOURCES = \ - Run.cc Event.cc Jet.cc Particle.cc \ - ProjectionApplier.cc Projection.cc \ - Analysis.cc AnalysisLoader.cc AnalysisInfo.cc \ -- AnalysisHandler.cc ProjectionHandler.cc -+ AnalysisHandler.cc ProjectionHandler.cc \ -+ BOSS_wrapperutils.cc \ -+ BOSS_AnalysisHandler.cc \ -+ BOSS_factory_AnalysisHandler.cc \ -+ BOSS_func_addAnalysisLibPath.cc \ -+ BOSS_function_return_utils.cc - - libRivetCore_la_CPPFLAGS = -I$(srcdir)/yamlcpp -DYAML_NAMESPACE=RIVET_YAML $(AM_CPPFLAGS) - libRivetCore_la_LIBADD = $(builddir)/yamlcpp/librivet-yaml-cpp.la -@@ -508,6 +523,11 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Event.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Jet.Plo@am__quote@ # am--include-marker - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRivetCore_la-Particle.Plo@am__quote@ # am--include-marker -@@ -620,6 +640,41 @@ libRivetCore_la-ProjectionHandler.lo: Pr - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-ProjectionHandler.lo `test -f 'ProjectionHandler.cc' || echo '$(srcdir)/'`ProjectionHandler.cc - -+libRivetCore_la-BOSS_wrapperutils.lo: BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_wrapperutils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_wrapperutils.cc' object='libRivetCore_la-BOSS_wrapperutils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_wrapperutils.lo `test -f 'BOSS_wrapperutils.cc' || echo '$(srcdir)/'`BOSS_wrapperutils.cc -+ -+libRivetCore_la-BOSS_AnalysisHandler.lo: BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_AnalysisHandler.cc' object='libRivetCore_la-BOSS_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_AnalysisHandler.lo `test -f 'BOSS_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_factory_AnalysisHandler.lo: BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_factory_AnalysisHandler.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Tpo $(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_factory_AnalysisHandler.cc' object='libRivetCore_la-BOSS_factory_AnalysisHandler.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_factory_AnalysisHandler.lo `test -f 'BOSS_factory_AnalysisHandler.cc' || echo '$(srcdir)/'`BOSS_factory_AnalysisHandler.cc -+ -+libRivetCore_la-BOSS_func_addAnalysisLibPath.lo: BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_func_addAnalysisLibPath.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Tpo $(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_func_addAnalysisLibPath.cc' object='libRivetCore_la-BOSS_func_addAnalysisLibPath.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_func_addAnalysisLibPath.lo `test -f 'BOSS_func_addAnalysisLibPath.cc' || echo '$(srcdir)/'`BOSS_func_addAnalysisLibPath.cc -+ -+libRivetCore_la-BOSS_function_return_utils.lo: BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libRivetCore_la-BOSS_function_return_utils.lo -MD -MP -MF $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Tpo $(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BOSS_function_return_utils.cc' object='libRivetCore_la-BOSS_function_return_utils.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRivetCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libRivetCore_la-BOSS_function_return_utils.lo `test -f 'BOSS_function_return_utils.cc' || echo '$(srcdir)/'`BOSS_function_return_utils.cc -+ - mostlyclean-libtool: - -rm -f *.lo - -@@ -828,6 +883,11 @@ distclean: distclean-recursive - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo -@@ -884,6 +944,11 @@ maintainer-clean: maintainer-clean-recur - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisHandler.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisInfo.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-AnalysisLoader.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_AnalysisHandler.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_factory_AnalysisHandler.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_func_addAnalysisLibPath.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_function_return_utils.Plo -+ -rm -f ./$(DEPDIR)/libRivetCore_la-BOSS_wrapperutils.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Event.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Jet.Plo - -rm -f ./$(DEPDIR)/libRivetCore_la-Particle.Plo -diff -rupN Rivet-3.1.7/include/Rivet/AnalysisHandler.hh ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh ---- Rivet-3.1.7/include/Rivet/AnalysisHandler.hh 2022-05-05 15:06:25.000000000 +0100 -+++ ../installed/rivet/3.1.7/include/Rivet/AnalysisHandler.hh 2023-04-14 14:55:04.096679845 +0100 -@@ -27,10 +27,10 @@ namespace Rivet { - AnalysisHandler(const string& runname=""); - - /// The copy constructor is deleted, so it can never be called. -- AnalysisHandler(const AnalysisHandler&) = delete; -+ //AnalysisHandler(const AnalysisHandler&) = delete; // Commented by GAMBIT - - /// The assignment operator is deleted, so it can never be called. -- AnalysisHandler& operator=(const AnalysisHandler&) = delete; -+ //AnalysisHandler& operator=(const AnalysisHandler&) = delete; // Commented by GAMBIT - - /// The destructor is not virtual, as this class should not be inherited from. - ~AnalysisHandler(); -@@ -281,6 +281,9 @@ namespace Rivet { - /// Write all analyses' plots (via getData) to the named file. - void writeData(const string& filename) const; - -+ // Added by GAMBIT, Dummy function to force BOSS to add the headers for the YODA::AnalysisObject type -+ void dummy(YODA::AnalysisObject*) const; -+ - /// @brief Configure the AnalysisObject dump rate and destination. - /// - /// Tell Rivet to dump intermediate result to a file named @a -diff -rupN Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh ---- Rivet-3.1.7/include/Rivet/Tools/RivetHepMC.hh 2022-05-05 12:26:28.000000000 +0100 -+++ ../installed/rivet/3.1.7/include/Rivet/Tools/RivetHepMC.hh 2023-04-14 14:55:04.096679845 +0100 -@@ -8,7 +8,7 @@ - #include - - --#ifdef RIVET_ENABLE_HEPMC_3 -+//#ifdef RIVET_ENABLE_HEPMC_3 // Commented by GAMBIT - - #include "HepMC3/HepMC3.h" - #include "HepMC3/Relatives.h" -@@ -34,7 +34,8 @@ namespace Rivet { - using PdfInfo = RivetHepMC::GenPdfInfo; - } - --#else // HEPMC_2 -+// Commented by GAMBIT -+/*#else // HEPMC_2 - - #include "HepMC/GenEvent.h" - #include "HepMC/GenParticle.h" -@@ -75,7 +76,7 @@ namespace Rivet { - using PdfInfo = RivetHepMC::PdfInfo; - } - --#endif -+#endif*/ - - - namespace Rivet { -diff -rupN Rivet-3.1.7/analyses/Makefile.in ../installed/rivet/3.1.7/analyses/Makefile.in ---- Rivet-3.1.7/analyses/Makefile.in 2022-09-28 14:33:10.000000000 +0100 -+++ ../installed/rivet/3.1.7/analyses/Makefile.in 2023-04-19 21:07:06.580845603 +0100 -@@ -329,10 +329,10 @@ top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - AUTOMAKE_OPTIONS = -Wno-portability --PLUGIN_DIRS = $(shell ls -d $(srcdir)/plugin*) -+PLUGIN_DIRS = $(shell ls -d $(srcdir)/pluginCMS $(srcdir)/pluginATLAS $(srcdir)/pluginLHCb) - PLUGIN_NAMES = $(notdir $(subst plugin,,$(PLUGIN_DIRS))) - PLUGIN_LIBS = $(patsubst %,Rivet%Analyses.so,$(PLUGIN_NAMES)) --PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/plugin*/*.*) -+PLUGIN_DATAFILES = $(shell ls $(abs_srcdir)/pluginCMS/*.* $(abs_srcdir)/pluginATLAS/*.* $(abs_srcdir)/pluginLHCb/*.*) - CLEANFILES = $(PLUGIN_LIBS) - EXTRA_DIST = $(PLUGIN_DIRS) examples - all: all-am -@@ -449,8 +449,8 @@ distclean-generic: - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." --@ENABLE_ANALYSES_FALSE@install-data-local: - @ENABLE_ANALYSES_FALSE@install-exec-local: -+@ENABLE_ANALYSES_FALSE@install-data-local: - @ENABLE_ANALYSES_FALSE@uninstall-local: - clean: clean-am - -@@ -567,7 +567,7 @@ RivetTristanAnalyses.so: $(filter-out $( - - @ENABLE_ANALYSES_TRUE@all-local: $(PLUGIN_LIBS) $(PLUGIN_DATAFILES) - @ENABLE_ANALYSES_TRUE@ mkdir -p $(builddir)/data --@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/plugin*; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done -+@ENABLE_ANALYSES_TRUE@ for pdir in $(abs_srcdir)/pluginCMS $(abs_srcdir)/pluginATLAS $(abs_srcdir)/pluginLHCb; do $(LN_S) -f $${pdir}/*.* $(builddir)/data; done - - @ENABLE_ANALYSES_TRUE@install-exec-local: $(PLUGIN_LIBS) - @ENABLE_ANALYSES_TRUE@ $(MKDIR_P) $(DESTDIR)$(libdir)/Rivet -@@ -576,7 +576,7 @@ RivetTristanAnalyses.so: $(filter-out $( - @ENABLE_ANALYSES_TRUE@install-data-local: $(PLUGIN_DATAFILES) - @ENABLE_ANALYSES_TRUE@ @echo "Installing analysis data files..." - @ENABLE_ANALYSES_TRUE@ $(mkdir_p) $(DESTDIR)$(pkgdatadir) --@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/plugin* $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done -+@ENABLE_ANALYSES_TRUE@ for pdir in $(srcdir)/pluginCMS $(srcdir)/pluginLHCb $(srcdir)/pluginATLAS $(srcdir)/examples; do $(FCP) $${pdir}/*.* $(DESTDIR)$(pkgdatadir)/; done - - @ENABLE_ANALYSES_TRUE@uninstall-local: - @ENABLE_ANALYSES_TRUE@ cd $(DESTDIR)$(libdir) && rm -f $(PLUGIN_LIBS) -diff -rupN Rivet-3.1.7/src/Core/AnalysisHandler.cc ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc ---- Rivet-3.1.7/src/Core/AnalysisHandler.cc 2022-07-26 09:34:20.000000000 +0100 -+++ ../installed/rivet/3.1.7/src/Core/AnalysisHandler.cc 2023-04-14 14:55:04.100679799 +0100 -@@ -123,7 +123,8 @@ namespace Rivet { - if (num_anas_requested > 0 && analysisNames().empty()) { - MSG_ERROR("All analyses were incompatible with the first event's beams\n" - << "Exiting, since this probably wasn't intentional!"); -- exit(1); -+ //exit(1); // Commented by GAMBIT -+ throw std::runtime_error("All analyses were incompatible with the first event's beams\n"); // Added by GAMBIT - } - - // Warn if any analysis' status is not unblemished -@@ -1087,6 +1088,12 @@ namespace Rivet { - - } - -+ // Added by GAMBIT, dummy function to force BOSS to add the headers for the YODA::AnalysisObject type -+ void AnalysisHandler::dummy(YODA::AnalysisObject* object) const { -+ -+ // Nothing to do here -+ -+ } - - string AnalysisHandler::runName() const { - return _runname; diff --git a/Backends/patches/rivet/3.1.7/touch_files.sh b/Backends/patches/rivet/3.1.7/touch_files.sh deleted file mode 100755 index 845fed1c18..0000000000 --- a/Backends/patches/rivet/3.1.7/touch_files.sh +++ /dev/null @@ -1,3 +0,0 @@ -for dir in $Rivet_dirs; do for file in "$dir"/*lo; do [ -e "$file" ] && touch $file; done; done -for dir in $Rivet_dirs; do for file in "$dir"/*la; do [ -e "$file" ] && touch $file; done; done -echo "Reseting library modification times" diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_5.py b/Backends/scripts/BOSS/configs/rivet_3_1_5.py deleted file mode 100644 index 8a2c9240cc..0000000000 --- a/Backends/scripts/BOSS/configs/rivet_3_1_5.py +++ /dev/null @@ -1,131 +0,0 @@ -################################### -# # -# Configuration module for BOSS # -# # -################################### - - -# ~~~~~ CASTXML options ~~~~~ - -# See CastXML documentation for details on these options: -# -# https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst -# - -# -# *** Special note for OS X *** -# -# BOSS will most likely fail if 'g++' points to the Clang compiler. -# Install GNU g++ and point the castxml_cc variable below the GNU -# g++ executable. -# - -castxml_cc_id = 'gnu' # Reference compiler: 'gnu', 'gnu-c', 'msvc', 'msvc-c' -castxml_cc = 'g++' # Name a specific compiler: 'g++', 'cl', ... -castxml_cc_opt = '-std=c++11' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') - - -# ~~~~~ GAMBIT-specific options ~~~~~ - -gambit_backend_name = 'Rivet' -gambit_backend_version = '3.1.5' -gambit_backend_reference = 'Bierlich:2019rhm' -gambit_base_namespace = '' - - -# ~~~~~ Information about the external code ~~~~~ - -# Use either absolute paths or paths relative to the main BOSS directory. - -input_files = [ - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/AnalysisHandler.hh', - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/Tools/RivetPaths.hh' -] -include_paths = [ - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include', - '../../../contrib/HepMC3-3.2.5/local/include', - '../../../contrib/YODA-1.9.7/local/include', - '../../../Backends/installed/fastjet/3.3.2/local/include' -] -base_paths = ['../../../Backends/installed/rivet/'+gambit_backend_version] - -header_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/include' -src_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/src/Core' - -load_classes = [ - 'Rivet::AnalysisHandler' -] - -load_functions = [ - 'Rivet::addAnalysisLibPath(const std::string&)' -] - -ditch = [ - 'Rivet::AnalysisHandler::stripOptions', - 'Rivet::AnalysisHandler::getPreload' -] - - -auto_detect_stdlib_paths = False - - -load_parent_classes = False -wrap_inherited_members = False - - -header_extension = '.hh' -source_extension = '.cc' - -indent = 3 - - -# ~~~~~ Information about other known types ~~~~~ - -# Dictionary key: type name -# Dictionary value: header file with containing type declaration. -# -# Example: -# known_classes = {"SomeNamespace::KnownClassOne" : "path_to_header/KnownClassOne.hpp", -# "AnotherNamespace::KnownClassTwo" : "path_to_header/KnownClassTwo.hpp" } - -known_classes = { - "HepMC3::GenEvent" : "HepMC3/GenEvent.h", - "YODA::AnalysisObject" : "YODA/AnalysisObject.h" -} - - -# ~~~~~ Declarations to be added to the frontend header file ~~~~~ - -convenience_functions = [] - -ini_function_in_header = False - - -# ~~~~~ Pragma directives for the inclusion of BOSSed classes in GAMBIT ~~~~~ - -# The listed pragma directives will be added before/after including the -# the BOSS-generated headers in GAMBIT. - -pragmas_begin = [ - '#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp"', # Contains pragmas to suppress warnings from YODA and HepMC -] - -pragmas_end = [ - '#include "gambit/Utils/end_ignore_warnings.hpp"', # Restores the warning settings -] - - -# ~~~~~ Extra code to surround BOSS-generated code included in GAMBIT ~~~~~ - -# The listed code will be added at the top/bottom in the frontend header file -# and in the loaded_types.hpp header. - -surround_code_begin = ''' -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC -''' - -surround_code_end = ''' -#endif -#endif -''' diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_7.py b/Backends/scripts/BOSS/configs/rivet_3_1_7.py deleted file mode 100644 index 696021af76..0000000000 --- a/Backends/scripts/BOSS/configs/rivet_3_1_7.py +++ /dev/null @@ -1,131 +0,0 @@ -################################### -# # -# Configuration module for BOSS # -# # -################################### - - -# ~~~~~ CASTXML options ~~~~~ - -# See CastXML documentation for details on these options: -# -# https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst -# - -# -# *** Special note for OS X *** -# -# BOSS will most likely fail if 'g++' points to the Clang compiler. -# Install GNU g++ and point the castxml_cc variable below the GNU -# g++ executable. -# - -castxml_cc_id = 'gnu' # Reference compiler: 'gnu', 'gnu-c', 'msvc', 'msvc-c' -castxml_cc = 'g++' # Name a specific compiler: 'g++', 'cl', ... -castxml_cc_opt = '-std=c++14' # Additional option string passed to the compiler in castxml_cc (e.g. '-m32') - - -# ~~~~~ GAMBIT-specific options ~~~~~ - -gambit_backend_name = 'Rivet' -gambit_backend_version = '3.1.7' -gambit_backend_reference = 'Bierlich:2019rhm' -gambit_base_namespace = '' - - -# ~~~~~ Information about the external code ~~~~~ - -# Use either absolute paths or paths relative to the main BOSS directory. - -input_files = [ - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/AnalysisHandler.hh', - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include/Rivet/Tools/RivetPaths.hh' -] -include_paths = [ - '../../../Backends/installed/rivet/'+gambit_backend_version+'/include', - '../../../contrib/HepMC3-3.2.5/local/include', - '../../../contrib/YODA-1.9.7/local/include', - '../../../Backends/installed/fastjet/3.4.0/local/include' -] -base_paths = ['../../../Backends/installed/rivet/'+gambit_backend_version] - -header_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/include' -src_files_to = '../../../Backends/installed/rivet/'+gambit_backend_version+'/src/Core' - -load_classes = [ - 'Rivet::AnalysisHandler' -] - -load_functions = [ - 'Rivet::addAnalysisLibPath(const std::string&)' -] - -ditch = [ - 'Rivet::AnalysisHandler::stripOptions', - 'Rivet::AnalysisHandler::getPreload' -] - - -auto_detect_stdlib_paths = False - - -load_parent_classes = False -wrap_inherited_members = False - - -header_extension = '.hh' -source_extension = '.cc' - -indent = 3 - - -# ~~~~~ Information about other known types ~~~~~ - -# Dictionary key: type name -# Dictionary value: header file with containing type declaration. -# -# Example: -# known_classes = {"SomeNamespace::KnownClassOne" : "path_to_header/KnownClassOne.hpp", -# "AnotherNamespace::KnownClassTwo" : "path_to_header/KnownClassTwo.hpp" } - -known_classes = { - "HepMC3::GenEvent" : "HepMC3/GenEvent.h", - "YODA::AnalysisObject" : "YODA/AnalysisObject.h" -} - - -# ~~~~~ Declarations to be added to the frontend header file ~~~~~ - -convenience_functions = [] - -ini_function_in_header = False - - -# ~~~~~ Pragma directives for the inclusion of BOSSed classes in GAMBIT ~~~~~ - -# The listed pragma directives will be added before/after including the -# the BOSS-generated headers in GAMBIT. - -pragmas_begin = [ - '#include "gambit/Utils/begin_ignore_warnings_rivet_backend.hpp"', # Contains pragmas to suppress warnings from YODA and HepMC -] - -pragmas_end = [ - '#include "gambit/Utils/end_ignore_warnings.hpp"', # Restores the warning settings -] - - -# ~~~~~ Extra code to surround BOSS-generated code included in GAMBIT ~~~~~ - -# The listed code will be added at the top/bottom in the frontend header file -# and in the loaded_types.hpp header. - -surround_code_begin = ''' -#ifndef EXCLUDE_YODA -#ifndef EXCLUDE_HEPMC -''' - -surround_code_end = ''' -#endif -#endif -''' diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 3911a57b88..21af14312d 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2087,7 +2087,7 @@ endif() set(patch_dir "${PROJECT_SOURCE_DIR}/Backends/patches/${name}/${ver}") set(patch "${patch_dir}/patch_${name}_${ver}.dif") -## Rivet needs to be compiled with c++17, otherwise it will fail to compile +## Rivet needs to be compiled with c++14 or c++17, otherwise it will fail to compile set(ditch_if_absent "HepMC;YODA;c++14") ## If cython is not installed disable the python extension gambit_find_python_module(cython) From dcbcbd5d68405a5865825985d338c282f5d5def8 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 30 May 2023 11:05:28 +0200 Subject: [PATCH 32/49] Update Rivet/Contur versions for CBS --- ColliderBit/examples/solo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ColliderBit/examples/solo.cpp b/ColliderBit/examples/solo.cpp index eb803b95eb..50fe49539e 100755 --- a/ColliderBit/examples/solo.cpp +++ b/ColliderBit/examples/solo.cpp @@ -27,10 +27,10 @@ #define NULIKE_VERSION "1.0.9" #define NULIKE_SAFE_VERSION 1_0_9 -#define RIVET_VERSION "3.1.5" -#define RIVET_SAFE_VERSION 3_1_5 -#define CONTUR_VERSION "2.1.1" -#define CONTUR_SAFE_VERSION 2_1_1 +#define RIVET_VERSION "3.1.8" +#define RIVET_SAFE_VERSION 3_1_8 +#define CONTUR_VERSION "2.4.1" +#define CONTUR_SAFE_VERSION 2_4_1 #define FULLLIKES_VERSION "1.0" #define FULLLIKES_SAFE_VERSION 1_0 From 897730ee19e277bfba4158c69426705a71dd85a8 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 20 Jun 2023 19:07:29 +0200 Subject: [PATCH 33/49] Upgrade Contur 2.4.1 -> 2.4.3 --- .../{Contur_2_4_1.hpp => Contur_2_4_3.hpp} | 6 +- .../contur/2.4.1/patch_contur_2.4.1.dif | 59 ------------------- .../contur/2.4.3/patch_contur_2.4.3.dif | 27 +++++++++ .../{Contur_2_4_1.cpp => Contur_2_4_3.cpp} | 2 +- ColliderBit/examples/solo.cpp | 4 +- cmake/backends.cmake | 4 +- config/backend_locations.yaml.default | 2 +- 7 files changed, 36 insertions(+), 68 deletions(-) rename Backends/include/gambit/Backends/frontends/{Contur_2_4_1.hpp => Contur_2_4_3.hpp} (94%) delete mode 100644 Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif create mode 100644 Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif rename Backends/src/frontends/{Contur_2_4_1.cpp => Contur_2_4_3.cpp} (98%) diff --git a/Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp b/Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp similarity index 94% rename from Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp rename to Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp index e2b7f1f9f6..59f83badb6 100644 --- a/Backends/include/gambit/Backends/frontends/Contur_2_4_1.hpp +++ b/Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp @@ -19,14 +19,14 @@ /// \author Tomasz Procter /// (t.procter.1@research.gla.ac.uk) /// \date 2021 June -/// \date 2023 May +/// \date 2023 May, June /// /// ********************************************* #define BACKENDNAME Contur #define BACKENDLANG Python3 -#define VERSION 2.4.1 -#define SAFE_VERSION 2_4_1 +#define VERSION 2.4.3 +#define SAFE_VERSION 2_4_3 #define REFERENCE Butterworth:2016sqg LOAD_LIBRARY diff --git a/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif b/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif deleted file mode 100644 index 750d5e991e..0000000000 --- a/Backends/patches/contur/2.4.1/patch_contur_2.4.1.dif +++ /dev/null @@ -1,59 +0,0 @@ -diff -rupN contur-2.4.1_original/contur/util/utils.py contur-2.4.1_patched/contur/util/utils.py ---- contur-2.4.1_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 -+++ contur-2.4.1_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 -@@ -16,12 +16,17 @@ import logging - - import scipy.stats as spstat - --## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option --try: -- from tqdm import tqdm as progress_bar --except ImportError: -- def progress_bar(iterable, **kwargs): -- return iterable -+# GAMBIT patch to avoid importing tqdm below -+def progress_bar(iterable, **kwargs): -+ return iterable -+ -+# ## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option -+# try: -+# from tqdm import tqdm as progress_bar -+# except ImportError: -+# def progress_bar(iterable, **kwargs): -+# return iterable -+ - - def mkoutdir(outdir): - """ -diff -rupN contur-2.4.1_original/data/DB/analyses.sql contur-2.4.1_patched/data/DB/analyses.sql ---- contur-2.4.1_original/data/DB/analyses.sql 2023-03-13 19:06:38.000000000 +0100 -+++ contur-2.4.1_patched/data/DB/analyses.sql 2023-05-11 19:26:58.885611301 +0200 -@@ -182,8 +182,8 @@ INSERT INTO analysis_pool VALUES('ATLAS_ - -- LEP - -- Hadronic Z decay in EE collisions - -- INSERT INTO analysis_pool VALUES('DELPHI_em_ep_91_2_LLJET', 'em_ep_91_2', 'hadronic z decay to two leptons'); --INSERT INTO analysis_pool VALUES('OPAL_912_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); --INSERT INTO analysis_pool VALUES('OPAL_912_JETS_GAMMA', 'em_ep_91_2', 'z decay to hadronic and photon final states'); -+-- INSERT INTO analysis_pool VALUES('OPAL_912_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); -+-- INSERT INTO analysis_pool VALUES('OPAL_912_JETS_GAMMA', 'em_ep_91_2', 'z decay to hadronic and photon final states'); - -- INSERT INTO analysis_pool VALUES('ALEPH_em_ep_91_2_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); - -- INSERT INTO analysis_pool VALUES('L3_em_ep_91_2_JETS', 'em_ep_91_2', 'z decay to multiple hadronic final states'); - -@@ -498,14 +498,14 @@ INSERT INTO analysis VALUES('CMS_2020_I1 - - -- LEP Z decays - -- INSERT INTO analysis VALUES('DELPHI_1994_I375963', 0.0405, 'DELPHI_em_ep_91_2_LLJET'); -- dimuons --INSERT INTO analysis VALUES('OPAL_1992_I321190', 'pb', 'OPAL_912_JETS'); -- Charged Particle Multiplicities of hadronic final states -+-- INSERT INTO analysis VALUES('OPAL_1992_I321190', 'pb', 'OPAL_912_JETS'); -- Charged Particle Multiplicities of hadronic final states - -- INSERT INTO analysis VALUES('ALEPH_2001_I555653', 160, 'ALEPH_em_ep_91_2'); -- tau polarization (lots of different decay modes?) - -- INSERT INTO analysis VALUES('ALEPH_1996_I421984', 132, 'ALEPH_em_ep_91_2_JETS'); -- tau decays with eta and omega mesons - -- INSERT INTO analysis VALUES('L3_1994_I374698', 35, 'L3_em_ep_91_2_JETS'); -- particle identification and multiple decay modes? - -- INSERT INTO analysis VALUES('L3_1997_I427107', 112, 'L3_em_ep_91_2_JETS'); -- eta' and omega meson production rates - -- INSERT INTO analysis VALUES('L3_1998_I467929', 149, 'l3_em_ep_91_2_JETS'); -- multiple different final states? --INSERT INTO analysis VALUES('OPAL_1993_S2692198', 'pb', 'OPAL_912_JETS_GAMMA'); -- photon production from quarks (rivet routine dodgy) --INSERT INTO analysis VALUES('OPAL_1994_S2927284', 'pb', 'OPAL_912_JETS'); -- meson and hadron production rates -+-- INSERT INTO analysis VALUES('OPAL_1993_S2692198', 'pb', 'OPAL_912_JETS_GAMMA'); -- photon production from quarks (rivet routine dodgy) -+-- INSERT INTO analysis VALUES('OPAL_1994_S2927284', 'pb', 'OPAL_912_JETS'); -- meson and hadron production rates - -- INSERT INTO analysis VALUES('OPAL_1995_I393503', 45.9, 'OPAL_em_ep_91_2_JETS'); -- K0 particle identification? - -- INSERT INTO analysis VALUES('OPAL_1998_S3780481', 177, 'OPAL_em_ep_91_2_JETS'); -- qqbar fragmentation functions - -- INSERT INTO analysis VALUES('OPAL_2001_I554583', 151, 'OPAL_em_ep_91_2_JETS'); -- tau polarization (lots of decay modes?) \ No newline at end of file diff --git a/Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif b/Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif new file mode 100644 index 0000000000..cd678c4595 --- /dev/null +++ b/Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif @@ -0,0 +1,27 @@ +diff -rupN contur-2.4.3_original/contur/util/utils.py contur-2.4.3_patched/contur/util/utils.py +--- contur-2.4.3_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 ++++ contur-2.4.3_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 +@@ -16,12 +16,17 @@ import logging + + import scipy.stats as spstat + +-## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option +-try: +- from tqdm import tqdm as progress_bar +-except ImportError: +- def progress_bar(iterable, **kwargs): +- return iterable ++# GAMBIT patch to avoid importing tqdm below ++def progress_bar(iterable, **kwargs): ++ return iterable ++ ++# ## Import the tqdm progress-bar if possible, otherwise fall back to a safe do-nothing option ++# try: ++# from tqdm import tqdm as progress_bar ++# except ImportError: ++# def progress_bar(iterable, **kwargs): ++# return iterable ++ + + def mkoutdir(outdir): + """ \ No newline at end of file diff --git a/Backends/src/frontends/Contur_2_4_1.cpp b/Backends/src/frontends/Contur_2_4_3.cpp similarity index 98% rename from Backends/src/frontends/Contur_2_4_1.cpp rename to Backends/src/frontends/Contur_2_4_3.cpp index 4437152431..46a15801ca 100644 --- a/Backends/src/frontends/Contur_2_4_1.cpp +++ b/Backends/src/frontends/Contur_2_4_3.cpp @@ -24,7 +24,7 @@ /// ********************************************* #include "gambit/Backends/frontend_macros.hpp" -#include "gambit/Backends/frontends/Contur_2_4_1.hpp" +#include "gambit/Backends/frontends/Contur_2_4_3.hpp" #ifdef HAVE_PYBIND11 diff --git a/ColliderBit/examples/solo.cpp b/ColliderBit/examples/solo.cpp index 50fe49539e..f0190b83bf 100755 --- a/ColliderBit/examples/solo.cpp +++ b/ColliderBit/examples/solo.cpp @@ -29,8 +29,8 @@ #define RIVET_VERSION "3.1.8" #define RIVET_SAFE_VERSION 3_1_8 -#define CONTUR_VERSION "2.4.1" -#define CONTUR_SAFE_VERSION 2_4_1 +#define CONTUR_VERSION "2.4.3" +#define CONTUR_SAFE_VERSION 2_4_3 #define FULLLIKES_VERSION "1.0" #define FULLLIKES_SAFE_VERSION 1_0 diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 21af14312d..526a4efd3d 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2129,9 +2129,9 @@ endif() # Contur set(name "contur") -set(ver "2.4.1") +set(ver "2.4.3") set(dl "https://gitlab.com/hepcedar/${name}/-/archive/${name}-${ver}/${name}-${name}-${ver}.tar.gz") -set(md5 "c8d988c279b333794f4b66c9b19025de") +set(md5 "504e22efe90b82d8fe5b27789c5d2daa") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(contur_dir "${dir}/contur") set(init_file ${contur_dir}/init_by_GAMBIT.py) diff --git a/config/backend_locations.yaml.default b/config/backend_locations.yaml.default index 2d726382b9..385000323f 100644 --- a/config/backend_locations.yaml.default +++ b/config/backend_locations.yaml.default @@ -29,7 +29,7 @@ classy: exo_2.7.2: ./Backends/installed/classy/exo_2.7.2/lib/classy_exo_2_7_2.py Contur: - 2.4.1: ./Backends/installed/contur/2.4.1/contur/init_by_GAMBIT.py + 2.4.3: ./Backends/installed/contur/2.4.3/contur/init_by_GAMBIT.py DarkAges: 1.2.0: ./Backends/installed/darkages/1.2.0/DarkAges_1_2_0 From 87e8416ee948663aa3e79e24f715de8777eb8186 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Mon, 10 Jul 2023 12:22:47 +0200 Subject: [PATCH 34/49] Upgrade Contur->2.4.4 to allow complete exclusion of multiprocessing python module --- .../frontends/{Contur_2_4_3.hpp => Contur_2_4_4.hpp} | 4 ++-- .../patch_contur_2.4.3.dif => 2.4.4/patch_contur_2.4.4.dif} | 6 +++--- .../src/frontends/{Contur_2_4_3.cpp => Contur_2_4_4.cpp} | 3 ++- ColliderBit/examples/solo.cpp | 4 ++-- cmake/backends.cmake | 4 ++-- config/backend_locations.yaml.default | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) rename Backends/include/gambit/Backends/frontends/{Contur_2_4_3.hpp => Contur_2_4_4.hpp} (96%) rename Backends/patches/contur/{2.4.3/patch_contur_2.4.3.dif => 2.4.4/patch_contur_2.4.4.dif} (76%) rename Backends/src/frontends/{Contur_2_4_3.cpp => Contur_2_4_4.cpp} (97%) diff --git a/Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp b/Backends/include/gambit/Backends/frontends/Contur_2_4_4.hpp similarity index 96% rename from Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp rename to Backends/include/gambit/Backends/frontends/Contur_2_4_4.hpp index 59f83badb6..82a8593e6b 100644 --- a/Backends/include/gambit/Backends/frontends/Contur_2_4_3.hpp +++ b/Backends/include/gambit/Backends/frontends/Contur_2_4_4.hpp @@ -25,8 +25,8 @@ #define BACKENDNAME Contur #define BACKENDLANG Python3 -#define VERSION 2.4.3 -#define SAFE_VERSION 2_4_3 +#define VERSION 2.4.4 +#define SAFE_VERSION 2_4_4 #define REFERENCE Butterworth:2016sqg LOAD_LIBRARY diff --git a/Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif b/Backends/patches/contur/2.4.4/patch_contur_2.4.4.dif similarity index 76% rename from Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif rename to Backends/patches/contur/2.4.4/patch_contur_2.4.4.dif index cd678c4595..a545611522 100644 --- a/Backends/patches/contur/2.4.3/patch_contur_2.4.3.dif +++ b/Backends/patches/contur/2.4.4/patch_contur_2.4.4.dif @@ -1,6 +1,6 @@ -diff -rupN contur-2.4.3_original/contur/util/utils.py contur-2.4.3_patched/contur/util/utils.py ---- contur-2.4.3_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 -+++ contur-2.4.3_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 +diff -rupN contur-2.4.4_original/contur/util/utils.py contur-2.4.4_patched/contur/util/utils.py +--- contur-2.4.4_original/contur/util/utils.py 2021-09-26 16:58:41.000000000 +0200 ++++ contur-2.4.4_patched/contur/util/utils.py 2023-02-20 16:48:41.182701916 +0100 @@ -16,12 +16,17 @@ import logging import scipy.stats as spstat diff --git a/Backends/src/frontends/Contur_2_4_3.cpp b/Backends/src/frontends/Contur_2_4_4.cpp similarity index 97% rename from Backends/src/frontends/Contur_2_4_3.cpp rename to Backends/src/frontends/Contur_2_4_4.cpp index 46a15801ca..f536800f63 100644 --- a/Backends/src/frontends/Contur_2_4_3.cpp +++ b/Backends/src/frontends/Contur_2_4_4.cpp @@ -24,7 +24,7 @@ /// ********************************************* #include "gambit/Backends/frontend_macros.hpp" -#include "gambit/Backends/frontends/Contur_2_4_3.hpp" +#include "gambit/Backends/frontends/Contur_2_4_4.hpp" #ifdef HAVE_PYBIND11 @@ -38,6 +38,7 @@ void Contur_add_GAMBIT_default_args(pybind11::dict& args_dict) { args_dict[pybind11::cast("QUIET")] = pybind11::bool_(true); + args_dict[pybind11::cast("NOMULTIP")] = pybind11::bool_(true); args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")] = pybind11::list(); args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("LLR"); args_dict[pybind11::cast("YODASTREAM_API_OUTPUT_OPTIONS")].attr("append")("Pool_LLR"); diff --git a/ColliderBit/examples/solo.cpp b/ColliderBit/examples/solo.cpp index f0190b83bf..e91d3d6390 100755 --- a/ColliderBit/examples/solo.cpp +++ b/ColliderBit/examples/solo.cpp @@ -29,8 +29,8 @@ #define RIVET_VERSION "3.1.8" #define RIVET_SAFE_VERSION 3_1_8 -#define CONTUR_VERSION "2.4.3" -#define CONTUR_SAFE_VERSION 2_4_3 +#define CONTUR_VERSION "2.4.4" +#define CONTUR_SAFE_VERSION 2_4_4 #define FULLLIKES_VERSION "1.0" #define FULLLIKES_SAFE_VERSION 1_0 diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 526a4efd3d..87e7d23670 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2129,9 +2129,9 @@ endif() # Contur set(name "contur") -set(ver "2.4.3") +set(ver "2.4.4") set(dl "https://gitlab.com/hepcedar/${name}/-/archive/${name}-${ver}/${name}-${name}-${ver}.tar.gz") -set(md5 "504e22efe90b82d8fe5b27789c5d2daa") +set(md5 "07c99d1656f4a40ed84bc6c3f313c63f") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(contur_dir "${dir}/contur") set(init_file ${contur_dir}/init_by_GAMBIT.py) diff --git a/config/backend_locations.yaml.default b/config/backend_locations.yaml.default index 385000323f..62b89b9432 100644 --- a/config/backend_locations.yaml.default +++ b/config/backend_locations.yaml.default @@ -29,7 +29,7 @@ classy: exo_2.7.2: ./Backends/installed/classy/exo_2.7.2/lib/classy_exo_2_7_2.py Contur: - 2.4.3: ./Backends/installed/contur/2.4.3/contur/init_by_GAMBIT.py + 2.4.4: ./Backends/installed/contur/2.4.4/contur/init_by_GAMBIT.py DarkAges: 1.2.0: ./Backends/installed/darkages/1.2.0/DarkAges_1_2_0 From 050786245876cad0635a0b8ec09917a756e61a32 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Tue, 5 Dec 2023 19:10:32 +0100 Subject: [PATCH 35/49] Update capabilities.dat for rivet 3.1.5, Contur 2.4.4 --- config/capabilities.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/capabilities.dat b/config/capabilities.dat index c6b82509cc..3e1b28773a 100644 --- a/config/capabilities.dat +++ b/config/capabilities.dat @@ -6309,7 +6309,7 @@ varNames: | # Rivet & Contur capabilites #----------------------- -Rivet_3_1_5_init: | +Rivet_3_1_8_init: | Initialise Rivet backend Rivet_measurements: | @@ -6318,7 +6318,7 @@ Rivet_measurements: | addAnalysisLibPath: | Wrapper for Rivet's addaAnalysisLibPath. Adds a path to Rivet's AnalysisLibPath environment variable. -Contur_2_1_1_init: | +Contur_2_4_4_init: | Initialise Contur backend Contur_GetAnalyses: | From 964bebeee70460631067384a1f644d15b2685720 Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Wed, 6 Dec 2023 12:56:50 +0100 Subject: [PATCH 36/49] Upgrade yoda 1.9.7->1.9.9 --- Backends/scripts/BOSS/configs/rivet_3_1_8.py | 2 +- cmake/backends.cmake | 1 + cmake/contrib.cmake | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Backends/scripts/BOSS/configs/rivet_3_1_8.py b/Backends/scripts/BOSS/configs/rivet_3_1_8.py index dd3164a3c9..bb8e9c82c1 100644 --- a/Backends/scripts/BOSS/configs/rivet_3_1_8.py +++ b/Backends/scripts/BOSS/configs/rivet_3_1_8.py @@ -44,7 +44,7 @@ include_paths = [ '../../../Backends/installed/rivet/'+gambit_backend_version+'/include', '../../../contrib/HepMC3-3.2.5/local/include', - '../../../contrib/YODA-1.9.7/local/include', + '../../../contrib/YODA-1.9.9/local/include', '../../../Backends/installed/fastjet/3.4.0/local/include' ] base_paths = ['../../../Backends/installed/rivet/'+gambit_backend_version] diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 25888e49c3..85788632b4 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2139,6 +2139,7 @@ if(NOT ditched_${name}_${ver}) CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "import sys" > ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "import os" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${YODA_PY_PATH}')" >> ${init_file} + COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${YODA_ALT_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${Rivet_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${Rivet_alt_PY_PATH}')" >> ${init_file} COMMAND ${CMAKE_COMMAND} -E echo "sys.path.append('${dir}')" >> ${init_file} diff --git a/cmake/contrib.cmake b/cmake/contrib.cmake index 334c2419b3..ec44ea0f92 100644 --- a/cmake/contrib.cmake +++ b/cmake/contrib.cmake @@ -243,7 +243,7 @@ else() endif() set(name "yoda") -set(ver "1.9.7") +set(ver "1.9.9") set(dir "${PROJECT_SOURCE_DIR}/contrib/YODA-${ver}") if(WITH_YODA) message("-- YODA-dependent functions in ColliderBit will be activated.") @@ -259,7 +259,7 @@ endif() if(NOT EXCLUDE_YODA) set(lib "YODA") set(dl "https://yoda.hepforge.org/downloads/?f=YODA-${ver}.tar.gz") - set(md5 "c5bc336d3caa3f357db484536c10dbc8") + set(md5 "9bdbcaa570c4a04d525f0f7ee6e06d54") include_directories("${dir}/include") set(YODA_PATH "${dir}") set(YODA_LIB "${dir}/local/lib") @@ -272,6 +272,8 @@ if(NOT EXCLUDE_YODA) set_compiler_warning("no-deprecated-copy" YODA_CXX_FLAGS) set_compiler_warning("no-implicit-fallthrough" YODA_CXX_FLAGS) set(YODA_PY_PATH "${dir}/local/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages") + #TODO (TP Dec 23): Bodge to cover different forms of python install: would be good to be able to autodetect + set(YODA_ALT_PY_PATH "${dir}/local/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${YODA_LIB}") # If cython is not installed disable the python extension gambit_find_python_module(cython) From ca3b2dc3861ff19d8322d67f5e38f0748fa856c6 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Sun, 10 Dec 2023 23:57:36 +0100 Subject: [PATCH 37/49] Added installation of the python module 'pathos' to the Ubuntu CI job script. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be2c2faaf4..a1254f8793 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh cat buildenv.sh - pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 pathos - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh From 208c291be0ca9ccb11108b261aba9779db690bf1 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 14:05:21 +0100 Subject: [PATCH 38/49] Temporary changes to ci.yml to debug issue with contur not being found by GAMBIT. --- .github/workflows/ci.yml | 130 ++++++++++++++++++++++++++++++++------- 1 file changed, 109 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1254f8793..c6bfd76f17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: - cron: '0 5 * * *' jobs: - gambit_build: + contur_upgrade_debug: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -48,37 +48,125 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" + - name: Build backends + run: | + cd BUILD && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) rivet + make -j$(( ($(nproc)+1)/2 )) contur + make -j$(( ($(nproc)+1)/2 )) pythia + make ATLAS_FullLikes + make nulike + make susyhit + make higgsbounds + make higgssignals + echo + echo + echo "DEBUG: Listing content of Backends/installed: " + echo + ls -Rl Backends/installed - name: Build scanners run: | cd BUILD/ && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) scanners + make diver cmake .. - name: Build Gambit run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit - - name: Build backends - run: | - cd BUILD && . buildenv.sh - #make -j$(( ($(nproc)+1)/2 )) backends - make backends - - name: CLI test - run: | - . BUILD/buildenv.sh - ./gambit -h - - name: WC test - run: | - . BUILD/buildenv.sh - ./gambit -f yaml_files/WC_lite.yaml + echo "DEBUG: Listing content of contrib: " + ls -Rl contrib + echo + echo + echo "DEBUG: Listing output of ./gambit backends: " + echo + ./gambit backends 2>&1 | tee gambit_backends.txt + cat gambit_backends.txt - name: ColliderBit test run: | . BUILD/buildenv.sh - ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - - name: Build standalones - run: | - cd BUILD && . buildenv.sh - make standalones + echo + echo + echo "DEBUG: Run ColliderBit_CMSSM.yaml and output default.log: " + echo + OMP_NUM_THREADS=1 ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml ; cat runs/ColliderBit_CMSSM/logs/default.log + echo + echo "DEBUG: End of default.log:" + echo + + + + # gambit_build: + # runs-on: [docker, self-hosted] + # strategy: + # fail-fast: false + # matrix: + # arch: [ubuntu] #, ubuntu-py2, fedora + # #mpi: [ON, OFF] + # container: gambitbsm/gambit-base:${{ matrix.arch }} + # defaults: + # run: + # shell: bash -eo pipefail {0} + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Set up build environment + # run: | + # mkdir -p BUILD + # cd BUILD + # echo "Sourcing setup.sh" + # cat /etc/profile.d/gambit-setup.sh + # source /etc/profile.d/gambit-setup.sh + # echo "Making buildenv.sh" + # > buildenv.sh + # echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh + # echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh + # echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh + # echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh + # echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh + # PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') + # PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') + # echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh + # echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh + # echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh + # echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh + # cat buildenv.sh + # pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 pathos + # - name: Configure with cmake + # run: | + # cd BUILD/ && . buildenv.sh + # cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + # - name: Build scanners + # run: | + # cd BUILD/ && . buildenv.sh + # make -j$(( ($(nproc)+1)/2 )) scanners + # cmake .. + # - name: Build Gambit + # run: | + # cd BUILD && . buildenv.sh + # make -j$(( ($(nproc)+1)/2 )) gambit + # - name: Build backends + # run: | + # cd BUILD && . buildenv.sh + # #make -j$(( ($(nproc)+1)/2 )) backends + # make backends + # - name: CLI test + # run: | + # . BUILD/buildenv.sh + # ./gambit -h + # - name: WC test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/WC_lite.yaml + # - name: ColliderBit test + # run: | + # . BUILD/buildenv.sh + # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + # - name: Build standalones + # run: | + # cd BUILD && . buildenv.sh + # make standalones + # - name: Validation dependencies # run: | # . BUILD/buildenv.sh From e97b60d9ff7bcf1b323df1a8e477127fb6e91459 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 14:25:04 +0100 Subject: [PATCH 39/49] Small fixes to debug code in ci.yml --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6bfd76f17..45f6f4800f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,10 @@ jobs: make higgsbounds make higgssignals echo + pwd + cd .. + pwd + echo echo echo "DEBUG: Listing content of Backends/installed: " echo @@ -74,6 +78,11 @@ jobs: run: | cd BUILD && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) gambit + echo + pwd + cd .. + pwd + echo echo "DEBUG: Listing content of contrib: " ls -Rl contrib echo From 26587a4be8a71dd029dd863f15a7bce914be5973 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 15:16:34 +0100 Subject: [PATCH 40/49] More debug tweaks to ci.yml --- .github/workflows/ci.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45f6f4800f..e7f868ee49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,14 +52,25 @@ jobs: - name: Build backends run: | cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) rivet make -j$(( ($(nproc)+1)/2 )) contur - make -j$(( ($(nproc)+1)/2 )) pythia - make ATLAS_FullLikes - make nulike - make susyhit - make higgsbounds - make higgssignals + cd ../Backends/installed/contur/2.4.4/contur + echo + pwd + echo "DEBUG: Listing content of init_by_GAMBIT.py:" + echo + cat init_by_GAMBIT.py + echo + echo "DEBUG: Run init_by_GAMBIT.py:" + echo + python init_by_GAMBIT.py + echo + # make -j$(( ($(nproc)+1)/2 )) rivet + # make -j$(( ($(nproc)+1)/2 )) pythia + # make ATLAS_FullLikes + # make nulike + # make susyhit + # make higgsbounds + # make higgssignals echo pwd cd .. From afe12207e8f9702668903b849c661025e5e5dfac Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 15:33:35 +0100 Subject: [PATCH 41/49] Added joblib installation in ci.yml. More debug code tweaks. --- .github/workflows/ci.yml | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7f868ee49..64133e5a0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh cat buildenv.sh - pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 pathos + pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 pathos joblib - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh @@ -80,39 +80,39 @@ jobs: echo "DEBUG: Listing content of Backends/installed: " echo ls -Rl Backends/installed - - name: Build scanners - run: | - cd BUILD/ && . buildenv.sh - make diver - cmake .. - - name: Build Gambit - run: | - cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) gambit - echo - pwd - cd .. - pwd - echo - echo "DEBUG: Listing content of contrib: " - ls -Rl contrib - echo - echo - echo "DEBUG: Listing output of ./gambit backends: " - echo - ./gambit backends 2>&1 | tee gambit_backends.txt - cat gambit_backends.txt - - name: ColliderBit test - run: | - . BUILD/buildenv.sh - echo - echo - echo "DEBUG: Run ColliderBit_CMSSM.yaml and output default.log: " - echo - OMP_NUM_THREADS=1 ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml ; cat runs/ColliderBit_CMSSM/logs/default.log - echo - echo "DEBUG: End of default.log:" - echo + # - name: Build scanners + # run: | + # cd BUILD/ && . buildenv.sh + # make diver + # cmake .. + # - name: Build Gambit + # run: | + # cd BUILD && . buildenv.sh + # make -j$(( ($(nproc)+1)/2 )) gambit + # echo + # pwd + # cd .. + # pwd + # echo + # echo "DEBUG: Listing content of contrib: " + # ls -Rl contrib + # echo + # echo + # echo "DEBUG: Listing output of ./gambit backends: " + # echo + # ./gambit backends 2>&1 | tee gambit_backends.txt + # cat gambit_backends.txt + # - name: ColliderBit test + # run: | + # . BUILD/buildenv.sh + # echo + # echo + # echo "DEBUG: Run ColliderBit_CMSSM.yaml and output default.log: " + # echo + # OMP_NUM_THREADS=1 ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml ; cat runs/ColliderBit_CMSSM/logs/default.log + # echo + # echo "DEBUG: End of default.log:" + # echo From 071a509ddd5c9f4a61c8ff4b099d28af121e4b92 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 15:48:03 +0100 Subject: [PATCH 42/49] Removed debug code from ci.yml. --- .github/workflows/ci.yml | 165 +++++++-------------------------------- 1 file changed, 29 insertions(+), 136 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64133e5a0b..595dfb091a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: - cron: '0 5 * * *' jobs: - contur_upgrade_debug: + gambit_build: runs-on: [docker, self-hosted] strategy: fail-fast: false @@ -48,144 +48,37 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh - cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;FlavBit;NeutrinoBit;ObjectivesBit" + cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF + - name: Build scanners + run: | + cd BUILD/ && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) scanners + cmake .. + - name: Build Gambit + run: | + cd BUILD && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) gambit - name: Build backends run: | cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) contur - cd ../Backends/installed/contur/2.4.4/contur - echo - pwd - echo "DEBUG: Listing content of init_by_GAMBIT.py:" - echo - cat init_by_GAMBIT.py - echo - echo "DEBUG: Run init_by_GAMBIT.py:" - echo - python init_by_GAMBIT.py - echo - # make -j$(( ($(nproc)+1)/2 )) rivet - # make -j$(( ($(nproc)+1)/2 )) pythia - # make ATLAS_FullLikes - # make nulike - # make susyhit - # make higgsbounds - # make higgssignals - echo - pwd - cd .. - pwd - echo - echo - echo "DEBUG: Listing content of Backends/installed: " - echo - ls -Rl Backends/installed - # - name: Build scanners - # run: | - # cd BUILD/ && . buildenv.sh - # make diver - # cmake .. - # - name: Build Gambit - # run: | - # cd BUILD && . buildenv.sh - # make -j$(( ($(nproc)+1)/2 )) gambit - # echo - # pwd - # cd .. - # pwd - # echo - # echo "DEBUG: Listing content of contrib: " - # ls -Rl contrib - # echo - # echo - # echo "DEBUG: Listing output of ./gambit backends: " - # echo - # ./gambit backends 2>&1 | tee gambit_backends.txt - # cat gambit_backends.txt - # - name: ColliderBit test - # run: | - # . BUILD/buildenv.sh - # echo - # echo - # echo "DEBUG: Run ColliderBit_CMSSM.yaml and output default.log: " - # echo - # OMP_NUM_THREADS=1 ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml ; cat runs/ColliderBit_CMSSM/logs/default.log - # echo - # echo "DEBUG: End of default.log:" - # echo - - - - # gambit_build: - # runs-on: [docker, self-hosted] - # strategy: - # fail-fast: false - # matrix: - # arch: [ubuntu] #, ubuntu-py2, fedora - # #mpi: [ON, OFF] - # container: gambitbsm/gambit-base:${{ matrix.arch }} - # defaults: - # run: - # shell: bash -eo pipefail {0} - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Set up build environment - # run: | - # mkdir -p BUILD - # cd BUILD - # echo "Sourcing setup.sh" - # cat /etc/profile.d/gambit-setup.sh - # source /etc/profile.d/gambit-setup.sh - # echo "Making buildenv.sh" - # > buildenv.sh - # echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh - # echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh - # echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh - # echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh - # echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh - # PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))') - # PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))') - # echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh - # echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh - # echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh - # echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh - # cat buildenv.sh - # pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0 pathos - # - name: Configure with cmake - # run: | - # cd BUILD/ && . buildenv.sh - # cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - # - name: Build scanners - # run: | - # cd BUILD/ && . buildenv.sh - # make -j$(( ($(nproc)+1)/2 )) scanners - # cmake .. - # - name: Build Gambit - # run: | - # cd BUILD && . buildenv.sh - # make -j$(( ($(nproc)+1)/2 )) gambit - # - name: Build backends - # run: | - # cd BUILD && . buildenv.sh - # #make -j$(( ($(nproc)+1)/2 )) backends - # make backends - # - name: CLI test - # run: | - # . BUILD/buildenv.sh - # ./gambit -h - # - name: WC test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/WC_lite.yaml - # - name: ColliderBit test - # run: | - # . BUILD/buildenv.sh - # ./gambit -f yaml_files/ColliderBit_CMSSM.yaml - # - name: Build standalones - # run: | - # cd BUILD && . buildenv.sh - # make standalones + #make -j$(( ($(nproc)+1)/2 )) backends + make backends + - name: CLI test + run: | + . BUILD/buildenv.sh + ./gambit -h + - name: ColliderBit test + run: | + . BUILD/buildenv.sh + ./gambit -f yaml_files/ColliderBit_CMSSM.yaml + - name: WC test + run: | + . BUILD/buildenv.sh + ./gambit -f yaml_files/WC_lite.yaml + - name: Build standalones + run: | + cd BUILD && . buildenv.sh + make standalones # - name: Validation dependencies # run: | From 81ffb7d127cead035bbcdbd0cf59c8f2cdd920cc Mon Sep 17 00:00:00 2001 From: Tomek Procter Date: Mon, 11 Dec 2023 15:57:06 +0100 Subject: [PATCH 43/49] Add joblib to Contur dependencies --- cmake/backends.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index 85788632b4..fc91ff6e6e 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -2122,7 +2122,7 @@ set(contur_dir "${dir}/contur") set(init_file ${contur_dir}/init_by_GAMBIT.py) set(Rivet_name "rivet") set(ditch_if_absent "Python;SQLITE3;YODA;HepMC;Rivet") -set(required_modules "cython;configobj;pandas;matplotlib;pathos") +set(required_modules "cython;configobj;pandas;matplotlib;pathos;joblib") set(patch "${PROJECT_SOURCE_DIR}/Backends/patches/${name}/${ver}/patch_${name}_${ver}.dif") check_ditch_status(${name} ${ver} ${dir} ${ditch_if_absent}) if(NOT ditched_${name}_${ver}) From 94b0a25262f52dbe5600d857feeced3ff099f189 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Mon, 11 Dec 2023 16:06:56 +0100 Subject: [PATCH 44/49] Switched build order in ci.yml to make sure BOSSed backends are built before GAMBIT. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 595dfb091a..a7e433a37c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,15 +54,15 @@ jobs: cd BUILD/ && . buildenv.sh make -j$(( ($(nproc)+1)/2 )) scanners cmake .. - - name: Build Gambit - run: | - cd BUILD && . buildenv.sh - make -j$(( ($(nproc)+1)/2 )) gambit - name: Build backends run: | cd BUILD && . buildenv.sh #make -j$(( ($(nproc)+1)/2 )) backends make backends + - name: Build Gambit + run: | + cd BUILD && . buildenv.sh + make -j$(( ($(nproc)+1)/2 )) gambit - name: CLI test run: | . BUILD/buildenv.sh From 75229dcd6c003bdeaae783a706c9316be2994cbe Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Wed, 13 Dec 2023 02:57:57 +0100 Subject: [PATCH 45/49] Added temporary code to ci_Mac_x64.yml to debug issue with yoda install directory. --- .github/workflows/ci_Mac_x64.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 54b771efdc..5afa104785 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -32,6 +32,12 @@ jobs: cd BUILD # Ditching a few backends that don't currently work on Mac cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. + - name: DEBUG Build yoda + run: | + echo "DEBUG: Build yoda" + cd BUILD + VERBOSE=1 make yoda + echo "DEBUG: Done building yoda" - name: Build scanners run: | echo "Build scanners" From f73f2bd9df526c5973854bf2c96d131f82fa305c Mon Sep 17 00:00:00 2001 From: Tomas Gonzalo Date: Wed, 21 Feb 2024 15:11:18 +0100 Subject: [PATCH 46/49] Missing capability description --- config/capabilities.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/capabilities.dat b/config/capabilities.dat index c6b82509cc..a39dae866d 100644 --- a/config/capabilities.dat +++ b/config/capabilities.dat @@ -216,7 +216,7 @@ run_light_quark_test: | ptr_arr_tests: | Function that tests array and -> operators on deps and BE vars. -libMathematicaTest_1_0_init: | +LibMathematicaTest_1_0_init: | Initialises the backend for Mathematica tests. MathematicaTest: | From 0325644a544e929dec4d7206fbfc4eddfe646cab Mon Sep 17 00:00:00 2001 From: Tomas Gonzalo Date: Mon, 26 Feb 2024 14:51:40 +0100 Subject: [PATCH 47/49] Fixed bug in heplike url --- cmake/backends.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/backends.cmake b/cmake/backends.cmake index d37460930b..8a0c373d60 100644 --- a/cmake/backends.cmake +++ b/cmake/backends.cmake @@ -568,7 +568,7 @@ endif() # HepLike set(name "heplike") set(ver "2.0") -set(dl "https://github.com/tegonzalo/HEPLike/archive/v${ver}.zip") +set(dl "https://github.com/tegonzalo/HEPLike/archive/V${ver}.zip") set(dir "${PROJECT_SOURCE_DIR}/Backends/installed/${name}/${ver}") set(md5 "a9b674b8a11037a15bfed69835aac1a6") set(HL_CXXFLAGS "${BACKEND_CXX_FLAGS} -I${yaml_INCLUDE_DIR}") From ff59763d79af81c7df392db636650c2d415fdd32 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalo Date: Mon, 26 Feb 2024 14:52:39 +0100 Subject: [PATCH 48/49] Updated HISTORY --- HISTORY | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index f6273647e1..e9928c43a0 100644 --- a/HISTORY +++ b/HISTORY @@ -3,8 +3,12 @@ GAMBIT Revision History Full details can be found in the git log. Only a summary of the changes in each new version is given here. +v2.4.4 +Bugfix release +- Fix bug on HEPLike url + v2.4.3 -Bufix release +Bugfix release - Remove usage of binary functions - Removed plc_data from building by default with backends - Used archived backends for broken links From fa180e9477c2a5278bcd3c87d0443621ca0c1b4d Mon Sep 17 00:00:00 2001 From: Tomas Gonzalo Date: Mon, 26 Feb 2024 14:57:22 +0100 Subject: [PATCH 49/49] Updated tarball info --- cmake/tarball_info.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/tarball_info.cmake b/cmake/tarball_info.cmake index 5b686bd6f2..31efd07915 100644 --- a/cmake/tarball_info.cmake +++ b/cmake/tarball_info.cmake @@ -5,6 +5,6 @@ set(GAMBIT_VERSION_MAJOR 2) set(GAMBIT_VERSION_MINOR 4) -set(GAMBIT_VERSION_REVISION 3) +set(GAMBIT_VERSION_REVISION 4) set(GAMBIT_VERSION_PATCH ) -set(GAMBIT_VERSION_FULL 2.4.3) +set(GAMBIT_VERSION_FULL 2.4.4)