Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Utility
ParabolicInterpolator.cxx
Go to the documentation of this file.
1
// ParabolicInterpolator.cxx
2
3
#include "
ParabolicInterpolator.h
"
4
#include "TF1.h"
5
6
//**********************************************************************
7
8
ParabolicInterpolator::
9
ParabolicInterpolator
(
const
Point
a_xy1,
const
Point
& a_xy2,
double
c
)
10
: m_xy1(a_xy1), m_xy2(a_xy2), m_a(0.0), m_b(0.0), m_c(c) {
11
double
dx =
xy2
().
x
-
xy1
().
x
;
12
if
( fabs(dx) < 1.
e
-20 )
return
;
13
m_a
=
xy2
().
y
/dx;
14
m_b
=
xy1
().
y
/dx;
15
}
16
17
//**********************************************************************
18
19
TF1*
ParabolicInterpolator::getTF1
(
Name
fnam,
double
x1
,
double
x2
)
const
{
20
const
Name
sfun =
"[2]*(x-[0]) + [3]*(x-[1]) + [4]*(x-[0])*(x-[1])"
;
21
TF1* pf =
new
TF1(fnam.c_str(), sfun.c_str(),
x1
,
x2
);
22
pf->SetParName(0,
"x1"
);
23
pf->SetParName(1,
"x2"
);
24
pf->SetParName(2,
"a"
);
25
pf->SetParName(3,
"b"
);
26
pf->SetParName(4,
"c"
);
27
pf->SetParameter(0,
xy1
().
x
);
28
pf->SetParameter(1,
xy2
().
x
);
29
pf->SetParameter(2,
a
());
30
pf->SetParameter(3,
b
());
31
pf->SetParameter(4,
c
());
32
return
pf;
33
}
34
35
//**********************************************************************
ParabolicInterpolator::m_a
double m_a
Definition:
ParabolicInterpolator.h:49
ParabolicInterpolator::m_b
double m_b
Definition:
ParabolicInterpolator.h:50
ParabolicInterpolator.h
ParabolicInterpolator::ParabolicInterpolator
ParabolicInterpolator(const Point xy1, const Point &xy2, double c)
Definition:
ParabolicInterpolator.cxx:9
ParabolicInterpolator::Point::x
double x
Definition:
ParabolicInterpolator.h:23
reco_momentum_tuples.x2
x2
Definition:
reco_momentum_tuples.py:83
ParabolicInterpolator::xy1
const Point & xy1() const
Definition:
ParabolicInterpolator.h:35
ParabolicInterpolator::a
double a() const
Definition:
ParabolicInterpolator.h:37
ParabolicInterpolator::Point
Definition:
ParabolicInterpolator.h:22
e
const double e
Definition:
gUpMuFluxGen.cxx:165
ParabolicInterpolator::getTF1
TF1 * getTF1(Name="parint", double x1=0.0, double x2=0.0) const
Definition:
ParabolicInterpolator.cxx:19
ValidateOpDetSimulation.c
dictionary c
Definition:
ValidateOpDetSimulation.py:57
ParabolicInterpolator::c
double c() const
Definition:
ParabolicInterpolator.h:39
ParabolicInterpolator::Name
std::string Name
Definition:
ParabolicInterpolator.h:29
ParabolicInterpolator::Point::y
double y
Definition:
ParabolicInterpolator.h:24
ParabolicInterpolator::xy2
const Point & xy2() const
Definition:
ParabolicInterpolator.h:36
ParabolicInterpolator::b
double b() const
Definition:
ParabolicInterpolator.h:38
train.x
list x
Definition:
train.py:276
reco_momentum_tuples.x1
x1
Definition:
reco_momentum_tuples.py:82
Generated by
1.8.11