Skip to content
Merged
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
13 changes: 10 additions & 3 deletions src/nusystematics/systproviders/MECq0q3InterpWeighting_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
jedori0228 marked this conversation as resolved.
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<double>{0.0}});
const double this_rw = std::clamp(1.0 + (sph.centralParamValue) * (-1.), 0., fWmax);
resp.push_back({sph.systParamId, std::vector<double>{this_rw}});
Comment thread
jedori0228 marked this conversation as resolved.
Comment thread
jedori0228 marked this conversation as resolved.
} else {
resp.push_back({sph.systParamId, std::vector<double>(sph.paramVariations.size(), 0.0)});
std::vector<double> 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;
Expand Down