Introduce an attribute to store short events (primarily LHE-like) in the HepMC::GenEvent
Introduce an attribute to store short events (primarily LHE-like) in the HepMC::GenEvent
From e.g. the Pythia8_i it can be used as
....
auto evtlhe = std::make_shared<HepMC3::GenEvent>();
toHepMClhe.fill_next_event(pythia.process, evtlhe.get(), m_internal_event_number, &pythia.info, &pythia.settings);
auto extra = std::make_shared<HepMC3::ShortEventAttribute>(evtlhe.get());
evt->add_attribute("MEEvent",extra);
....
The ShortEventAttribute was designed to be close to LHE.
To retrieve the attribute
auto extra = evt.attribute<HepMC3::ShortEventAttribute>("MEEvent");
To print
std::string xx;
extra->to_string(xx);
std::cout<<xx;
Edited by Andrii Verbytskyi