thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::Units Namespace Reference

The Units namespace contains the declaration of a number of classes for variables with dimension. More...

Typedefs

template<long int L, long int E, long int Q, long int DL = 1, long int DE = 1, long int DQ = 1>
using Qty = ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >
 adapter for the old style of naming quantities
 
typedef Qty< 0, 1, 0 > Energy
 Energy.
 
typedef Energy Mass
 Mass has the same unit as Energy <=> c == 1.
 
typedef Qty< 1, 0, 0 > Length
 Length.
 
typedef Length Time
 Time has the same unit as Length.
 
typedef Qty<-1, 0, 0 > InvLength
 Inverse Length.
 
typedef double Velocity
 Velocities are dimensionless fractions of c.
 
typedef Qty< 0, 0, 1 > Charge
 Charge.
 
typedef Qty< 1, 1, 0 > AngularMomentum
 Angular momentum.
 
typedef Qty<-1, 1, 0 > Tension
 Tension.
 
typedef Qty< 2, 0, 0 > Area
 Area will be assumed to be Length \(^2\).
 
typedef Qty<-2, 0, 0 > InvArea
 Inverse Area.
 
typedef Area CrossSection
 Cross section is an area.
 
Higher powers of energy.

Even higher powers can be created with similar typedefs.

typedef Qty< 0, 2, 0 > Energy2
 
typedef Qty< 0, 3, 0 > Energy3
 
typedef Qty< 0, 4, 0 > Energy4
 
typedef Qty< 0, 5, 0 > Energy5
 
typedef Qty< 0, 6, 0 > Energy6
 
typedef Qty< 0, 7, 0 > Energy7
 
typedef Qty< 0, 8, 0 > Energy8
 
typedef Qty< 0, 9, 0 > Energy9
 
typedef Qty< 0, 10, 0 > Energy10
 
typedef Qty< 0, 11, 0 > Energy11
 
typedef Qty< 0, 12, 0 > Energy12
 
typedef Qty< 0, 1, 0, 1, 2, 1 > SqrtEnergy
 
typedef Qty< 0,-1, 0, 1, 2, 1 > InvSqrtEnergy
 
typedef Qty< 0, -1, 0 > InvEnergy
 
typedef Qty< 0, -2, 0 > InvEnergy2
 
typedef Qty< 0, -3, 0 > InvEnergy3
 
typedef Qty< 0, -4, 0 > InvEnergy4
 
typedef Qty< 0, -5, 0 > InvEnergy5
 
typedef Qty< 0, -6, 0 > InvEnergy6
 
typedef Qty< 0, -7, 0 > InvEnergy7
 
typedef Qty< 0, -8, 0 > InvEnergy8
 
typedef Qty< 0, -9, 0 > InvEnergy9
 
typedef Qty< 0,-10, 0 > InvEnergy10
 
typedef Qty< 0,-11, 0 > InvEnergy11
 
typedef Qty< 0,-12, 0 > InvEnergy12
 
typedef Qty< 2, 2, 0 > Energy2XSec
 CrossSection*Energy2.
 
typedef Qty< 2,-2, 0 > DiffXSec
 CrossSection/Energy2.
 
typedef Qty< 2,-4, 0 > Diff2XSec
 CrossSection/Energy4.
 
typedef Qty< 2,-6, 0 > Diff3XSec
 CrossSection/Energy6.
 
typedef Energy2 Scale
 Scale is the same as a squared energy.
 
typedef ThreeVector< LengthPoint
 A point in three-dimensional euclidean space.
 
typedef ThreeVector< LengthDistance
 A distance in three-dimensional euclidean space.
 
typedef ThreeVector< double > Axis
 A direction in three-dimensional euclidean space.
 
typedef ThreeVector< EnergyMomentum3
 A momentum in three-dimensional euclidean space.
 
typedef ThreeVector< double > Boost
 A three-dimensional boost vector.
 
typedef LorentzVector< LengthLorentzDistance
 A distance in four-dimensional space-time.
 
typedef Lorentz5Vector< LengthLorentz5Distance
 A distance in four-dimensional space-time with an explicit invariant time component.
 
typedef LorentzVector< LengthLorentzPoint
 A point in four-dimensional space-time.
 
typedef LorentzVector< EnergyLorentzMomentum
 A momentum in four-dimensional space-time.
 
typedef Lorentz5Vector< EnergyLorentz5Momentum
 A momentum in four-dimensional space-time with an explicit invariant mass component.
 
typedef Transverse< EnergyTransverseMomentum
 Transverse components of a momentum.
 

Pre-defined basic units.

constexpr Length meter = 1.0e+3_mm
 
constexpr Length millimeter = 1_mm
 
constexpr Length mm = 1_mm
 
constexpr Length centimeter = 10_mm
 
constexpr Length micrometer = 1.0e-3_mm
 
constexpr Length nanometer = 1.0e-6_mm
 
constexpr Length picometer = 1.0e-9_mm
 
constexpr Length femtometer = 1.0e-12_mm
 
constexpr Energy keV = 1.0e-3_MeV
 
constexpr Energy MeV = 1_MeV
 
constexpr Energy GeV = 1_GeV
 
constexpr Energy TeV = 1_TeV
 
constexpr Energy2 MeV2 = 1_MeV2
 
constexpr Energy2 GeV2 = 1_GeV2
 
constexpr InvEnergy InvGeV = 1/GeV
 
constexpr Area femtobarn = 1.0e-03_pb
 
constexpr Area picobarn = 1_pb
 
constexpr Area nanobarn = 1.0e+03_pb
 
constexpr Area microbarn = 1.0e+06_pb
 
constexpr Area millibarn = 1.0e+09_pb
 
constexpr Area barn = 1.0e+12_pb
 
constexpr Charge eplus = Charge::baseunit()
 
constexpr Qty< 1, 1, 0 > hbarc = 197.326968e-15 * MeV * meter
 Planck's constant times c (PDG 2006 value 197.326968(17) MeV fm)
 
constexpr Qty< 1, 1, 0 > hbar_Planck = hbarc / 1.0
 Planck's constant (PDG 2006 value 197.326968(17) MeV fm)
 
constexpr Length operator""_mm (long double x)
 
constexpr Length operator""_mm (unsigned long long x)
 
constexpr Energy operator""_MeV (long double x)
 
constexpr Energy operator""_MeV (unsigned long long x)
 
constexpr Energy operator""_GeV (long double x)
 
constexpr Energy operator""_GeV (unsigned long long x)
 
constexpr Energy operator""_TeV (long double x)
 
constexpr Energy operator""_TeV (unsigned long long x)
 
constexpr Energy2 operator""_MeV2 (long double x)
 
constexpr Energy2 operator""_MeV2 (unsigned long long x)
 
constexpr Energy2 operator""_GeV2 (long double x)
 
constexpr Energy2 operator""_GeV2 (unsigned long long x)
 
constexpr Area operator""_pb (long double x)
 
constexpr Area operator""_pb (unsigned long long x)
 

Detailed Description

The Units namespace contains the declaration of a number of classes for variables with dimension.

Currently they are all typedefs of double, but in the future the SIUnits package will be used.

The file Utilities/UnitIO.h defines helper-classes and helper functions to read and write variables with dimensions. As an example, to read and write an energy variable e in units of GeV, use: os << ounit(e, GeV) and is >> iunit(e, GeV)

Typedef Documentation

◆ AngularMomentum

Angular momentum.

Definition at line 63 of file Unitsystem.h.

◆ Area

typedef Qty<2,0,0> ThePEG::Units::Area

Area will be assumed to be Length \(^2\).

Definition at line 69 of file Unitsystem.h.

◆ Axis

A direction in three-dimensional euclidean space.

Definition at line 133 of file Unitsystem.h.

◆ Boost

A three-dimensional boost vector.

Definition at line 139 of file Unitsystem.h.

◆ Charge

typedef Qty<0,0,1> ThePEG::Units::Charge

Charge.

Definition at line 60 of file Unitsystem.h.

◆ CrossSection

Cross section is an area.

Definition at line 75 of file Unitsystem.h.

◆ Diff2XSec

typedef Qty<2,-4,0> ThePEG::Units::Diff2XSec

CrossSection/Energy4.

Definition at line 118 of file Unitsystem.h.

◆ Diff3XSec

typedef Qty<2,-6,0> ThePEG::Units::Diff3XSec

CrossSection/Energy6.

Definition at line 121 of file Unitsystem.h.

◆ DiffXSec

typedef Qty<2,-2,0> ThePEG::Units::DiffXSec

CrossSection/Energy2.

Definition at line 115 of file Unitsystem.h.

◆ Distance

A distance in three-dimensional euclidean space.

Definition at line 130 of file Unitsystem.h.

◆ Energy

typedef Qty<0,1,0> ThePEG::Units::Energy

