Fork me on GitHub

source: svn/trunk/Utilities/HepMC/interface/Units.h@ 606

Last change on this file since 606 was 349, checked in by severine ovyn, 15 years ago

first test

File size: 1.3 KB
Line 
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
15namespace HepMC {
16
17 ///
18 /// \namespace Units
19 /// Allow units to be specified within HepMC.
20 /// The default units are set at compile time.
21 ///
22 namespace Units {
23
24 // Convention: if both types are passed, MomentumUnit always goes first.
25 enum MomentumUnit { MEV, GEV }; //!< momentum units
26 enum LengthUnit { MM, CM }; //!< position units
27
28 LengthUnit default_length_unit(); //!< default unit is defined by configure
29 MomentumUnit default_momentum_unit(); //!< default unit is defined by configure
30
31 // helper functions
32 std::string name( MomentumUnit ); //!< convert enum to string
33 std::string name( LengthUnit ); //!< convert enum to string
34
35 /// scaling factor relative to MeV
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
Note: See TracBrowser for help on using the repository browser.