diff --git a/src/nusystematics/systproviders/MECq0q3InterpWeighting_tool.cc b/src/nusystematics/systproviders/MECq0q3InterpWeighting_tool.cc index 2df894c..d5539aa 100644 --- a/src/nusystematics/systproviders/MECq0q3InterpWeighting_tool.cc +++ b/src/nusystematics/systproviders/MECq0q3InterpWeighting_tool.cc @@ -363,16 +363,23 @@ MECq0q3InterpWeighting::GetEventResponse(genie::EventRecord const& ev) ComputeQ0Q3(ev, q0, q3, Enu); // Helper lambda to create zero-weight response (suppress events) + // Same as setting w_eff_cv = 0 or one_sigma = -1.0 auto GetZeroWeightResponse = [this]() { auto const& smd = this->GetSystMetaData(); systtools::event_unit_response_t resp; resp.reserve(smd.size()); for(auto const& sph : smd) { - // Create zero-weight response for this parameter if (sph.isCorrection) { - resp.push_back({sph.systParamId, std::vector{0.0}}); + const double this_rw = std::clamp(1.0 + (sph.centralParamValue) * (-1.), 0., fWmax); + resp.push_back({sph.systParamId, std::vector{this_rw}}); } else { - resp.push_back({sph.systParamId, std::vector(sph.paramVariations.size(), 0.0)}); + std::vector arr_rw; + arr_rw.reserve(sph.paramVariations.size()); + for (double d : sph.paramVariations) { + const double this_rw = std::clamp(1.0 + d * (-1.), 0., fWmax); + arr_rw.push_back(this_rw); + } + resp.push_back({sph.systParamId, arr_rw}); } } return resp;