SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
Units.h File Reference
#include <GeoModelKernel/Units.h>
#include <mp-units/framework.h>
#include <mp-units/systems/si.h>
Include dependency graph for Units.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  SHiP
namespace  SHiP::geometry
namespace  SHiP::geometry::units
 Typed-unit vocabulary for the SHiP geometry.

Typedefs

using SHiP::geometry::units::LengthMm = mp_units::quantity<mm>
 Spellings for struct members and function parameters.
using SHiP::geometry::units::LengthCm = mp_units::quantity<cm>
using SHiP::geometry::units::AngleDeg = mp_units::quantity<deg>
using SHiP::geometry::units::AngleRad = mp_units::quantity<rad>

Functions

template<auto U, typename Rep>
requires (U == mm || U == cm || U == m)
constexpr double SHiP::geometry::units::gm (mp_units::quantity< U, Rep > q)
 Length quantity -> GeoModel raw double (GeoModel native unit: mm).
template<auto U, typename Rep>
requires (U == deg || U == rad)
constexpr double SHiP::geometry::units::gm (mp_units::quantity< U, Rep > q)
 Angle quantity -> GeoModel raw double (GeoTrf / GeoShape take radians).
constexpr double SHiP::geometry::units::gm (mp_units::quantity< g/cm3 > density)
 Density bridge; reproduces the former (X * g) / cm3 evaluation order.
constexpr double SHiP::geometry::units::gm (mp_units::quantity< g/mol > molarMass)
 Molar-mass bridge; reproduces the former (X * g) / mole evaluation order.
constexpr double SHiP::geometry::units::ratio (mp_units::quantity< one > q)
 Dimensionless quantity -> plain double (counts, growth slopes, and inputs to GeoGenfun / Eigen, which own their own double math).

Variables

constexpr auto SHiP::geometry::units::mm = mp_units::si::unit_symbols::mm
constexpr auto SHiP::geometry::units::cm = mp_units::si::unit_symbols::cm
constexpr auto SHiP::geometry::units::m = mp_units::si::unit_symbols::m
constexpr auto SHiP::geometry::units::deg = mp_units::si::unit_symbols::deg
constexpr auto SHiP::geometry::units::rad = mp_units::si::unit_symbols::rad
constexpr auto SHiP::geometry::units::g = mp_units::si::unit_symbols::g
constexpr auto SHiP::geometry::units::mol = mp_units::si::unit_symbols::mol
constexpr auto SHiP::geometry::units::cm3 = mp_units::cubic(mp_units::si::centi<mp_units::si::metre>)