HepMC3 event record library
Functions
HepMCCompatibility.h File Reference

Detailed Description

Implementation of compatibility layer (in-memory conversion functions) between HepMC2 and HepMC3.

Definition in file HepMCCompatibility.h.

#include "HepMC3/GenVertex.h"
#include "HepMC3/GenParticle.h"
#include "HepMC3/GenEvent.h"
#include "HepMC/GenVertex.h"
#include "HepMC/GenParticle.h"
#include "HepMC/GenEvent.h"
+ Include dependency graph for HepMCCompatibility.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HepMC::GenEvent * ConvertHepMCGenEvent_3to2 (const HepMC3::GenEvent &evt)
 Please note the HEPMC_HAS_CENTRALITY should be defined externaly.
 
HepMC3::GenEventConvertHepMCGenEvent_2to3 (const HepMC::GenEvent &evt, std::shared_ptr< HepMC3::GenRunInfo > run)
 

Function Documentation

◆ ConvertHepMCGenEvent_2to3()

HepMC3::GenEvent * ConvertHepMCGenEvent_2to3 ( const HepMC::GenEvent &  evt,
std::shared_ptr< HepMC3::GenRunInfo run 
)

Converts HepMC::Genevent to HepMC3::Genevent

we set it always as there is no way to check if it is set

Yes, the desing is not always perfect

Definition at line 199 of file HepMCCompatibility.h.

References GenEvent::add_attribute(), GenEvent::add_vertex(), GenEvent::run_info(), GenEvent::set_cross_section(), GenEvent::set_event_number(), GenEvent::set_heavy_ion(), GenEvent::set_pdf_info(), GenEvent::set_run_info(), GenEvent::set_units(), GenEvent::weight(), and GenEvent::weights().

◆ ConvertHepMCGenEvent_3to2()

HepMC::GenEvent * ConvertHepMCGenEvent_3to2 ( const HepMC3::GenEvent evt)