Energy.

Definition at line 42 of file Unitsystem.h.

◆ Energy10

typedef Qty<0,10, 0> ThePEG::Units::Energy10

Definition at line 90 of file Unitsystem.h.

◆ Energy11

typedef Qty<0,11, 0> ThePEG::Units::Energy11

Definition at line 91 of file Unitsystem.h.

◆ Energy12

typedef Qty<0,12, 0> ThePEG::Units::Energy12

Definition at line 92 of file Unitsystem.h.

◆ Energy2

typedef Qty<0, 2, 0> ThePEG::Units::Energy2

Definition at line 82 of file Unitsystem.h.

◆ Energy2XSec

CrossSection*Energy2.

Definition at line 112 of file Unitsystem.h.

◆ Energy3

typedef Qty<0, 3, 0> ThePEG::Units::Energy3

Definition at line 83 of file Unitsystem.h.

◆ Energy4

typedef Qty<0, 4, 0> ThePEG::Units::Energy4

Definition at line 84 of file Unitsystem.h.

◆ Energy5

typedef Qty<0, 5, 0> ThePEG::Units::Energy5

Definition at line 85 of file Unitsystem.h.

◆ Energy6

typedef Qty<0, 6, 0> ThePEG::Units::Energy6

Definition at line 86 of file Unitsystem.h.

◆ Energy7

typedef Qty<0, 7, 0> ThePEG::Units::Energy7

Definition at line 87 of file Unitsystem.h.

◆ Energy8

typedef Qty<0, 8, 0> ThePEG::Units::Energy8

Definition at line 88 of file Unitsystem.h.

◆ Energy9

typedef Qty<0, 9, 0> ThePEG::Units::Energy9

Definition at line 89 of file Unitsystem.h.

◆ InvArea

typedef Qty<-2,0,0> ThePEG::Units::InvArea

Inverse Area.

Definition at line 72 of file Unitsystem.h.

◆ InvEnergy

typedef Qty<0, -1, 0> ThePEG::Units::InvEnergy

Definition at line 97 of file Unitsystem.h.

◆ InvEnergy10

typedef Qty<0,-10, 0> ThePEG::Units::InvEnergy10

Definition at line 106 of file Unitsystem.h.

◆ InvEnergy11

typedef Qty<0,-11, 0> ThePEG::Units::InvEnergy11

Definition at line 107 of file Unitsystem.h.

◆ InvEnergy12

typedef Qty<0,-12, 0> ThePEG::Units::InvEnergy12

Definition at line 108 of file Unitsystem.h.

◆ InvEnergy2

typedef Qty<0, -2, 0> ThePEG::Units::InvEnergy2

Definition at line 98 of file Unitsystem.h.

◆ InvEnergy3

typedef Qty<0, -3, 0> ThePEG::Units::InvEnergy3

Definition at line 99 of file Unitsystem.h.

◆ InvEnergy4

typedef Qty<0, -4, 0> ThePEG::Units::InvEnergy4

Definition at line 100 of file Unitsystem.h.

◆ InvEnergy5

typedef Qty<0, -5, 0> ThePEG::Units::InvEnergy5

Definition at line 101 of file Unitsystem.h.

◆ InvEnergy6

typedef Qty<0, -6, 0> ThePEG::Units::InvEnergy6

Definition at line 102 of file Unitsystem.h.

◆ InvEnergy7

typedef Qty<0, -7, 0> ThePEG::Units::InvEnergy7

Definition at line 103 of file Unitsystem.h.

◆ InvEnergy8

typedef Qty<0, -8, 0> ThePEG::Units::InvEnergy8

Definition at line 104 of file Unitsystem.h.

◆ InvEnergy9

typedef Qty<0, -9, 0> ThePEG::Units::InvEnergy9

Definition at line 105 of file Unitsystem.h.

◆ InvLength

typedef Qty<-1,0,0> ThePEG::Units::InvLength

Inverse Length.

Definition at line 54 of file Unitsystem.h.

◆ InvSqrtEnergy

typedef Qty<0,-1,0, 1,2,1> ThePEG::Units::InvSqrtEnergy

Definition at line 95 of file Unitsystem.h.

◆ Length

typedef Qty<1,0,0> ThePEG::Units::Length

Length.

Definition at line 48 of file Unitsystem.h.

◆ Lorentz5Distance

A distance in four-dimensional space-time with an explicit invariant time component.

Definition at line 146 of file Unitsystem.h.

