Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 std::vector<SamplePoint>
points{};
20 const double stepWidth = rtRel.
tBinWidth();
21 double time = rtRel.
tLower();
22 while (time <= rtRel.
tUpper()){
23 const double r = rtRel.
radius(time);
24 points.emplace_back(time,
r, relUnc);
30 std::vector<SamplePoint>
points{};
31 const double stepWidth = rtRel.
tBinWidth();
32 double time = rtRel.
tLower();
33 while (time <= rtRel.
tUpper()){
40 const double uncert) {
41 std::vector<SamplePoint> outPoints{};
42 outPoints.reserve(
points.size());
44 outPoints.emplace_back(point.x2(),point.error(), uncert);
49 const double uncert) {
50 std::vector<SamplePoint> outPoints{};
51 outPoints.reserve(
points.size());
53 outPoints.emplace_back(point.x1(),point.error(), uncert);
59 std::vector<SamplePoint>
swapCoordinates(
const std::vector<SamplePoint>& inPoints,
62 std::vector<SamplePoint> outPoints{};
63 outPoints.reserve(inPoints.size());
69 outPoints.emplace_back(in.x2(), in.x1(), in.error() / (fPrime > 0 ? fPrime : 1.));
72 return a.x1() <
b.x1();
76 std::vector<SamplePoint>
normalizeDomain(
const std::vector<SamplePoint>& dataPoints) {
77 const auto [minX, maxX] =
interval(dataPoints);
78 std::vector<SamplePoint> normedPoints{dataPoints};
79 for (
unsigned k = 0;
k < dataPoints.size(); ++
k) {
84 std::pair<double, double>
minMax(
const std::vector<SamplePoint>&
points) {
90 return std::make_pair(
min,
max);
98 return std::make_pair(
min,
max);
virtual double resolution(double t, double bgRate=0.0) const =0
returns resolution for a give time and background rate
std::vector< SamplePoint > normalizeDomain(const std::vector< SamplePoint > &dataPoints)
Normalizes the domain of the samples points to the interval -1 to 1.
std::vector< SamplePoint > fetchResolution(const std::vector< SamplePoint > &points, const double uncert)
Creates a new vector of sample points where the x2 is assigned to the uncertainty and the uncertainty...
double calculateChi2(const std::vector< SamplePoint > &dataPoints, const IRtRelation &rtRel)
Returns the chi2 of the rt-relation w.r.t.
std::pair< double, double > interval(const std::vector< SamplePoint > &points)
Returns the interval covered by the sample points.
std::pair< double, double > minMax(const std::vector< SamplePoint > &points)
Returns the minimum & maximum values covered by the sample points.
virtual std::optional< double > driftTime(const double r) const =0
Interface method for fetching the drift-time from the radius Returns a nullopt if the time is out of ...
virtual double maxRadius() const =0
Returns the maximum drift-radius.
double chi2(TH1 *h0, TH1 *h1)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
std::vector< SamplePoint > fetchDataPoints(const IRtRelation &rtRel, const double relUnc)
Constructs a list of sample points from the rt-relation.
virtual double radius(double t) const =0
returns drift radius for a given time
virtual double driftVelocity(double t) const =0
Returns the drift velocity for a given time.
Generic interface to retrieve the resolution on the drift radius as a function of the drift time.
virtual double tLower() const =0
Returns the lower time covered by the r-t.
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].
std::vector< SamplePoint > swapCoordinates(const std::vector< SamplePoint > &points, const IRtRelation &rtRel)
Creates a new vector of samples points with x1 exchanged by x2 and vice-versa.
virtual double tBinWidth() const =0
Returns the step-size for the sampling.
constexpr int pow(int base, int exp) noexcept
generic interface for a rt-relation
std::vector< SamplePoint > resoFromRadius(const std::vector< SamplePoint > &points, const double uncert)
Creates a new vector of sample points where the x2 coordinate becomes the x1 coordinate and the resol...