HepMC event record
Public Types | Static Public Member Functions
Units Class Reference

Detailed Description

Stores units-related enums and conversion functions.

Manages units used by HepMC::GenEvent

Definition at line 26 of file build/outputs/include/HepMC/Units.h.

#include <Units.h>

Public Types

enum  MomentumUnit { MEV, GEV, MEV, GEV }
 Momentum units. More...
 
enum  LengthUnit { MM, CM, MM, CM }
 Position units. More...
 
enum  MomentumUnit { MEV, GEV, MEV, GEV }
 Momentum units. More...
 
enum  LengthUnit { MM, CM, MM, CM }
 Position units. More...
 

Static Public Member Functions

static MomentumUnit momentum_unit (const std::string &name)
 Get momentum unit based on its name. More...
 
static LengthUnit length_unit (const std::string &name)
 Get length unit based on its name. More...
 
static std::string name (MomentumUnit u)
 Get name of momentum unit. More...
 
static std::string name (LengthUnit u)
 Get name of length unit. More...
 
static void convert (FourVector &m, MomentumUnit from, MomentumUnit to)
 Convert FourVector to different momentum unit. More...
 
static void convert (FourVector &m, LengthUnit from, LengthUnit to)
 Convert FourVector to different length unit. More...
 
static MomentumUnit momentum_unit (const std::string &name)
 Get momentum unit based on its name. More...
 
static LengthUnit length_unit (const std::string &name)
 Get length unit based on its name. More...
 
static std::string name (MomentumUnit u)
 Get name of momentum unit. More...
 
static std::string name (LengthUnit u)
 Get name of length unit. More...
 
static void convert (FourVector &m, MomentumUnit from, MomentumUnit to)
 Convert FourVector to different momentum unit. More...
 
static void convert (FourVector &m, LengthUnit from, LengthUnit to)
 Convert FourVector to different length unit. More...
 

Member Enumeration Documentation

◆ LengthUnit [1/2]

enum LengthUnit

Position units.

Definition at line 32 of file build/outputs/include/HepMC/Units.h.

◆ LengthUnit [2/2]

enum LengthUnit

Position units.

Definition at line 32 of file include/HepMC/Units.h.

◆ MomentumUnit [1/2]

Momentum units.

Definition at line 29 of file include/HepMC/Units.h.

◆ MomentumUnit [2/2]

Momentum units.

Definition at line 29 of file build/outputs/include/HepMC/Units.h.

Member Function Documentation

◆ convert() [1/4]

static void convert ( FourVector m,
MomentumUnit  from,
MomentumUnit  to 
)
inlinestatic

Convert FourVector to different momentum unit.

Definition at line 76 of file build/outputs/include/HepMC/Units.h.

◆ convert() [2/4]

static void convert ( FourVector m,
MomentumUnit  from,
MomentumUnit  to 
)
inlinestatic

Convert FourVector to different momentum unit.

Definition at line 76 of file include/HepMC/Units.h.

◆ convert() [3/4]

static void convert ( FourVector m,
LengthUnit  from,
LengthUnit  to 
)
inlinestatic

Convert FourVector to different length unit.

Definition at line 90 of file build/outputs/include/HepMC/Units.h.

◆ convert() [4/4]

static void convert ( FourVector m,
LengthUnit  from,
LengthUnit  to 
)
inlinestatic

Convert FourVector to different length unit.

Definition at line 90 of file include/HepMC/Units.h.

◆ length_unit() [1/2]

static LengthUnit length_unit ( const std::string &  name)
inlinestatic

Get length unit based on its name.

Definition at line 46 of file include/HepMC/Units.h.

References Units::name().

◆ length_unit() [2/2]

static LengthUnit length_unit ( const std::string &  name)
inlinestatic

Get length unit based on its name.

Definition at line 46 of file build/outputs/include/HepMC/Units.h.

References Units::name().

◆ momentum_unit() [1/2]

static MomentumUnit momentum_unit ( const std::string &  name)
inlinestatic

Get momentum unit based on its name.

Definition at line 36 of file include/HepMC/Units.h.

References Units::name().

◆ momentum_unit() [2/2]

static MomentumUnit momentum_unit ( const std::string &  name)
inlinestatic

Get momentum unit based on its name.

Definition at line 36 of file build/outputs/include/HepMC/Units.h.

References Units::name().

◆ name() [1/4]

static std::string name ( MomentumUnit  u)
inlinestatic

Get name of momentum unit.

Definition at line 56 of file include/HepMC/Units.h.

◆ name() [2/4]

static std::string name ( MomentumUnit  u)
inlinestatic

Get name of momentum unit.

Definition at line 56 of file build/outputs/include/HepMC/Units.h.

◆ name() [3/4]

static std::string name ( LengthUnit  u)
inlinestatic

Get name of length unit.

Definition at line 66 of file include/HepMC/Units.h.

◆ name() [4/4]

static std::string name ( LengthUnit  u)
inlinestatic

Get name of length unit.

Definition at line 66 of file build/outputs/include/HepMC/Units.h.


The documentation for this class was generated from the following file: