This class contains the implementation of an r(t) relationship parameterized as support points to a cubic spline.
More...
#include <RtSpline.h>
|
| using | ParVec = std::vector<double> |
|
| | RtSpline (const ParVec &vec) |
| | initialization constructor,
|
| virtual | ~RtSpline () |
| std::string | name () const override final |
| | get the class name
|
| virtual double | radius (double t) const override final |
| | get the radius corresponding to the drift time t; 0 or 14.6 is returned if t is outside the range
|
| virtual double | driftVelocity (double t) const override final |
| | get the drift velocity
|
| virtual double | driftAcceleration (double t) const override final |
| | Returns the acceleration of the r-t relation.
|
| virtual double | tLower () const override final |
| | get the lower drift-time bound
|
| virtual double | tUpper () const override final |
| | get the upper drift-time bound
|
| virtual double | tBinWidth () const override final |
| | Returns the step-size for the sampling.
|
| virtual unsigned | nDoF () const override final |
| | Returns the number of degrees of freedom of the relation function.
|
| virtual std::string | typeName () const override final |
| double | GetTmaxDiff () const |
| | return the difference in total dirft time between the two multilayers (ML1 - ML2)
|
| bool | hasTmaxDiff () const |
| void | SetTmaxDiff (const double d) |
| | set the difference in total drift time betwene the two multilayers (ML1 - ML2)
|
| double | getReducedTime (const double t) const |
| | map the in the interval [tLower;tUpper] onto the interval [-1.;1.
|
| double | dReducedTimeDt () const |
| | CalibFunc (const ParVec &vec) |
| unsigned int | nPar () const |
| const ParVec & | parameters () const |
| double | par (unsigned int index) const |
This class contains the implementation of an r(t) relationship parameterized as support points to a cubic spline.
- Author
- Felix.nosp@m..Rau.nosp@m.scher.nosp@m.@cer.nosp@m.n.ch
- Date
- 07.08.2007
Definition at line 34 of file RtSpline.h.
◆ ParVec
◆ RtSpline()
| MuonCalib::RtSpline::RtSpline |
( |
const ParVec & | vec | ) |
|
|
explicit |
initialization constructor,
2 * (size of ParVec) = number of points
ParVec[ 2n] = x coordinate of n_th support point ParVec[1 + 2n] = y coordinate of n_th support point
Definition at line 20 of file RtSpline.cxx.
20 :
22
24 THROW_EXCEPTION(
"Not enough parameters!" << std::endl<<
"Minimum number of parameters is 6!");
25 }
26
27 if ((
nPar() % 2) != 0) {
29 }
30
31 std::vector<double>
x(
nPar() /2);
32 std::vector<double>
y(
nPar() /2);
33 for (
unsigned int i = 0;
i <
nPar() / 2;
i++) {
35 y[
i] =
par(2 * i + 1);
36 }
37 m_sp3 = std::make_unique<TSpline3>(
"Rt Relation",
x.data(),
y.data(),
nPar() / 2,
"b2e2", 0, 0);
38 }
std::vector< size_t > vec
double par(unsigned int index) const
unsigned int nPar() const
std::unique_ptr< TSpline3 > m_sp3
#define THROW_EXCEPTION(MESSAGE)
◆ ~RtSpline()
| MuonCalib::RtSpline::~RtSpline |
( |
| ) |
|
|
virtualdefault |
◆ CalibFunc()
| MuonCalib::CalibFunc::CalibFunc |
( |
const ParVec & | vec | ) |
|
|
inlineexplicitinherited |
◆ dReducedTimeDt()
| double MuonCalib::IRtRelation::dReducedTimeDt |
( |
| ) |
const |
|
inlineinherited |
Definition at line 53 of file IRtRelation.h.
53 {
55 }
virtual double tLower() const =0
Returns the lower time covered by the r-t.
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
double unitIntervalPrime(const double lowerEdge, const double upperEdge)
◆ driftAcceleration()
| double MuonCalib::RtSpline::driftAcceleration |
( |
double | t | ) |
const |
|
finaloverridevirtual |
Returns the acceleration of the r-t relation.
Implements MuonCalib::IRtRelation.
Definition at line 54 of file RtSpline.cxx.
54 {
55 constexpr double h = 1.e-7;
57 }
virtual double driftVelocity(double t) const override final
get the drift velocity
◆ driftVelocity()
| double MuonCalib::RtSpline::driftVelocity |
( |
double | t | ) |
const |
|
finaloverridevirtual |
◆ getReducedTime()
| double MuonCalib::IRtRelation::getReducedTime |
( |
const double | t | ) |
const |
|
inlineinherited |
map the in the interval [tLower;tUpper] onto the interval [-1.;1.
] where tLower is mapped to -1. & tUpper to 1.;
Definition at line 49 of file IRtRelation.h.
49 {
51 }
double mapToUnitInterval(const double x, const double lowerEdge, const double upperEdge)
Maps the number x which is in [lowEdge;upperEdge] to the interval [-1;1].
◆ GetTmaxDiff()
| double MuonCalib::IRtRelation::GetTmaxDiff |
( |
| ) |
const |
|
inlineinherited |
return the difference in total dirft time between the two multilayers (ML1 - ML2)
Definition at line 40 of file IRtRelation.h.
std::optional< double > m_tmax_diff
◆ hasTmaxDiff()
| bool MuonCalib::IRtRelation::hasTmaxDiff |
( |
| ) |
const |
|
inlineinherited |
◆ name()
| std::string MuonCalib::RtSpline::name |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ nDoF()
| unsigned MuonCalib::RtSpline::nDoF |
( |
| ) |
const |
|
finaloverridevirtual |
◆ nPar()
| unsigned int MuonCalib::CalibFunc::nPar |
( |
| ) |
const |
|
inlineinherited |
◆ par()
| double MuonCalib::CalibFunc::par |
( |
unsigned int | index | ) |
const |
|
inlineinherited |
◆ parameters()
| const ParVec & MuonCalib::CalibFunc::parameters |
( |
| ) |
const |
|
inlineinherited |
◆ radius()
| double MuonCalib::RtSpline::radius |
( |
double | t | ) |
const |
|
finaloverridevirtual |
get the radius corresponding to the drift time t; 0 or 14.6 is returned if t is outside the range
Implements MuonCalib::IRtRelation.
Definition at line 45 of file RtSpline.cxx.
45 {
46
48 if (t < m_sp3->GetXmin())
return m_sp3->Eval(
m_sp3->GetXmin());
50 return r >= 0 ?
r : 0;
51 }
◆ SetTmaxDiff()
| void MuonCalib::IRtRelation::SetTmaxDiff |
( |
const double | d | ) |
|
|
inlineinherited |
set the difference in total drift time betwene the two multilayers (ML1 - ML2)
Definition at line 45 of file IRtRelation.h.
◆ tBinWidth()
| double MuonCalib::RtSpline::tBinWidth |
( |
| ) |
const |
|
finaloverridevirtual |
◆ tLower()
| double MuonCalib::RtSpline::tLower |
( |
| ) |
const |
|
finaloverridevirtual |
◆ tUpper()
| double MuonCalib::RtSpline::tUpper |
( |
| ) |
const |
|
finaloverridevirtual |
◆ typeName()
| virtual std::string MuonCalib::IRtRelation::typeName |
( |
| ) |
const |
|
inlinefinaloverridevirtualinherited |
◆ m_parameters
| ParVec MuonCalib::CalibFunc::m_parameters {} |
|
privateinherited |
◆ m_sp3
| std::unique_ptr<TSpline3> MuonCalib::RtSpline::m_sp3 {} |
|
private |
◆ m_tmax_diff
| std::optional<double> MuonCalib::IRtRelation::m_tmax_diff {std::nullopt} |
|
privateinherited |
◆ s_tBinWidth
| double MuonCalib::IRtRelation::s_tBinWidth = 1.e-3 |
|
staticconstexprprotectedinherited |
The documentation for this class was generated from the following files: