 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 std::vector<SamplePoint>
points{};
22 const double stepWidth = rtRel.
tBinWidth();
32 std::vector<SamplePoint>
points{};
33 const double stepWidth = rtRel.
tBinWidth();
42 const double uncert) {
43 std::vector<SamplePoint> outPoints{};
44 outPoints.reserve(
points.size());
46 outPoints.emplace_back(point.x2(),point.error(), uncert);
51 const double uncert) {
52 std::vector<SamplePoint> outPoints{};
53 outPoints.reserve(
points.size());
55 outPoints.emplace_back(point.x1(),point.error(), uncert);
61 std::vector<SamplePoint>
swapCoordinates(
const std::vector<SamplePoint>& inPoints,
64 std::vector<SamplePoint> outPoints{};
65 outPoints.reserve(inPoints.size());
71 outPoints.emplace_back(in.x2(), in.x1(), in.error() / (fPrime > 0 ? fPrime : 1.));
74 return a.x1() <
b.x1();
78 std::vector<SamplePoint>
normalizeDomain(
const std::vector<SamplePoint>& dataPoints) {
79 const auto [minX, maxX] =
interval(dataPoints);
80 std::vector<SamplePoint> normedPoints{dataPoints};
81 for (
unsigned k = 0;
k < dataPoints.size(); ++
k) {
86 std::pair<double, double>
minMax(
const std::vector<SamplePoint>&
points) {
92 return std::make_pair(
min,
max);
100 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.
def time(flags, cells_name, *args, **kw)
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...