Ticket #246: 0001-Fix-bug-in-Output_HepMC2_Short-subevents.patch
File 0001-Fix-bug-in-Output_HepMC2_Short-subevents.patch, 1.2 KB (added by , 12 years ago) |
---|
-
SHERPA/Tools/Output_HepMC2_Short.C
From 79210fed6cb8ecff2c86129a794ac595b91692ef Mon Sep 17 00:00:00 2001 From: Valery Yundin <yuvalery@gmail.com> Date: Fri, 4 May 2012 22:02:59 +0200 Subject: [PATCH 1/2] Fix bug in Output_HepMC2_Short (subevents) --- SHERPA/Tools/Output_HepMC2_Short.C | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/SHERPA/Tools/Output_HepMC2_Short.C b/SHERPA/Tools/Output_HepMC2_Short.C index 8f882ab..50fb748 100644
a b void Output_HepMC2_Short::Output(Blob_List* blobs, const double weight) 59 59 #ifdef USING__HEPMC2__IOGENEVENT 60 60 p_event->clear(); 61 61 m_hepmc2.Sherpa2ShortHepMC(blobs, *p_event, weight); 62 std::vector<HepMC::GenEvent*> subevents(m_hepmc2.GenSubEventList()); 62 63 #ifdef HEPMC_HAS_CROSS_SECTION 63 64 p_event->set_cross_section(*p_xs); 65 for (size_t i(0); i<subevents.size(); ++i) { 66 subevents[i]->set_cross_section(*p_xs); 67 } 64 68 #endif 65 p_iogenevent->write_event(p_event); 69 if (subevents.size()) { 70 for (size_t i(0); i<subevents.size(); ++i) { 71 p_iogenevent->write_event(subevents[i]); 72 } 73 m_hepmc2.DeleteGenSubEventList(); 74 } else { 75 p_iogenevent->write_event(p_event); 76 } 66 77 #endif 67 78 } 68 79