diff --git a/doc/doxygen/modules.txt b/doc/doxygen/modules.txt index 34859496ed00fc11b68fcd6ef40302f8e82c1156..35e5320a7bdc2903c5f48fdc9ebc6e3b947942af 100644 --- a/doc/doxygen/modules.txt +++ b/doc/doxygen/modules.txt @@ -40,7 +40,7 @@ in the HepMC2 style. This is pre-3.2.6 default behaviour. Otherwise, the cross-section vector will be expanded to the size of event weights. This is 3.2.6+ default behaviour. If present, "fill_crosssections_value"/"fill_crosssections_error" values will be inserted into the cross-section vector. - Otherwise, the nominal cross-section and error will be used. + Otherwise, the cross-sections and errors will be filled with zeros. "particle_flows_are_separated" diff --git a/src/ReaderAsciiHepMC2.cc b/src/ReaderAsciiHepMC2.cc index 446ea62cec65a4f7e63a4cd6236dd3b428e855ac..f9418acf7d20fe1f2a4a9016bf740252a99060fe 100644 --- a/src/ReaderAsciiHepMC2.cc +++ b/src/ReaderAsciiHepMC2.cc @@ -609,8 +609,8 @@ bool ReaderAsciiHepMC2::parse_xs_info(GenEvent &evt, const char *buf) { if ( !(cursor = strchr(cursor+1, ' ')) ) return false; const double xs_err = atof(cursor); const size_t all = m_options.count("keep_single_crosssection") ? size_t{1} : std::max(evt.weights().size(),size_t{1}); - const double xs_val_dummy = m_options.count("fill_crosssections_value") ? std::strtod(m_options.at("fill_crosssections_value").c_str(),nullptr) : xs_val; - const double xs_err_dummy = m_options.count("fill_crosssections_error") ? std::strtod(m_options.at("fill_crosssections_error").c_str(),nullptr) : xs_err; + const double xs_val_dummy = m_options.count("fill_crosssections_value") ? std::strtod(m_options.at("fill_crosssections_value").c_str(),nullptr) : 0.0; + const double xs_err_dummy = m_options.count("fill_crosssections_error") ? std::strtod(m_options.at("fill_crosssections_error").c_str(),nullptr) : 0.0; xs->set_cross_section(std::vector<double>(all,xs_val_dummy), std::vector<double>(all,xs_err_dummy)); xs->set_xsec(0,xs_val); xs->set_xsec_err(0,xs_err);