ThePEG  1.8.0
Unitsystem.h
1 // -*- C++ -*-
2 //
3 // Unitsystem.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad, David Grellscheid
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_Units_H
10 #define ThePEG_Units_H
11 
12 #include "ThePEG/Vectors/Lorentz5Vector.fh"
13 #include "ThePEG/Vectors/LorentzVector.fh"
14 #include "ThePEG/Vectors/ThreeVector.fh"
15 #include "ThePEG/Vectors/Transverse.fh"
16 #include "ThePEG_Qty.h"
17 
18 namespace ThePEG {
19 
31 namespace Units {
32 
35 
37 typedef Energy Mass;
38 
41 
43 typedef Length Time;
44 
46 typedef QTY<-1,0,0>::Type InvLength;
47 
49 typedef double Velocity;
50 
53 
56 
58 typedef QTY<-1,1,0>::Type Tension;
59 
62 
64 typedef QTY<-2,0,0>::Type InvArea;
65 
67 typedef Area CrossSection;
68 
74 typedef QTY<0, 2, 0>::Type Energy2;
85 
87 typedef QTY<0,-1,0, 1,2,1>::Type InvSqrtEnergy;
88 
89 typedef QTY<0, -1, 0>::Type InvEnergy;
90 typedef QTY<0, -2, 0>::Type InvEnergy2;
91 typedef QTY<0, -3, 0>::Type InvEnergy3;
92 typedef QTY<0, -4, 0>::Type InvEnergy4;
93 typedef QTY<0, -5, 0>::Type InvEnergy5;
94 typedef QTY<0, -6, 0>::Type InvEnergy6;
95 typedef QTY<0, -7, 0>::Type InvEnergy7;
96 typedef QTY<0, -8, 0>::Type InvEnergy8;
97 typedef QTY<0, -9, 0>::Type InvEnergy9;
98 typedef QTY<0,-10, 0>::Type InvEnergy10;
99 typedef QTY<0,-11, 0>::Type InvEnergy11;
100 typedef QTY<0,-12, 0>::Type InvEnergy12;
102 
105 
107 typedef QTY<2,-2,0>::Type DiffXSec;
108 
110 typedef QTY<2,-4,0>::Type Diff2XSec;
111 
113 typedef QTY<2,-6,0>::Type Diff3XSec;
114 
116 typedef Energy2 Scale;
117 
120 
123 
126 
129 
132 
135 
139 
142 
145 
149 
152 
154 
155 const Length millimeter = TypeTraits<Length>::baseunit;
156 const Energy MeV = TypeTraits<Energy>::baseunit;
157 const Charge eplus = TypeTraits<Charge>::baseunit;
158 
159 const Energy keV = 1.0e-3 * MeV;
160 const Energy GeV = 1.0e3 * MeV;
161 const Energy TeV = 1.0e6 * MeV;
162 
163 const Energy2 MeV2 = MeV * MeV;
164 const Energy2 GeV2 = GeV * GeV;
165 const InvEnergy InvGeV = 1/GeV;
166 
167 const Length meter = 1.0e3 * millimeter;
168 const Length mm = millimeter;
169 const Length centimeter = 10.0*millimeter;
170 const Length micrometer = 1.0e-3 * millimeter;
171 const Length nanometer = 1.0e-6 * millimeter;
172 const Length picometer = 1.0e-9 * millimeter;
173 const Length femtometer = 1.0e-12 * millimeter;
174 
175 const Area picobarn = 1.0e-40 * meter * meter;
176 const Area nanobarn = 1.0e3 * picobarn;
177 const Area microbarn = 1.0e6 * picobarn;
178 const Area millibarn = 1.0e9 * picobarn;
179 const Area barn = 1.0e12 * picobarn;
180 const Area femtobarn = 1.0e-3 * picobarn;
182 
184 const QTY<1,1,0>::Type hbarc = 197.326968e-15 * MeV * meter;
186 const QTY<1,1,0>::Type hbar_Planck = hbarc / 1.0;
187 }
188 
193 namespace UnitRemoval {
195 
196  const Units::Energy E = Units::MeV;
197 
198  const Units::Energy2 E2 = E*E;
199  const Units::Energy3 E3 = E*E2;
200  const Units::Energy4 E4 = E2*E2;
201 
202  const Units::InvEnergy InvE = 1.0/E;
203  const Units::InvEnergy2 InvE2 = 1.0/E2;
204  const Units::InvEnergy3 InvE3 = 1.0/E3;
205  const Units::InvEnergy4 InvE4 = 1.0/E4;
206 
207  const Units::SqrtEnergy SqrtE = sqrt(E);
208  const Units::InvSqrtEnergy InvSqrtE = 1.0/sqrt(E);
210 }
211 
212 }
213 
214 #endif /* ThePEG_Units_H */
Helper class to define unitful quantities.
Definition: ThePEG_Qty.h:35
ThreeVector< Length > Point
A point in three-dimensional euclidean space.
Definition: Unitsystem.h:119
QTY<-1, 1, 0 >::Type Tension
Tension.
Definition: Unitsystem.h:58
const QTY< 1, 1, 0 >::Type hbar_Planck
Planck's constant (PDG 2006 value 197.326968(17) MeV fm)
Definition: Unitsystem.h:186
LorentzVector< Energy > LorentzMomentum
A momentum in four-dimensional space-time.
Definition: Unitsystem.h:144
QTY<-2, 0, 0 >::Type InvArea
Inverse Area.
Definition: Unitsystem.h:64
A 3-component vector.
Definition: ThreeVector.h:33
Lorentz5Vector< Energy > Lorentz5Momentum
A momentum in four-dimensional space-time with an explicit invariant mass component.
Definition: Unitsystem.h:148
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
Area CrossSection
Cross section is an area.
Definition: Unitsystem.h:67
Lorentz5Vector< Length > Lorentz5Distance
A distance in four-dimensional space-time with an explicit invariant time component.
Definition: Unitsystem.h:138
QTY< 2,-6, 0 >::Type Diff3XSec
CrossSection/Energy6.
Definition: Unitsystem.h:113
ThreeVector< double > Boost
A three-dimensional boost vector.
Definition: Unitsystem.h:131
QTY< 0, 1, 0 >::Type Energy
Energy.
Definition: Unitsystem.h:34
double Velocity
Velocities are dimensionless fractions of c.
Definition: Unitsystem.h:49
QTY< 1, 0, 0 >::Type Length
Length.
Definition: Unitsystem.h:40
LorentzVector< Length > LorentzPoint
A point in four-dimensional space-time.
Definition: Unitsystem.h:141
Length Time
Time has the same unit as Length.
Definition: Unitsystem.h:43
ThreeVector< Length > Distance
A distance in three-dimensional euclidean space.
Definition: Unitsystem.h:122
QTY<-1, 0, 0 >::Type InvLength
Inverse Length.
Definition: Unitsystem.h:46
QTY< 1, 1, 0 >::Type AngularMomentum
Angular momentum.
Definition: Unitsystem.h:55
LorentzVector< Length > LorentzDistance
A distance in four-dimensional space-time.
Definition: Unitsystem.h:134
QTY< 2,-2, 0 >::Type DiffXSec
CrossSection/Energy2.
Definition: Unitsystem.h:107
Transverse< Energy > TransverseMomentum
Transverse components of a momentum.
Definition: Unitsystem.h:151
ThreeVector< Energy > Momentum3
A momentum in three-dimensional euclidean space.
Definition: Unitsystem.h:128
QTY< 2,-4, 0 >::Type Diff2XSec
CrossSection/Energy4.
Definition: Unitsystem.h:110
Type traits for built-in types.
Definition: TemplateTools.h:76
Energy2 Scale
Scale is the same as a squared energy.
Definition: Unitsystem.h:116
This template class allows the compiler to check calculations with physical quantities for dimensiona...
Definition: PhysicalQty.h:81
QTY< 2, 2, 0 >::Type Energy2XSec
CrossSection*Energy2.
Definition: Unitsystem.h:104
QTY< 2, 0, 0 >::Type Area
Area will be assumed to be Length .
Definition: Unitsystem.h:61
QTY< 0, 0, 1 >::Type Charge
Charge.
Definition: Unitsystem.h:52
ThreeVector< double > Axis
A direction in three-dimensional euclidean space.
Definition: Unitsystem.h:125
const QTY< 1, 1, 0 >::Type hbarc
Planck's constant times c (PDG 2006 value 197.326968(17) MeV fm)
Definition: Unitsystem.h:184
Energy Mass
Mass has the same unit as Energy <=> c == 1.
Definition: Unitsystem.h:37