Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8725440
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
53 KB
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 904b136..1ae0ce8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,207 +1,224 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project("Reversed HEJ" VERSION 0.0.1 LANGUAGES C CXX)
## Flags for the compiler. No warning allowed.
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
elseif (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /EHsc")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
## Create Version
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_GIT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(INSTALL_INCLUDE_DIR "include/RHEJ/")
set(INSTALL_BIN_DIR "bin/")
set(INSTALL_LIB_DIR "lib/")
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Templates/Version.hh.in
${PROJECT_BINARY_DIR}/include/RHEJ/Version.hh @ONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Templates/rHEJ-config.cc.in
${PROJECT_BINARY_DIR}/src/bin/rHEJ-config.cc @ONLY )
## Add directories and find dependences
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include)
find_package(fastjet REQUIRED)
include_directories(${fastjet_INCLUDE_PATH})
find_package(clhep 2.3 REQUIRED)
include_directories(${clhep_INCLUDE_PATH})
find_package(lhapdf REQUIRED)
include_directories(${lhapdf_INCLUDE_PATH})
find_package(gsl REQUIRED)
include_directories(${gsl_INCLUDE_PATH})
find_package(Boost REQUIRED COMPONENTS iostreams)
include_directories(${Boost_INCLUDE_DIRS})
find_package(yaml-cpp)
include_directories(${YAML_CPP_INCLUDE_DIR})
find_package(HepMC 2)
if(${HepMC_FOUND})
message (STATUS "HepMC installation found: ${HepMC_INCLUDE_DIRS}")
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_HepMC_VERSION=${HepMC_VERSION_MAJOR}"
)
include_directories(${HepMC_INCLUDE_DIRS})
find_package(rivet)
if(${rivet_FOUND})
include_directories(${rivet_INCLUDE_PATH})
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_RIVET"
)
endif()
endif()
find_package(QCDloop 2)
if(${QCDloop_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_QCDLOOP")
include_directories(SYSTEM ${QCDloop_INCLUDE_DIRS})
endif()
add_subdirectory(src)
## define executable
add_executable(rHEJ src/bin/rHEJ.cc)
## link libraries
target_link_libraries(rHEJ rhej)
add_executable(rHEJ-config src/bin/rHEJ-config.cc)
file(GLOB rhej_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/RHEJ/*.hh ${PROJECT_BINARY_DIR}/include/RHEJ/*.hh)
file(GLOB lhef_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/LHEF/*.h)
install(FILES ${rhej_headers} DESTINATION ${INSTALL_INCLUDE_DIR})
install(FILES ${lhef_headers} DESTINATION include/LHEF/)
install(TARGETS rHEJ rHEJ-config DESTINATION ${INSTALL_BIN_DIR})
+## tests
enable_testing()
set(tst_dir "${CMAKE_CURRENT_SOURCE_DIR}/t")
add_executable(test_Matrix ${tst_dir}/test_Matrix.cc)
add_executable(test_classify ${tst_dir}/test_classify.cc)
add_executable(test_psp ${tst_dir}/test_psp.cc)
add_executable(test_ME_h_3j ${tst_dir}/test_ME_h_3j.cc)
add_executable(test_ME_hjets_mt174 ${tst_dir}/test_ME_hjets_mt174.cc)
+add_executable(test_ME_generic ${tst_dir}/test_ME_generic.cc)
add_executable(check_res ${tst_dir}/check_res.cc)
add_executable(check_lhe ${tst_dir}/check_lhe.cc)
add_library(scales SHARED ${tst_dir}/scales.cc)
add_executable(test_scale_import ${tst_dir}/test_scale_import)
add_executable(test_descriptions ${tst_dir}/test_descriptions)
target_link_libraries(test_Matrix rhej)
target_link_libraries(test_classify rhej)
target_link_libraries(test_psp rhej)
target_link_libraries(test_ME_h_3j rhej)
target_link_libraries(test_ME_hjets_mt174 rhej)
+target_link_libraries(test_ME_generic rhej)
target_link_libraries(check_res rhej)
target_link_libraries(check_lhe rhej)
target_link_libraries(test_scale_import rhej)
target_link_libraries(test_descriptions rhej)
+## add tests
add_test(
NAME t_matrix
COMMAND test_Matrix
)
add_test(
NAME t_classify
COMMAND test_classify ${tst_dir}/classify.lhe.gz
)
add_test(
NAME t_psp
COMMAND test_psp ${tst_dir}/psp_gen.lhe.gz
)
add_test(
NAME t_ME
COMMAND test_ME_h_3j
)
+set(tst_ME_data_dir "${tst_dir}/ME_data")
+add_test(
+ NAME t_ME_new
+ COMMAND test_ME_generic ${tst_ME_data_dir}/config_mtinf.yml ${tst_ME_data_dir}/ME_mtinf.dat ${tst_ME_data_dir}/PSP.lhe.gz
+ )
if(${QCDloop_FOUND})
add_test(
NAME t_ME_mt174
COMMAND test_ME_hjets_mt174
)
+ add_test(
+ NAME t_ME_new_mt
+ COMMAND test_ME_generic ${tst_ME_data_dir}/config_mt.yml ${tst_ME_data_dir}/ME_mt.dat ${tst_ME_data_dir}/PSP.lhe.gz
+ )
+ add_test(
+ NAME t_ME_new_mtmb
+ COMMAND test_ME_generic ${tst_ME_data_dir}/config_mtmb.yml ${tst_ME_data_dir}/ME_mtmb.dat ${tst_ME_data_dir}/PSP.lhe.gz
+ )
endif()
add_test(
NAME t_2j
COMMAND check_res ${tst_dir}/2j.lhe.gz 3.382e7 752159
)
add_test(
NAME t_3j
COMMAND check_res ${tst_dir}/3j.lhe.gz 2.5019e+06 97075
)
add_test(
NAME t_4j
COMMAND check_res ${tst_dir}/4j.lhe.gz 479170 19203.9
)
add_test(
NAME t_h_3j
COMMAND check_res ${tst_dir}/h_3j.lhe.gz 0.793107 0.0479054
)
add_test(
NAME t_h_3j_uno
COMMAND check_res ${tst_dir}/h_3j_uno.lhe.gz 0.0260428 0.00129855 uno
)
if(${HepMC_FOUND})
file(READ "${tst_dir}/jet_config.yml" config)
file(WRITE "${tst_dir}/jet_config_withHepMC.yml" "${config} - tst.hepmc")
if(${rivet_FOUND})
file(READ "${tst_dir}/jet_config_withHepMC.yml" config)
file(WRITE "${tst_dir}/jet_config_withRivet.yml" "${config}\n\nanalysis:\n rivet: MC_XS\n output: tst")
add_test(
NAME t_main
COMMAND rHEJ ${tst_dir}/jet_config_withRivet.yml ${tst_dir}/2j.lhe.gz
)
else()
add_test(
NAME t_main
COMMAND rHEJ ${tst_dir}/jet_config_withHepMC.yml ${tst_dir}/2j.lhe.gz
)
endif()
if(${HepMC_VERSION_MAJOR} GREATER 2)
add_executable(check_hepmc ${tst_dir}/check_hepmc.cc)
target_link_libraries(check_hepmc rhej)
add_test(
NAME t_hepmc
COMMAND check_hepmc tst.hepmc
)
endif()
else()
add_test(
NAME t_main
COMMAND rHEJ ${tst_dir}/jet_config.yml ${tst_dir}/2j.lhe.gz
)
endif()
add_test(
NAME t_lhe
COMMAND check_lhe tst.lhe
)
add_test(
NAME t_scale_import
COMMAND test_scale_import ${tst_dir}/jet_config_with_import.yml
)
add_test(
NAME t_descriptions
COMMAND test_descriptions
)
diff --git a/t/ME_data/ME_mt.dat b/t/ME_data/ME_mt.dat
new file mode 100644
index 0000000..7077b70
--- /dev/null
+++ b/t/ME_data/ME_mt.dat
@@ -0,0 +1,832 @@
+5.104894052e-13
+5.352622449e-10
+4.969573157e-10
+2.145528889e-07
+5.179868583e-11
+5.186612094e-12
+8.184596043e-12
+9.984601411e-12
+7.741172452e-12
+2.811815772e-10
+6.048182163e-10
+2.073045156e-11
+6.66039542e-09
+1.961224078e-10
+1.224241762e-10
+4.32868245e-07
+1.040619985e-11
+0.007768794803
+7.610415405e-11
+1.710880827e-07
+2.465669225e-05
+7.301895764e-09
+1.021336966e-08
+4.213476003e-10
+4.549986632e-09
+8.982902151e-09
+4.840856957e-07
+8.314915739e-12
+2.568001307e-05
+1.128684498e-12
+5.917444371e-07
+1.358250141e-06
+1.194467688e-11
+8.319694976e-08
+2.900640451e-07
+4.60385939e-10
+8.584404257e-12
+7.528222205e-08
+9.677246774e-10
+6.835091587e-08
+7.772359801e-09
+1.06401966e-07
+4.279453646e-08
+4.128596402e-10
+1.934316029e-09
+7.061366471e-08
+4.947564916e-07
+2.952137967e-12
+6.994111301e-10
+0.0001082505186
+2.367058445e-09
+6.328389101e-11
+6.498853427e-11
+1.670010371e-09
+2.448771441e-06
+3.050633948e-07
+5.675639142e-05
+3.315952902e-09
+1.617330327e-05
+6.446313674e-08
+2.719709725e-11
+7.473107471e-07
+3.583148545e-08
+8.028928061e-05
+9.211773558e-13
+6.100500324e-11
+2.113329621e-10
+1.94362594e-10
+1.425526559e-11
+1.217666028e-08
+1.184560153e-11
+2.917557311e-05
+1.699335639e-08
+2.024143344e-08
+0.3442927935
+1.092144866e-11
+8.800781539e-09
+1.359753769e-12
+2.512776002e-07
+2.491193819e-11
+5.617913484e-10
+3.270273849e-07
+0.6344821534
+6.871744872e-11
+1.367151495e-11
+3.585161779e-11
+1.361864634e-09
+2.858317998e-09
+1.002191663e-12
+3.451656719e-08
+7.229278352e-09
+9.638608491e-07
+1.640895783e-08
+4.58351413e-10
+1.467176149e-06
+2.341093118e-06
+1.453567109e-09
+2.208416704e-10
+3.10223449e-07
+1.373510706e-08
+6.466737699e-11
+1.363412137e-06
+1.181157781e-09
+0.001164324174
+2.482894847e-07
+1.143495324e-09
+2.141940981e-11
+3.757677211e-09
+1.658820983e-09
+1.493890032e-11
+1.695409399e-09
+0.03873988865
+1.760046194e-05
+1.091455594e-06
+0.0004617994402
+2.279280466e-11
+1.155813325e-10
+2.062505197e-08
+1.572716077e-05
+4.64967665e-09
+3.456965196e-11
+6.024799197e-11
+2.18305802e-08
+4.06272439e-06
+1.127205912e-08
+1.120492298e-06
+3.355865036e-06
+3.508725306e-07
+2.340647078e-11
+3.433885321e-08
+2.416912613e-11
+2.263675956e-11
+2.924727544e-10
+1.680133582e-10
+3.65709815e-07
+1.680191008e-09
+7.649435327e-05
+5461.999859
+3.712696103e-09
+0.002299667682
+1.46747966e-05
+5.807057038e-11
+3.750496919e-07
+0.0001584181795
+7.490125558e-09
+1.577544592e-11
+5.891058295e-10
+9.226482713e-06
+3.981704762e-09
+1.404815171e-12
+9.662319859e-09
+4.412732642e-11
+2.428963928e-08
+2.254527206e-05
+8.471343262e-09
+0.005562283795
+1.87419733e-10
+4.937434303e-08
+6.861569216e-08
+1.263177271e-10
+3.363001153e-08
+5.42050835e-07
+2.312160972e-10
+1.089215399e-08
+2.471044032e-05
+2.508799611e-11
+2.477130105e-09
+8.2115246e-10
+0.005568378599
+1.095908816e-09
+4.048846527e-08
+4.014930525e-12
+1.366942677e-06
+1.448046854e-12
+6.937077038e-11
+8.528100934e-11
+3.150099426e-08
+5.507052087e-08
+3.091460185e-10
+4.829462681e-13
+6.567176761e-11
+1.091462165e-09
+0.1743783946
+0.001494914324
+0.004947565067
+2.754409458e-06
+2.981169088e-11
+1.304920549e-09
+5.982729449e-08
+5.461855271e-06
+1.358367171e-09
+2.534908174e-11
+2.875773068e-12
+3.760000087e-10
+4.57221867e-06
+8.661839614e-11
+6.246969983e-08
+6.797615513e-09
+1.35325272e-12
+1.427389547e-10
+2.812872241e-11
+5.06658049e-11
+9.447102213e-08
+7.364300726e-10
+2.424474918e-11
+2.925296899e-08
+9.579286559e-08
+1.207880712e-06
+9.754323939e-07
+1.525055795e-08
+1.681629682e-09
+3.990773828e-12
+8.522916627e-12
+2.869481333e-12
+1.780254814e-12
+3.978864751e-09
+3.988704591e-08
+4.080383003e-12
+6.568652399e-09
+1.526780316e-05
+2.189834438e-10
+3.226776986e-10
+3.402313107e-11
+5.723422101e-12
+4.591634583e-10
+8.315526202e-12
+3.414848009e-08
+2.170431549e-06
+1.929510577e-07
+2.396526087e-10
+1.300323385e-08
+2.258604243e-09
+3.917325948e-11
+0.01501933997
+1.197122062e-10
+9.068444934e-12
+5.796628508e-10
+5.047312952e-11
+4.175594151e-08
+1.644895443e-07
+2.245175634e-07
+1.328114263e-09
+1.096231693e-06
+9.564970121e-12
+3.872223214e-07
+3.22408379e-12
+1.372665534e-11
+7.543933766e-09
+5.080861764e-11
+0.0008644118503
+1.123602961e-10
+5.102074676e-10
+3.43410998e-11
+1.503146468e-06
+0.0003353126025
+5.977374809e-10
+1.582271062e-07
+0.0002099473651
+4.02119019e-06
+1.179583233e-10
+1.340575399e-10
+4.66466377e-06
+3.727391202e-09
+6.400375244e-08
+1.761266755e-10
+3.332289804e-10
+1.625309953e-09
+4.058708707e-10
+7.789952189e-12
+3.884758826e-07
+2.477714488e-06
+3.352205676e-07
+2.974667295e-12
+2.667535458e-05
+6.557285691e-08
+2.653081833e-12
+9.747934892e-07
+8.863542614e-10
+1.044408504e-06
+6.775353457e-11
+1.921171461e-07
+5.873767147e-12
+1.850344388e-08
+5.18563846e-09
+1.674106523e-06
+7.721910476e-10
+3.968855787e-05
+1.475461233e-08
+0.01075323227
+4.969240504e-06
+4.570428686e-13
+3.177178121e-08
+2.916606041e-07
+2.508869925e-07
+2.033433977e-11
+2.026122514e-08
+2.248008776e-11
+1.62821802e-10
+6.94196468e-11
+3.720366509e-11
+0.0002295583453
+1.533349023e-08
+1.339458794e-08
+3.832744987e-09
+7.563257852e-10
+1.608657828e-11
+2.654164632e-09
+3.867056438e-12
+4.99160662e-09
+0.1010608909
+3.788922424e-11
+5.888901111e-06
+1.153353392e-10
+4.488062193e-12
+8.276941981e-08
+2.12851524e-12
+1.646763483e-06
+4.753225275e-11
+2.613190435e-09
+3.161484441e-12
+4.128852927e-07
+3.055786788e-09
+1.375445526e-09
+7.567564368e-06
+7.521471583e-08
+3.027767767e-08
+6.518064709e-10
+6.922174861e-08
+7.149123164e-08
+1.487496266e-09
+1.084049065e-12
+0.001146860409
+0.04741388678
+1.066622881e-08
+3.466080398e-10
+8.641908939e-11
+5.553901435e-09
+2.156150402e-05
+1.397181559e-06
+1.406480377e-07
+2.341830285e-06
+4.175220905e-12
+5.63206335e-08
+1.097452058e-13
+4.134287176e-06
+1.597311784e-11
+5.982336402e-12
+5.555294093e-09
+1.625013143e-06
+5.30057572e-09
+6.530141173e-07
+2.743978178e-08
+0.5112386353
+5.541796426e-08
+2.023141066e-08
+1.624607377e-12
+7.731804373e-09
+9.215906339e-10
+1.751566406e-07
+3.335678883e-12
+1.113824759e-06
+7.49828786e-08
+2.910496323e-05
+5.191014707e-09
+5.530653838e-10
+3.898059842e-11
+5.11707079e-11
+2.427135458e-11
+1.850238319e-08
+7.620770756e-12
+9.646807177e-11
+1.23673806e-06
+2.608730305e-10
+1.4933387e-10
+4.283388879e-12
+6.175858427e-11
+0.0005129328253
+1.053030924e-07
+2.42384909e-09
+4.232838056e-10
+3.88315716e-08
+3.361041928e-09
+1.767535278e-08
+1.667240493e-10
+8.884514926e-10
+12.48992357
+2.466424201e-12
+5.020953994e-09
+4.24342045e-11
+7.58265221e-05
+1.804874813e-07
+5.911772616e-07
+1.719771629e-08
+8.043804916e-09
+1.13603639e-11
+1.401521525e-09
+3.528588806e-07
+2.608609767e-08
+3.246543847e-06
+3.243569731e-07
+5.401817589e-09
+4.025545915e-10
+5.210381941e-10
+1.004537562e-09
+9.52990327e-07
+1.108929802e-12
+4.624182866e-11
+1.092408663e-11
+3.598387594e-06
+1.391709345e-12
+4.440661162e-11
+6.359479836e-09
+5.317219127e-10
+2.794194951e-05
+1.34146216e-07
+7.606717261e-08
+8.825714612e-07
+2.150854029e-10
+4.834957558e-09
+1.466648131e-12
+0.0132398271
+6.67358476e-12
+2.318474991e-10
+2.89942103e-07
+7.885932253e-09
+1.810610172e-10
+0.0005075796697
+1.446977117e-11
+3.327772088e-05
+8.771959685e-08
+9.459437382e-12
+6.739729638e-05
+2.271404191e-05
+2.723460449e-09
+3.059067844e-12
+3.168577024e-07
+2.645795641e-11
+3.182324395e-05
+4.718787257e-09
+1.637176359e-11
+1.850167567e-13
+2.48208021e-11
+2.059135921e-07
+6.471362325e-14
+5.055145364e-10
+2.481196651e-14
+2.577380218e-09
+3.677856861e-06
+0.03086527493
+2.903161453e-11
+2.023107683e-10
+4.590766145e-09
+8.257020625e-11
+8.0493976e-11
+1.753150768e-06
+4.554949492e-13
+0.0001359733702
+7.280269703e-09
+1.388884078e-07
+3.595615816e-07
+6.565406158e-11
+2.895995417e-08
+8.674683636e-09
+3.244659869e-10
+1.092208045e-08
+1.369818896e-10
+1.190084163e-12
+2.894258464e-11
+3.904597733e-10
+9.276063412e-10
+3.906237749e-05
+3.174821293e-12
+0.01818321943
+3.066727156e-09
+2.003501846e-11
+9.068912919e-10
+5.799688835e-12
+1.2472353e-08
+2.268258497e-07
+9.821991992e-11
+1.978517813e-07
+0.001245824855
+1.626147549e-07
+3.160387454e-09
+1.363050762e-10
+1.592011291e-07
+3.32780818e-05
+0.0003673677032
+2.648913628e-13
+2.256789201e-11
+2.629734476e-09
+3.017537685e-05
+8.679416643e-10
+1.018136559e-11
+0.001271444081
+2.752654239e-05
+1.355363372e-07
+1.839712858e-12
+1.777546485e-09
+3.320450559e-14
+3.084992485e-12
+9.24772251e-06
+3.589109676e-12
+3.042851893e-05
+1.337079609e-09
+3.162191784e-13
+0.0001246503948
+8.133091624e-10
+4.663427033e-08
+43.42209438
+2.402514994e-07
+1.053283492e-10
+2.181066063e-11
+1.163912199e-06
+1.703456487e-11
+1.029893421e-06
+1.9097889e-07
+6.56166549e-11
+2.400392511e-12
+7.191946838e-11
+8.469718586e-05
+3.084265499e-11
+1.059755922e-06
+0.0003667785394
+1.757580968e-10
+0.003616092335
+2.982681963e-07
+5.727279382e-06
+4.11070905e-10
+6.68690482e-07
+6.795780498e-05
+1.476918539e-08
+9.280021832e-13
+8.735021891e-12
+9.264231128e-10
+1.289011435e-05
+7.49816805e-09
+4.142454212e-13
+4.660740507e-10
+4.819117974e-09
+2.257742291e-06
+3.11481237e-08
+5.385087447e-10
+3.483927472e-12
+6.706427946e-10
+9.266087799e-10
+1.14764671e-08
+1.748426066e-09
+3.698583088e-11
+1.676620119e-09
+7.437251879e-13
+3.207226206e-11
+4.032746598e-09
+4.109767454e-06
+2.909887493e-10
+4.399662587e-09
+0.0001384472523
+4.021512371e-12
+8.862249614e-11
+3.931841697e-07
+1.169394844e-09
+5.018964742e-13
+4.168333096e-07
+9.536261747e-13
+5.184118812e-07
+1.17794366e-05
+1.538915863e-10
+1.29067501e-10
+3.490886227e-12
+5.956778156e-12
+1.182447721e-10
+1.518783633e-09
+6.120733874e-10
+1.200151294e-12
+4.074743343e-08
+4.950942536e-12
+4.507578791e-06
+2.878378681e-11
+1.487318969e-12
+0.009342104007
+9.031056264e-12
+8.469117444e-11
+7.292645837e-10
+0.0009378360098
+5.84111714e-09
+1.007796089e-08
+1.215663762e-12
+1.340236154e-10
+2.796845099e-07
+5.950967449e-12
+6.189903798e-07
+0.0002565845235
+5.640146484e-09
+5.036530528e-09
+1.105207138e-11
+3.597156441e-06
+7.611238087e-13
+1.081680196e-06
+3.969161815e-08
+1.460249898e-08
+3.293123703e-09
+7.863298387e-11
+3.605167415e-09
+7.862789415e-11
+8.110559869e-11
+6.807862966e-08
+2.394067709e-10
+3.400093355e-08
+1.142592224e-10
+8.482286075e-08
+6.2579047e-12
+8.484287593e-11
+1.973293652e-05
+4.4105729e-06
+3.224742747e-09
+5.352099852e-08
+7.559371361e-10
+4.901387593e-12
+1.075107343e-09
+4.968509849e-13
+2.033509889e-06
+1.109085979e-07
+4.417223124e-05
+1.41000091e-06
+1.632865346e-10
+9.247817326e-12
+1.632947486e-13
+2.02632942e-11
+3.567533812e-08
+2.001784216e-06
+6.170041132e-09
+2.319054361e-06
+4.279252077e-10
+5.096369104e-09
+6.252610445e-12
+4.714043522e-09
+2.557090515e-09
+9.56469474e-10
+7.096612262e-13
+1.00613134e-12
+2.058832265e-12
+1.992848359e-09
+1.141815695e-10
+1.736761495e-11
+4.803601755e-09
+5.241543444e-11
+2.368211103e-11
+5.663158332e-09
+7.374173378e-11
+1.434354356e-07
+5.22426801e-09
+0.0008927834025
+2.810981852e-06
+2.500251198e-10
+0.0002470529083
+5.792896072e-12
+1.094982803e-10
+1.485849933e-09
+0.001266608403
+2.16235464e-07
+0.0007977503515
+5.023378611e-12
+1.190104765e-09
+6.785140616e-10
+5.849605385e-10
+1.209210254e-08
+7.809647154e-13
+6.093011941e-10
+3.598777125e-10
+1.217092468e-12
+4.459448776e-05
+1.537620679e-08
+2.717847193e-09
+2.619288808e-07
+1.512756067e-10
+2.258742148e-09
+3.096186177e-09
+3.827069086e-12
+1.844648767e-06
+0.2452489767
+3.337864576e-10
+2.750772859e-10
+1.36048568e-11
+8.519078365e-08
+1.225204345e-11
+2.310712682e-05
+4.014496817e-14
+4.313048493e-09
+9.348470752e-08
+4.309099261e-08
+1.927044957e-11
+1.748558749e-09
+2.676962473e-06
+6.991889853e-07
+1.963348095e-12
+1.192450571e-10
+1.904057677e-05
+0.0006405362065
+1.004052992e-06
+5.602947625e-06
+3.056661745e-07
+6.345979058e-11
+7.423763651e-05
+6.125213716e-12
+7.302857557e-07
+0.0001217178562
+5.514458013e-10
+8.207494942e-12
+3.050999738e-12
+1.053034354e-10
+3.083995131e-09
+1.026664156e-10
+1.567180325e-07
+2.910976255e-05
+3.838601816e-07
+3.997209165e-08
+2.576915656e-11
+4.526603199e-10
+4.564321787e-08
+3.013040725e-05
+5.061637623e-09
+2.587289912e-11
+8.983063416e-05
+1.466501647e-08
+7.30704784e-05
+1.26206431e-07
+1.478293557e-07
+2.09317266e-11
+1.110534598e-10
+7.589331645e-12
+3.006457636e-07
+2.289103408e-11
+1.007184927e-07
+1.911056615e-09
+2.667639145e-11
+5.390401402e-06
+1.051486813e-09
+2.744357812e-10
+6.942734343e-07
+1.582087944e-08
+1.001335408e-11
+5.577265988e-10
+1.291487593e-09
+7.710846751e-13
+2.455075109e-05
+0.1740234617
+2.353502108e-12
+8.812504214e-10
+3.446514503e-07
+5.724074014e-12
+6.853699755e-10
+1.690504481e-10
+3.394219559e-10
+1.205783603e-07
+2.082916629e-11
+1.31662714e-09
+1.211207864e-07
+3.231579528e-10
+1.073546147e-08
+4.85005641e-06
+1.218056008e-07
+1.564575125e-09
+2.679975029e-11
+1.617428084
+2.341764897e-05
+4.130339313e-08
+1.035466874e-05
+1.140306094e-10
+7.625232186e-08
+0.001600375822
+5.615036359e-09
+1.488077526e-11
+2.487878835e-06
+4.486095425e-05
+1.956444299e-06
+7.593116456e-08
+1.090614073e-09
+5.602652314e-09
+5.260668934e-12
+6.283698571e-11
+1.464853727e-11
+3.191132881e-05
+2.873113854e-11
+2.073520335e-08
+2.010336545e-12
+9.457721794e-07
+1.496776398e-07
+6.395872274e-05
+5.474916096e-11
+1.70721213e-12
+0.000110603224
+2.255085766e-09
+0.001950753228
+4.560880168e-10
+7.547075061e-10
+8.036447082e-05
+8.086337623e-09
+7.306596969e-13
+9.525383987e-10
+2.793441861e-12
+1.334982893e-08
+4.787670469e-05
+2.186363229e-10
+1.119599879e-08
+2.111104686e-09
+8.522826825e-08
+3.291489152e-07
+2.54665674e-10
+1.006511036e-10
+5.62481012e-11
+6.731899439e-07
+1.099188501e-10
+2.163621366e-09
+2.782603594e-13
+6.528009628e-06
+3.142168895e-10
+9.832450763e-11
+2.907579933e-06
+2.020430868e-10
+1.205491073e-12
+2.011675896e-06
+4.358465846e-10
+7.933983038e-12
+1.008388902e-10
+9.500590881e-10
+4.707425423e-10
+2.740135254e-06
+0.6837527766
+1.274048503e-10
+5.037955594e-08
+7.411342267e-08
+2.046779886e-09
diff --git a/t/ME_data/ME_mtinf.dat b/t/ME_data/ME_mtinf.dat
new file mode 100644
index 0000000..bf7d4c6
--- /dev/null
+++ b/t/ME_data/ME_mtinf.dat
@@ -0,0 +1,832 @@
+7.126227655e-13
+3.607064073e-10
+4.972280475e-10
+2.612240675e-07
+5.984643648e-11
+1.952095303e-12
+8.195887696e-12
+7.538577677e-12
+8.270256586e-12
+1.896839132e-10
+6.229371347e-10
+2.483001707e-11
+5.666125737e-09
+2.043063318e-10
+1.572415157e-10
+4.375890611e-07
+1.091825705e-11
+0.007398414739
+8.076412806e-11
+1.673595145e-07
+2.875974741e-05
+1.4827829e-08
+1.012263582e-08
+3.854483433e-10
+2.047919169e-09
+1.248695391e-08
+4.950634251e-07
+4.101675808e-12
+2.479067339e-05
+1.149152286e-12
+5.891010154e-07
+2.128428447e-06
+1.354302222e-11
+5.623689172e-08
+2.805980528e-07
+4.790717168e-10
+8.800157113e-12
+8.090189538e-08
+2.971504987e-09
+5.908029052e-08
+7.498204803e-09
+1.459283909e-07
+3.558161874e-08
+2.919419804e-10
+2.320991568e-09
+1.17939932e-07
+4.149138657e-07
+3.950915786e-12
+6.871516309e-10
+0.0001536347032
+2.386523186e-09
+5.474554574e-11
+1.26409809e-09
+1.446801031e-09
+1.80471708e-06
+3.031369699e-07
+6.943945639e-05
+2.808280694e-09
+1.605163816e-05
+7.077213883e-08
+1.905507673e-11
+5.235383506e-07
+3.971004383e-08
+6.249191379e-05
+1.221130881e-12
+5.485688303e-11
+1.613744433e-10
+1.923466466e-10
+5.145906672e-11
+1.187579696e-08
+4.572024375e-11
+2.819913482e-05
+1.720099039e-08
+2.486622605e-08
+0.3312264444
+6.124872582e-12
+1.618406921e-08
+2.806306699e-12
+3.278946121e-07
+2.21881066e-11
+6.872055075e-10
+4.614491728e-07
+0.6174121846
+7.941519469e-11
+1.055931967e-10
+3.110420063e-11
+1.047598292e-08
+2.497898685e-09
+1.080442006e-12
+3.190110893e-08
+6.725565606e-09
+1.072450732e-06
+1.416475802e-08
+2.140040588e-10
+1.545371118e-06
+2.580708504e-06
+1.874780279e-09
+1.912706511e-10
+2.294017803e-07
+1.877223604e-08
+7.797362352e-11
+1.464749791e-06
+7.71539997e-10
+0.001062529853
+2.492595848e-07
+1.390389662e-09
+7.604322362e-12
+2.657791649e-09
+1.966574795e-09
+1.734296135e-11
+2.524668259e-09
+0.0379006788
+1.831064286e-05
+1.008102854e-06
+0.0004313077887
+2.48167826e-11
+1.08645741e-10
+2.133026276e-08
+1.412251391e-05
+6.072963331e-09
+2.877944392e-11
+6.4142266e-11
+3.427725776e-08
+4.090723445e-06
+8.718491516e-09
+7.864552866e-07
+4.840494217e-06
+3.908590972e-07
+1.639032205e-11
+2.982145561e-08
+1.513350059e-10
+2.182794977e-11
+2.876351749e-10
+1.659462485e-10
+3.752028607e-07
+2.008159902e-09
+8.170025282e-05
+6186.185295
+3.722408825e-09
+0.002194594122
+2.085687949e-05
+4.786472808e-11
+3.920916184e-07
+0.0001667667055
+8.74202013e-09
+2.703350016e-11
+3.55539889e-10
+1.528814854e-05
+2.857570837e-09
+1.899688407e-12
+9.458458611e-09
+8.438398975e-11
+2.710373928e-08
+1.997000118e-05
+8.513950576e-09
+0.006041179805
+1.829112135e-10
+4.823871685e-08
+6.865714944e-08
+5.676172559e-11
+2.988335789e-08
+2.161265265e-06
+2.339557449e-10
+8.802053471e-09
+2.306932465e-05
+2.220688134e-11
+2.884450771e-09
+8.343336228e-10
+0.005591295852
+1.072516885e-09
+4.275511044e-08
+2.417175473e-12
+1.420489631e-06
+2.685579087e-12
+7.737302455e-11
+8.607422743e-11
+2.691053748e-08
+3.850879583e-08
+3.419965398e-10
+5.299983085e-13
+8.820712499e-11
+5.635168067e-10
+0.1682448031
+0.001434694131
+0.005207710474
+2.486287367e-06
+4.638362342e-11
+1.14235407e-09
+5.792781547e-08
+5.583762697e-06
+1.248537176e-09
+3.546753539e-11
+2.171560851e-11
+3.915575379e-10
+4.560150631e-06
+6.210669983e-11
+6.451659574e-08
+6.777293518e-09
+3.557413138e-13
+1.631413349e-10
+1.235901896e-10
+3.240280802e-11
+8.231537986e-08
+8.434012851e-10
+2.420167945e-11
+2.352027594e-08
+9.075533615e-07
+1.186105613e-06
+1.029991711e-06
+1.000928057e-08
+1.662153264e-09
+8.884859878e-12
+5.913374488e-12
+3.006406692e-12
+1.558334073e-11
+4.315381335e-09
+3.997164339e-08
+8.07868909e-12
+6.782716169e-09
+1.327131816e-05
+2.013418738e-10
+5.147768009e-10
+2.73477564e-11
+5.913354365e-12
+4.549790617e-10
+9.759875784e-12
+5.226605555e-08
+2.183381731e-06
+1.200574391e-07
+1.387430067e-10
+1.268273097e-08
+1.637862326e-09
+3.853362276e-11
+0.01458489768
+7.849025023e-11
+7.591069677e-11
+5.724312903e-10
+6.223450291e-11
+4.302060316e-08
+1.720855948e-07
+2.163452166e-07
+1.105904978e-09
+9.870924669e-07
+2.891637214e-11
+3.877485807e-07
+8.17320338e-12
+3.451570362e-11
+8.639454924e-09
+3.090110141e-11
+0.0008269689592
+1.065153421e-10
+4.0711502e-10
+2.186087282e-11
+1.234018581e-06
+0.0003242021304
+3.502562703e-10
+1.654361065e-07
+0.0002572979281
+2.965180122e-06
+1.032978471e-10
+9.807642844e-11
+5.862849577e-05
+3.126457646e-09
+6.687168446e-08
+1.395182513e-10
+4.412714302e-10
+3.793042717e-08
+4.331992684e-10
+9.7857912e-12
+3.787132818e-07
+2.960538238e-06
+3.11043352e-07
+3.016710068e-12
+4.093581758e-05
+1.947067088e-08
+2.793661312e-12
+8.545937313e-07
+9.243440099e-10
+1.063994922e-06
+4.167644988e-11
+1.526958695e-07
+3.188924764e-12
+2.098736199e-08
+5.150655304e-09
+1.668304161e-06
+5.274835554e-10
+3.888439344e-05
+3.852874628e-08
+0.01125015762
+5.803685829e-06
+1.157052122e-12
+2.76169739e-08
+3.183838657e-07
+2.609159234e-06
+2.042203523e-11
+9.484139396e-08
+1.403029242e-10
+1.492622415e-10
+6.154904601e-11
+3.84424915e-11
+0.0001646939649
+1.898885936e-08
+9.065752406e-09
+4.1132862e-09
+8.472401074e-10
+1.225704161e-11
+3.833548963e-09
+7.521261662e-12
+9.957314092e-09
+0.1620282213
+1.590787192e-11
+5.882149354e-06
+5.981673548e-11
+4.690463863e-12
+9.196607945e-08
+3.187830023e-12
+1.640908423e-06
+8.507568181e-11
+2.952522516e-09
+3.476048251e-12
+3.242757341e-07
+3.300468944e-09
+1.953687443e-09
+6.421773059e-06
+7.915371751e-08
+3.028935208e-08
+6.469895088e-10
+5.19625099e-08
+7.613536949e-08
+3.991759608e-09
+1.212320146e-12
+0.001230806805
+0.05212429865
+8.909985139e-09
+3.849180291e-10
+1.117533931e-10
+6.016132173e-09
+2.065316677e-05
+1.159123283e-06
+1.504759808e-07
+2.605724375e-06
+5.244881097e-12
+5.453726089e-08
+1.140603702e-13
+3.600780674e-06
+6.281921984e-12
+6.416773503e-12
+5.40606327e-09
+1.507024346e-06
+5.232903734e-09
+6.775959184e-07
+2.77683103e-08
+0.5094375114
+6.32777001e-08
+1.992894332e-08
+5.456907955e-12
+6.944510902e-09
+8.514947213e-10
+9.265473967e-08
+3.3308619e-12
+1.084822784e-06
+4.870915395e-08
+2.837118733e-05
+4.520844196e-09
+2.862956777e-09
+4.54691505e-11
+5.654429908e-11
+1.345404792e-11
+1.907656476e-08
+3.122899343e-12
+1.061062635e-10
+1.237234561e-06
+2.504526722e-10
+1.612632806e-10
+1.01574469e-11
+6.843154608e-11
+0.0006234563759
+6.300289655e-08
+2.061889522e-09
+4.449606549e-10
+3.787969705e-08
+2.230767268e-09
+1.74707149e-08
+1.713456067e-10
+7.229585907e-10
+12.14301615
+1.732191731e-11
+3.102941046e-09
+4.263247313e-11
+8.105230727e-05
+1.526979387e-07
+5.308785852e-07
+1.435838498e-08
+7.305854755e-09
+4.800096978e-11
+1.413793837e-09
+3.802981678e-07
+2.506274903e-08
+3.203911456e-06
+2.742375992e-07
+6.096879072e-09
+4.65731613e-10
+5.397208038e-10
+9.413950814e-10
+9.737077426e-07
+1.564188424e-12
+2.821048907e-11
+2.931315018e-11
+4.256751092e-06
+4.640258596e-11
+2.468739002e-11
+6.31929514e-09
+5.577353414e-10
+2.936810611e-05
+1.638682772e-07
+7.121215546e-08
+9.186746658e-07
+2.325490454e-10
+2.828685367e-09
+1.621737704e-12
+0.02476674253
+7.233317983e-12
+2.375015383e-10
+2.906948958e-07
+5.399833135e-09
+1.258479697e-10
+0.0004956332562
+1.091398123e-11
+4.077777371e-05
+8.584238024e-08
+1.071018139e-11
+6.886211384e-05
+2.27512332e-05
+4.174576613e-09
+7.674915092e-12
+3.352222227e-07
+4.685001936e-10
+3.217846771e-05
+3.44464835e-09
+1.900686466e-11
+2.903393166e-12
+1.115283824e-11
+1.858649411e-07
+6.966727964e-14
+5.02921027e-10
+7.036257434e-13
+1.956319519e-09
+4.079180079e-06
+0.03029068073
+3.529050516e-11
+1.66671237e-10
+5.078967189e-09
+6.316683693e-09
+4.187487596e-11
+1.730567142e-06
+1.217748448e-13
+0.0001660668207
+8.682239901e-09
+1.231109216e-07
+2.355508843e-07
+8.920734585e-11
+3.085000332e-08
+1.777504208e-08
+2.821589585e-10
+9.120301007e-09
+3.954542586e-11
+1.356626682e-12
+1.96694007e-11
+2.962497537e-10
+7.539980367e-10
+3.593350228e-05
+3.352366403e-12
+0.01627386048
+3.081641227e-09
+1.800196873e-11
+5.215013472e-10
+1.875164636e-12
+1.161501653e-08
+2.005523435e-07
+6.728384766e-11
+2.098502929e-07
+0.001225372521
+1.465084009e-07
+5.222926184e-09
+1.44230526e-10
+1.598909573e-07
+5.846672636e-05
+0.0003604021805
+3.023343348e-13
+3.207900157e-11
+2.612985469e-09
+5.58309527e-05
+6.642939479e-10
+1.287322265e-11
+0.00122318979
+2.776604681e-05
+1.478053572e-07
+2.121148582e-12
+2.080411936e-09
+4.443715512e-14
+5.020051754e-12
+8.847744889e-06
+3.381828874e-11
+0.0002539035761
+1.296417058e-09
+8.109070476e-13
+0.0001164000244
+1.634267961e-09
+4.63624811e-08
+39.88021468
+2.550347729e-07
+1.156834728e-10
+2.306180216e-11
+1.313509621e-06
+3.048241639e-10
+9.898079421e-07
+1.75683574e-07
+6.43295808e-11
+6.122719069e-12
+7.567151847e-11
+8.436738591e-05
+2.643918352e-11
+7.844694976e-07
+0.000434343751
+1.403926386e-09
+0.003944389695
+3.224122226e-07
+8.146520413e-06
+2.484011012e-09
+6.596213422e-07
+0.0001017722774
+1.528057046e-08
+1.129493876e-12
+9.06496112e-12
+1.129612127e-09
+1.306121634e-05
+7.697952221e-09
+6.265613923e-13
+3.546240629e-10
+4.92217743e-09
+2.300473811e-06
+3.215649298e-08
+6.194410674e-10
+1.196947027e-10
+6.667060718e-10
+1.001357497e-09
+1.050674778e-08
+1.933280591e-09
+2.645797896e-11
+2.724510596e-09
+9.07925989e-13
+2.762981161e-11
+4.724895554e-09
+3.988381068e-06
+3.107143416e-10
+4.080442196e-09
+0.0001656310249
+2.431468146e-12
+9.812563345e-11
+3.893590863e-07
+6.173505277e-10
+6.615084332e-13
+4.497572707e-07
+9.58156455e-13
+8.166482005e-07
+3.804817924e-05
+4.25326827e-10
+1.187678869e-10
+4.602836027e-12
+4.462218337e-12
+3.713447638e-10
+1.607482986e-09
+4.266567045e-10
+1.520027101e-12
+4.077472285e-08
+4.85398587e-12
+3.939895802e-06
+2.891714316e-11
+1.584081141e-12
+0.009337639716
+4.95087277e-12
+6.721091296e-11
+7.507946651e-10
+0.0009219712073
+7.126121582e-09
+9.936902053e-09
+4.197660327e-12
+7.457318551e-11
+2.698354237e-07
+1.620676389e-11
+5.96809108e-07
+0.0003232251481
+5.958997262e-09
+3.017535751e-09
+1.237385598e-11
+3.435715331e-06
+9.690231918e-13
+1.580402999e-06
+2.62637456e-08
+1.655990056e-08
+3.291772402e-09
+9.1512343e-11
+4.001694592e-09
+2.423846858e-10
+8.701245489e-11
+6.64795397e-08
+1.983278865e-10
+2.76139679e-08
+2.656177577e-10
+7.546912747e-08
+9.063389298e-12
+7.741377607e-11
+1.184418939e-05
+6.890508766e-06
+3.169263803e-09
+4.150355296e-08
+1.725033287e-09
+2.878535003e-12
+2.509889293e-09
+7.762506373e-13
+2.069391151e-06
+1.73139774e-07
+4.279493758e-05
+1.395259694e-06
+2.595199036e-10
+9.944075024e-12
+3.499094205e-13
+1.046340741e-11
+3.750463625e-08
+2.155601237e-06
+1.121236271e-08
+2.418563504e-06
+4.518744714e-10
+6.024271303e-08
+3.197565919e-11
+4.727213403e-09
+2.495877987e-09
+3.9339182e-10
+7.870318143e-13
+1.037138464e-12
+3.627042927e-12
+1.847825522e-09
+1.241172337e-10
+4.904761237e-12
+2.555499032e-09
+3.671973248e-11
+4.093156547e-11
+6.07341066e-09
+5.209192511e-11
+2.312550123e-07
+9.474021731e-09
+0.0008751191368
+2.540725539e-06
+3.522280135e-10
+0.0002471416431
+5.17838856e-12
+9.034878264e-11
+1.281341869e-09
+0.001213603838
+2.125033615e-07
+0.0007516099299
+7.210918902e-11
+9.948278753e-10
+4.25665388e-10
+5.743070288e-10
+1.346385387e-08
+4.6271783e-12
+4.319199598e-10
+2.676313902e-10
+1.880568301e-12
+4.508721913e-05
+1.534556792e-08
+2.863507187e-09
+4.506653433e-07
+1.819028254e-10
+2.261346482e-09
+6.931109654e-09
+1.090042639e-11
+1.863199616e-06
+0.2569371596
+2.809929231e-10
+2.165733694e-10
+4.838882764e-12
+5.539156408e-07
+1.182889834e-11
+2.409936621e-05
+2.77807872e-13
+5.306104995e-09
+7.589969511e-08
+4.633693419e-08
+2.353621939e-11
+1.361457397e-09
+2.338908014e-06
+7.013172047e-07
+2.157507113e-12
+3.705929994e-10
+1.264812791e-05
+0.000515629747
+8.254265313e-07
+5.811099949e-06
+3.808866844e-07
+3.838708551e-11
+9.781886473e-05
+1.101969368e-11
+7.208821406e-07
+0.0001209531453
+4.050388061e-10
+8.297564427e-12
+6.121028312e-12
+3.937488275e-10
+2.188311494e-09
+1.185175828e-10
+2.343346684e-07
+3.086418042e-05
+3.875250986e-07
+3.723187755e-08
+2.624168807e-11
+7.159164244e-10
+4.505486295e-08
+3.066371391e-05
+5.406587986e-09
+2.062783826e-11
+0.0001122458723
+1.929257292e-08
+7.037241173e-05
+3.825878539e-07
+3.230356502e-07
+2.192467591e-11
+9.358990493e-11
+4.287624273e-12
+3.069764311e-07
+5.494772268e-10
+1.2878838e-07
+1.00972277e-08
+2.68849901e-11
+5.852276723e-06
+1.110488619e-09
+8.274179852e-10
+7.327187289e-07
+4.178996564e-08
+9.88693834e-12
+5.680890086e-10
+9.012789305e-10
+4.390580825e-12
+2.407241598e-05
+0.160787769
+9.028280245e-13
+7.949103177e-10
+4.133700209e-07
+1.596022623e-11
+6.313283075e-10
+1.749300287e-10
+3.329492735e-10
+1.068032728e-07
+2.066244277e-11
+1.054784845e-09
+1.259271467e-07
+3.151800707e-10
+8.821344806e-09
+3.895296733e-06
+8.582182823e-08
+1.340170932e-09
+2.668229061e-11
+1.559846797
+8.202658092e-05
+3.973152843e-08
+1.027291804e-05
+1.183849117e-10
+7.633126919e-08
+0.001532846055
+6.250851928e-09
+7.216840877e-12
+2.491546937e-06
+4.996328614e-05
+3.589433186e-06
+8.108978969e-08
+1.593128993e-09
+5.699078259e-09
+1.042784986e-10
+6.783439439e-11
+4.451858839e-11
+3.18076816e-05
+2.864821824e-11
+2.168071839e-08
+7.003248604e-12
+9.693038219e-07
+1.49690198e-07
+6.696275809e-05
+3.534690205e-11
+2.014636072e-12
+0.0001125804168
+2.231180043e-09
+0.004024836928
+4.146101095e-10
+1.67446175e-09
+7.797928688e-05
+7.959611572e-09
+2.545535783e-12
+1.359734308e-09
+3.580800533e-12
+1.282652419e-08
+5.222431525e-05
+2.453298101e-10
+1.210042014e-08
+1.181067859e-09
+9.468738966e-08
+3.243631875e-07
+2.664412272e-10
+1.400041323e-10
+5.387159818e-11
+2.253611825e-06
+8.082488737e-11
+2.133865429e-09
+4.538658746e-13
+7.403608156e-06
+2.601636865e-10
+7.066868357e-11
+3.51151705e-06
+9.270566812e-10
+4.737157377e-12
+1.956895471e-06
+3.083230886e-10
+1.19941541e-11
+4.760506495e-11
+9.474960114e-10
+4.811641626e-10
+2.656656039e-06
+0.695940073
+1.111460609e-10
+5.314759567e-08
+7.248751549e-08
+1.650883586e-09
diff --git a/t/ME_data/ME_mtmb.dat b/t/ME_data/ME_mtmb.dat
new file mode 100644
index 0000000..28cfa74
--- /dev/null
+++ b/t/ME_data/ME_mtmb.dat
@@ -0,0 +1,832 @@
+5.161578862e-13
+5.039167012e-10
+5.07822427e-10
+2.180163e-07
+5.276333955e-11
+5.268735705e-12
+8.332005011e-12
+9.966582663e-12
+7.931024712e-12
+2.755574546e-10
+6.292493314e-10
+2.104309375e-11
+6.75883884e-09
+1.980088239e-10
+1.242274813e-10
+4.478525563e-07
+1.070409295e-11
+0.007761977755
+7.754548515e-11
+1.749952563e-07
+2.506461628e-05
+7.37516234e-09
+1.055734983e-08
+4.335726837e-10
+4.675947546e-09
+9.090737822e-09
+5.036929892e-07
+8.545366894e-12
+2.556758104e-05
+1.162605908e-12
+6.132787101e-07
+1.376892343e-06
+1.213129962e-11
+8.495593266e-08
+2.988441656e-07
+4.702835471e-10
+8.758268129e-12
+6.893598231e-08
+9.761306144e-10
+6.835434695e-08
+7.914902398e-09
+1.078369709e-07
+4.40178464e-08
+4.104821514e-10
+1.973592787e-09
+7.137445578e-08
+5.041652646e-07
+3.00038152e-12
+7.235642609e-10
+0.0001098032067
+2.440164282e-09
+6.460705131e-11
+6.53527571e-11
+1.72089959e-09
+2.443179383e-06
+3.099461742e-07
+5.794454625e-05
+3.337753504e-09
+1.677727778e-05
+6.545208433e-08
+2.689179268e-11
+7.712578388e-07
+3.673077075e-08
+8.249727011e-05
+9.344442244e-13
+5.981886844e-11
+2.137982982e-10
+1.992807618e-10
+1.439179963e-11
+1.270882186e-08
+1.189969468e-11
+3.007081767e-05
+1.728676603e-08
+2.051845996e-08
+0.3484785417
+1.118678378e-11
+8.899884166e-09
+1.367683546e-12
+2.560199105e-07
+2.503793929e-11
+5.694044661e-10
+3.320952491e-07
+0.6474840456
+6.996183624e-11
+1.374228611e-11
+3.662655687e-11
+1.369037938e-09
+2.927961136e-09
+1.023998948e-12
+3.443932134e-08
+7.442982246e-09
+9.860821844e-07
+1.692067627e-08
+4.717376292e-10
+1.505320056e-06
+2.392960033e-06
+1.474777766e-09
+2.270583928e-10
+3.143112818e-07
+1.388638842e-08
+6.579027786e-11
+1.316833549e-06
+1.210713571e-09
+0.001197976655
+2.595563985e-07
+1.160656584e-09
+2.177085346e-11
+3.797355263e-09
+1.688348884e-09
+1.523486154e-11
+1.715760652e-09
+0.03951400683
+1.795161126e-05
+1.124950848e-06
+0.0004584133818
+2.330534718e-11
+1.183492654e-10
+2.126966159e-08
+1.620046818e-05
+4.700255654e-09
+3.56140605e-11
+6.179802274e-11
+2.20812699e-08
+4.204624647e-06
+1.138856748e-08
+1.035357956e-06
+3.401108707e-06
+3.563909998e-07
+2.38665309e-11
+3.533371098e-08
+2.436674225e-11
+2.289077112e-11
+2.989509299e-10
+1.728218712e-10
+3.725129195e-07
+1.711793802e-09
+7.786373675e-05
+5600.724016
+3.837779218e-09
+0.002324124675
+1.489074945e-05
+5.980511918e-11
+3.818040542e-07
+0.0001632710409
+7.646126502e-09
+1.58948792e-11
+5.881031843e-10
+9.312099782e-06
+3.928658476e-09
+1.421521622e-12
+1.000467573e-08
+4.458482834e-11
+2.474239767e-08
+2.223552782e-05
+8.674465019e-09
+0.005716807403
+1.918133617e-10
+5.07132297e-08
+7.112868305e-08
+1.281668393e-10
+3.442830997e-08
+5.448792732e-07
+2.346968563e-10
+1.10844963e-08
+2.532995826e-05
+2.583118352e-11
+2.540014451e-09
+8.412709568e-10
+0.005757165208
+1.132341337e-09
+4.140246148e-08
+4.069285819e-12
+1.414313224e-06
+1.462527408e-12
+7.062154498e-11
+8.811773326e-11
+2.905512212e-08
+5.630081321e-08
+3.149239203e-10
+4.931305791e-13
+6.670649139e-11
+1.099749073e-09
+0.174904342
+0.001517456166
+0.005089052482
+2.771005206e-06
+3.006542647e-11
+1.341220509e-09
+6.196731147e-08
+5.637669845e-06
+1.393179555e-09
+2.572263155e-11
+2.898625282e-12
+3.912428539e-10
+4.717336202e-06
+8.458442004e-11
+6.42641548e-08
+7.015892425e-09
+1.374775692e-12
+1.448645517e-10
+2.830211708e-11
+5.174268905e-11
+9.73960428e-08
+7.493321937e-10
+2.473506865e-11
+2.946809006e-08
+9.659239088e-08
+1.239883112e-06
+1.004025307e-06
+1.48962638e-08
+1.736341399e-09
+4.016962501e-12
+8.57946181e-12
+2.946197041e-12
+1.790180187e-12
+4.056571586e-09
+4.149449543e-08
+4.11148959e-12
+6.843648126e-09
+1.490267567e-05
+2.172239497e-10
+3.262223285e-10
+3.480989446e-11
+5.840139108e-12
+4.752941184e-10
+8.457628345e-12
+3.463487038e-08
+2.243659189e-06
+1.95081391e-07
+2.443606059e-10
+1.312063142e-08
+2.322191185e-09
+4.045621151e-11
+0.01528168948
+1.207500992e-10
+9.129136701e-12
+6.011476801e-10
+5.136665999e-11
+4.338764079e-08
+1.693797471e-07
+2.313409301e-07
+1.36633431e-09
+1.12544043e-06
+9.646421196e-12
+4.021528812e-07
+3.250096043e-12
+1.382696558e-11
+7.696910156e-09
+5.245700162e-11
+0.0008887473524
+1.15565883e-10
+5.075671925e-10
+3.505318112e-11
+1.553720038e-06
+0.0003415304715
+5.979380938e-10
+1.606787823e-07
+0.0002140060805
+4.045913358e-06
+1.193979683e-10
+1.376869364e-10
+4.692558677e-06
+3.676311233e-09
+6.576622948e-08
+1.801093147e-10
+3.38302126e-10
+1.635800285e-09
+4.136481744e-10
+7.920160155e-12
+3.934403905e-07
+2.523181364e-06
+3.427629577e-07
+3.065923771e-12
+2.710710711e-05
+5.988625037e-08
+2.711662142e-12
+9.663154644e-07
+8.982479699e-10
+1.077773361e-06
+6.662490712e-11
+1.9637019e-07
+6.026753187e-12
+1.88021922e-08
+5.345998673e-09
+1.694927394e-06
+7.853471582e-10
+4.135235092e-05
+1.500655782e-08
+0.01112149111
+5.066893748e-06
+4.609453072e-13
+3.251384413e-08
+3.006155007e-07
+2.525913051e-07
+2.079922606e-11
+2.037478059e-08
+2.264841315e-11
+1.668390917e-10
+6.846864951e-11
+3.797803309e-11
+0.0002341410671
+1.559225887e-08
+1.216175408e-08
+3.901816909e-09
+7.688412331e-10
+1.656883503e-11
+2.694367481e-09
+3.909277131e-12
+5.034525077e-09
+0.10233596
+3.891588373e-11
+6.015989725e-06
+1.171704447e-10
+4.583283115e-12
+8.541074085e-08
+2.153154274e-12
+1.682663129e-06
+4.815920504e-11
+2.656680243e-09
+3.216521573e-12
+4.23227036e-07
+3.11753179e-09
+1.32361718e-09
+7.805111712e-06
+7.633083176e-08
+3.132613014e-08
+6.664501801e-10
+7.104900128e-08
+7.270758579e-08
+1.503646026e-09
+1.105484201e-12
+0.001178878773
+0.04817980684
+1.058878585e-08
+3.56143178e-10
+8.791614213e-11
+5.820343723e-09
+2.204336351e-05
+1.429285934e-06
+1.440986444e-07
+2.397857216e-06
+4.232774693e-12
+5.734462019e-08
+1.13161004e-13
+4.213494667e-06
+1.628455836e-11
+6.1256109e-12
+5.496556158e-09
+1.671238515e-06
+5.41672098e-09
+6.668259122e-07
+2.801116772e-08
+0.5289630979
+5.699450544e-08
+2.060003556e-08
+1.63768593e-12
+7.901530391e-09
+9.183562761e-10
+1.623783245e-07
+3.392271473e-12
+1.148305255e-06
+7.500497596e-08
+2.890330237e-05
+5.27032471e-09
+5.568033653e-10
+3.949596472e-11
+5.220976997e-11
+2.402632296e-11
+1.90830439e-08
+7.751184878e-12
+9.941929184e-11
+1.272221409e-06
+2.664941889e-10
+1.526350044e-10
+4.315185204e-12
+6.269464872e-11
+0.0005219040184
+1.061538445e-07
+2.397954157e-09
+4.345108653e-10
+4.027007675e-08
+3.425309094e-09
+1.829568773e-08
+1.702794894e-10
+8.35043218e-10
+12.94153361
+2.476534638e-12
+5.17635957e-09
+4.333588914e-11
+7.740479327e-05
+1.806348864e-07
+6.061092265e-07
+1.720034884e-08
+8.149783551e-09
+1.13995821e-11
+1.444516097e-09
+3.442511357e-07
+2.687487769e-08
+3.324929595e-06
+3.214075023e-07
+5.514037995e-09
+3.910515916e-10
+5.352452899e-10
+1.024974745e-09
+9.723926528e-07
+1.142155843e-12
+4.549786265e-11
+1.09972016e-11
+3.654067351e-06
+1.398566656e-12
+4.539943432e-11
+6.587500049e-09
+5.43102904e-10
+2.873970984e-05
+1.358608406e-07
+7.596156629e-08
+9.101975663e-07
+2.190418483e-10
+4.834628892e-09
+1.493835427e-12
+0.01338162062
+6.824167554e-12
+2.363893913e-10
+2.994636183e-07
+8.087715398e-09
+1.86783735e-10
+0.0005178587169
+1.474851e-11
+3.392226085e-05
+8.923959214e-08
+9.637725551e-12
+6.886609787e-05
+2.322001452e-05
+2.753071964e-09
+3.088840168e-12
+3.254411231e-07
+2.658258666e-11
+3.255677234e-05
+4.876292523e-09
+1.659394343e-11
+1.858424176e-13
+2.556943709e-11
+2.090064633e-07
+6.620533035e-14
+5.170942373e-10
+2.48944936e-14
+2.646862159e-09
+3.770708988e-06
+0.03201375642
+2.93996316e-11
+2.076672647e-10
+4.571168077e-09
+8.305173791e-11
+8.104966242e-11
+1.811968698e-06
+4.663158882e-13
+0.000138362268
+7.426889829e-09
+1.4212255e-07
+3.703332036e-07
+6.638291564e-11
+2.953929356e-08
+8.777363968e-09
+3.316523026e-10
+1.107106883e-08
+1.409598857e-10
+1.209122232e-12
+2.902510058e-11
+3.96034659e-10
+9.196899471e-10
+4.020577393e-05
+3.25913351e-12
+0.01847195399
+3.132541072e-09
+2.02383484e-11
+8.854255541e-10
+5.893594176e-12
+1.24581317e-08
+2.294789491e-07
+1.010843123e-10
+2.014929995e-07
+0.001291434813
+1.630038652e-07
+3.188312555e-09
+1.385615895e-10
+1.631451759e-07
+3.354053806e-05
+0.0003801533141
+2.699556355e-13
+2.293788424e-11
+2.712453688e-09
+3.058759497e-05
+8.489260539e-10
+1.032512017e-11
+0.001290098307
+2.84532239e-05
+1.379081725e-07
+1.868228874e-12
+1.809628185e-09
+3.358663903e-14
+3.111629026e-12
+9.46933789e-06
+3.609320215e-12
+3.061076594e-05
+1.360424978e-09
+3.17816418e-13
+0.0001264832244
+8.054244375e-10
+4.825101484e-08
+44.02160304
+2.445194762e-07
+1.076210706e-10
+2.236063025e-11
+1.190775158e-06
+1.716083993e-11
+1.062355983e-06
+1.950174472e-07
+6.711319395e-11
+2.421340095e-12
+7.397284289e-11
+8.83511727e-05
+3.102480954e-11
+1.087922217e-06
+0.0003720817528
+1.77635381e-10
+0.003718235607
+3.023425685e-07
+5.817932632e-06
+4.143114379e-10
+6.911705457e-07
+6.889716047e-05
+1.498377696e-08
+9.411761559e-13
+8.933732236e-12
+9.395427183e-10
+1.316617364e-05
+7.724940223e-09
+4.187115353e-13
+4.669831349e-10
+4.981084309e-09
+2.358353593e-06
+3.194586414e-08
+5.527329388e-10
+3.505859406e-12
+6.870481818e-10
+9.42940378e-10
+1.17343523e-08
+1.776481379e-09
+3.772851011e-11
+1.69370149e-09
+7.558224662e-13
+3.194858061e-11
+4.164336716e-09
+4.168772149e-06
+2.980278454e-10
+4.277150915e-09
+0.0001406406425
+4.008767822e-12
+9.072481681e-11
+3.865726736e-07
+1.198243373e-09
+5.081396311e-13
+4.236415887e-07
+9.829655176e-13
+5.234761309e-07
+1.187886511e-05
+1.551527442e-10
+1.320855039e-10
+3.536291922e-12
+6.151859454e-12
+1.19401798e-10
+1.548879644e-09
+6.13774868e-10
+1.21565954e-12
+4.21734264e-08
+5.105243567e-12
+4.323726843e-06
+2.971590786e-11
+1.523280587e-12
+0.009665186131
+9.082583545e-12
+8.374707024e-11
+7.36542533e-10
+0.0009676351546
+5.935287844e-09
+1.044304135e-08
+1.226833099e-12
+1.340892197e-10
+2.84849364e-07
+6.017963602e-12
+6.332097369e-07
+0.0002610800344
+5.753195201e-09
+5.033152405e-09
+1.128322784e-11
+3.687657341e-06
+7.694858369e-13
+1.046657256e-06
+4.071807426e-08
+1.504115753e-08
+3.416312031e-09
+8.042591166e-11
+3.673271463e-09
+7.939468793e-11
+8.34399429e-11
+6.918675008e-08
+2.463056479e-10
+3.42636841e-08
+1.14978863e-10
+8.743295311e-08
+6.359748774e-12
+8.361475525e-11
+1.946886511e-05
+4.461129129e-06
+3.290256702e-09
+5.240669948e-08
+7.624797813e-10
+4.923448432e-12
+1.085442214e-09
+5.008362208e-13
+2.029099373e-06
+1.119345704e-07
+4.497415582e-05
+1.461888539e-06
+1.677339586e-10
+9.470059347e-12
+1.690672429e-13
+2.089535866e-11
+3.67631793e-08
+2.032149944e-06
+6.229351721e-09
+2.366857336e-06
+4.376238094e-10
+5.108882465e-09
+6.289209845e-12
+4.857192613e-09
+2.630163319e-09
+9.893066988e-10
+7.2453132e-13
+1.032803215e-12
+2.080498277e-12
+2.014877325e-09
+1.175734888e-10
+1.786889829e-11
+4.948148165e-09
+5.368903626e-11
+2.404270469e-11
+5.809890177e-09
+7.603438036e-11
+1.447200402e-07
+5.265288114e-09
+0.0009119738917
+2.892811458e-06
+2.530624642e-10
+0.0002564682179
+5.692913799e-12
+1.10646136e-10
+1.455633303e-09
+0.001304037856
+2.24258057e-07
+0.0007915523348
+5.062077013e-12
+1.151874212e-09
+6.969750526e-10
+5.986321743e-10
+1.239101793e-08
+7.864702491e-13
+6.153573866e-10
+3.714385172e-10
+1.230992602e-12
+4.578892258e-05
+1.568487729e-08
+2.794712941e-09
+2.639370037e-07
+1.544494613e-10
+2.280788929e-09
+3.123808845e-09
+3.861474772e-12
+1.911631087e-06
+0.2499846907
+3.19225177e-10
+2.614453725e-10
+1.398491398e-11
+8.562469885e-08
+1.218572475e-11
+2.382358493e-05
+4.029895441e-14
+4.374732156e-09
+9.45071802e-08
+4.400753096e-08
+1.967810924e-11
+1.80576304e-09
+2.744315074e-06
+7.253354496e-07
+2.000385227e-12
+1.203149729e-10
+1.935969267e-05
+0.0006415868859
+1.03690197e-06
+5.8677177e-06
+3.115070914e-07
+6.509311283e-11
+7.540101871e-05
+6.198548998e-12
+7.574919028e-07
+0.0001260201701
+5.684493173e-10
+8.470223051e-12
+3.082526063e-12
+1.062506134e-10
+3.183998404e-09
+1.04709567e-10
+1.584561457e-07
+2.963946383e-05
+3.934968677e-07
+3.984803086e-08
+2.664884499e-11
+4.586815524e-10
+4.664037272e-08
+3.123337878e-05
+5.168067087e-09
+2.659886796e-11
+9.146241615e-05
+1.488629492e-08
+7.515265167e-05
+1.294302619e-07
+1.490676693e-07
+2.131030772e-11
+1.047095118e-10
+7.812191293e-12
+3.073023674e-07
+2.297480775e-11
+1.022001774e-07
+1.923798112e-09
+2.68784657e-11
+5.518668936e-06
+1.079266241e-09
+2.771283706e-10
+7.130922025e-07
+1.599328256e-08
+1.037394515e-11
+5.761578154e-10
+1.291428144e-09
+7.771381599e-13
+2.536086148e-05
+0.1784868598
+2.412853721e-12
+8.88041775e-10
+3.539693383e-07
+5.779624447e-12
+7.078400109e-10
+1.723891497e-10
+3.536481215e-10
+1.214627609e-07
+2.132485696e-11
+1.350724663e-09
+1.236558546e-07
+3.339322152e-10
+1.075923967e-08
+4.815013434e-06
+1.206395012e-07
+1.572421012e-09
+2.764851524e-11
+1.647329565
+2.368002173e-05
+4.237058734e-08
+1.078809717e-05
+1.174868344e-10
+7.786697199e-08
+0.001622963321
+5.746989725e-09
+1.53268773e-11
+2.541137237e-06
+4.588541518e-05
+1.985200383e-06
+7.768704352e-08
+1.101188512e-09
+5.779742424e-09
+5.276269394e-12
+6.398246624e-11
+1.476464601e-11
+3.242082626e-05
+2.941790743e-11
+2.047333476e-08
+2.02403026e-12
+9.658737439e-07
+1.548742877e-07
+6.595898464e-05
+5.63830094e-11
+1.73793751e-12
+0.000114222445
+2.306248261e-09
+0.001970127895
+4.625313263e-10
+7.626762775e-10
+8.171432488e-05
+8.261016812e-09
+7.348525745e-13
+9.685534333e-10
+2.842228114e-12
+1.352391235e-08
+4.893143159e-05
+2.22853914e-10
+1.143866338e-08
+2.123532099e-09
+8.7495866e-08
+3.390315473e-07
+2.59663603e-10
+1.016732605e-10
+5.449682488e-11
+6.779302524e-07
+1.105076406e-10
+2.236492572e-09
+2.803988373e-13
+6.632204848e-06
+3.201229955e-10
+1.017066781e-10
+2.950857218e-06
+2.033613654e-10
+1.213718634e-12
+2.05136948e-06
+4.292331829e-10
+8.014593716e-12
+1.037859575e-10
+9.382940044e-10
+4.852697738e-10
+2.726880566e-06
+0.7057613948
+1.307637198e-10
+5.186330781e-08
+7.674214165e-08
+2.089661369e-09
diff --git a/t/ME_data/PSP.lhe.gz b/t/ME_data/PSP.lhe.gz
new file mode 100644
index 0000000..98df72d
Binary files /dev/null and b/t/ME_data/PSP.lhe.gz differ
diff --git a/t/ME_data/config_mt.yml b/t/ME_data/config_mt.yml
new file mode 100644
index 0000000..4656032
--- /dev/null
+++ b/t/ME_data/config_mt.yml
@@ -0,0 +1,29 @@
+trials: 1
+
+min extparton pt: 30
+
+resummation jets:
+ min pt: 30
+ algorithm: antikt
+ R: 0.4
+
+fixed order jets:
+ min pt: 30
+
+FKL: reweight
+unordered: reweight
+non-HEJ: discard
+
+scales: 125
+
+log correction: false
+unweight: false
+
+random generator:
+ name: mixmax
+ seed: 1
+
+Higgs coupling:
+ use impact factors: false
+ mt: 174
+ include bottom: false
diff --git a/t/ME_data/config_mtinf.yml b/t/ME_data/config_mtinf.yml
new file mode 100644
index 0000000..0dbc0c1
--- /dev/null
+++ b/t/ME_data/config_mtinf.yml
@@ -0,0 +1,24 @@
+trials: 1
+
+min extparton pt: 30
+
+resummation jets:
+ min pt: 30
+ algorithm: antikt
+ R: 0.4
+
+fixed order jets:
+ min pt: 30
+
+FKL: reweight
+unordered: reweight
+non-HEJ: discard
+
+scales: 125
+
+log correction: false
+unweight: false
+
+random generator:
+ name: mixmax
+ seed: 1
diff --git a/t/ME_data/config_mtmb.yml b/t/ME_data/config_mtmb.yml
new file mode 100644
index 0000000..d2c5d7b
--- /dev/null
+++ b/t/ME_data/config_mtmb.yml
@@ -0,0 +1,30 @@
+trials: 1
+
+min extparton pt: 30
+
+resummation jets:
+ min pt: 30
+ algorithm: antikt
+ R: 0.4
+
+fixed order jets:
+ min pt: 30
+
+FKL: reweight
+unordered: reweight
+non-HEJ: discard
+
+scales: 125
+
+log correction: false
+unweight: false
+
+random generator:
+ name: mixmax
+ seed: 1
+
+Higgs coupling:
+ use impact factors: false
+ mt: 174
+ include bottom: true
+ mb: 4.7
diff --git a/t/test_ME_generic.cc b/t/test_ME_generic.cc
new file mode 100644
index 0000000..c24d455
--- /dev/null
+++ b/t/test_ME_generic.cc
@@ -0,0 +1,104 @@
+
+// Generic tester for the ME for a given set of PSP
+// reference weights and PSP (as LHE file) have to be given as _individual_ files
+
+#include <fstream>
+
+#include "LHEF/LHEF.h"
+
+#include "RHEJ/MatrixElement.hh"
+#include "RHEJ/Event.hh"
+#include "RHEJ/YAMLreader.hh"
+#include "RHEJ/stream.hh"
+
+constexpr double alpha_s = 0.118;
+constexpr double mu = 1234.; // coupling fixed mu doesn't matter
+constexpr double ep = 1e-6;
+
+void dump(RHEJ::UnclusteredEvent const & ev, RHEJ::Config config){
+ {
+ LHEF::Writer writer{std::cout};
+ std::cout << std::setprecision(6);
+ RHEJ::Event out_ev{ev, config.resummation_jets.def, config.resummation_jets.min_pt};
+ writer.hepeup = to_HEPEUP(std::move(out_ev), nullptr);
+ writer.writeEvent();
+ }
+ std::cout << "Rapidity ordering:\n";
+ for(const auto & part: ev.outgoing){
+ std::cout << std::setw(2) << part.type << ": "<< std::setw(7) << part.rapidity() << std::endl;
+ }
+}
+
+int main(int argn, char** argv){
+ if(argn != 4 && argn != 5){
+ std::cerr << "\n# Usage:\n."<< argv[0] <<" config.yml ME_weights input_file.lhe\n\n";
+ return EXIT_FAILURE;
+ }
+ bool OUTPUT_MODE = false;
+ if(argn == 5 && std::string("OUTPUT")==std::string(argv[4]))
+ OUTPUT_MODE = true;
+ const RHEJ::Config config = RHEJ::load_config(argv[1]);
+
+ std::fstream wgt_file;
+ if ( OUTPUT_MODE ) {
+ std::cout << "_______________________USING OUTPUT MODE!_______________________" << std::endl;
+ wgt_file.open(argv[2], std::fstream::out);
+ wgt_file.precision(10);
+ } else {
+ wgt_file.open(argv[2], std::fstream::in);
+ }
+
+ RHEJ::istream in{argv[3]};
+ LHEF::Reader reader{in};
+
+ RHEJ::MatrixElement ME{
+ [](double){ return alpha_s; },
+ RHEJ::to_MatrixElementConfig(config)
+ };
+ double max_ratio = 0.;
+ size_t idx_max_ratio = 0;
+ RHEJ::UnclusteredEvent ev_max_ratio;
+ double av_ratio = 0;
+
+ size_t i = 0;
+ while(reader.readEvent()){
+ ++i;
+
+ RHEJ::UnclusteredEvent event{reader.hepeup};
+ const double our_ME = ME.tree(
+ mu, event.incoming, event.outgoing, true
+ );
+
+ if ( OUTPUT_MODE ) {
+ wgt_file << our_ME << std::endl;
+ } else {
+ std::string line;
+ if(!std::getline(wgt_file,line)) break;
+ const double ref_ME = std::stod(line);
+ const double diff = std::abs(our_ME/ref_ME-1.);
+ av_ratio+=diff;
+ if( diff > max_ratio ) {
+ max_ratio = diff;
+ idx_max_ratio = i;
+ ev_max_ratio = event;
+ }
+ if( diff > ep ){
+ size_t precision(std::cout.precision());
+ std::cout.precision(16);
+ std::cout<< "Large difference in PSP " << i << "\nis: "<<our_ME << " should: " << ref_ME << " => difference: " << diff << std::endl;
+ std::cout.precision(precision);
+ dump(event, config);
+ return EXIT_FAILURE;
+ }
+ }
+ }
+ wgt_file.close();
+ if ( !OUTPUT_MODE ) {
+ size_t precision(std::cout.precision());
+ std::cout.precision(16);
+ std::cout << "Avg ratio after " << i << " PSP: " << av_ratio/i << std::endl;
+ std::cout << "maximal ratio at " << idx_max_ratio << ": " << max_ratio << std::endl;
+ std::cout.precision(precision);
+ }
+ return EXIT_SUCCESS;
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 21, 1:43 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4243478
Default Alt Text
(53 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment