BOSS
7.0.4
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
_
e
f
g
h
i
l
m
o
p
r
s
t
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
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
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
w
x
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
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
p
q
r
s
t
u
v
w
z
Enumerations
d
e
g
h
p
r
s
t
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
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
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h
Go to the documentation of this file.
1
#ifndef ENTRANCEANGLE_H
2
#define ENTRANCEANGLE_H
3
////////////////////////////////
4
//
5
// BESIII MDC entrance angles are in radians, and degress should inly be used
6
// when absolutely necessary. Automatic conversions to and from
7
// the radians form are provided, but you have to manually
8
// go to and from degrees
9
//
10
// By convention, angles are represented as [-pi/2, pi/2]
11
//
12
#include "MdcGeom/Constants.h"
13
#include <math.h>
14
15
16
class
EntranceAngle
17
{
18
public
:
19
inline
EntranceAngle
();
20
inline
EntranceAngle
(
const
double
);
21
inline
~EntranceAngle
();
22
23
inline
operator
double()
const
{
return
_phi
;};
// automatic conversion to double
24
25
inline
double
rad
()
const
;
26
inline
double
deg
()
const
;
27
// convention : returns value in [-90, 90]
28
29
protected
:
30
double
_phi
;
31
32
inline
static
double
normalize
(
double
);
33
34
};
35
36
//
37
// Methods for EntranceAngle
38
//
39
40
inline
double
EntranceAngle::normalize
(
double
angle) {
41
while
(angle < -
Constants::halfPi
) {
42
angle +=
Constants::pi
;
43
}
44
while
(angle >
Constants::halfPi
) {
45
angle -=
Constants::pi
;
46
}
47
return
angle;
48
}
49
50
inline
EntranceAngle::EntranceAngle
() : _phi(0)
51
{ }
52
53
inline
EntranceAngle::EntranceAngle
(
const
double
phi) : _phi(normalize(phi))
54
{}
55
56
inline
EntranceAngle::~EntranceAngle
() {}
57
58
inline
double
EntranceAngle::rad
()
const
59
{
return
_phi
; }
60
61
inline
double
EntranceAngle::deg
()
const
62
{
return
_phi
*
Constants::radToDegrees
; }
63
64
#endif
Constants::pi
static const double pi
Definition:
InstallArea/include/MdcGeom/MdcGeom/Constants.h:38
Constants::halfPi
static const double halfPi
Definition:
InstallArea/include/MdcGeom/MdcGeom/Constants.h:40
Constants::radToDegrees
static const double radToDegrees
Definition:
InstallArea/include/MdcGeom/MdcGeom/Constants.h:41
EntranceAngle
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:17
EntranceAngle::EntranceAngle
EntranceAngle()
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:50
EntranceAngle::_phi
double _phi
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:30
EntranceAngle::rad
double rad() const
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:58
EntranceAngle::~EntranceAngle
~EntranceAngle()
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:56
EntranceAngle::normalize
static double normalize(double)
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:40
EntranceAngle::deg
double deg() const
Definition:
InstallArea/include/MdcGeom/MdcGeom/EntranceAngle.h:61
source
InstallArea
include
MdcGeom
MdcGeom
EntranceAngle.h
Generated by
1.9.6