13#include "ThePEG/EventRecord/Event.h"
14#include "ThePEG/EventRecord/SubProcess.h"
15#include "ThePEG/Handlers/XComb.h"
16#include "ThePEG/Handlers/EventHandler.h"
17#include "ThePEG/PDF/PDF.h"
19#include "Herwig/API/HerwigAPI.h"
25#define HEPMC_HAS_CROSS_SECTION
26#define HEPMC_HAS_PDF_INFO
29#include "ThePEG/Vectors/HepMCConverter.h"
31#include "HepMC3/GenEvent.h"
32#include "HepMC3/GenParticle.h"
33#include "HepMC3/GenVertex.h"
36 struct HepMCTraits<
HepMC3::GenEvent>
37 :
public HepMCTraitsBase<HepMC3::GenEvent,
39 HepMC3::GenParticlePtr,
42 std::pair<double,double>,
45 static bool hasUnits() {
53 static void setScaleAndAlphas(HepMC3::GenEvent & e, Energy2 scale,
61 static void setSignalProcessVertex(HepMC3::GenEvent & e, HepMC3::GenVertexPtr v) {
67 static void setPolarization(HepMC3::GenParticle & genp,
double the,
double phi) {
68 genp.add_attribute(
HepMCStr::theta,std::make_shared<HepMC3::DoubleAttribute>(the));
69 genp.add_attribute(
HepMCStr::phi,std::make_shared<HepMC3::DoubleAttribute>(
phi));
74 static void setColourLine(HepMC3::GenParticle & p,
int indx,
int coline) {
75 p.add_attribute(
HepMCStr::flow + std::to_string(indx),std::make_shared<HepMC3::IntAttribute>(coline));
78 static void setBeamParticles(HepMC3::GenEvent & e, HepMC3::GenParticlePtr p1, HepMC3::GenParticlePtr p2) {
81 e.set_beam_particles(std::move(p1),std::move(p2));
84 static HepMC3::GenParticlePtr newParticle(
const Lorentz5Momentum & p,
88 LorentzVector<double> p_scalar = p/
unit;
89 HepMC3::GenParticlePtr genp = std::make_shared<HepMC3::GenParticle>(
HepMC::FourVector(p_scalar.x(),p_scalar.y(),p_scalar.z(),p_scalar.e()),
id, status);
90 genp->set_generated_mass(p.mass()/
unit);
95 static void setPosition( HepMC3::GenVertex & v,
const LorentzPoint & p, Length
unit) {
96 LorentzVector<double> p_scaled = p/
unit;
97 v.set_position(
HepMC::FourVector(p_scaled.x(),p_scaled.y(),p_scaled.z(),p_scaled.t()));
101 static HepMC3::GenVertexPtr newVertex() {
102 return std::make_shared<HepMC3::GenVertex>();
110 :
public HepMCTraitsBase<HepMC::GenEvent,
124 ThePEG::HepMCConverter<HepMC::GenEvent>::convert(event, evt, nocopies, eunit, lunit);
Scalar phi() const
phi method
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
void convert_to_HepMC(const ThePEG::Event &event, HepMC::GenEvent &evt, bool nocopies, ThePEG::Energy eunit, ThePEG::Length lunit)
const std::string event_scale
const std::string signal_process_vertex
const std::string alphaQED
const std::string alphaQCD
HepMC3::FourVector FourVector
HepMC3::GenEvent GenEvent