HepMC
2.04.00 Release Notes
June 11, 2008

HepMC Savannah ] [ HepMC Homepage ] [ Downloads ]

Conventions ] [ PdfInfo ] [ Complex Objects ] [ Compiler Support ] [ Examples ] [ IO_GenEvent ] [ Units ]

HepMC 2.04 contains information about momentum and length units. This is a major change. Please see the Units section.

The technical discussion of the original proposal can be found in support #103814. For a complete history, refer to the Beta and Beta 2 pages.

Conventions

HepMC GenParticles contain the PDG ID and a status code. These are expected to match the conventions of the PDG numbering scheme and the HEPEVT status codes. In addition, pdf information is expected to match LHAPDF. However, HepMC does not enforce these conventions.

PdfInfo

There has been confusion about whether f(x) or x*f(x) should be stored in PdfInfo. It is agreed that x*f(x) should be stored and the documentation (and code documentaion) will make this clear. Also, two new integer data members have been added, one for each beam, to store the unique pdf set id (which is the integer that appears in the first column of the table: PDFsets).

Complex Objects

When possible, it is more efficient to return complex objects by reference rather than by value (e.g., making a copy). It was noted that several methods returned a const copy instead of a reference. The code was modified to return a const reference in these cases. This change should be backwards compatible.

Affected methods:

Compiler Support

HepMC now supports gcc compilers with arbitrary names. This was accomplished by using libtool along with autoconf and automake. Using libtool should be helpful for all GNU compilers.

Unfortunately, the use of libtool is not compatible with Visual C++. Therefore, the Windows VC build uses separate makefiles (VCMakefile). These custom makefiles are invoked automatically if you configure with CXX=cl. This also allowed us to remove extraneous warning messages caused by unsupported compiler flags. Due to possible mismatches between the Linux autotools and the cygwin autotools, we recommend that you run the bootstrap command on Windows before the configure step.

See Readme.cygwin for more info about the Windows build.

Examples

The examples had grown unwieldy and were cleaned up. The most noticeable change is that a number of separate examples are now subsets of example_MyPythia.cc.

IO_GenEvent

IO_GenEvent had a constructor which took const char* filename as an argument. This constructor is supplied for historical convenience, but the argument has been changed to const std::string&, which is backwards compatible. We presume that users would prefer the stream constructors.

IO_Ascii has a similar constructor, but since this class is deprecated, the constructor was not changed. Use of IO_Ascii is strongly discouraged. IO_GenEvent will read files written by either method.

IO_ExtendedAscii, which was introduced in 1.28.00, has been removed. IO_Ascii will be removed in the 2.05.00 release, tentatively scheduled for spring of 2009.

IO_GenEvent constructors:

Units

Historically, HepMC did not contain any information about the units of the momentum and position vectors. The user was charged with knowing what units were being used, which made it difficult to share generated events. Two data members, MomentumUnit and LengthUnit have been added to GenEvent.

The enum definitions below are encapsulated within the HepMC::Units namespace. The HepMC::Units namespace also contains a number of useful methods, including a method to return a conversion factor used by GenEvent when changing unit representations. We know of code now which uses MeV, GeV, mm, and cm and provide enums for these units.

We expect the user to convert units once, immediately after getting a new GenEvent object. This conversion would be done only if necessary. The methods are designed to encourage this use case. Although it would be possible to provide methods returning, say, the momentum in some units, that would encourage the user to convert on the fly, which is very inefficient.

No existing HepMC data has unit information. Further, the LCG experiments use different unit conventions. To allow users to specify default units which match their convention, configure now accepts --with-momentum and --with-length switches. Both momentum and length MUST be specified when configuring.