Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Control
AthenaKernel
AthenaKernel
Units.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3
/*
4
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5
*/
6
36
#ifndef ATHENAKERNEL_UNITS_H
37
#define ATHENAKERNEL_UNITS_H
38
39
40
#include "GaudiKernel/SystemOfUnits.h"
41
#include "GaudiKernel/PhysicalConstants.h"
42
43
44
namespace
Athena
{
45
namespace
Units
{
46
47
58
template
<
int
TAG>
class
Unit
{};
59
template
<
int
TAG>
60
constexpr
double
operator/
(
double
x
,
const
Unit<TAG>
u
)
61
{
62
constexpr
double
recip = 1. /
static_cast<
double
>
(
u
);
63
return
x
* recip;
64
}
65
template
<
int
TAG>
66
constexpr
float
operator/
(
float
x
,
const
Unit<TAG>
u
)
67
{
68
constexpr
float
recip = 1. /
static_cast<
float
>
(
u
);
69
return
x
* recip;
70
}
71
72
73
// Include a selection of units from SystemOfUnits.h
74
#define UNIT(NAME) \
75
template <> class Unit<__LINE__> \
76
{ \
77
public: \
78
constexpr operator double() const { return Gaudi::Units::NAME; } \
79
}; \
80
constexpr static const Unit<__LINE__> NAME
81
82
UNIT
(
millimeter
);
83
UNIT
(
millimeter2
);
84
UNIT
(
millimeter3
);
85
UNIT
(
centimeter
);
86
UNIT
(
centimeter2
);
87
UNIT
(
centimeter3
);
88
UNIT
(
meter
);
89
UNIT
(
meter2
);
90
UNIT
(
meter3
);
91
UNIT
(
micrometer
);
92
UNIT
(um);
93
UNIT
(
mm
);
94
UNIT
(
mm2
);
95
UNIT
(
mm3
);
96
UNIT
(
cm
);
97
UNIT
(
cm2
);
98
UNIT
(
cm3
);
99
UNIT
(
radian
);
100
UNIT
(
degree
);
101
UNIT
(
rad
);
102
UNIT
(
deg
);
103
UNIT
(
picosecond
);
104
UNIT
(
nanosecond
);
105
UNIT
(
microsecond
);
106
UNIT
(
millisecond
);
107
UNIT
(
second
);
108
UNIT
(
ns
);
109
UNIT
(
s
);
110
UNIT
(
ms
);
111
UNIT
(
keV
);
112
UNIT
(
MeV
);
113
UNIT
(
GeV
);
114
UNIT
(
TeV
);
115
UNIT
(
gram
);
116
UNIT
(
g
);
117
UNIT
(
mole
);
118
UNIT
(
c_light
);
119
#undef UNIT
120
121
122
}
// namespace Units
123
}
// namespace Athena
124
125
126
#endif // not ATHENAKERNEL_ATLASUNITS_H
python.SystemOfUnits.second
int second
Definition:
SystemOfUnits.py:120
GeV
#define GeV
Definition:
PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
python.SystemOfUnits.nanosecond
int nanosecond
Definition:
SystemOfUnits.py:119
python.SystemOfUnits.MeV
int MeV
Definition:
SystemOfUnits.py:154
cm3
#define cm3
python.SystemOfUnits.microsecond
int microsecond
Definition:
SystemOfUnits.py:122
deg
#define deg
Definition:
SbPolyhedron.cxx:17
python.SystemOfUnits.TeV
int TeV
Definition:
SystemOfUnits.py:158
python.SystemOfUnits.gram
int gram
Definition:
SystemOfUnits.py:165
Athena::Units::Unit
Wrapper to avoid constant divisions when using units.
Definition:
Units.h:58
python.SystemOfUnits.meter2
int meter2
Definition:
SystemOfUnits.py:62
x
#define x
python.SystemOfUnits.ms
int ms
Definition:
SystemOfUnits.py:132
Trk::u
@ u
Enums for curvilinear frames.
Definition:
ParamDefs.h:77
python.SystemOfUnits.mm3
int mm3
Definition:
SystemOfUnits.py:85
python.SystemOfUnits.millisecond
int millisecond
Definition:
SystemOfUnits.py:121
python.SystemOfUnits.keV
int keV
Definition:
SystemOfUnits.py:156
cm
const double cm
Definition:
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
python.SystemOfUnits.radian
int radian
Definition:
SystemOfUnits.py:104
python.SystemOfUnits.millimeter
int millimeter
Definition:
SystemOfUnits.py:53
python.SystemOfUnits.meter
int meter
Definition:
SystemOfUnits.py:61
python.SystemOfUnits.cm2
int cm2
Definition:
SystemOfUnits.py:88
Athena
Some weak symbol referencing magic...
Definition:
AthLegacySequence.h:21
python.CaloCondTools.g
g
Definition:
CaloCondTools.py:15
Athena::Units::operator/
constexpr double operator/(double x, const Unit< TAG > u)
Definition:
Units.h:60
python.SystemOfUnits.centimeter
int centimeter
Definition:
SystemOfUnits.py:57
python.SystemOfUnits.micrometer
int micrometer
Definition:
SystemOfUnits.py:71
Athena::Units
Definition:
Units.h:45
python.SystemOfUnits.mm2
int mm2
Definition:
SystemOfUnits.py:84
python.SystemOfUnits.centimeter3
int centimeter3
Definition:
SystemOfUnits.py:59
python.PhysicalConstants.c_light
float c_light
Definition:
PhysicalConstants.py:63
Athena::Units::UNIT
UNIT(millimeter)
python.SystemOfUnits.mm
int mm
Definition:
SystemOfUnits.py:83
python.SystemOfUnits.millimeter3
int millimeter3
Definition:
SystemOfUnits.py:55
mole
#define mole
python.SystemOfUnits.ns
int ns
Definition:
SystemOfUnits.py:130
python.SystemOfUnits.millimeter2
int millimeter2
Definition:
SystemOfUnits.py:54
python.SystemOfUnits.degree
tuple degree
Definition:
SystemOfUnits.py:106
python.SystemOfUnits.centimeter2
int centimeter2
Definition:
SystemOfUnits.py:58
python.SystemOfUnits.picosecond
int picosecond
Definition:
SystemOfUnits.py:123
python.SystemOfUnits.rad
int rad
Definition:
SystemOfUnits.py:111
python.SystemOfUnits.meter3
int meter3
Definition:
SystemOfUnits.py:63
Generated on Thu Apr 17 2025 21:22:09 for ATLAS Offline Software by
1.8.18