StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Units.h
1 #ifndef HEPMC_UNITS_H
2 #define HEPMC_UNITS_H
3 
4 //--------------------------------------------------------------------------
5 // Units.h
6 // Author: A. Buckley, D. Grellscheid
7 //
8 // units used by a GenEvent
9 // The default units are set by a configure switch at compile time in Units.cc.
10 //--------------------------------------------------------------------------
11 
12 #include <iostream>
13 #include <string>
14 
15 namespace HepMC {
16 
22  namespace Units {
23 
24  // Convention: if both types are passed, MomentumUnit always goes first.
25  enum MomentumUnit { MEV, GEV };
26  enum LengthUnit { MM, CM };
27 
28  LengthUnit default_length_unit();
29  MomentumUnit default_momentum_unit();
30 
31  // helper functions
32  std::string name( MomentumUnit );
33  std::string name( LengthUnit );
34 
36  double conversion_factor( MomentumUnit from, MomentumUnit to );
37  double conversion_factor( LengthUnit from, LengthUnit to );
38 
39  } // Units
40 } // HepMC
41 
42 #endif // HEPMC_UNITS_H