TrackingTools
GeomPropagators
src
RealQuadEquation.h
Go to the documentation of this file.
1
#ifndef RealQuadEquation_H
2
#define RealQuadEquation_H
3
4
#include <cmath>
5
#include "
FWCore/Utilities/interface/Visibility.h
"
6
11
struct
dso_internal
RealQuadEquation
{
12
double
first
;
13
double
second
;
14
bool
hasSolution
;
15
16
RealQuadEquation
(
double
A
,
double
B
,
double
C
) {
17
double
D
=
B
*
B
- 4 *
A
*
C
;
18
if
(
D
< 0)
19
hasSolution =
false
;
20
else
{
21
hasSolution =
true
;
22
auto
q
= -0.5 * (
B
+ std::copysign(
std::sqrt
(
D
),
B
));
23
first
=
q
/
A
;
24
second
=
C
/
q
;
25
}
26
}
27
};
28
29
#endif
Visibility.h
RealQuadEquation::RealQuadEquation
RealQuadEquation(double A, double B, double C)
Definition:
RealQuadEquation.h:16
edm::second
U second(std::pair< T, U > const &p)
Definition:
ParameterSet.cc:222
RealQuadEquation::hasSolution
bool hasSolution
Definition:
RealQuadEquation.h:14
RealQuadEquation::second
double second
Definition:
RealQuadEquation.h:13
RealQuadEquation
Definition:
RealQuadEquation.h:11
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
first
auto first
Definition:
CAHitNtupletGeneratorKernelsImpl.h:125
dso_internal
#define dso_internal
Definition:
Visibility.h:13
A
submitPVResolutionJobs.q
q
Definition:
submitPVResolutionJobs.py:84
TtFullHadDaughter::B
static const std::string B
Definition:
TtFullHadronicEvent.h:9
MaterialEffects_cfi.A
A
Definition:
MaterialEffects_cfi.py:11
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition:
Factorize.h:141
gen::C
C
Definition:
PomwigHadronizer.cc:78
RealQuadEquation::first
double first
Definition:
RealQuadEquation.h:12
Generated for CMSSW Reference Manual by
1.8.16