Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoPixelVertexing
PixelTrackFitting
src
ParabolaFit.h
Go to the documentation of this file.
1
#ifndef ParabolaFit_H
2
#define ParabolaFit_H
3
4
#include <vector>
5
12
class
ParabolaFit
{
13
public
:
14
struct
Result
{
double
parA
,
parB
,
parC
;
15
double
varAA
,
varBB
,
varCC
,
varAB
,
varAC
,
varBC
; } ;
16
ParabolaFit
() :
17
doErr
(
true
),
hasFixedParC
(
false
),
hasValues
(
false
),
hasErrors
(
false
),
hasWeights
(
true
) { }
18
19
void
addPoint
(
double
x
,
double
y
);
20
void
addPoint
(
double
x
,
double
y
,
double
weight
);
21
22
void
skipErrorCalculationByDefault
() {
doErr
=
false
; }
23
void
fixParC
(
double
val) {
hasFixedParC
=
true
;
theResult
.
parC
= val; }
24
25
const
Result &
result
(
bool
doErrors)
const
;
26
27
double
parA
()
const
{
if
(!
hasValues
)
result
(
doErr
);
return
theResult
.
parA
; }
28
double
parB
()
const
{
if
(!
hasValues
)
result
(
doErr
);
return
theResult
.
parB
; }
29
double
parC
()
const
{
if
(!
hasValues
)
result
(
doErr
);
return
theResult
.
parC
; }
30
double
varAA
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varAA
; }
31
double
varBB
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varBB
; }
32
double
varCC
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varCC
; }
33
double
varAB
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varAB
; }
34
double
varAC
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varAC
; }
35
double
varBC
()
const
{
if
(!
hasErrors
)
result
(
true
);
return
theResult
.
varBC
; }
36
37
double
chi2
()
const
;
38
int
dof
()
const
;
39
40
private
:
41
struct
Column
{
double
r1
;
double
r2
;
double
r3
; };
42
double
det
(
const
Column
&
c1
,
const
Column
& c2,
const
Column
& c3)
const
;
43
double
det
(
const
Column
&
c1
,
const
Column
& c2)
const
;
44
45
double
fun
(
double
x
)
const
;
46
47
private
:
48
struct
Point
{
double
x
;
double
y
;
mutable
double
w
; };
49
mutable
std::vector<Point>
points
;
50
bool
doErr
,
hasFixedParC
;
51
mutable
bool
hasValues
,
hasErrors
;
52
bool
hasWeights
;
53
mutable
Result
theResult
;
54
};
55
56
#endif
ParabolaFit::parC
double parC() const
Definition:
ParabolaFit.h:29
ParabolaFit::dof
int dof() const
Definition:
ParabolaFit.cc:119
ParabolaFit::result
const Result & result(bool doErrors) const
Definition:
ParabolaFit.cc:20
ParabolaFit::hasValues
bool hasValues
Definition:
ParabolaFit.h:51
ParabolaFit::Point::x
double x
Definition:
ParabolaFit.h:48
ParabolaFit::varCC
double varCC() const
Definition:
ParabolaFit.h:32
ParabolaFit::hasFixedParC
bool hasFixedParC
Definition:
ParabolaFit.h:50
ParabolaFit::doErr
bool doErr
Definition:
ParabolaFit.h:50
ParabolaFit::Result::parC
double parC
Definition:
ParabolaFit.h:14
ParabolaFit::Point::w
double w
Definition:
ParabolaFit.h:48
funct::false
false
Definition:
Factorize.h:34
alignmentValidation.c1
tuple c1
do drawing
Definition:
alignmentValidation.py:1023
ParabolaFit::points
std::vector< Point > points
Definition:
ParabolaFit.h:49
ParabolaFit::Column
Definition:
ParabolaFit.h:41
ParabolaFit::Result::varAC
double varAC
Definition:
ParabolaFit.h:15
ParabolaFit::det
double det(const Column &c1, const Column &c2, const Column &c3) const
Definition:
ParabolaFit.cc:126
ParabolaFit::ParabolaFit
ParabolaFit()
Definition:
ParabolaFit.h:16
funct::true
true
Definition:
Factorize.h:183
ParabolaFit::varBB
double varBB() const
Definition:
ParabolaFit.h:31
ParabolaFit::skipErrorCalculationByDefault
void skipErrorCalculationByDefault()
Definition:
ParabolaFit.h:22
ParabolaFit::varBC
double varBC() const
Definition:
ParabolaFit.h:35
ParabolaFit::Result::varBB
double varBB
Definition:
ParabolaFit.h:15
ParabolaFit::hasErrors
bool hasErrors
Definition:
ParabolaFit.h:51
ParabolaFit::Point
Definition:
ParabolaFit.h:48
ParabolaFit::chi2
double chi2() const
Definition:
ParabolaFit.cc:104
ParabolaFit::addPoint
void addPoint(double x, double y)
Definition:
ParabolaFit.cc:6
ParabolaFit::Result::varBC
double varBC
Definition:
ParabolaFit.h:15
ParabolaFit
Definition:
ParabolaFit.h:12
ParabolaFit::fun
double fun(double x) const
Definition:
ParabolaFit.cc:114
ParabolaFit::varAC
double varAC() const
Definition:
ParabolaFit.h:34
ParabolaFit::Result
Definition:
ParabolaFit.h:14
ParabolaFit::Column::r1
double r1
Definition:
ParabolaFit.h:41
ParabolaFit::fixParC
void fixParC(double val)
Definition:
ParabolaFit.h:23
ParabolaFit::Point::y
double y
Definition:
ParabolaFit.h:48
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:15
ParabolaFit::Result::parB
double parB
Definition:
ParabolaFit.h:14
ParabolaFit::Result::varAB
double varAB
Definition:
ParabolaFit.h:15
ParabolaFit::Column::r3
double r3
Definition:
ParabolaFit.h:41
ParabolaFit::parB
double parB() const
Definition:
ParabolaFit.h:28
ParabolaFit::Result::varAA
double varAA
Definition:
ParabolaFit.h:15
ParabolaFit::Column::r2
double r2
Definition:
ParabolaFit.h:41
ParabolaFit::hasWeights
bool hasWeights
Definition:
ParabolaFit.h:52
ParabolaFit::parA
double parA() const
Definition:
ParabolaFit.h:27
ParabolaFit::varAB
double varAB() const
Definition:
ParabolaFit.h:33
x
Definition:
DDAxes.h:10
histoStyle.weight
int weight
Definition:
histoStyle.py:50
ParabolaFit::Result::varCC
double varCC
Definition:
ParabolaFit.h:15
ParabolaFit::varAA
double varAA() const
Definition:
ParabolaFit.h:30
ParabolaFit::theResult
Result theResult
Definition:
ParabolaFit.h:53
ParabolaFit::Result::parA
double parA
Definition:
ParabolaFit.h:14
Generated for CMSSW Reference Manual by
1.8.5