Page MenuHomeHEPForge

No OneTemporary

diff --git a/FixedOrderGen/CMakeLists.txt b/FixedOrderGen/CMakeLists.txt
index 0cd16f6..f2d3ace 100644
--- a/FixedOrderGen/CMakeLists.txt
+++ b/FixedOrderGen/CMakeLists.txt
@@ -1,65 +1,72 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project("Fixed Order Generation" C CXX)
## Flags for the compiler. No warning allowed.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(warnings "-Wall -Wextra -Werror -std=c++1y")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(warnings "-Wall -Wextra -Werror -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(warnings "/W4 /WX /EHsc")
endif()
if (NOT CONFIGURED_ONCE)
set(CMAKE_CXX_FLAGS "${warnings}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)
set(CMAKE_C_FLAGS "${warnings}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)
endif()
## Add directories and find dependences
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake/Modules/")
#find_library(rhej rhej_)
find_package(fastjet REQUIRED)
find_package(clhep REQUIRED)
find_package(lhapdf REQUIRED)
find_package(gsl REQUIRED)
find_package(Boost REQUIRED COMPONENTS iostreams)
find_package(HepMC 3)
if(${HepMC_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_HepMC")
endif()
find_package(QCDloop 2)
if(${QCDloop_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_QCDLOOP")
include_directories(SYSTEM ${QCDloop_INCLUDE_PATH})
endif()
include_directories(SYSTEM ${lhapdf_INCLUDE_PATH})
include_directories(SYSTEM ${fastjet_INCLUDE_PATH})
include_directories(SYSTEM ${clhep_INCLUDE_PATH})
include_directories(SYSTEM ${gsl_INCLUDE_PATH})
#add_subdirectory(src)
## define executable
file(GLOB FOgen_source ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
add_executable(FOgen src/main.cc ${FOgen_source})
## link libraries
-#target_link_libraries(rHEJ rhej)
+set(libraries ${CMAKE_DL_LIBS} ${LHAPDF_LIBRARIES} ${CLHEP_LIBRARIES} ${FASTJET_LIBRARIES} ${GSL_LIBRARIES} ${Boost_LIBRARIES} ${HepMC_LIBRARIES} yaml-cpp)
+if(${QCDloop_FOUND})
+ list(APPEND libraries ${QCDloop_LIBRARIES} quadmath)
+endif()
+# add libraries for reversed HEJ <by hand>
+list(APPEND libraries "/home/andersen/HEJ/PURE/GitReverse/run/lib/librhej.so")
+
+target_link_libraries(FOgen ${libraries})
file(GLOB FOgen_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hh)
install(TARGETS FOgen DESTINATION bin)
enable_testing()
set(tst_dir "${CMAKE_CURRENT_SOURCE_DIR}/t")
set(CONFIGURED_ONCE TRUE CACHE INTERNAL
"A flag showing that CMake has configured at least once.")
diff --git a/FixedOrderGen/configFO.yml b/FixedOrderGen/configFO.yml
new file mode 100644
index 0000000..6e63e45
--- /dev/null
+++ b/FixedOrderGen/configFO.yml
@@ -0,0 +1,76 @@
+min extparton pt: 30 # minimum transverse momentum of extremal partons
+
+resummation jets: # resummation jet properties
+ min pt: 35 # minimum jet transverse momentum
+ algorithm: antikt # jet algorithm
+ R: 0.4 # jet R parameter
+
+fixed order jets: # properties of input jets
+ min pt: 30
+ # by default, algorithm and R are like for resummation jets
+
+# treatment of he various event classes
+# the supported settings are: keep, discard
+FKL: keep
+unordered: keep
+non-FKL: discard
+
+# scale settings similar to original HEJ
+#
+# Use combinations of max jet pperp, input scales, ht/2,
+# and the jet invariant mass and vary all scales by factors
+# of 1, sqrt(2), and 2. Discard combinations where mur and muf
+# differ by a factor of more than two.
+#
+# The weight entries in the final events are ordered as follows:
+# 0-18: max jet pperp
+# 19-37: input scales
+# 38-56: ht/2
+# 57-75: jet invariant mass
+# In each of these groups, the first entry corresponds to the basic
+# scale choice. In the following entries, mur and muf are varied with
+# the above factors. The entries are ordered lexicographically so that
+# mur1 < mur2 or (mur1 == mur2 and muf1 < muf2).
+#
+# Note that in contrast to HEJ, the central choice for the event is always
+# max jet pperp and cannot be configured (yet).
+#
+# scales: [max jet pperp, input, Ht/2, jet invariant mass]
+# scale factors: [0.5, 0.7071, 1, 1.41421, 2]
+# max scale ratio: 2.0001
+
+scales: max jet pperp
+
+log correction: false # whether or not to include higher order logs
+unweight: false # TODO: whether or not to unweight events
+
+# event output files
+#
+# the supported formats are
+# - Les Houches (suffix .lhe)
+# - HepMC (suffix .hepmc3)
+# TODO: - ROOT ntuples (suffix .root)
+#
+# An output file's format is deduced either automatically from the suffix
+# or from an explicit specification, e.g.
+# - Les Houches: outfile
+
+event output:
+ - RHEJ.lhe
+# - RHEJ_events.hepmc3
+
+analysis:
+ # to use a custom analysis
+ # plugin: ./src/analysis-plugins/libVBF.so
+ # output: RHEJ.root
+ # wtwt cut: # optional cut on (event weight)^2
+
+#RanLux init: ranlux.0 # file for initialisation of random number engine
+
+# parameters for Higgs-gluon couplings
+# this requires compilation with looptools
+# Higgs coupling:
+# use impact factors: false
+# mt: 174
+# include bottom: true
+# mb: 4.7
diff --git a/FixedOrderGen/src/main.cc b/FixedOrderGen/src/main.cc
index 679489b..ebee280 100644
--- a/FixedOrderGen/src/main.cc
+++ b/FixedOrderGen/src/main.cc
@@ -1,18 +1,79 @@
+/**
+ * Name: main.cc
+ * Authors: Jeppe R. Andersen
+ */
+
+#include <fstream>
+#include <algorithm>
+#include <memory>
+#include <chrono>
#include <iostream>
-int main() {
+#include "yaml-cpp/yaml.h"
+
+#include "LHEF/LHEF.h"
+#include "RHEJ/CombinedEventWriter.hh"
+#include "RHEJ/get_analysis.hh"
+#include "RHEJ/utility.hh"
+#include "RHEJ/EventReweighter.hh"
+#include "RHEJ/config.hh"
+#include "RHEJ/stream.hh"
+
+RHEJ::Config load_config(char const * filename){
+ try{
+ return RHEJ::load_config(filename);
+ }
+ catch(std::exception const & exc){
+ std::cerr << "Error: " << exc.what() << '\n';
+ std::exit(EXIT_FAILURE);
+ }
+}
+
+std::unique_ptr<RHEJ::Analysis> get_analysis(
+ YAML::Node const & parameters
+){
+ try{
+ return RHEJ::get_analysis(parameters);
+ }
+ catch(std::exception const & exc){
+ std::cerr << "Failed to load analysis: " << exc.what() << '\n';
+ std::exit(EXIT_FAILURE);
+ }
+}
+
+int main(int argn, char** argv) {
std::cout << " __ ___ __ ______ __ __ \n";
std::cout << " / / / (_)___ _/ /_ / ____/___ ___ _________ ___ __ / /__ / /______ \n";
std::cout << " / /_/ / / __ `/ __ \\ / __/ / __ \\/ _ \\/ ___/ __ `/ / / / __ / / _ \\/ __/ ___/ \n";
std::cout << " / __ / / /_/ / / / / / /___/ / / / __/ / / /_/ / /_/ / / /_/ / __/ /_(__ ) \n";
std::cout << " /_/ /_/_/\\__, /_/ /_/ /_____/_/ /_/\\___/_/ \\__, /\\__, / \\____/\\___/\\__/____/ \n";
std::cout << " ____///__/ __ ____ ///__//____/ ______ __ \n";
std::cout << " / ____(_) _____ ____/ / / __ \\_________/ /__ _____ / ____/__ ____ ___ _________ _/ /_____ _____\n";
std::cout << " / /_ / / |/_/ _ \\/ __ / / / / / ___/ __ / _ \\/ ___/ / / __/ _ \\/ __ \\/ _ \\/ ___/ __ `/ __/ __ \\/ ___/\n";
std::cout << " / __/ / /> </ __/ /_/ / / /_/ / / / /_/ / __/ / / /_/ / __/ / / / __/ / / /_/ / /_/ /_/ / / \n";
std::cout << " /_/ /_/_/|_|\\___/\\__,_/ \\____/_/ \\__,_/\\___/_/ \\____/\\___/_/ /_/\\___/_/ \\__,_/\\__/\\____/_/ \n";
+ using clock = std::chrono::system_clock;
+
+ if (argn < 2) {
+ std::cerr << "\n# Usage:\n.FOgen config_file\n";
+ return EXIT_FAILURE;
+ }
+
+ const auto start_time = clock::now();
+
+ // read configuration
+ const RHEJ::Config config = load_config(argv[1]);
+
+ // RHEJ::istream in{argv[2]};
+
+ // std::unique_ptr<RHEJ::Analysis> analysis = get_analysis(
+ // config.analysis_parameters
+ // );
+ // assert(analysis != nullptr);
+ std::chrono::duration<double> run_time = (clock::now() - start_time);
+ std::cout << "\nTask Runtime: " << run_time.count() << " seconds.\n";
return 0;
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 21, 2:16 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4243622
Default Alt Text
(8 KB)

Event Timeline