src
RecoTracker
MkFitCore
standalone
RntDumper
RntStructs.cc
Go to the documentation of this file.
1
#include "
RntStructs.h
"
2
3
#include <cstdio>
4
5
namespace
{
6
constexpr
bool
isFinite
(
float
x
) {
7
const
unsigned
int
mask
= 0x7f800000;
8
union
{
9
unsigned
int
l
;
10
float
d
;
11
}
v
= {.d =
x
};
12
return
(
v
.l &
mask
) !=
mask
;
13
}
14
15
// nan-guard, in place, return true if nan detected.
16
bool
ngr(
float
&
f
) {
17
bool
is_bad = !
isFinite
(
f
);
18
if
(is_bad)
19
f
= -999.0f;
20
return
is_bad;
21
}
22
bool
ngr(
RVec
&
v
) {
23
bool
is_bad = ngr(
v
.fX);
24
is_bad |= ngr(
v
.fY);
25
is_bad |= ngr(
v
.fZ);
26
return
is_bad;
27
}
28
bool
ngr(
State
&
s
) {
29
bool
is_bad = ngr(
s
.pos);
30
is_bad |= ngr(
s
.mom);
31
return
is_bad;
32
}
33
}
// namespace
34
35
bool
BinSearch::nan_check
() {
36
has_nans
= ngr(
phi
);
37
has_nans
|= ngr(
dphi
);
38
has_nans
|= ngr(
q
);
39
has_nans
|= ngr(
dq
);
40
return
has_nans
;
41
}
42
43
void
CandInfo::nan_check
() {
44
has_nans
= ngr(
ps_min
);
45
has_nans
|= ngr(
ps_max
);
46
has_nans
|=
bso
.
nan_check
();
47
has_nans
|=
bsn
.
nan_check
();
48
}
49
50
void
FailedPropInfo::nan_check
() {
51
has_nans
= ngr(
s_prev
);
52
has_nans
|= ngr(
s_final
);
53
}
BinSearch::dq
float dq
Definition:
RntStructs.h:62
CandInfo::ps_min
PropState ps_min
Definition:
RntStructs.h:77
BinSearch::phi
float phi
Definition:
RntStructs.h:62
CandInfo::has_nans
bool has_nans
Definition:
RntStructs.h:80
BinSearch::q
float q
Definition:
RntStructs.h:62
RVec
ROOT::Experimental::REveVector RVec
Definition:
RntStructs.h:22
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
FailedPropInfo::s_prev
State s_prev
Definition:
RntStructs.h:92
edm::isFinite
constexpr bool isFinite(T x)
gpuClustering::pixelStatus::mask
constexpr uint32_t mask
Definition:
gpuClustering.h:26
BinSearch::nan_check
bool nan_check()
Definition:
RntStructs.cc:35
FailedPropInfo::nan_check
void nan_check()
Definition:
RntStructs.cc:50
BinSearch::has_nans
bool has_nans
Definition:
RntStructs.h:66
CandInfo::ps_max
PropState ps_max
Definition:
RntStructs.h:77
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
CandInfo::bso
BinSearch bso
Definition:
RntStructs.h:78
ztail.d
d
Definition:
ztail.py:151
RntStructs.h
BinSearch::dphi
float dphi
Definition:
RntStructs.h:62
State
Definition:
RntStructs.h:33
x
float x
Definition:
beamSpotDipStandalone.cc:55
CandInfo::bsn
BinSearch bsn
Definition:
RntStructs.h:79
FailedPropInfo::s_final
State s_final
Definition:
RntStructs.h:93
CandInfo::nan_check
void nan_check()
Definition:
RntStructs.cc:43
MainPageGenerator.l
l
Definition:
MainPageGenerator.py:429
FailedPropInfo::has_nans
bool has_nans
Definition:
RntStructs.h:94
Generated for CMSSW Reference Manual by
1.8.14