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"
24 #define HEPMC_HAS_CROSS_SECTION
25 #define HEPMC_HAS_PDF_INFO
27 #include "ThePEG/Vectors/HepMCConverter.h"
30 #include "HepMC3/GenEvent.h"
31 #include "HepMC3/GenParticle.h"
32 #include "HepMC3/GenVertex.h"
35 struct HepMCTraits<HepMC3::GenEvent>
36 :
public HepMCTraitsBase<HepMC3::GenEvent,
38 HepMC3::GenParticlePtr,
41 std::pair<double,double>,
44 static bool hasUnits() {
52 static void setScaleAndAlphas(HepMC3::GenEvent &
e, Energy2
scale,
54 e.add_attribute(
"event_scale",std::make_shared<HepMC3::DoubleAttribute>(sqrt(
scale)/
unit));
55 e.add_attribute(
"alphaQCD",std::make_shared<HepMC3::DoubleAttribute>(aS));
56 e.add_attribute(
"alphaQED",std::make_shared<HepMC3::DoubleAttribute>(aEM));
61 e.add_attribute(
"signal_process_vertex",std::make_shared<HepMC3::IntAttribute>(
v->id()));
67 genp.add_attribute(
"theta",std::make_shared<HepMC3::DoubleAttribute>(the));
68 genp.add_attribute(
"phi",std::make_shared<HepMC3::DoubleAttribute>(phi));
74 p.add_attribute(
"flow"+
std::to_string(indx),std::make_shared<HepMC3::IntAttribute>(coline));
80 e.set_beam_particles(
p1,
p2);
87 LorentzVector<double> p_scalar =
p/
unit;
88 HepMC3::GenParticlePtr genp = std::make_shared<HepMC3::GenParticle>(HepMC::FourVector(p_scalar.x(),p_scalar.y(),p_scalar.z(),p_scalar.e()),
id,
status);
89 genp->set_generated_mass(
p.mass()/
unit);
94 static void setPosition( HepMC3::GenVertex &
v,
const LorentzPoint &
p, Length
unit) {
95 LorentzVector<double> p_scaled =
p/
unit;
96 v.set_position(HepMC::FourVector(p_scaled.x(),p_scaled.y(),p_scaled.z(),p_scaled.t()));
101 return std::make_shared<HepMC3::GenVertex>();
108 struct HepMCTraits<
HepMC::GenEvent>
109 :
public HepMCTraitsBase<HepMC::GenEvent,
111 HepMC::GenParticle *,
117 static bool hasUnits() {
127 :
public HepMCTraitsBase<HepMC::GenEvent,