#include <TrRelationLookUp.h>
|
| using | ParVec = std::vector<double> |
|
| | TrRelationLookUp (const IRtRelation &rtRelation) |
| virtual std::string | name () const override final |
| virtual std::optional< double > | driftTime (const double r) const override final |
| | Interface method for fetching the drift-time from the radius Returns a nullopt if the time is out of the boundaries.
|
| virtual std::optional< double > | driftTimePrime (const double r) const override final |
| virtual std::optional< double > | driftTime2Prime (const double r) const override final |
| virtual double | minRadius () const override final |
| | Returns the minimum drift-radius.
|
| virtual double | maxRadius () const override final |
| | Returns the maximum drift-radius.
|
| virtual unsigned | nDoF () const override final |
| | Returns the number of degrees of freedom of the tr relation.
|
| virtual std::string | typeName () const override final |
| double | getReducedR (const double r) const |
| | Maps the radius interval [minRadius;maxRadius] to [-1;1] where the minimal radius is on the lower end.
|
| double | getReducedRPrime () const |
| | Returns the derivative of the reduced radisu w.r.t r.
|
| unsigned int | nPar () const |
| const ParVec & | parameters () const |
| double | par (unsigned int index) const |
Definition at line 14 of file TrRelationLookUp.h.
◆ ParVec
◆ TrRelationLookUp()
| MuonCalib::TrRelationLookUp::TrRelationLookUp |
( |
const IRtRelation & | rtRelation | ) |
|
Definition at line 14 of file TrRelationLookUp.cxx.
15
16 constexpr std::size_t numPoints(100);
17 double stepSize{rtRelation.radius(rtRelation.tUpper()) / (numPoints - 1)};
20
21 for(std::size_t i = 0;
i < numPoints; ++
i){
24 }
27 }
std::vector< double > ParVec
ITrRelation(const ParVec ¶meters)
Constructor taking the input r-t relation & the vector of parameters.
std::vector< double > m_radii
double getTFromR(const double radius, const IRtRelation &rtRelation) const
std::vector< double > m_times
◆ driftTime()
| std::optional< double > MuonCalib::TrRelationLookUp::driftTime |
( |
const double | r | ) |
const |
|
finaloverridevirtual |
Interface method for fetching the drift-time from the radius Returns a nullopt if the time is out of the boundaries.
Implements MuonCalib::ITrRelation.
Definition at line 31 of file TrRelationLookUp.cxx.
31 {
34
36
37 std::size_t
idx = std::distance(
m_radii.begin(), it) - 1;
43 return time1 + (time2 - time1) * (
r - radius1) / (radius2 - radius1);
44 }
virtual double minRadius() const override final
Returns the minimum drift-radius.
virtual double maxRadius() const override final
Returns the maximum drift-radius.
◆ driftTime2Prime()
| std::optional< double > MuonCalib::TrRelationLookUp::driftTime2Prime |
( |
const double | r | ) |
const |
|
finaloverridevirtual |
◆ driftTimePrime()
| std::optional< double > MuonCalib::TrRelationLookUp::driftTimePrime |
( |
const double | r | ) |
const |
|
finaloverridevirtual |
◆ getReducedR()
| double MuonCalib::ITrRelation::getReducedR |
( |
const double | r | ) |
const |
|
inlineinherited |
Maps the radius interval [minRadius;maxRadius] to [-1;1] where the minimal radius is on the lower end.
Definition at line 42 of file ITrRelation.h.
42 {
44 }
virtual double maxRadius() const =0
Returns the maximum drift-radius.
virtual double minRadius() const =0
Returns the minimum drift-radius.
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].
◆ getReducedRPrime()
| double MuonCalib::ITrRelation::getReducedRPrime |
( |
| ) |
const |
|
inlineinherited |
Returns the derivative of the reduced radisu w.r.t r.
Definition at line 46 of file ITrRelation.h.
46 {
48 }
double unitIntervalPrime(const double lowerEdge, const double upperEdge)
◆ getTFromR()
| double MuonCalib::TrRelationLookUp::getTFromR |
( |
const double | radius, |
|
|
const IRtRelation & | rtRelation ) const |
|
private |
Definition at line 67 of file TrRelationLookUp.cxx.
67 {
68 double precision{0.001};
69 double tMax{rtRelation.tUpper()};
70 double tMin{rtRelation.tLower()};
71
72
73 while (tMax - tMin > 0.1 and std::abs(rtRelation.radius(0.5 * (tMin + tMax)) - radius) > precision) {
74 double midPoint = 0.5 * (tMin + tMax);
75 if (rtRelation.radius(midPoint) > radius) {
76 tMax = midPoint;
77 } else {
78 tMin = midPoint;
79 }
80 }
81 return 0.5 * (tMin + tMax);
82 }
◆ maxRadius()
| double MuonCalib::TrRelationLookUp::maxRadius |
( |
| ) |
const |
|
finaloverridevirtual |
◆ minRadius()
| double MuonCalib::TrRelationLookUp::minRadius |
( |
| ) |
const |
|
finaloverridevirtual |
◆ name()
| std::string MuonCalib::TrRelationLookUp::name |
( |
| ) |
const |
|
finaloverridevirtual |
◆ nDoF()
| unsigned MuonCalib::TrRelationLookUp::nDoF |
( |
| ) |
const |
|
finaloverridevirtual |
◆ nPar()
| unsigned int MuonCalib::CalibFunc::nPar |
( |
| ) |
const |
|
inlineinherited |
◆ par()
| double MuonCalib::CalibFunc::par |
( |
unsigned int | index | ) |
const |
|
inlineinherited |
Definition at line 41 of file CalibFunc.h.
41 {
43 }
unsigned int nPar() const
◆ parameters()
| const ParVec & MuonCalib::CalibFunc::parameters |
( |
| ) |
const |
|
inlineinherited |
◆ typeName()
| virtual std::string MuonCalib::ITrRelation::typeName |
( |
| ) |
const |
|
inlinefinaloverridevirtualinherited |
◆ m_maxRadius
| double MuonCalib::TrRelationLookUp::m_maxRadius {} |
|
private |
◆ m_minRadius
| double MuonCalib::TrRelationLookUp::m_minRadius {} |
|
private |
◆ m_parameters
| ParVec MuonCalib::CalibFunc::m_parameters {} |
|
privateinherited |
◆ m_radii
| std::vector<double> MuonCalib::TrRelationLookUp::m_radii {} |
|
private |
◆ m_times
| std::vector<double> MuonCalib::TrRelationLookUp::m_times {} |
|
private |
The documentation for this class was generated from the following files: