Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmake/Templates/nusystematicsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ if(EXISTS "${CMakeModules_CMAKE_DIR}/FindGENIE3.cmake")
endif()

find_package(GENIE3 REQUIRED)
# Parsing GENIE version
string(REPLACE "." ";" VERSION_LIST ${GENIE_VERSION})
list(GET VERSION_LIST 0 MAJOR)
list(GET VERSION_LIST 1 MINOR)
list(GET VERSION_LIST 2 PATCH)
math(EXPR GENIE_VERSION_CODE "${MAJOR} * 10000 + ${MINOR} * 100 + ${PATCH}")


find_package(Eigen3 3.4.0 REQUIRED)

set(nusystematics_FOUND TRUE)
Expand Down
13 changes: 12 additions & 1 deletion src/nusystematics/systproviders/GENIEReWeightEngineConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@
#include "RwCalculators/GReWeightFGM.h"
#include "RwCalculators/GReWeightFZone.h"
#include "RwCalculators/GReWeightINuke.h"

// TODO These modules are not yet merged into tagged Reweight
// https://github.com/GENIE-MC/Reweight/pull/44
// https://github.com/GENIE-MC/Reweight/pull/45
// Assuming these are activated for GENIE>=3.08.00 for now (01/12/2026),
// but need to be updated
#if GENIE_VERSION_CODE >= 30800
#include "RwCalculators/GReWeightINukeExtra.h"
#include "RwCalculators/GReWeightINukeKinematics.h"
#endif

#include "RwCalculators/GReWeightNonResonanceBkg.h"
#include "RwCalculators/GReWeightNuXSecCCQE.h"
#include "RwCalculators/GReWeightNuXSecCCQEaxial.h"
Expand All @@ -19,7 +29,6 @@
#include "RwCalculators/GReWeightNuXSecNCRES.h"
#include "RwCalculators/GReWeightResonanceDecay.h"
#include "RwCalculators/GReWeightDeltaradAngle.h"
#include "RwCalculators/GReWeightINukeKinematics.h"

#include <functional>

Expand Down Expand Up @@ -473,6 +482,7 @@ ConfigureFSIWeightEngine(systtools::SystMetaData const &FSImd,
kINukeTwkDial_FrAbs_N, kINukeTwkDial_FrPiProd_N},
"INuke_N", []() { return new GReWeightINuke; }, UseFullHERG, param_map);

#if GENIE_VERSION_CODE >= 30800
AddResponseAndDependentDials(
FSImd, "FSI_N_EDepVariationResponse",
{kINukeTwkDial_G4_N, kINukeTwkDial_INCL_N,
Expand All @@ -489,6 +499,7 @@ ConfigureFSIWeightEngine(systtools::SystMetaData const &FSImd,
{kINukeKinematicsTwkDial_NP_N, kINukeKinematicsTwkDial_PP_N,
kINukeKinematicsFixPiPro, kINukeKinematicsPiProBias, kINukeKinematicsPiProBiaswFix},
"FrKin", []() { return new GReWeightINukeKinematics; }, UseFullHERG, param_map);
#endif

return param_map;
}
Expand Down
2 changes: 2 additions & 0 deletions src/nusystematics/systproviders/GENIEReWeightParamConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ SystMetaData ConfigureFSIParameterHeaders(fhicl::ParameterSet const &cfg,
firstParamId += FSI_N_md.size();
ExtendSystMetaData(FSImd, std::move(FSI_N_md));

#if GENIE_VERSION_CODE >= 30800
SystMetaData FSI_N_EDep_md = ConfigureSetOfDependentParameters(
cfg, firstParamId, tool_options, "FSI_N_EDep_VariationResponse",
{kINukeTwkDial_G4_N, kINukeTwkDial_INCL_N,
Expand All @@ -442,6 +443,7 @@ SystMetaData ConfigureFSIParameterHeaders(fhicl::ParameterSet const &cfg,
{kINukeKinematicsTwkDial_NP_N, kINukeKinematicsTwkDial_PP_N,
kINukeKinematicsFixPiPro, kINukeKinematicsPiProBias, kINukeKinematicsPiProBiaswFix});
ExtendSystMetaData(FSImd, std::move(FSI_Kinematics));
#endif

return FSImd;
}
Expand Down