HepMC
2.04.00 proposal

HepMC Savannah ] [ HepMC Homepage ] [ Downloads ]

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

Please use support #103814 for comments.

The beta release is now available.

HepMC GenParticles contain the PDG ID and a status code. These are expected to match the conventions of the PDG numbering scheme, HEPEVT status codes, and 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 will be 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 has been noted that several methods return a const copy instead of a reference. The code will be modified to return a const references in these cases. This change should be backwards compatible.

Affected methods:

Compiler Support

It has been agreed that HepMC should support gcc compilers with arbitrary names. Providing this support appears to require using libtool along with autoconf and automake. How this impacts support for Windows VC is still undetermined. One way or another, HepMC will build both with arbitrary "gcc" compilers and on Windows with Visual C++.

Examples

The examples have grown unwieldy and need to be cleaned up. This is a low priority problem and may be deferred to the 2.05 release.

IO_GenEvent

IO_GenEvent (and also the deprecated IO_Ascii and IO_ExtendedAscii) has a constructor which takes const char* filename as an argument. This constructor is supplied for historical convenience, but we will change the argument to const std::string&, which is backwards compatible. We presume that users would prefer the stream constructors. Since IO_Ascii and IO_ExtendedAscii are deprecated, they will not be changed. Use of IO_Ascii and IO_ExtendedAscii is strongly discouraged. IO_GenEvent will read files written by either method.

IO_GenEvent constructors:

Units

At present, HepMC does not contain any information about the units of the momentum and position vectors. The user is charged with knowing what units are being used. This makes it difficult to share generated events. We propose adding two data members, MomentumUnits and PositionUnits, to GenEvent.

The enum definitions below are encapsulated within the MomentumUnits and PositionUnits classes. The classes also provide a number of useful methods, including a method to return a conversion factor to be used by GenEvent when changing unit representations. Which units would be most useful is a matter for discussion. We know of code now which uses MeV, GeV, mm, and cm. However, it would be unwise to limit the code to just 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. If there is no unit information in the persistent GenEvent object, then the units are "unknown" and must be set by the user. Also, by default, units are "unknown" if not explicitly specified. This is because different experiments use different default units.