BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/mdcWrapAng.h
Go to the documentation of this file.
1
// mdcWrapAng.h
2
/* Handle wrap-around problems in phi: phi1 is the reference angle, and phi2
3
is adjusted, if necessary, so that it is close to phi1. The assumption is
4
that phi1 and phi2 are in fact supposed to be close to one another. */
5
6
#ifndef MDCWRAPANG_H
7
#define MDCWRAPANG_H
8
9
#include "MdcGeom/Constants.h"
10
static
const
double
& twpi =
Constants::twoPi
;
11
12
inline
double
mdcWrapAng
(
double
phi1
,
double
phi2
) {
13
14
double
diff;
15
16
diff =
phi2
-
phi1
;
17
if
( diff > 0.5 * twpi )
phi2
-= twpi;
18
else
if
( diff < -0.5 * twpi )
phi2
+= twpi;
19
20
return
phi2
;
21
}
22
#endif
phi2
Double_t phi2
Definition
DataBase/tau_mode.c:8
phi1
Double_t phi1
Definition
DataBase/tau_mode.c:8
mdcWrapAng
double mdcWrapAng(double phi1, double phi2)
Definition
Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/mdcWrapAng.h:12
Constants::twoPi
static const double twoPi
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcGeom/Constants.h:38
8.0.0
BOSS_Source
Reconstruction
MdcPatRec
MdcTrkRecon
include
MdcTrkRecon
mdcWrapAng.h
Generated by
1.16.1