diff --git a/sbncode/EventGenerator/MeVPrtl/Tools/BNBKaonGen_tool.cc b/sbncode/EventGenerator/MeVPrtl/Tools/BNBKaonGen_tool.cc index 6d4ed4711..7d74a9942 100644 --- a/sbncode/EventGenerator/MeVPrtl/Tools/BNBKaonGen_tool.cc +++ b/sbncode/EventGenerator/MeVPrtl/Tools/BNBKaonGen_tool.cc @@ -311,7 +311,7 @@ simb::MCFlux BNBKaonGen::MakeMCFlux(const bsim::BooNe &boone) { << std::endl; } - flux.fFluxType = simb::kDk2Nu; + flux.fFluxType = simb::kSimple_Flux; flux.fnimpwt = fBooneNtp.beamwgt; flux.fvx = fBooneNtp.ini_pos[0][0]; //0 flux.fvy = fBooneNtp.ini_pos[0][1]; //0 diff --git a/sbncode/SBNEventWeight/Calculators/BNBFlux/FluxCalcPrep.cxx b/sbncode/SBNEventWeight/Calculators/BNBFlux/FluxCalcPrep.cxx index d832e8638..ff2b10b99 100644 --- a/sbncode/SBNEventWeight/Calculators/BNBFlux/FluxCalcPrep.cxx +++ b/sbncode/SBNEventWeight/Calculators/BNBFlux/FluxCalcPrep.cxx @@ -224,7 +224,7 @@ namespace sbn { } //or do the above 3 lines in one line -// auto const& mclist = *e.getValidHandle>(fGeneratorModuleLabel); + auto const& mclist = *e.getValidHandle>(fGeneratorModuleLabel); // If no neutrinos in this event, gives 0 weight; int NUni = fParameterSet.fNuniverses; @@ -264,8 +264,8 @@ namespace sbn { } // Collect neutrino energy; mclist is replaced with fluxlist. -// double enu= mclist[inu].GetNeutrino().Nu().E(); double enu= fluxlist[inu].fnenergyn; + if ( enu == -1 ) enu= mclist[inu].GetNeutrino().Nu().E(); //For MeVPrtl generator, not all MCFlux result in a neutrino, so equivalent neutrino energy is computed and saved as MCTruth //Let's make a weights based on the calculator you have requested