Celeritas  0.5.0-57+aeecb15
Enumerations | Functions
ImportUnits.hh File Reference
#include "celeritas/Types.hh"
This graph shows which files directly or indirectly include this file:

Enumerations

enum class  celeritas::ImportUnits {
  unitless , mev , mev_per_len , len ,
  len_inv , len_mev_inv , mev_sq_per_len , len_sq ,
  mev_len_sq , time , inv_len_cb , len_time_sq_per_mass ,
  inv_mev , size_ , none = unitless , mev_per_cm = mev_per_len ,
  cm = len , cm_inv = len_inv , cm_mev_inv = len_mev_inv , mev_2_per_cm = mev_sq_per_len ,
  cm_2 = len_sq
}
 Quantity of measure enumeration for imported data. More...
 

Functions

char const * celeritas::to_cstring (ImportUnits value)
 Get a printable label for units.
 
double celeritas::native_value_from (UnitSystem sys, ImportUnits q)
 Get the native value from a quantity of this type.
 
double celeritas::native_value_from_clhep (ImportUnits q)
 Get the native value from a unit CLHEP quantity of this type. More...
 

Enumeration Type Documentation

◆ ImportUnits

Quantity of measure enumeration for imported data.

These enumeration values are used to scale values between the Celeritas native unit system and the CLHEP/Geant4 values. Note that MeV quantities are set to unity for this special case (i.e. they retain their energy scaling and need to be wrapped with the MevEnergy quantity when used in Celeritas).

Todo:
Rename to ImportUnit
Enumerator
unitless 

No dimension.

mev 

Energy [MeV].

mev_per_len 

Energy loss [MeV/len].

len 

Range [len].

len_inv 

Macroscopic xs [1/len].

len_mev_inv 

Scaled (1/E) macroscopic xs [1/len-MeV].

mev_sq_per_len 

Scaled [E^2] macroscopic xs [MeV^2/len].

len_sq 

Microscopic cross section [len^2].

mev_len_sq 

[MeV-len^2]

time 

Time [time].

inv_len_cb 

Number density [1/len^3].

len_time_sq_per_mass 

Inverse pressure [len-time^2/mass].

inv_mev 

Inverse energy [1/MeV].

none 

Deprecated.

mev_per_cm 

Deprecated.

cm 

Deprecated.

cm_inv 

Deprecated.

cm_mev_inv 

Deprecated.

mev_2_per_cm 

Deprecated.

cm_2 

Deprecated.

Function Documentation

◆ native_value_from_clhep()

double celeritas::native_value_from_clhep ( ImportUnits  q)

Get the native value from a unit CLHEP quantity of this type.

Multiply a Geant4 quantity by the result to convert to the native unit system.