diff --git a/Framework/Particles/ParticleProperties.h b/Framework/Particles/ParticleProperties.h index 2f5365eb0525183b2810da96e3c7b85fe9766570..7b2b6f7e5594efa6aa4c5014f002bcc78d328701 100644 --- a/Framework/Particles/ParticleProperties.h +++ b/Framework/Particles/ParticleProperties.h @@ -23,13 +23,12 @@ #include <iosfwd> #include <type_traits> -#include <corsika/units/PhysicalConstants.h> #include <corsika/units/PhysicalUnits.h> /** * * The properties of all elementary particles is stored here. The data - * is taken from the Pythia ParticleData.xml file. + * are taken from the Pythia ParticleData.xml file. * */ diff --git a/Framework/Particles/testParticles.cc b/Framework/Particles/testParticles.cc index 0603ea03575cb7668bed8e3e276b5c81f60e27c3..cba91b476f42e6ee540ebfbf64b5990c4e03ea81 100644 --- a/Framework/Particles/testParticles.cc +++ b/Framework/Particles/testParticles.cc @@ -34,6 +34,8 @@ TEST_CASE("ParticleProperties", "[Particles]") { SECTION("Masses") { REQUIRE(Electron::GetMass() / (511_keV) == Approx(1)); REQUIRE(Electron::GetMass() / GetMass(Code::Electron) == Approx(1)); + + REQUIRE((Proton::GetMass() + Neutron::GetMass()) / corsika::units::constants::nucleonMass == Approx(2)); } SECTION("Charges") { diff --git a/Framework/Units/PhysicalConstants.h b/Framework/Units/PhysicalConstants.h index 38c59992fe928228754e3a16658043308e71ab68..1bf9872a03ed3abee9bcb03ef93fd24250f14a50 100644 --- a/Framework/Units/PhysicalConstants.h +++ b/Framework/Units/PhysicalConstants.h @@ -61,7 +61,9 @@ namespace corsika::units::constants { // unified atomic mass unit constexpr quantity<mass_d> u{Rep(1.6605402e-27L) * kilogram}; - + + auto constexpr nucleonMass = 0.5 * (0.93827 + 0.93957) * 1e9 * electronvolt; + // etc. } // namespace corsika::units::constants diff --git a/Framework/Units/PhysicalUnits.h b/Framework/Units/PhysicalUnits.h index 90b98e170f2a912018e1486cac26b7da1c85f3ff..af4dbb966aaaf5dfe5bfe7ace9619c9d299e94c7 100644 --- a/Framework/Units/PhysicalUnits.h +++ b/Framework/Units/PhysicalUnits.h @@ -18,28 +18,11 @@ namespace phys::units { /** * @file PhysicalUnits * - * Add new units and types we need. Units are compile-time. We support - * different system of units in parallel. Literals are used for - * optimal coding style. + * Add new units and types we need. Units are compile-time. Literals are + * used for optimal coding style. * */ -/* -namespace corsika::units::hep { - using namespace phys::units; - using namespace phys::units::literals; - using namespace phys::units::io; - - /// defining HEP energy, mass, momentum - using energy_hep_d = phys::units::energy_d; - constexpr phys::units::quantity<energy_hep_d> GeV{corsika::units::constants::eV}; - // corsika::units::constants::e / phys::units::coulomb * phys::units::joule }; - - 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>; -} // namespace corsika::units::hep -*/ namespace corsika::units::si { using namespace phys::units; using namespace phys::units::literals;