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:

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)

Please note the HEPMC_HAS_CENTRALITY should be defined externaly.

Converts HepMC3::Genevent to HepMC::Genevent

Converts HepMC3::Genevent to HepMC::Genevent

Definition at line 22 of file HepMCCompatibility.h.

References GenEvent::attribute(), GenEvent::beams(), FourVector::e(), GenEvent::event_number(), GenEvent::length_unit(), GenEvent::momentum_unit(), GenEvent::particles(), FourVector::px(), FourVector::py(), FourVector::pz(), FourVector::t(), GenEvent::vertices(), GenEvent::weight_names(), GenEvent::weights(), FourVector::x(), and FourVector::y().