77 produces<edm::HepMCProduct>(
"unsmeared");
99 HepMC::GenVertex*
v =
new HepMC::GenVertex();
104 v->add_particle_in(gp1);
107 v->add_particle_in(gp2);
108 evt->set_beam_particles(gp1, gp2);
110 LogWarning(
"LHE2HepMCConverter") <<
"Could not retrieve the LHERunInfoProduct for this event. You'll miss the beam "
111 "particles in your HepMC product.";
114 for (
int i = 0;
i < lheEventSrc->hepeup().NUP; ++
i) {
115 if (lheEventSrc->hepeup().ISTUP[
i] != 1) {
119 HepMC::FourVector
p(lheEventSrc->hepeup().PUP[
i][0],
120 lheEventSrc->hepeup().PUP[
i][1],
121 lheEventSrc->hepeup().PUP[
i][2],
122 lheEventSrc->hepeup().PUP[
i][3]);
124 gp->set_generated_mass(lheEventSrc->hepeup().PUP[
i][4]);
125 v->add_particle_out(gp);
128 std::unique_ptr<HepMCProduct> pOut(
new HepMCProduct(evt));
136 if (lheRunSrcHandle.
isValid()) {
141 if (lheRunSrcHandle.
isValid()) {
143 edm::LogInfo(
"LHE2HepMCConverter") <<
"Taking LHERunInfoproduct from source";
145 edm::LogWarning(
"LHE2HepMCConverter") <<
"No LHERunInfoProduct from source";
bool getByLabel(std::string const &label, Handle< PROD > &result) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
#define DEFINE_FWK_MODULE(type)
std::pair< double, double > EBMUP
void produce(edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::pair< int, int > IDBMUP
edm::InputTag _lheRunSrcTag
const lhef::HEPRUP & heprup() const
LHE2HepMCConverter(const edm::ParameterSet &)
~LHE2HepMCConverter() override
void addDefault(ParameterSetDescription const &psetDescription)
edm::InputTag _lheEventSrcTag
const LHERunInfoProduct * _lheRunSrc
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void beginRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Info, false > LogInfo
T const * product() const
T getParameter(std::string const &) const
Log< level::Warning, false > LogWarning