◆ Lorentz5Momentum

A momentum in four-dimensional space-time with an explicit invariant mass component.

Definition at line 156 of file Unitsystem.h.

◆ LorentzDistance

A distance in four-dimensional space-time.

Definition at line 142 of file Unitsystem.h.

◆ LorentzMomentum

A momentum in four-dimensional space-time.

Definition at line 152 of file Unitsystem.h.

◆ LorentzPoint

A point in four-dimensional space-time.

Definition at line 149 of file Unitsystem.h.

◆ Mass

Mass has the same unit as Energy <=> c == 1.

Definition at line 45 of file Unitsystem.h.

◆ Momentum3

A momentum in three-dimensional euclidean space.

Definition at line 136 of file Unitsystem.h.

◆ Point

A point in three-dimensional euclidean space.

Definition at line 127 of file Unitsystem.h.

◆ Qty

template<long int L, long int E, long int Q, long int DL = 1, long int DE = 1, long int DQ = 1>
using ThePEG::Units::Qty = typedef ThePEG::Qty<std::ratio<L,DL>, std::ratio<E,DE>, std::ratio<Q,DQ> >

adapter for the old style of naming quantities

Definition at line 39 of file Unitsystem.h.

◆ Scale

Scale is the same as a squared energy.

Definition at line 124 of file Unitsystem.h.

◆ SqrtEnergy

typedef Qty<0, 1,0, 1,2,1> ThePEG::Units::SqrtEnergy

Definition at line 94 of file Unitsystem.h.

◆ Tension

typedef Qty<-1,1,0> ThePEG::Units::Tension

Tension.

Definition at line 66 of file Unitsystem.h.

◆ Time

Time has the same unit as Length.

<=> c == 1.

Definition at line 51 of file Unitsystem.h.

◆ TransverseMomentum

Transverse components of a momentum.

Definition at line 159 of file Unitsystem.h.

◆ Velocity

typedef double ThePEG::Units::Velocity

Velocities are dimensionless fractions of c.

Definition at line 57 of file Unitsystem.h.

Function Documentation

◆ operator""_GeV() [1/2]

constexpr Energy ThePEG::Units::operator""_GeV ( long double  x)
constexpr

Definition at line 186 of file Unitsystem.h.

◆ operator""_GeV() [2/2]

constexpr Energy ThePEG::Units::operator""_GeV ( unsigned long long  x)
constexpr

Definition at line 189 of file Unitsystem.h.

◆ operator""_GeV2() [1/2]

constexpr Energy2 ThePEG::Units::operator""_GeV2 ( long double  x)
constexpr

Definition at line 214 of file Unitsystem.h.

◆ operator""_GeV2() [2/2]

constexpr Energy2 ThePEG::Units::operator""_GeV2 ( unsigned long long  x)
constexpr

Definition at line 217 of file Unitsystem.h.

◆ operator""_MeV() [1/2]

constexpr Energy ThePEG::Units::operator""_MeV ( long double  x)
constexpr

Definition at line 179 of file Unitsystem.h.

◆ operator""_MeV() [2/2]

constexpr Energy ThePEG::Units::operator""_MeV ( unsigned long long  x)
constexpr

Definition at line 182 of file Unitsystem.h.

◆ operator""_MeV2() [1/2]

constexpr Energy2 ThePEG::Units::operator""_MeV2 ( long double  x)
constexpr

Definition at line 207 of file Unitsystem.h.

◆ operator""_MeV2() [2/2]

constexpr Energy2 ThePEG::Units::operator""_MeV2 ( unsigned long long  x)
constexpr

Definition at line 210 of file Unitsystem.h.

◆ operator""_mm() [1/2]

constexpr Length ThePEG::Units::operator""_mm ( long double  x)
constexpr

Definition at line 163 of file Unitsystem.h.

◆ operator""_mm() [2/2]

constexpr Length ThePEG::Units::operator""_mm ( unsigned long long  x)
constexpr

Definition at line 166 of file Unitsystem.h.

◆ operator""_pb() [1/2]

constexpr Area ThePEG::Units::operator""_pb ( long double  x)
constexpr

Definition at line 227 of file Unitsystem.h.

◆ operator""_pb() [2/2]

constexpr Area ThePEG::Units::operator""_pb ( unsigned long long  x)
constexpr

Definition at line 230 of file Unitsystem.h.

◆ operator""_TeV() [1/2]

constexpr Energy ThePEG::Units::operator""_TeV ( long double  x)
constexpr

