Newer
Older
#ifndef _include_PhysicalUnits_h_
#define _include_PhysicalUnits_h_
#include <corsika/units/PhysicalConstants.h>
#include <phys/units/quantity.hpp>
* @file PhysicalUnits
*
* Add units and types we need
*
* Define _XeV literals, etc., allowing 10_GeV in the code.
namespace corsika::units::hep {
using namespace phys::units;
using namespace phys::units::literals;
/// defining HEP energy, mass, momentum
using energy_hep_d = phys::units::energy_d;
using MassType = phys::units::quantity<energy_hep_d, double>;
using MomentumType = phys::units::quantity<energy_hep_d, double>;
using EnergyType = phys::units::quantity<energy_hep_d, double>;
using namespace phys::units;
using namespace phys::units::literals;
using LengthType = phys::units::quantity<phys::units::length_d, double>;
using TimeType = phys::units::quantity<phys::units::time_interval_d, double>;
using SpeedType = phys::units::quantity<phys::units::speed_d, double>;
using FrequencyType = phys::units::quantity<phys::units::frequency_d, double>;
using ElectricChargeType =
phys::units::quantity<phys::units::electric_charge_d, double>;
using EnergyType = phys::units::quantity<phys::units::energy_d, double>;
using MassType = phys::units::quantity<phys::units::mass_d, double>;
namespace phys {
namespace units {
namespace literals {
QUANTITY_DEFINE_SCALING_LITERALS(eV, energy_d,
magnitude(corsika::units::si::constants::eV))
} // namespace literals
} // namespace units
} // namespace phys
// we want to call the operator<< without namespace... I think
using namespace phys::units::io;
#endif