Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-15 10:10:42

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file celeritas/Quantities.hh
0006 //! \brief Derivative unit classes and annotated Quantity values
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "corecel/math/Quantity.hh"  // IWYU pragma: export
0011 #include "geocel/detail/LengthQuantities.hh"
0012 
0013 #include "UnitTypes.hh"  // IWYU pragma: export
0014 
0015 namespace celeritas
0016 {
0017 namespace units
0018 {
0019 //---------------------------------------------------------------------------//
0020 //!@{
0021 //! \name Quantities for atomic scale/natural units
0022 using ElementaryCharge = RealQuantity<EElectron>;
0023 using MevEnergy = RealQuantity<Mev>;
0024 using MevMass = RealQuantity<MevPerCsq>;
0025 using MevMomentum = RealQuantity<MevPerC>;
0026 using MevMomentumSq = RealQuantity<UnitProduct<MevPerC, MevPerC>>;
0027 using LightSpeed = RealQuantity<CLight>;
0028 using AmuMass = RealQuantity<Amu>;
0029 //!@}
0030 
0031 //! Special faux quantity for overloading cross section calculation
0032 using LogMevEnergy = RealQuantity<LogMev>;
0033 
0034 //! Spin (in units of hbar/2)
0035 using HalfSpinInt = Quantity<HalfSpin, short int>;
0036 
0037 //---------------------------------------------------------------------------//
0038 //!@{
0039 //! \name Quantities for Geant4 conversion
0040 using ClhepLength = ::celeritas::lengthunits::ClhepLength;
0041 using ClhepField = Quantity<ClhepUnitBField, double>;
0042 using ClhepTime = Quantity<Nanosecond, double>;
0043 using ClhepEnergy = Quantity<Mev, double>;
0044 //!@}
0045 
0046 //---------------------------------------------------------------------------//
0047 //!@{
0048 //! \name Quantities for manual input and/or test harnesses
0049 using BarnXs = RealQuantity<Barn>;
0050 using CmLength = ::celeritas::lengthunits::CmLength;
0051 using InvCmXs = RealQuantity<UnitInverse<Centimeter>>;
0052 using InvCcDensity = RealQuantity<InvCentimeterCubed>;
0053 using MolCcDensity = RealQuantity<MolPerCentimeterCubed>;
0054 using GramCcDensity = RealQuantity<GramPerCentimeterCubed>;
0055 using TeslaField = RealQuantity<Tesla>;
0056 //!@}
0057 
0058 // DEPRECATED: remove in v1.0
0059 using FieldTesla [[deprecated]] = RealQuantity<Tesla>;
0060 
0061 //---------------------------------------------------------------------------//
0062 }  // namespace units
0063 }  // namespace celeritas