HepMC Reference Documentation

HepMC

Units.h

Go to the documentation of this file.
00001 #ifndef HEPMC_UNITS_H
00002 #define HEPMC_UNITS_H
00003 
00004 //--------------------------------------------------------------------------
00005 // Units.h
00006 // Author:  A. Buckley, D. Grellscheid
00007 //
00008 // units used by a GenEvent
00009 // The default units are set by a configure switch at compile time in Units.cc.
00010 //--------------------------------------------------------------------------
00011 
00012 #include <iostream>
00013 #include <string>
00014 
00015 namespace HepMC {
00016 
00022   namespace Units {
00023 
00024     // Convention: if both types are passed, MomentumUnit always goes first.
00025     enum MomentumUnit { MEV, GEV };     
00026     enum LengthUnit   { MM, CM };       
00027     
00028     LengthUnit   default_length_unit();         
00029     MomentumUnit default_momentum_unit();       
00030 
00031     // helper functions
00032     std::string name( MomentumUnit );   
00033     std::string name( LengthUnit );     
00034 
00036     double conversion_factor( MomentumUnit from, MomentumUnit to ); 
00037     double conversion_factor( LengthUnit from, LengthUnit to );
00038 
00039   }     // Units
00040 }       // HepMC
00041 
00042 #endif // HEPMC_UNITS_H

Generated on Thu Jan 7 13:10:16 2010 for HepMC by  doxygen 1.4.7