Page MenuHomeHEPForge

No OneTemporary

diff --git a/cmake/NEUTSetup.cmake b/cmake/NEUTSetup.cmake
index 9bdca4e..0bb4da7 100644
--- a/cmake/NEUTSetup.cmake
+++ b/cmake/NEUTSetup.cmake
@@ -1,225 +1,227 @@
# 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 <http://www.gnu.org/licenses/>.
################################################################################
include(cmake/parseConfigApp.cmake)
find_program(NEUTCONFIG NAMES neut-config)
LIST(APPEND EXTRA_CXX_FLAGS -DNEED_FILL_NEUT_COMMONS)
SET(HAVENEUTCONFIG FALSE)
# We are dealing with shiny NEUT
if(NOT "${NEUTCONFIG}" STREQUAL "NEUTCONFIG-NOTFOUND")
SET(HAVENEUTCONFIG TRUE)
cmessage(STATUS "Found neut-config, using it to determine configuration.")
else()
cmessage(STATUS "Failed to find neut-config, assuming older NEUT build.")
endif()
if(HAVENEUTCONFIG)
execute_process (COMMAND neut-config
- --version OUTPUT_VARIABLE NEUT_VERSION
+ --version OUTPUT_VARIABLE NEUT_VER
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND neut-config
--incdir OUTPUT_VARIABLE NEUT_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND neut-config
--libdir OUTPUT_VARIABLE NEUT_LINK_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
GETLIBDIRS(neut-config --cernflags CERN_LIB_DIR)
LIST(APPEND NEUT_LINK_DIRS ${CERN_LIB_DIR})
GETLIBS(neut-config --cernflags CERN_LIBS)
if(USE_REWEIGHT)
execute_process (COMMAND neut-config
--rwlibflags OUTPUT_VARIABLE NEUT_RWLIBS
OUTPUT_STRIP_TRAILING_WHITESPACE)
GETLIBS(neut-config --rwlibflags NEUT_RWLIBS)
LIST(APPEND NEUT_LIBS ${NEUT_RWLIBS})
else()
GETLIBS(neut-config --libflags NEUT_GENLIBS)
GETLIBS(neut-config --iolibflags NEUT_LIBS)
LIST(APPEND NEUT_LIBS ${NEUT_IOLIBS})
LIST(APPEND NEUT_LIBS ${NEUT_GENLIBS})
endif()
LIST(APPEND NEUT_LIBS ${CERN_LIBS};gfortran)
LIST(APPEND EXTRA_LIBS ${NEUT_LIBS})
+ string(REPLACE "." "" NEUT_VERSION ${NEUT_VER})
+
PrefixList(NEUT_INCLUDE_DIRS "-I" ${NEUT_INCLUDE_DIRS})
- LIST(APPEND EXTRA_CXX_FLAGS ${NEUT_INCLUDE_DIRS} -D__NEUT_ENABLED__ -DNEUT_VERSION=${NEUT_VERSION})
+ LIST(APPEND EXTRA_CXX_FLAGS ${NEUT_INCLUDE_DIRS} -D__NEUT_ENABLED__ -D__NEUT_VERSION__=${NEUT_VERSION})
LIST(APPEND EXTRA_LINK_DIRS ${NEUT_LINK_DIRS})
cmessage(STATUS "NEUT")
- cmessage(STATUS " Version : ${NEUT_VERSION}")
+ cmessage(STATUS " Version : ${NEUT_VER}")
cmessage(STATUS " Flags : ${NEUT_CXX_FLAGS}")
cmessage(STATUS " Includes : ${NEUT_INCLUDE_DIRS}")
cmessage(STATUS " Link Dirs : ${NEUT_LINK_DIRS}")
cmessage(STATUS " Libs : ${NEUT_LIBS}")
else() # Everything better be set up already
if(NEUT_ROOT STREQUAL "")
cmessage(FATAL_ERROR "Variable NEUT_ROOT is not defined. Please export environment variable NEUT_ROOT or configure with -DNEUT_ROOT=/path/to/NEUT. This must be set to point to a prebuilt NEUT instance.")
endif()
if(CERN STREQUAL "")
cmessage(FATAL_ERROR "Variable CERN is not defined. Please export environment variable CERN or configure with -DCERN=/path/to/CERNLIB. This must be set to point to a prebuilt CERNLIB instance.")
endif()
if(CERN_LEVEL STREQUAL "")
cmessage(FATAL_ERROR "Variable CERN_LEVEL is not defined. Please export environment variable CERN_LEVEL or configure with -DCERN_LEVEL=XXXX (likely to be 2005).")
endif()
if(${NEUT_VERSION} VERSION_LESS 5.4.0)
set(NEUT_LIB_DIR ${NEUT_ROOT}/lib/Linux_pc)
else()
set(NEUT_LIB_DIR ${NEUT_ROOT}/lib)
endif()
set(NEUT_CLASS ${NEUT_ROOT}/src/neutclass)
LIST(APPEND EXTRA_CXX_FLAGS -D__NEUT_ENABLED__ -DNEUT_VERSION=${NEUT_VERSION})
LIST(APPEND EXTRA_CXX_FLAGS
-I${NEUT_ROOT}/include
-I${NEUT_ROOT}/src/neutclass)
LIST(APPEND EXTRA_LINK_DIRS
${NEUT_LIB_DIR}
${CERN}/${CERN_LEVEL}/lib)
if(USE_REWEIGHT)
LIST(APPEND EXTRA_CXX_FLAGS
-I${NEUT_ROOT}/src/reweight)
LIST(APPEND EXTRA_LINK_DIRS
${NEUT_ROOT}/src/reweight)
endif()
if(${NEUT_VERSION} VERSION_EQUAL 5.4.2)
LIST(APPEND EXTRA_LIBS
-Wl,--as-needed)
if(USE_REWEIGHT)
LIST(APPEND EXTRA_LIBS
NReWeight)
endif()
LIST(APPEND EXTRA_LIBS
-Wl,--start-group
neutcore_5.4.2
nuccorspl_5.4.2 #typo in NEUT, may hopefully disappear
nuceff_5.4.2
partnuck_5.4.2
skmcsvc_5.4.2
tauola_5.4.2
HT2p2h_5.4.0
N1p1h_5.4.0
-Wl,--end-group
jetset74
pdflib804
mathlib
packlib
pawlib)
LIST(APPEND EXTRA_CXX_FLAGS -DNEUT_COMMON_QEAV)
elseif(${NEUT_VERSION} VERSION_EQUAL 5.4.0)
LIST(APPEND EXTRA_LIBS
-Wl,--as-needed)
if(USE_REWEIGHT)
LIST(APPEND EXTRA_LIBS
NReWeight)
endif()
LIST(APPEND EXTRA_LIBS
-Wl,--start-group
neutcore_5.4.0
nuccorspl_5.4.0 #typo in NEUT, may hopefully disappear
nuceff_5.4.0
partnuck_5.4.0
skmcsvc_5.4.0
tauola_5.4.0
HT2p2h_5.4.0
N1p1h_5.4.0
specfunc_5.4.0
radcorr_5.4.0
gfortran
-Wl,--end-group
jetset74
pdflib804
mathlib
packlib
pawlib)
else()
LIST(APPEND EXTRA_LIBS
-Wl,--as-needed)
if(USE_REWEIGHT)
LIST(APPEND EXTRA_LIBS
NReWeight)
endif()
LIST(APPEND EXTRA_LIBS
-Wl,--start-group
neutcore
nuccorrspl
nuceff
partnuck
skmcsvc
tauola
-Wl,--end-group
jetset74
pdflib804
mathlib
packlib
pawlib)
endif()
set(NEUT_ROOT_LIBS)
LIST(APPEND NEUT_ROOT_LIBS
${NEUT_CLASS}/neutctrl.so
${NEUT_CLASS}/neutfsivert.so)
# Check for new versions of NEUT with NUCLEON FSI
if(EXISTS "${NEUT_CLASS}/neutnucfsistep.so")
set(NEUT_NUCFSI 1)
LIST(APPEND EXTRA_CXX_FLAGS -DNEUT_NUCFSI_ENABLED)
LIST(APPEND NEUT_ROOT_LIBS
${NEUT_CLASS}/neutnucfsistep.so
${NEUT_CLASS}/neutnucfsivert.so
)
endif()
if(${NEUT_VERSION} VERSION_LESS 5.4.0)
LIST(APPEND NEUT_ROOT_LIBS
${NEUT_CLASS}/neutrootTreeSingleton.so)
endif()
LIST(APPEND NEUT_ROOT_LIBS
${NEUT_CLASS}/neutvtx.so
${NEUT_CLASS}/neutfsipart.so
${NEUT_CLASS}/neutpart.so
${NEUT_CLASS}/neutvect.so
)
foreach(OBJ ${NEUT_ROOT_LIBS})
LIST(APPEND EXTRA_SHAREDOBJS ${OBJ})
endforeach()
endif()
diff --git a/data/neut/neut_minimal_6t.card b/data/neut/neut_minimal_6t.card
new file mode 100644
index 0000000..c7b71f2
--- /dev/null
+++ b/data/neut/neut_minimal_6t.card
@@ -0,0 +1,18 @@
+NEUT-MAQE 1.21
+NEUT-MDLQE 402
+NEUT-MDL2P2H 1
+
+EVCT-IDPT 14
+EVCT-MPOS 2
+EVCT-RAD 100.
+EVCT-MDIR 1
+EVCT-DIR 0. 0. 1.
+EVCT-MPV 3
+EVCT-FILENM 'nd5_tuned13av1.1_13anom_run1-7c_fine.root'
+EVCT-HISTNM 'enu_nd5_tuned13a_numu'
+EVCT-INMEV 0
+
+NEUT-NUMBNDN 6
+NEUT-NUMBNDP 6
+NEUT-NUMFREP 0
+NEUT-NUMATOM 12
diff --git a/src/InputHandler/GeneratorUtils.h b/src/InputHandler/GeneratorUtils.h
index 568378d..c6f809f 100644
--- a/src/InputHandler/GeneratorUtils.h
+++ b/src/InputHandler/GeneratorUtils.h
@@ -1,68 +1,74 @@
// 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 <http://www.gnu.org/licenses/>.
*******************************************************************************/
#ifndef GENERATOR_UTILS_H
#define GENERATOR_UTILS_H
/*!
* \addtogroup InputHandler
* @{
*/
#ifdef __NIWG_ENABLED__
#ifdef __NEUT_ENABLED__
#include "NIWGEvent.h"
#include "NIWGSyst.h"
#include "InputHandler.h"
#include "TargetUtils.h"
+
+#include "TTreePerfStats.h"
+#include "PlotUtils.h"
+
+
+/*
#include "neutpart.h"
#include "neutvect.h"
-#include "PlotUtils.h"
-#include "TTreePerfStats.h"
#include "nefillverC.h"
#include "necardC.h"
#include "neutmodelC.h"
#include "neutparamsC.h"
#include "neworkC.h"
#include "fsihistC.h"
#include "neutcrsC.h"
#include "neutvect.h"
#include "neutpart.h"
#include "neutfsipart.h"
#include "neutfsivert.h"
#include "neutrootTreeSingleton.h"
#include "NModeDefn.h"
#include "NSyst.h"
#include "NFortFns.h" // Contains all the NEUT common blocks
#ifdef __NEUT_NUCFSI_ENABLED__
#include "nucleonfsihistC.h"
#include "neutnucfsivert.h"
#include "neutnucfsistep.h"
#endif
+*/
+#include "neutvect.h"
#endif
#endif
// namespace GeneratorUtils {
// #ifdef __NIWG_ENABLED__
// #ifdef __NEUT_ENABLED__
// niwg::rew::NIWGEvent* GetNIWGEventLocal(NeutVect* nvect);
// #endif
// #endif
// };
/*! @} */
#endif
diff --git a/src/Reweight/NEUTWeightEngine.cxx b/src/Reweight/NEUTWeightEngine.cxx
index 966a09b..273723c 100644
--- a/src/Reweight/NEUTWeightEngine.cxx
+++ b/src/Reweight/NEUTWeightEngine.cxx
@@ -1,178 +1,195 @@
#include "NEUTWeightEngine.h"
NEUTWeightEngine::NEUTWeightEngine(std::string name) {
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
+ // For newer NEUT we need to set up our defaults
+#if __NEUT_VERSION__ >= 541
+ neut::CommonBlockIFace::Initialize(std::string(std::getenv("NUISANCE"))+"/data/neut/neut_minimal_6t.card");
+#endif
+
// Setup the NEUT Reweight engien
fCalcName = name;
NUIS_LOG(FIT, "Setting up NEUT RW : " << fCalcName);
// Create RW Engine suppressing cout
StopTalking();
fNeutRW = new neut::rew::NReWeight();
TDirectory *olddir = gDirectory;
// get list of vetoed calc engines (just for debug really)
std::string rw_engine_list =
FitPar::Config().GetParS("FitWeight_fNeutRW_veto");
bool xsec_ccqe = rw_engine_list.find("xsec_ccqe") == std::string::npos;
bool xsec_res = rw_engine_list.find("xsec_res") == std::string::npos;
bool xsec_ccres = rw_engine_list.find("xsec_ccres") == std::string::npos;
bool xsec_coh = rw_engine_list.find("xsec_coh") == std::string::npos;
bool xsec_dis = rw_engine_list.find("xsec_dis") == std::string::npos;
bool xsec_ncel = rw_engine_list.find("xsec_ncel") == std::string::npos;
bool xsec_nc = rw_engine_list.find("xsec_nc") == std::string::npos;
bool xsec_ncres = rw_engine_list.find("xsec_ncres") == std::string::npos;
bool nucl_casc = rw_engine_list.find("nucl_casc") == std::string::npos;
bool nucl_piless = rw_engine_list.find("nucl_piless") == std::string::npos;
// Activate each calc engine
if (xsec_ccqe)
fNeutRW->AdoptWghtCalc("xsec_ccqe", new neut::rew::NReWeightNuXSecCCQE);
if (xsec_res)
fNeutRW->AdoptWghtCalc("xsec_res", new neut::rew::NReWeightNuXSecRES);
- if (xsec_ccres)
- fNeutRW->AdoptWghtCalc("xsec_ccres", new neut::rew::NReWeightNuXSecCCRES);
+
+ // Dials removed in NEUT 5.4.1
+#if __NEUT_VERSION__ < 541
+ if (nucl_casc)
+ fNeutRW->AdoptWghtCalc("nucl_casc", new neut::rew::NReWeightCasc);
if (xsec_coh)
fNeutRW->AdoptWghtCalc("xsec_coh", new neut::rew::NReWeightNuXSecCOH);
- if (xsec_dis)
- fNeutRW->AdoptWghtCalc("xsec_dis", new neut::rew::NReWeightNuXSecDIS);
- if (xsec_ncel)
- fNeutRW->AdoptWghtCalc("xsec_ncel", new neut::rew::NReWeightNuXSecNCEL);
if (xsec_nc)
fNeutRW->AdoptWghtCalc("xsec_nc", new neut::rew::NReWeightNuXSecNC);
- if (xsec_ncres)
- fNeutRW->AdoptWghtCalc("xsec_ncres", new neut::rew::NReWeightNuXSecNCRES);
- if (nucl_casc)
- fNeutRW->AdoptWghtCalc("nucl_casc", new neut::rew::NReWeightCasc);
if (nucl_piless)
fNeutRW->AdoptWghtCalc("nucl_piless", new neut::rew::NReWeightNuclPiless);
+ if (xsec_ncres)
+ fNeutRW->AdoptWghtCalc("xsec_ncres", new neut::rew::NReWeightNuXSecNCRES);
+ if (xsec_ccres)
+ fNeutRW->AdoptWghtCalc("xsec_ccres", new neut::rew::NReWeightNuXSecCCRES);
+ if (xsec_ncel)
+ fNeutRW->AdoptWghtCalc("xsec_ncel", new neut::rew::NReWeightNuXSecNCEL);
+ if (xsec_dis)
+ fNeutRW->AdoptWghtCalc("xsec_dis", new neut::rew::NReWeightNuXSecDIS);
+#endif
fNeutRW->Reconfigure();
olddir->cd();
// Set Abs Twk Config
fIsAbsTwk = (FitPar::Config().GetParB("setabstwk"));
// allow cout again
StartTalking();
#else
NUIS_ABORT("NEUT RW NOT ENABLED!");
#endif
};
void NEUTWeightEngine::IncludeDial(std::string name, double startval) {
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
// Get First enum
int nuisenum = Reweight::ConvDial(name, kNEUT);
// Setup Maps
fEnumIndex[nuisenum]; // = std::vector<size_t>(0);
fNameIndex[name]; // = std::vector<size_t>(0);
// Split by commas
std::vector<std::string> allnames = GeneralUtils::ParseToStr(name, ",");
for (uint i = 0; i < allnames.size(); i++) {
std::string singlename = allnames[i];
// Get Syst
+#if __NEUT_VERSION__ < 541
neut::rew::NSyst_t gensyst = NSyst::FromString(singlename);
+#else
+ neut::rew::NSyst_t gensyst = neut::rew::NSyst::FromString(singlename);
+#endif
// Fill Maps
int index = fValues.size();
fValues.push_back(0.0);
fNEUTSysts.push_back(gensyst);
// Initialize dial
NUIS_LOG(FIT, "Registering " << singlename << " dial.");
fNeutRW->Systematics().Init(fNEUTSysts[index]);
// If Absolute
if (fIsAbsTwk) {
+#if __NEUT_VERSION__ < 541
NSystUncertainty::Instance()->SetUncertainty(fNEUTSysts[index], 1.0, 1.0);
+#else
+ neut::rew::NSystUncertainty::Instance()->SetUncertainty(fNEUTSysts[index], 1.0, 1.0);
+#endif
}
// Setup index
fEnumIndex[nuisenum].push_back(index);
fNameIndex[name].push_back(index);
}
// Set Value if given
if (startval != -999.9) {
SetDialValue(nuisenum, startval);
}
#endif
}
void NEUTWeightEngine::SetDialValue(int nuisenum, double val) {
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
std::vector<size_t> indices = fEnumIndex[nuisenum];
for (uint i = 0; i < indices.size(); i++) {
fValues[indices[i]] = val;
NUIS_LOG(FIT, "Setting Dial Value for "
<< nuisenum << " " << i << " " << indices[i] << " "
<< fValues[indices[i]]
<< " Enum: " << fNEUTSysts[indices[i]]);
fNeutRW->Systematics().Set(fNEUTSysts[indices[i]], val);
}
#endif
}
void NEUTWeightEngine::SetDialValue(std::string name, double val) {
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
std::vector<size_t> indices = fNameIndex[name];
for (uint i = 0; i < indices.size(); i++) {
fValues[indices[i]] = val;
NUIS_LOG(FIT, "Setting Dial Value for "
<< name << " = " << i << " " << indices[i] << " "
<< fValues[indices[i]]
<< " Enum: " << fNEUTSysts[indices[i]]);
fNeutRW->Systematics().Set(fNEUTSysts[indices[i]], val);
}
#endif
}
void NEUTWeightEngine::Reconfigure(bool silent) {
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
// Hush now...
if (silent)
StopTalking();
// Reconf
fNeutRW->Reconfigure();
// if (LOG_LEVEL(DEB)){
fNeutRW->Print();
// }
// Shout again
if (silent)
StartTalking();
#endif
}
double NEUTWeightEngine::CalcWeight(BaseFitEvt *evt) {
double rw_weight = 1.0;
#if defined(__NEUT_ENABLED__) and !defined(__NO_REWEIGHT__)
// Skip Non NEUT
if (evt->fType != kNEUT)
return 1.0;
// Hush now
StopTalking();
// Fill NEUT Common blocks
NEUTUtils::FillNeutCommons(evt->fNeutVect);
// Call Weight calculation
rw_weight = fNeutRW->CalcWeight();
// Speak Now
StartTalking();
#endif
// Return rw_weight
return rw_weight;
}
diff --git a/src/Reweight/NEUTWeightEngine.h b/src/Reweight/NEUTWeightEngine.h
index 7cc7bb0..17ff6ca 100644
--- a/src/Reweight/NEUTWeightEngine.h
+++ b/src/Reweight/NEUTWeightEngine.h
@@ -1,55 +1,61 @@
#ifndef WEIGHT_ENGINE_NEUT_H
#define WEIGHT_ENGINE_NEUT_H
#include "FitLogger.h"
#ifdef __NEUT_ENABLED__
#ifndef __NO_REWEIGHT__
#include "NEUTInputHandler.h"
#include "NReWeight.h"
-#include "NReWeightCasc.h"
#include "NReWeightNuXSecCCQE.h"
+#include "NReWeightNuXSecRES.h"
+// Dials removed in NEUT 5.4.1
+#if __NEUT_VERSION__ < 541
+#include "NReWeightCasc.h"
+#include "NReWeightNuclPiless.h"
+#include "NReWeightNuXSecNCRES.h"
#include "NReWeightNuXSecCCRES.h"
-#include "NReWeightNuXSecCOH.h"
-#include "NReWeightNuXSecDIS.h"
#include "NReWeightNuXSecNC.h"
+#include "NReWeightNuXSecCOH.h"
#include "NReWeightNuXSecNCEL.h"
-#include "NReWeightNuXSecNCRES.h"
-#include "NReWeightNuXSecRES.h"
-#include "NReWeightNuclPiless.h"
+#include "NReWeightNuXSecDIS.h"
+#endif
+#if __NEUT_VERSION__ >= 541
+#include "CommonBlockIFace.h"
+#endif
#include "NSyst.h"
#include "NSystUncertainty.h"
#include "neutpart.h"
#include "neutvect.h"
#endif
#endif
#include "FitWeight.h"
#include "GeneratorUtils.h"
#include "WeightEngineBase.h"
class NEUTWeightEngine : public WeightEngineBase {
public:
NEUTWeightEngine(std::string name);
~NEUTWeightEngine(){};
void IncludeDial(std::string name, double startval);
void SetDialValue(std::string name, double val);
void SetDialValue(int nuisenum, double val);
void Reconfigure(bool silent = false);
double CalcWeight(BaseFitEvt *evt);
inline bool NeedsEventReWeight() { return true; };
#ifdef __NEUT_ENABLED__
#ifndef __NO_REWEIGHT__
std::vector<neut::rew::NSyst_t> fNEUTSysts;
neut::rew::NReWeight *fNeutRW;
#endif
#endif
};
#endif
diff --git a/src/Reweight/NIWGWeightEngine.h b/src/Reweight/NIWGWeightEngine.h
index 809eed6..c91bcdd 100644
--- a/src/Reweight/NIWGWeightEngine.h
+++ b/src/Reweight/NIWGWeightEngine.h
@@ -1,82 +1,85 @@
#ifndef WEIGHT_ENGINE_NIWG_H
#define WEIGHT_ENGINE_NIWG_H
#ifdef __NIWG_ENABLED__
#ifdef __NEUT_ENABLED__
#include "NIWGReWeight.h"
#include "NIWGReWeight1piAngle.h"
#include "NIWGReWeight2010a.h"
#include "NIWGReWeight2012a.h"
#include "NIWGReWeight2014a.h"
#include "NIWGReWeightDeltaMass.h"
#include "NIWGReWeightEffectiveRPA.h"
#ifdef HAVE_NIWGRW_LOWQ2
#include "NIWGReWeightEffectiveQELowQ2Suppression.h"
#endif
#ifdef HAVE_NIWGRW_2P2HENU
#include "NIWGReWeight2p2hEdep.h"
#endif
#include "NIWGReWeightHadronMultSwitch.h"
#include "NIWGReWeightMEC.h"
#include "NIWGReWeightPiMult.h"
#include "NIWGReWeightProtonFSIbug.h"
#include "NIWGReWeightRPA.h"
#include "NIWGReWeightSpectralFunc.h"
#include "NIWGReWeightSplineEnu.h"
#include "NIWGSyst.h"
#include "NIWGSystUncertainty.h"
#include "NReWeight.h"
-#include "NReWeightCasc.h"
#include "NReWeightNuXSecCCQE.h"
+#include "NReWeightNuXSecRES.h"
+// Dials removed in NEUT 5.4.1
+#if __NEUT_VERSION__ < 541
+#include "NReWeightCasc.h"
+#include "NReWeightNuclPiless.h"
+#include "NReWeightNuXSecNCRES.h"
#include "NReWeightNuXSecCCRES.h"
-#include "NReWeightNuXSecCOH.h"
-#include "NReWeightNuXSecDIS.h"
#include "NReWeightNuXSecNC.h"
+#include "NReWeightNuXSecCOH.h"
#include "NReWeightNuXSecNCEL.h"
-#include "NReWeightNuXSecNCRES.h"
-#include "NReWeightNuXSecRES.h"
-#include "NReWeightNuclPiless.h"
+#include "NReWeightNuXSecDIS.h"
+#endif
#include "NSyst.h"
#include "NSystUncertainty.h"
#include "neutpart.h"
#include "neutvect.h"
#include "NEUTInputHandler.h"
#endif
#endif
#include "FitLogger.h"
#include "GeneratorUtils.h"
#include "WeightEngineBase.h"
#include "FitWeight.h"
class NIWGWeightEngine : public WeightEngineBase {
public:
NIWGWeightEngine(std::string name);
~NIWGWeightEngine() {};
void IncludeDial(std::string name, double startval);
void SetDialValue(std::string name, double val);
void SetDialValue(int nuisenum, double val);
void Reconfigure(bool silent = false);
double CalcWeight(BaseFitEvt* evt);
inline bool NeedsEventReWeight() { return true; };
#ifdef __NIWG_ENABLED__
#ifdef __NEUT_ENABLED__
std::vector<niwg::rew::NIWGSyst_t> fNIWGSysts;
niwg::rew::NIWGEvent* GetNIWGEventLocal(NeutVect* nvect);
niwg::rew::NIWGReWeight* fNIWGRW;
#endif
#endif
};
#endif

File Metadata

Mime Type
text/x-diff
Expires
Mon, Feb 24, 6:42 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4494601
Default Alt Text
(21 KB)

Event Timeline