ThePEG  1.8.0
ThePEG_Qty.h
1 /* Config/ThePEG_Qty.h. Generated from ThePEG_Qty.h.b by configure. */
2 #ifndef THEPEG_QTY_H
3 #define THEPEG_QTY_H
4 /* Config/ThePEG_Qty.h.in. */
5 
6 /* Define to 1 if you want units checking */
7 #define ThePEG_HAS_UNITS_CHECKING 1
8 
9 
10 
11 #ifdef ThePEG_HAS_UNITS_CHECKING
12 #include "PhysicalQty.h"
13 #include "PhysicalQtyOps.h"
14 #include "PhysicalQtyComplex.h"
15 
16 namespace ThePEG {
17 
18 #else
19 
20 #include <cmath>
21 namespace ThePEG {
22 
23 const double ZERO = 0.0;
24 
26 template<int P, int R>
27 double pow(double q) {
28  return std::pow(q,double(P)/double(R));
29 }
30 
31 #endif
32 
34 template <int L, int E, int Q, int DL = 1, int DE = 1, int DQ = 1>
35 struct QTY {
36 #ifdef ThePEG_HAS_UNITS_CHECKING
37  typedef Qty<L,E,Q,DL,DE,DQ> Type;
39 #else
40  typedef double Type;
42 #endif
43 };
44 
45 }
46 
47 #endif
Helper class to define unitful quantities.
Definition: ThePEG_Qty.h:35
The PhysicalQty class allows compile-time checking of dimensional correctness.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
Overloads for mathematical operations on physical quantities.
Qty< L, E, Q, DL, DE, DQ > Type
The QTY type is dimensioned.
Definition: ThePEG_Qty.h:38
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:33
Overloads for operations on complex physical quantities.
This template class allows the compiler to check calculations with physical quantities for dimensiona...
Definition: PhysicalQty.h:81