diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 3983c0a..c260ba6 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -1,178 +1,192 @@
# Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
################################################################################
# This file is part of NUISANCE.
#
# NUISANCE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# NUISANCE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NUISANCE. If not, see .
################################################################################
set(TARGETS_TO_BUILD)
if(USE_MINIMIZER)
add_executable(nuismin nuismin.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuismin)
target_link_libraries(nuismin ${MODULETargets})
target_link_libraries(nuismin ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuismin ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuismin PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
add_executable(nuissplines nuissplines.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuissplines)
target_link_libraries(nuissplines ${MODULETargets})
target_link_libraries(nuissplines ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuissplines ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuissplines PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
include_directories(${RWENGINE_INCLUDE_DIRECTORIES})
include_directories(${CMAKE_SOURCE_DIR}/src/Routines)
include_directories(${CMAKE_SOURCE_DIR}/src/InputHandler)
include_directories(${CMAKE_SOURCE_DIR}/src/Genie)
include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
include_directories(${CMAKE_SOURCE_DIR}/src/Utils)
include_directories(${CMAKE_SOURCE_DIR}/src/Splines)
include_directories(${CMAKE_SOURCE_DIR}/src/Reweight)
include_directories(${CMAKE_SOURCE_DIR}/src/FCN)
include_directories(${CMAKE_SOURCE_DIR}/src/MCStudies)
include_directories(${CMAKE_SOURCE_DIR}/src/Smearceptance)
include_directories(${EXP_INCLUDE_DIRECTORIES})
if (USE_NuWro AND NOT NUWRO_BUILT_FROM_FILE)
add_executable(nuwro_nuisance nuwro_NUISANCE.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuwro_nuisance)
target_link_libraries(nuwro_nuisance ${MODULETargets})
target_link_libraries(nuwro_nuisance ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuwro_nuisance ${ROOT_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuwro_nuisance PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
if (USE_NEUT)
add_executable(neut_nuisance neut_NUISANCE.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};neut_nuisance)
target_link_libraries(neut_nuisance ${MODULETargets})
target_link_libraries(neut_nuisance ${CMAKE_DEPENDLIB_FLAGS})
target_link_libraries(neut_nuisance ${ROOT_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(neut_nuisance PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
if (BUILD_GEVGEN)
add_executable(gevgen_nuisance gEvGen_NUISANCE.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};gevgen_nuisance)
target_link_libraries(gevgen_nuisance ${MODULETargets})
target_link_libraries(gevgen_nuisance ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(gevgen_nuisance ${ROOT_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
include_directories(${GENIE_INCLUDES}/Apps)
include_directories(${GENIE_INCLUDES}/FluxDrivers)
include_directories(${GENIE_INCLUDES}/EVGDrivers)
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(gevgen_nuisance PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
+
+
+ add_executable(gevgen_nuisance_mixed gEvGen_NUISANCE_MIXED.cxx)
+ set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};gevgen_nuisance_mixed)
+ target_link_libraries(gevgen_nuisance_mixed ${MODULETargets})
+ target_link_libraries(gevgen_nuisance_mixed ${CMAKE_DEPENDLIB_FLAGS})
+ # target_link_libraries(gevgen_nuisance_mixed ${ROOT_LIBS})
+ include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
+ include_directories(${GENIE_INCLUDES}/Apps)
+ include_directories(${GENIE_INCLUDES}/FluxDrivers)
+ include_directories(${GENIE_INCLUDES}/EVGDrivers)
+ if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
+ set_target_properties(gevgen_nuisance_mixed PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
+ endif()
endif()
if (USE_GiBUU)
add_executable(DumpGiBUUEvents DumpGiBUUEvents.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};DumpGiBUUEvents)
target_link_libraries(DumpGiBUUEvents ${MODULETargets})
target_link_libraries(DumpGiBUUEvents ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(DumpGiBUUEvents ${ROOT_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src/FitBase)
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(DumpGiBUUEvents PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
add_executable(nuiscomp nuiscomp.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuiscomp)
target_link_libraries(nuiscomp ${MODULETargets})
target_link_libraries(nuiscomp ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuiscomp ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuiscomp PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
add_executable(nuisflat nuisflat.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuisflat)
target_link_libraries(nuisflat ${MODULETargets})
target_link_libraries(nuisflat ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuisflat ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuisflat PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
add_executable(nuissmear nuissmear.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuissmear)
target_link_libraries(nuissmear ${MODULETargets})
target_link_libraries(nuissmear ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuissmear ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuissmear PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
add_executable(nuissyst nuissyst.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};nuissyst)
target_link_libraries(nuissyst ${MODULETargets})
target_link_libraries(nuissyst ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(nuissyst ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(nuissyst PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
if(USE_GENIE)
add_executable(PrepareGENIE PrepareGENIE.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};PrepareGENIE)
target_link_libraries(PrepareGENIE ${MODULETargets})
target_link_libraries(PrepareGENIE ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(PrepareGENIE ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(PrepareGENIE PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
if(USE_NEUT)
add_executable(PrepareNEUT PrepareNEUT.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};PrepareNEUT)
target_link_libraries(PrepareNEUT ${MODULETargets})
target_link_libraries(PrepareNEUT ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(PrepareNEUT ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(PrepareNEUT PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
# PREPARE NUWRO
# Commented out for the time being until it is finished..
if(USE_NuWro)
add_executable(PrepareNuwro PrepareNuwroEvents.cxx)
set(TARGETS_TO_BUILD ${TARGETS_TO_BUILD};PrepareNuwro)
target_link_libraries(PrepareNuwro ${MODULETargets})
target_link_libraries(PrepareNuwro ${CMAKE_DEPENDLIB_FLAGS})
# target_link_libraries(PrepareNuwro ${ROOT_LIBS})
if(NOT "${CMAKE_LINK_FLAGS}" STREQUAL "")
set_target_properties(PrepareNuwro PROPERTIES LINK_FLAGS ${CMAKE_LINK_FLAGS})
endif()
endif()
install(TARGETS ${TARGETS_TO_BUILD} DESTINATION bin)
diff --git a/app/gEvGen_NUISANCE_MIXED.cxx b/app/gEvGen_NUISANCE_MIXED.cxx
new file mode 100644
index 0000000..c0969c7
--- /dev/null
+++ b/app/gEvGen_NUISANCE_MIXED.cxx
@@ -0,0 +1,1001 @@
+#ifdef __GENIE_ENABLED__
+//____________________________________________________________________________
+/*!
+
+\program gevgen
+
+\brief A simple 'generic' GENIE v+A event generation driver (gevgen).
+
+ It handles:
+ a) event generation for a fixed init state (v+A) at fixed energy, or
+ b) event generation for simple fluxes (specified either via some
+ functional form, tabular text file or a ROOT histogram) and for
+ simple 'geometries' (a target mix with its corresponding weights)
+
+ See the GENIE manual for other apps handling experiment-specific
+ event generation cases using the outputs of detailed neutrino flux
+ simulations and realistic detector geometry descriptions.
+
+ Syntax :
+ gevgen [-h]
+ [-r run#]
+ -n nev
+ -e energy (or energy range)
+ -p neutrino_pdg
+ -t target_pdg
+ [-f flux_description]
+ [-w]
+ [--seed random_number_seed]
+ [--cross-sections xml_file]
+ [--event-generator-list list_name]
+ [--tune genie_tune]
+ [--message-thresholds xml_file]
+ [--unphysical-event-mask mask]
+ [--event-record-print-level level]
+ [--mc-job-status-refresh-rate rate]
+ [--cache-file root_file]
+
+ Options :
+ [] Denotes an optional argument.
+ -h
+ Prints-out help on using gevgen and exits.
+ -n
+ Specifies the number of events to generate.
+ -r
+ Specifies the MC run number.
+ -e
+ Specifies the neutrino energy.
+ If what follows the -e option is a comma separated pair of values
+ it will be interpreted as an energy range for the flux specified
+ via the -f option (see below).
+ -p
+ Specifies the neutrino PDG code.
+ -t
+ Specifies the target PDG code (pdg format: 10LZZZAAAI) _or_ a target
+ mix (pdg codes with corresponding weights) typed as a comma-separated
+ list of pdg codes with the corresponding weight fractions in brackets,
+ eg code1[fraction1],code2[fraction2],...
+ For example, to use a target mix of 95% O16 and 5% H type:
+ `-t 1000080160[0.95],1000010010[0.05]'.
+ -f
+ Specifies the neutrino flux spectrum.
+ It can be any of:
+ -- A function:
+ eg ` -f x*x+4*exp(-x)'
+ -- A vector file:
+ The vector file should contain 2 columns corresponding to
+ energy,flux (see $GENIE/data/flux/ for few examples).
+ -- A 1-D ROOT histogram (TH1D):
+ The general syntax is `-f /full/path/file.root,object_name'
+ -w
+ Forces generation of weighted events.
+ This option is relevant only if a neutrino flux is specified.
+ Note that 'weighted' refers to the selection of the primary
+ flux neutrino + target that were forced to interact. A weighting
+ scheme for the generated kinematics of individual processes can
+ still be in effect if enabled..
+ ** Only use that option if you understand what it means **
+ --seed
+ Random number seed.
+ --cross-sections
+ Name (incl. full path) of an XML file with pre-computed
+ cross-section values used for constructing splines.
+ --event-generator-list
+ List of event generators to load in event generation drivers.
+ [default: "Default"].
+ --tune
+ Specifies a GENIE comprehensive neutrino interaction model tune.
+ [default: "Default"].
+ --message-thresholds
+ Allows users to customize the message stream thresholds.
+ The thresholds are specified using an XML file.
+ See $GENIE/config/Messenger.xml for the XML schema.
+ --unphysical-event-mask
+ Allows users to specify a 16-bit mask to allow certain types of
+ unphysical events to be written in the output file.
+ [default: all unphysical events are rejected]
+ --event-record-print-level
+ Allows users to set the level of information shown when the event
+ record is printed in the screen. See GHepRecord::Print().
+ --mc-job-status-refresh-rate
+ Allows users to customize the refresh rate of the status file.
+ --cache-file
+ Allows users to specify a cache file so that the cache can be
+ re-used in subsequent MC jobs.
+
+ *** See the User Manual for more details and examples. ***
+
+\author Costas Andreopoulos
+ University of Liverpool & STFC Rutherford Appleton Lab
+
+\created October 05, 2004
+
+\cpright Copyright (c) 2003-2016, GENIE Neutrino MC Generator Collaboration
+ For the full text of the license visit http://copyright.genie-mc.org
+ or see $GENIE/LICENSE
+*/
+//____________________________________________________________________________
+
+#include
+#include
+#include
+#include
+#include
+#include