78 : _lheRunSrc(nullptr),
79 _lheEventSrcTag(iConfig.getParameter<
edm::
InputTag>(
"LHEEventProduct")),
80 _lheRunSrcTag(iConfig.getParameter<
edm::
InputTag>(
"LHERunInfoProduct")),
84 produces<edm::HepMCProduct>(
"unsmeared");
97 HepMC::GenVertex*
v =
new HepMC::GenVertex();
102 v->add_particle_in(gp1);
105 v->add_particle_in(gp2);
106 evt->set_beam_particles(gp1, gp2);
108 LogWarning(
"LHE2HepMCConverter") <<
"Could not retrieve the LHERunInfoProduct for this event. You'll miss the beam " 109 "particles in your HepMC product.";
117 HepMC::FourVector
p(lheEventSrc->
hepeup().
PUP[
i][0],
122 gp->set_generated_mass(lheEventSrc->
hepeup().
PUP[
i][4]);
123 v->add_particle_out(
gp);
126 std::unique_ptr<HepMCProduct> pOut(
new HepMCProduct(evt));
133 if (lheRunSrcHandle.
isValid()) {
138 if (lheRunSrcHandle.
isValid()) {
140 edm::LogInfo(
"LHE2HepMCConverter") <<
"Taking LHERunInfoproduct from source";
142 edm::LogWarning(
"LHE2HepMCConverter") <<
"No LHERunInfoProduct from source";
const edm::EDGetTokenT< LHERunInfoProduct > runInfoProductToken_
#define DEFINE_FWK_MODULE(type)
std::pair< double, double > EBMUP
T const * product() const
~LHE2HepMCConverter() override=default
void produce(edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::pair< int, int > IDBMUP
void endRun(edm::Run const &, edm::EventSetup const &) override
LHE2HepMCConverter(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
const edm::InputTag _lheRunSrcTag
const lhef::HEPRUP & heprup() const
std::vector< FiveVector > PUP
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const LHERunInfoProduct * _lheRunSrc
void beginRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Info, false > LogInfo
Log< level::Warning, false > LogWarning
const edm::InputTag _lheEventSrcTag
const edm::EDGetTokenT< LHEEventProduct > eventProductToken_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
const lhef::HEPEUP & hepeup() const