Celeritas  0.5.0-56+6b053cd
Functions | Variables
Convert.hh File Reference
#include <G4ThreeVector.hh>
#include "corecel/Types.hh"
#include "corecel/cont/Array.hh"
#include "geocel/Types.hh"
#include "geocel/detail/LengthUnits.hh"
This graph shows which files directly or indirectly include this file:

Functions

template<class T >
constexpr T celeritas::convert_from_geant (T const &val, T units)
 Convert a value from Geant4/CLHEP to Celeritas native units.
 
constexpr double celeritas::convert_from_geant (double val, double units)
 Convert a value from Geant4 with CLHEP units.
 
Real3 celeritas::convert_from_geant (G4ThreeVector const &vec, double units)
 Convert a 3-vector from Geant4/CLHEP to Celeritas native units.
 
Real3 celeritas::convert_from_geant (double const vec[3], double units)
 Convert a C array from Geant4/CLHEP to Celeritas native units.
 
template<class T >
constexpr T celeritas::convert_to_geant (T const &val, T units)
 Convert a native Celeritas quantity to a Geant4 value with CLHEP units.
 
constexpr double celeritas::convert_to_geant (real_type val, double units)
 Convert a native Celeritas quantity to a Geant4 value.
 
template<class T >
G4ThreeVector celeritas::convert_to_geant (Array< T, 3 > const &arr, double units)
 Convert a native Celeritas 3-vector to a Geant4 equivalent.
 
void celeritas::axpy (double a, G4ThreeVector const &x, G4ThreeVector *y)
 Set y += a * x .
 

Variables

constexpr real_type celeritas::clhep_length = 1 / lengthunits::millimeter
 Value of a unit Celeritas length in the CLHEP unit system.