Definition at line 193 of file Unitsystem.h.

◆ operator""_TeV() [2/2]

constexpr Energy ThePEG::Units::operator""_TeV ( unsigned long long  x)
constexpr

Definition at line 196 of file Unitsystem.h.

Variable Documentation

◆ barn

constexpr Area ThePEG::Units::barn = 1.0e+12_pb
constexpr

Definition at line 239 of file Unitsystem.h.

◆ centimeter

constexpr Length ThePEG::Units::centimeter = 10_mm
constexpr

Definition at line 173 of file Unitsystem.h.

◆ eplus

constexpr Charge ThePEG::Units::eplus = Charge::baseunit()
constexpr

Definition at line 241 of file Unitsystem.h.

◆ femtobarn

constexpr Area ThePEG::Units::femtobarn = 1.0e-03_pb
constexpr

Definition at line 234 of file Unitsystem.h.

◆ femtometer

constexpr Length ThePEG::Units::femtometer = 1.0e-12_mm
constexpr

Definition at line 177 of file Unitsystem.h.

◆ GeV

constexpr Energy ThePEG::Units::GeV = 1_GeV
constexpr

Definition at line 202 of file Unitsystem.h.

◆ GeV2

constexpr Energy2 ThePEG::Units::GeV2 = 1_GeV2
constexpr

Definition at line 222 of file Unitsystem.h.

◆ hbar_Planck

constexpr Qty<1,1,0> ThePEG::Units::hbar_Planck = hbarc / 1.0
constexpr

Planck's constant (PDG 2006 value 197.326968(17) MeV fm)

Definition at line 247 of file Unitsystem.h.

Referenced by ThePEG::ParticleData::spin().

◆ hbarc

constexpr Qty<1,1,0> ThePEG::Units::hbarc = 197.326968e-15 * MeV * meter
constexpr

Planck's constant times c (PDG 2006 value 197.326968(17) MeV fm)

Definition at line 245 of file Unitsystem.h.

Referenced by ThePEG::ParticleData::cTau(), ThePEG::HardSphereYukawaFormFactor::formFactor(), and ThePEG::ParticleData::width().

◆ InvGeV

constexpr InvEnergy ThePEG::Units::InvGeV = 1/GeV
constexpr

Definition at line 224 of file Unitsystem.h.

◆ keV

constexpr Energy ThePEG::Units::keV = 1.0e-3_MeV
constexpr

Definition at line 200 of file Unitsystem.h.

◆ meter

constexpr Length ThePEG::Units::meter = 1.0e+3_mm
constexpr

Definition at line 170 of file Unitsystem.h.

◆ MeV

constexpr Energy ThePEG::Units::MeV = 1_MeV
constexpr

Definition at line 201 of file Unitsystem.h.

◆ MeV2

constexpr Energy2 ThePEG::Units::MeV2 = 1_MeV2
constexpr

Definition at line 221 of file Unitsystem.h.

◆ microbarn

constexpr Area ThePEG::Units::microbarn = 1.0e+06_pb
constexpr

Definition at line 237 of file Unitsystem.h.

◆ micrometer

constexpr Length ThePEG::Units::micrometer = 1.0e-3_mm
constexpr

Definition at line 174 of file Unitsystem.h.

◆ millibarn

constexpr Area ThePEG::Units::millibarn = 1.0e+09_pb
constexpr

Definition at line 238 of file Unitsystem.h.

◆ millimeter

constexpr Length ThePEG::Units::millimeter = 1_mm
constexpr

Definition at line 171 of file Unitsystem.h.

◆ mm

constexpr Length ThePEG::Units::mm = 1_mm
constexpr

Definition at line 172 of file Unitsystem.h.

◆ nanobarn

constexpr Area ThePEG::Units::nanobarn = 1.0e+03_pb
constexpr

Definition at line 236 of file Unitsystem.h.

◆ nanometer

constexpr Length ThePEG::Units::nanometer = 1.0e-6_mm
constexpr

Definition at line 175 of file Unitsystem.h.

◆ picobarn

constexpr Area ThePEG::Units::picobarn = 1_pb
constexpr

Definition at line 235 of file Unitsystem.h.

◆ picometer

constexpr Length ThePEG::Units::picometer = 1.0e-9_mm
constexpr

Definition at line 176 of file Unitsystem.h.

◆ TeV

constexpr Energy ThePEG::Units::TeV = 1_TeV
constexpr

Definition at line 203 of file Unitsystem.h.