[Rivet-svn] r3286 - contrib/lhef2hepmc

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Aug 9 15:11:37 BST 2011


Author: buckley
Date: Tue Aug  9 15:11:37 2011
New Revision: 3286

Log:
Add cross-section reading/writing

Modified:
   contrib/lhef2hepmc/lhef2hepmc.cc

Modified: contrib/lhef2hepmc/lhef2hepmc.cc
==============================================================================
--- contrib/lhef2hepmc/lhef2hepmc.cc	Sun Aug  7 17:04:16 2011	(r3285)
+++ contrib/lhef2hepmc/lhef2hepmc.cc	Tue Aug  9 15:11:37 2011	(r3286)
@@ -60,6 +60,16 @@
     evt.use_units(Units::GEV, Units::MM);
     evt.weights().push_back(reader->hepeup.weight());
 
+    // Cross-section
+    #ifdef HEPMC_HAS_CROSS_SECTION
+    HepMC::GenCrossSection xsec;
+    const double xsecval = reader->heprup.XSECUP[0];
+    const double xsecerr = reader->heprup.XSECUP[1];
+    //cout << "Read cross-section = " << xsecval << " +- " << xsecerr << endl;
+    xsec.set_cross_section(xsecval, xsecerr);
+    evt.set_cross_section(xsec);
+    #endif
+
     GenVertex* v = new GenVertex();
     evt.add_vertex(v);
     FourVector beam1(0, 0, reader->heprup.EBMUP.first, reader->heprup.EBMUP.first);


More information about the Rivet-svn mailing list