yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis  1.9.0
Point3D.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // This file is part of YODA -- Yet more Objects for Data Analysis
4 // Copyright (C) 2008-2021 The YODA collaboration (see AUTHORS for details)
5 //
6 #ifndef YODA_POINT3D_H
7 #define YODA_POINT3D_H
8 
9 #include "YODA/Point.h"
10 #include "YODA/Exceptions.h"
11 #include "YODA/Utils/MathUtils.h"
12 #include <utility>
13 
14 namespace YODA {
15 
16 
18  class Point3D : public Point {
19  public:
20 
23 
24  // Default constructor
25  Point3D() { }
26 
27 
29  Point3D(double x, double y, double z, double ex=0.0, double ey=0.0, double ez=0.0, std::string source="")
30  : _x(x), _y(y), _z(z)
31  {
32  _ex = std::make_pair(ex, ex);
33  _ey = std::make_pair(ey, ey);
34  _ez[source] = std::make_pair(ez, ez);
35  }
36 
37 
39  Point3D(double x, double y, double z,
40  double exminus,
41  double explus,
42  double eyminus,
43  double eyplus,
44  double ezminus,
45  double ezplus, std::string source="")
46  : _x(x), _y(y), _z(z)
47  {
48  _ex = std::make_pair(exminus, explus);
49  _ey = std::make_pair(eyminus, eyplus);
50  _ez[source] = std::make_pair(ezminus, ezplus);
51  }
52 
54  Point3D(double x, double y, double z,
55  const std::pair<double,double>& ex,
56  const std::pair<double,double>& ey,
57  const std::pair<double,double>& ez, std::string source="")
58  : _x(x), _y(y), _z(z),
59  _ex(ex), _ey(ey)
60  {
61  _ez[source] = ez;
62  }
63 
64 
66  Point3D(const Point3D& p)
67  : _x(p._x), _y(p._y), _z(p._z),
68  _ex(p._ex), _ey(p._ey), _ez(p._ez)
69  {
70  this->setParent( p.getParent() );
71  }
72 
73 
76  _x = p._x;
77  _y = p._y;
78  _z = p._z;
79  _ex = p._ex;
80  _ey = p._ey;
81  _ez = p._ez;
82  this->setParent( p.getParent() );
83  return *this;
84  }
85 
86 
88 
89 
90  public:
91 
93  size_t dim() { return 3; }
94 
95 
98 
100  double x() const { return _x; }
101 
103  void setX(double x) { _x = x; }
104 
106  double y() const { return _y; }
107 
109  void setY(double y) { _y = y; }
110 
112  double z() const { return _z;}
113 
115  void setZ(double z) { _z = z;}
116 
118 
119  // /// Get x,y,z value tuple
120  // triple<double,double,double> xyz() const { return std::triple(_x, _y, _z); }
121 
123  void setXYZ(double x, double y, double z) { setX(x); setY(y); setZ(z); }
124 
125  // /// Set x and y values
126  // void setXY(triple<double,double,double> xyz) { setX(xy.first); setY(xy.second); setZ(xy.third); }
127 
129 
130 
133 
135  const std::pair<double,double>& xErrs() const {
136  return _ex;
137  }
138 
140  double xErrMinus() const {
141  return _ex.first;
142  }
143 
145  double xErrPlus() const {
146  return _ex.second;
147  }
148 
150  double xErrAvg() const {
151  return (_ex.first + _ex.second)/2.0;
152  }
153 
155  void setXErrMinus(double exminus) {
156  _ex.first = exminus;
157  }
158 
160  void setXErrPlus(double explus) {
161  _ex.second = explus;
162  }
163 
165  void setXErr(double ex) {
166  setXErrMinus(ex);
167  setXErrPlus(ex);
168  }
169 
171  void setXErrs(double ex) {
172  setXErr(ex);
173  }
174 
176  void setXErrs(double exminus, double explus) {
177  setXErrMinus(exminus);
178  setXErrPlus(explus);
179  }
180 
182  void setXErrs(const std::pair<double,double>& ex) {
183  _ex = ex;
184  }
185 
187  double xMin() const {
188  return _x - _ex.first;
189  }
190 
192  double xMax() const {
193  return _x + _ex.second;
194  }
195 
197 
198 
201 
203  const std::pair<double,double>& yErrs() const {
204  return _ey;
205  }
206 
208  double yErrMinus() const {
209  return _ey.first;
210  }
211 
213  double yErrPlus() const {
214  return _ey.second;
215  }
216 
218  double yErrAvg() const {
219  return (_ey.first + _ey.second)/2.0;
220  }
221 
223  void setYErrMinus(double eyminus) {
224  _ey.first = eyminus;
225  }
226 
228  void setYErrPlus(double eyplus) {
229  _ey.second = eyplus;
230  }
231 
233  void setYErr(double ey) {
234  setYErrMinus(ey);
235  setYErrPlus(ey);
236  }
237 
239  void setYErrs(double ey) {
240  setYErr(ey);
241  }
242 
244  void setYErrs(double eyminus, double eyplus) {
245  setYErrMinus(eyminus);
246  setYErrPlus(eyplus);
247  }
248 
250  void setYErrs(const std::pair<double,double>& ey) {
251  _ey = ey;
252  }
253 
255  double yMin() const {
256  return _y - _ey.first;
257  }
258 
260  double yMax() const {
261  return _y + _ey.second;
262  }
263 
265 
266 
269 
270 
272  const std::pair<double,double>& zErrs( std::string source="") const {
273  if (source!="") getVariationsFromParent();
274  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
275  return _ez.at(source);
276  }
277 
279  double zErrMinus( std::string source="") const {
280  if (source!="") getVariationsFromParent();
281  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
282  return _ez.at(source).first;
283  }
284 
286  double zErrPlus( std::string source="") const {
287  if (source!="") getVariationsFromParent();
288  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
289  return _ez.at(source).second;
290  }
291 
293  double zErrAvg( std::string source="") const {
294  if (source!="") getVariationsFromParent();
295  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
296  return (_ez.at(source).first + _ez.at(source).second)/2.0;
297  }
298 
300  void setZErrMinus(double ezminus, std::string source="") {
301  if (!_ez.count(source)) _ez[source] = std::make_pair(0.,0.);
302  _ez.at(source).first = ezminus;
303  }
304 
306  void setZErrPlus(double ezplus, std::string source="") {
307  if (!_ez.count(source)) _ez[source] = std::make_pair(0.,0.);
308  _ez.at(source).second = ezplus;
309  }
310 
312  void setZErr(double ez, std::string source="") {
313  setZErrMinus(ez, source);
314  setZErrPlus(ez, source);
315  }
316 
318  void setZErrs(double ez, std::string source="") {
319  setZErr(ez, source);
320  }
321 
323  void setZErrs(double ezminus, double ezplus, std::string source="") {
324  setZErrMinus(ezminus, source);
325  setZErrPlus(ezplus, source);
326  }
327 
329  void setZErrs(const std::pair<double,double>& ez, std::string source="") {
330  _ez[source] = ez;
331  }
332 
334  double zMin( std::string source="") const {
335  if (source!="") getVariationsFromParent();
336  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
337  return _z - _ez.at(source).first;
338  }
339 
341  double zMax( std::string source="") const {
342  if (source!="") getVariationsFromParent();
343  if (!_ez.count(source)) throw RangeError("zErrs has no such key: "+source);
344  return _z + _ez.at(source).second;
345  }
346 
348 
349 
352 
354  void setX(double x, double ex) {
355  setX(x);
356  setXErrs(ex);
357  }
358 
360  void setX(double x, double exminus, double explus) {
361  setX(x);
362  setXErrs(exminus, explus);
363  }
364 
366  void setX(double x, std::pair<double,double>& ex) {
367  setX(x);
368  setXErrs(ex);
369  }
370 
371 
373  void setY(double y, double ey) {
374  setY(y);
375  setYErrs(ey);
376  }
377 
379  void setY(double y, double eyminus, double eyplus) {
380  setY(y);
381  setYErrs(eyminus, eyplus);
382  }
383 
385  void setY(double y, std::pair<double,double>& ey) {
386  setY(y);
387  setYErrs(ey);
388  }
389 
390 
392  void setZ(double z, double ez, std::string source="") {
393  setZ(z);
394  setZErrs(ez, source);
395  }
396 
398  void setZ(double z, double ezminus, double ezplus, std::string source="") {
399  setZ(z);
400  setZErrs(ezminus, ezplus, source);
401  }
402 
404  void setZ(double z, std::pair<double,double>& ez, std::string source="") {
405  setZ(z);
406  setZErrs(ez, source);
407  }
408 
410 
411 
412  // @name Manipulations
414 
416  void scaleX(double scalex) {
417  setX(x()*scalex);
418  setXErrs(xErrMinus()*scalex, xErrPlus()*scalex);
419  }
420 
422  void scaleY(double scaley) {
423  setY(y()*scaley);
424  setYErrs(yErrMinus()*scaley, yErrPlus()*scaley);
425  }
426 
428  void scaleZ(double scalez) {
429  setZ(z()*scalez);
430  for (const auto &source : _ez){
431  setZErrs(zErrMinus()*scalez, zErrPlus()*scalez, source.first);
432  }
433  }
434 
436  void scaleXYZ(double scalex, double scaley, double scalez) {
437  scaleX(scalex);
438  scaleY(scaley);
439  scaleZ(scalez);
440  }
441 
443  void scale(size_t i, double scale) {
444  switch (i) {
445  case 1: scaleX(scale); break;
446  case 2: scaleY(scale); break;
447  case 3: scaleZ(scale); break;
448  default: throw RangeError("Invalid axis int, must be in range 1..dim");
449  }
450  }
451 
453 
454 
457 
459  double val(size_t i) const {
460  switch (i) {
461  case 1: return x();
462  case 2: return y();
463  case 3: return z();
464  default: throw RangeError("Invalid axis int, must be in range 1..dim");
465  }
466  }
468  void setVal(size_t i, double val) {
469  switch (i) {
470  case 1: setX(val); break;
471  case 2: setY(val); break;
472  case 3: setZ(val); break;
473  default: throw RangeError("Invalid axis int, must be in range 1..dim");
474  }
475  }
476 
478  const std::map< std::string, std::pair<double,double>> & errMap() const {
480  return _ez;
481  }
482 
483  // Parse the variations from the parent AO if it exists
484  void getVariationsFromParent() const;
485 
487  const std::pair<double,double>& errs(size_t i, std::string source="") const {
488  switch (i) {
489  case 1: return xErrs();
490  case 2: return yErrs();
491  case 3: return zErrs(source);
492  default: throw RangeError("Invalid axis int, must be in range 1..dim");
493  }
494  }
496  double errMinus(size_t i, std::string source="") const {
497  switch (i) {
498  case 1: return xErrMinus();
499  case 2: return yErrMinus();
500  case 3: return zErrMinus(source);
501  default: throw RangeError("Invalid axis int, must be in range 1..dim");
502  }
503  }
505  double errPlus(size_t i, std::string source="") const {
506  switch (i) {
507  case 1: return xErrPlus();
508  case 2: return yErrPlus();
509  case 3: return zErrPlus(source);
510  default: throw RangeError("Invalid axis int, must be in range 1..dim");
511  }
512  }
514  double errAvg(size_t i, std::string source="") const {
515  switch (i) {
516  case 1: return xErrAvg();
517  case 2: return yErrAvg();
518  case 3: return zErrAvg(source);
519  default: throw RangeError("Invalid axis int, must be in range 1..dim");
520  }
521  }
522 
524  void setErrMinus(size_t i, double eminus, std::string source="") {
525  switch (i) {
526  case 1: setXErrMinus(eminus); break;
527  case 2: setYErrMinus(eminus); break;
528  case 3: setZErrMinus(eminus, source); break;
529  default: throw RangeError("Invalid axis int, must be in range 1..dim");
530  }
531  }
533  void setErrPlus(size_t i, double eplus, std::string source="") {
534  switch (i) {
535  case 1: setXErrPlus(eplus); break;
536  case 2: setYErrPlus(eplus); break;
537  case 3: setZErrPlus(eplus, source); break;
538  default: throw RangeError("Invalid axis int, must be in range 1..dim");
539  }
540  }
541 
543  void setErr(size_t i, double e, std::string source="") {
544  switch (i) {
545  case 1: setXErrs(e); break;
546  case 2: setYErrs(e); break;
547  case 3: setZErrs(e, source); break;
548  default: throw RangeError("Invalid axis int, must be in range 1..dim");
549  }
550  }
552  void setErrs(size_t i, double eminus, double eplus, std::string source="") {
553  switch (i) {
554  case 1: setXErrs(eminus, eplus); break;
555  case 2: setYErrs(eminus, eplus); break;
556  case 3: setZErrs(eminus, eplus, source); break;
557  default: throw RangeError("Invalid axis int, must be in range 1..dim");
558  }
559  }
561  void setErrs(size_t i, std::pair<double,double>& e, std::string source="") {
562  switch (i) {
563  case 1: setXErrs(e); break;
564  case 2: setYErrs(e); break;
565  case 3: setZErrs(e, source); break;
566  default: throw RangeError("Invalid axis int, must be in range 1..dim");
567  }
568  }
569 
571  void set(size_t i, double val, double e, std::string source="") {
572  switch (i) {
573  case 1: setX(val, e); break;
574  case 2: setY(val, e); break;
575  case 3: setZ(val, e, source); break;
576  default: throw RangeError("Invalid axis int, must be in range 1..dim");
577  }
578  }
580  void set(size_t i, double val, double eminus, double eplus, std::string source="") {
581  switch (i) {
582  case 1: setX(val, eminus, eplus); break;
583  case 2: setY(val, eminus, eplus); break;
584  case 3: setZ(val, eminus, eplus, source); break;
585  default: throw RangeError("Invalid axis int, must be in range 1..dim");
586  }
587  }
589  void set(size_t i, double val, std::pair<double,double>& e, std::string source="") {
590  switch (i) {
591  case 1: setX(val, e); break;
592  case 2: setY(val, e); break;
593  case 3: setZ(val, e, source); break;
594  default: throw RangeError("Invalid axis int, must be in range 1..dim");
595  }
596  }
597 
599 
600 
601  protected:
602 
605 
606  double _x;
607  double _y;
608  double _z;
609  std::pair<double,double> _ex;
610  std::pair<double,double> _ey;
611  // a map of the errors for each source. Nominal stored under ""
612  // to ensure backward compatibility
613  std::map< std::string, std::pair<double,double> >_ez;
614 
616 
617  };
618 
619 
620 
623 
626  inline bool operator==(const Point3D& a, const YODA::Point3D& b) {
627  if (!YODA::fuzzyEquals(a.x(), b.x()) ||
629  !YODA::fuzzyEquals(a.xErrPlus(), b.xErrPlus()) ) return false;
630  if (!YODA::fuzzyEquals(a.y(), b.y()) ||
632  !YODA::fuzzyEquals(a.yErrPlus(), b.yErrPlus()) ) return false;
633  if (!YODA::fuzzyEquals(a.z(), b.z()) ||
635  !YODA::fuzzyEquals(a.zErrPlus(), b.zErrPlus()) ) return false;
636  return true;
637 
638 
639  const bool same_val = fuzzyEquals(a.x(), b.x()) && fuzzyEquals(a.y(), b.y());
640  const bool same_eminus = fuzzyEquals(a.xErrMinus(), b.xErrMinus()) &&
641  fuzzyEquals(a.yErrMinus(), b.yErrMinus());
642  const bool same_eplus = fuzzyEquals(a.xErrPlus(), b.xErrPlus()) &&
643  fuzzyEquals(a.yErrPlus(), b.yErrPlus());
644  return same_val && same_eminus && same_eplus;
645  }
646 
648  inline bool operator != (const Point3D& a, const YODA::Point3D& b) {
649  return !(a == b);
650  }
651 
653  inline bool operator < (const Point3D& a, const YODA::Point3D& b) {
654  if (! fuzzyEquals(a.x(), b.x())) {
655  return a.x() < b.x();
656  }
657  if (!fuzzyEquals(a.y(), b.y())) {
658  return a.y() < b.y();
659  }
660  if (! fuzzyEquals(a.xErrMinus(), b.xErrMinus())) {
661  return a.xErrMinus() < b.xErrMinus();
662  }
663  if (!fuzzyEquals(a.yErrMinus(), b.yErrMinus())) {
664  return a.yErrMinus() < b.yErrMinus();
665  }
666  if (! fuzzyEquals(a.xErrPlus(), b.xErrPlus())) {
667  return a.xErrPlus() < b.xErrPlus();
668  }
669  if (!fuzzyEquals(a.yErrPlus(), b.yErrPlus())) {
670  return a.yErrPlus() < b.yErrPlus();
671  }
672  return false;
673  }
674 
676  inline bool operator <= (const Point3D& a, const YODA::Point3D& b) {
677  if (a == b) return true;
678  return a < b;
679  }
680 
682  inline bool operator > (const Point3D& a, const YODA::Point3D& b) {
683  return !(a <= b);
684  }
685 
687  inline bool operator >= (const Point3D& a, const YODA::Point3D& b) {
688  return !(a < b);
689  }
690 
692 
693 
694 }
695 
696 #endif
Point3D & operator=(const Point3D &p)
Copy assignment.
Definition: Point3D.h:75
void setErrMinus(size_t i, double eminus, std::string source="")
Set negative error for direction i.
Definition: Point3D.h:524
void setXErrs(const std::pair< double, double > &ex)
Set asymmetric x error.
Definition: Point3D.h:182
void setY(double y, double eyminus, double eyplus)
Set y value and asymmetric error.
Definition: Point3D.h:379
double errPlus(size_t i, std::string source="") const
Get positive error value for direction i.
Definition: Point3D.h:505
void scaleY(double scaley)
Scaling of y axis.
Definition: Point3D.h:422
void setZErrs(const std::pair< double, double > &ez, std::string source="")
Set asymmetric z error.
Definition: Point3D.h:329
void setVal(size_t i, double val)
Set the point value for direction i.
Definition: Point3D.h:468
double zErrMinus(std::string source="") const
Get negative z-error value.
Definition: Point3D.h:279
double z() const
Get z value.
Definition: Point3D.h:112
void setYErrMinus(double eyminus)
Set negative y error.
Definition: Point3D.h:223
Base class for all Point*Ds, providing generic access to their numerical properties.
Definition: Point.h:16
void scale(size_t i, double scale)
Scaling along direction i.
Definition: Point3D.h:443
void setXYZ(double x, double y, double z)
Set x, y and z values.
Definition: Point3D.h:123
double xErrPlus() const
Get positive x-error value.
Definition: Point3D.h:145
void setYErrs(double eyminus, double eyplus)
Set asymmetric y error.
Definition: Point3D.h:244
void setZ(double z, double ez, std::string source="")
Set z value and symmetric error.
Definition: Point3D.h:392
double errAvg(size_t i, std::string source="") const
Get average error value for direction i.
Definition: Point3D.h:514
double xErrAvg() const
Get average x-error value.
Definition: Point3D.h:150
Error for e.g. use of invalid bin ranges.
Definition: Exceptions.h:34
bool fuzzyEquals(double a, double b, double tolerance=1E-5)
Compare two floating point numbers for equality with a degree of fuzziness.
Definition: MathUtils.h:73
double zErrAvg(std::string source="") const
Get average z-error value.
Definition: Point3D.h:293
Point3D(double x, double y, double z, const std::pair< double, double > &ex, const std::pair< double, double > &ey, const std::pair< double, double > &ez, std::string source="")
Constructor from asymmetric errors given as vectors.
Definition: Point3D.h:54
double yMax() const
Get value plus positive y-error.
Definition: Point3D.h:260
const std::pair< double, double > & errs(size_t i, std::string source="") const
Get error values for direction i.
Definition: Point3D.h:487
void setYErrs(double ey)
Set symmetric y error (alias)
Definition: Point3D.h:239
void scaleZ(double scalez)
Scaling of z axis.
Definition: Point3D.h:428
double y() const
Get y value.
Definition: Point3D.h:106
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point3D.cc:7
double val(size_t i) const
Get the point value for direction i.
Definition: Point3D.h:459
void setParent(Scatter *parent)
Definition: Point.h:114
bool operator<(const Bin1D< DBN > &a, const Bin1D< DBN > &b)
Bin1Ds are compared for axis sorting by lower edge position.
Definition: Bin1D.h:355
void setYErr(double ey)
Set symmetric y error.
Definition: Point3D.h:233
void setZErrMinus(double ezminus, std::string source="")
Set negative z error.
Definition: Point3D.h:300
void setZErrs(double ez, std::string source="")
Set symmetric z error (alias)
Definition: Point3D.h:318
size_t dim()
Space dimension of the point.
Definition: Point3D.h:93
const std::pair< double, double > & yErrs() const
Get y-error values.
Definition: Point3D.h:203
void setX(double x, double exminus, double explus)
Set x value and asymmetric error.
Definition: Point3D.h:360
bool operator>(const Error< N > &a, const Error< N > &b)
Greater-than operator used to sort errors.
Definition: ErrorND.h:206
A 3D data point to be contained in a Scatter3D.
Definition: Point3D.h:18
Point3D(double x, double y, double z, double exminus, double explus, double eyminus, double eyplus, double ezminus, double ezplus, std::string source="")
Constructor from values with explicit asymmetric errors.
Definition: Point3D.h:39
void setXErrPlus(double explus)
Set positive x error.
Definition: Point3D.h:160
void setY(double y, std::pair< double, double > &ey)
Set y value and asymmetric error.
Definition: Point3D.h:385
void setX(double x, double ex)
Set x value and symmetric error.
Definition: Point3D.h:354
void setY(double y, double ey)
Set y value and symmetric error.
Definition: Point3D.h:373
const std::pair< double, double > & xErrs() const
Get x-error values.
Definition: Point3D.h:135
double yErrMinus() const
Get negative y-error value.
Definition: Point3D.h:208
void setErrs(size_t i, std::pair< double, double > &e, std::string source="")
Set asymmetric error for direction i.
Definition: Point3D.h:561
void setErrs(size_t i, double eminus, double eplus, std::string source="")
Set asymmetric error for direction i.
Definition: Point3D.h:552
void setZErr(double ez, std::string source="")
Set symmetric z error.
Definition: Point3D.h:312
T * getParent() const
Definition: Point.h:119
double xMax() const
Get value plus positive x-error.
Definition: Point3D.h:192
void setErrPlus(size_t i, double eplus, std::string source="")
Set positive error for direction i.
Definition: Point3D.h:533
double zMax(std::string source="") const
Get value plus positive z-error.
Definition: Point3D.h:341
bool operator!=(const Error< N > &a, const Error< N > &b)
Inequality test.
Definition: ErrorND.h:180
void setErr(size_t i, double e, std::string source="")
Set symmetric error for direction i.
Definition: Point3D.h:543
void setYErrPlus(double eyplus)
Set positive y error.
Definition: Point3D.h:228
Point3D(const Point3D &p)
Copy constructor.
Definition: Point3D.h:66
double yMin() const
Get value minus negative y-error.
Definition: Point3D.h:255
void setZErrPlus(double ezplus, std::string source="")
Set positive z error.
Definition: Point3D.h:306
Point3D(double x, double y, double z, double ex=0.0, double ey=0.0, double ez=0.0, std::string source="")
Constructor from values with optional symmetric errors.
Definition: Point3D.h:29
const std::map< std::string, std::pair< double, double > > & errMap() const
Get error map for direction i.
Definition: Point3D.h:478
void setXErrs(double ex)
Set symmetric x error (alias)
Definition: Point3D.h:171
void setZ(double z, double ezminus, double ezplus, std::string source="")
Set z value and asymmetric error.
Definition: Point3D.h:398
bool operator>=(const Error< N > &a, const Error< N > &b)
Greater-than-or-equals operator used to sort errors.
Definition: ErrorND.h:212
void setX(double x, std::pair< double, double > &ex)
Set x value and asymmetric error.
Definition: Point3D.h:366
double xErrMinus() const
Get negative x-error value.
Definition: Point3D.h:140
void scaleXYZ(double scalex, double scaley, double scalez)
Scaling of all three axes.
Definition: Point3D.h:436
void setX(double x)
Set x value.
Definition: Point3D.h:103
void setZErrs(double ezminus, double ezplus, std::string source="")
Set asymmetric z error.
Definition: Point3D.h:323
double errMinus(size_t i, std::string source="") const
Get negative error value for direction i.
Definition: Point3D.h:496
void setZ(double z, std::pair< double, double > &ez, std::string source="")
Set z value and asymmetric error.
Definition: Point3D.h:404
void setY(double y)
Set y value.
Definition: Point3D.h:109
double yErrAvg() const
Get average y-error value.
Definition: Point3D.h:218
void setXErrMinus(double exminus)
Set negative x error.
Definition: Point3D.h:155
double zMin(std::string source="") const
Get value minus negative z-error.
Definition: Point3D.h:334
const std::pair< double, double > & zErrs(std::string source="") const
Get z-error values.
Definition: Point3D.h:272
void setYErrs(const std::pair< double, double > &ey)
Set asymmetric y error.
Definition: Point3D.h:250
void setXErr(double ex)
Set symmetric x error.
Definition: Point3D.h:165
void setZ(double z)
Set z value.
Definition: Point3D.h:115
double xMin() const
Get value minus negative x-error.
Definition: Point3D.h:187
double yErrPlus() const
Get positive y-error value.
Definition: Point3D.h:213
bool operator<=(const Error< N > &a, const Error< N > &b)
Less-than-or-equals operator used to sort errors.
Definition: ErrorND.h:199
double x() const
Get x value.
Definition: Point3D.h:100
void setXErrs(double exminus, double explus)
Set asymmetric x error.
Definition: Point3D.h:176
double zErrPlus(std::string source="") const
Get positive z-error value.
Definition: Point3D.h:286
void scaleX(double scalex)
Scaling of x axis.
Definition: Point3D.h:416
bool operator==(const Error< N > &a, const Error< N > &b)
Equality test.
Definition: ErrorND.h:169