yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis  1.9.0
YODA::Point1D Class Reference

A 1D data point to be contained in a Scatter1D. More...

#include <Point1D.h>

Inheritance diagram for YODA::Point1D:
YODA::Point< N >

Public Member Functions

size_t dim ()
 Space dimension of the point. More...
 
Constructors
 Point1D ()
 
 Point1D (double x, double ex=0.0, std::string source="")
 Constructor from values with optional symmetric errors. More...
 
 Point1D (double x, double exminus, double explus, std::string source="")
 Constructor from values with explicit asymmetric errors. More...
 
 Point1D (double x, const std::pair< double, double > &ex, std::string source="")
 Constructor from values with asymmetric errors. More...
 
 Point1D (const Point1D &p)
 Copy constructor. More...
 
Point1Doperator= (const Point1D &p)
 Copy assignment. More...
 
Value accessors
double x () const
 Get x value. More...
 
void setX (double x)
 Set x value. More...
 
x error accessors
Todo:
Uniform "coords" accessor across all Scatters: returning fixed-size tuple?
const std::pair< double, double > & xErrs (std::string source="") const
 Get x-error values. More...
 
double xErrMinus (std::string source="") const
 Get negative x-error value. More...
 
double xErrPlus (std::string source="") const
 Get positive x-error value. More...
 
double xErrAvg (std::string source="") const
 Get average x-error value. More...
 
void setXErrMinus (double exminus, std::string source="")
 Set negative x error. More...
 
void setXErrPlus (double explus, std::string source="")
 Set positive x error. More...
 
void setXErr (double ex, std::string source="")
 Set symmetric x error. More...
 
void setXErrs (double ex, std::string source="")
 Set symmetric x error (alias) More...
 
void setXErrs (double exminus, double explus, std::string source="")
 Set asymmetric x error. More...
 
void setXErrs (const std::pair< double, double > &ex, std::string source="")
 Set asymmetric x error. More...
 
double xMin (std::string source="") const
 Get value minus negative x-error. More...
 
double xMax (std::string source="") const
 Get value plus positive x-error. More...
 
Combined x value and error setters
void setX (double x, double ex, std::string source="")
 Set x value and symmetric error. More...
 
void setX (double x, double exminus, double explus, std::string source="")
 Set x value and asymmetric error. More...
 
void setX (double x, std::pair< double, double > &ex, std::string source="")
 Set x value and asymmetric error. More...
 
void scaleX (double scalex)
 Scaling of x axis. More...
 
void scale (size_t i, double scale)
 Scaling along direction i. More...
 
Integer axis accessor equivalents
double val (size_t i) const
 Get the point value for direction i. More...
 
void setVal (size_t i, double val)
 Set the point value for direction i. More...
 
const std::map< std::string, std::pair< double, double > > & errMap () const
 Get error map for direction i. More...
 
void getVariationsFromParent () const
 Parse the variations annotation on the parent scatter. More...
 
const std::pair< double, double > & errs (size_t i, std::string source="") const
 Get error values for direction i. More...
 
double errMinus (size_t i, std::string source="") const
 Get negative error value for direction i. More...
 
double errPlus (size_t i, std::string source="") const
 Get positive error value for direction i. More...
 
double errAvg (size_t i, std::string source="") const
 Get average error value for direction i. More...
 
void setErrMinus (size_t i, double eminus, std::string source="")
 Set negative error for direction i. More...
 
void setErrPlus (size_t i, double eplus, std::string source="")
 Set positive error for direction i. More...
 
void setErr (size_t i, double e, std::string source="")
 Set symmetric error for direction i. More...
 
void setErrs (size_t i, double eminus, double eplus, std::string source="")
 Set asymmetric error for direction i. More...
 
void setErrs (size_t i, std::pair< double, double > &e, std::string source="")
 Set asymmetric error for direction i. More...
 
void set (size_t i, double val, double e, std::string source="")
 Set value and symmetric error for direction i. More...
 
void set (size_t i, double val, double eminus, double eplus, std::string source="")
 Set value and asymmetric error for direction i. More...
 
void set (size_t i, double val, std::pair< double, double > &e, std::string source="")
 Set value and asymmetric error for direction i. More...
 
- Public Member Functions inherited from YODA::Point< N >
virtual ~Point ()
 Virtual destructor for inheritance. More...
 
void setParent (Scatter *parent)
 
template<typename T = Scatter>
T * getParent () const
 
virtual void setErrs (size_t i, double e, std::string source="")
 Set symmetric error for direction i (alias) More...
 
 Point ()
 
 Point (const NdVal &pos)
 Constructor from position values without errors. More...
 
 Point (const NdVal &pos, const NdValPair &errs)
 Constructor from values with a single set of asymmetric errors. More...
 
 Point (const NdVal &pos, const Error< N > &err)
 Constructor from values and a single Error object. More...
 
 Point (const std::vector< double > &pos, const std::vector< Error< N > > &errs)
 Constructor from values and a collection of Error objects. More...
 
void clear ()
 Clear the point values and errors. More...
 
NdValpos ()
 Get the coordinate vector. More...
 
const NdValpos () const
 Get the coordinate vector (const version) More...
 
void setPos (const NdVal &pos)
 Set the coordinate vector. More...
 
Errorserrs ()
 Get error values. More...
 
const Errorserrs () const
 Get error values (const version) More...
 
void setErrs (const Errors &errs)
 Set the error values. More...
 
void scale (const NdVal &scales)
 Uniform scaling. More...
 

Additional Inherited Members

- Public Types inherited from YODA::Point< N >
typedef std::pair< double, double > ValuePair
 
typedef Utils::ndarray< double, N > NdVal
 
typedef Utils::ndarray< std::pair< double, double >, N > NdValPair
 
typedef Utils::sortedvector< Error< N > > Errors
 

Detailed Description

A 1D data point to be contained in a Scatter1D.

Definition at line 18 of file Point1D.h.

Constructor & Destructor Documentation

◆ Point1D() [1/5]

YODA::Point1D::Point1D ( )
inline

Definition at line 25 of file Point1D.h.

25 { }

◆ Point1D() [2/5]

YODA::Point1D::Point1D ( double  x,
double  ex = 0.0,
std::string  source = "" 
)
inline

Constructor from values with optional symmetric errors.

Definition at line 29 of file Point1D.h.

30  : _x(x)
31  {
32  _ex[source] = std::make_pair(ex, ex);
33  }
double x() const
Get x value.
Definition: Point1D.h:81

◆ Point1D() [3/5]

YODA::Point1D::Point1D ( double  x,
double  exminus,
double  explus,
std::string  source = "" 
)
inline

Constructor from values with explicit asymmetric errors.

Definition at line 37 of file Point1D.h.

38  : _x(x)
39  {
40  _ex[source] = std::make_pair(exminus, explus);
41  }
double x() const
Get x value.
Definition: Point1D.h:81

◆ Point1D() [4/5]

YODA::Point1D::Point1D ( double  x,
const std::pair< double, double > &  ex,
std::string  source = "" 
)
inline

Constructor from values with asymmetric errors.

Definition at line 45 of file Point1D.h.

46  : _x(x)
47  {
48  _ex[source] = ex;
49  }
double x() const
Get x value.
Definition: Point1D.h:81

◆ Point1D() [5/5]

YODA::Point1D::Point1D ( const Point1D p)
inline

Copy constructor.

Definition at line 53 of file Point1D.h.

References YODA::Point< N >::getParent(), and YODA::Point< N >::setParent().

54  : _x(p._x), _ex(p._ex)
55  {
56  this->setParent( p.getParent() );
57  }
void setParent(Scatter *parent)
Definition: Point.h:114

Member Function Documentation

◆ dim()

size_t YODA::Point1D::dim ( )
inlinevirtual

Space dimension of the point.

Implements YODA::Point< N >.

Definition at line 74 of file Point1D.h.

74 { return 1; }

◆ errAvg()

double YODA::Point1D::errAvg ( size_t  i,
std::string  source = "" 
) const
inlinevirtual

Get average error value for direction i.

Implements YODA::Point< N >.

Definition at line 259 of file Point1D.h.

References xErrAvg().

259  {
260  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
261  return xErrAvg(source);
262  }
double xErrAvg(std::string source="") const
Get average x-error value.
Definition: Point1D.h:116

◆ errMap()

const std::map< std::string, std::pair<double,double> >& YODA::Point1D::errMap ( ) const
inlinevirtual

Get error map for direction i.

Implements YODA::Point< N >.

Definition at line 234 of file Point1D.h.

References getVariationsFromParent().

Referenced by YODA::Scatter1D::variations().

234  {
236  return _ex;
237  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ errMinus()

double YODA::Point1D::errMinus ( size_t  i,
std::string  source = "" 
) const
inlinevirtual

Get negative error value for direction i.

Implements YODA::Point< N >.

Definition at line 249 of file Point1D.h.

References xErrMinus().

249  {
250  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
251  return xErrMinus(source);
252  }
double xErrMinus(std::string source="") const
Get negative x-error value.
Definition: Point1D.h:102

◆ errPlus()

double YODA::Point1D::errPlus ( size_t  i,
std::string  source = "" 
) const
inlinevirtual

Get positive error value for direction i.

Implements YODA::Point< N >.

Definition at line 254 of file Point1D.h.

References xErrPlus().

254  {
255  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
256  return xErrPlus(source);
257  }
double xErrPlus(std::string source="") const
Get positive x-error value.
Definition: Point1D.h:109

◆ errs()

const std::pair<double,double>& YODA::Point1D::errs ( size_t  i,
std::string  source = "" 
) const
inlinevirtual

Get error values for direction i.

Implements YODA::Point< N >.

Definition at line 244 of file Point1D.h.

References xErrs().

244  {
245  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
246  return xErrs(source);
247  }
const std::pair< double, double > & xErrs(std::string source="") const
Get x-error values.
Definition: Point1D.h:95

◆ getVariationsFromParent()

void YODA::Point1D::getVariationsFromParent ( ) const
virtual

Parse the variations annotation on the parent scatter.

Implements YODA::Point< N >.

Definition at line 7 of file Point1D.cc.

References YODA::Point< N >::getParent().

Referenced by errMap(), xErrAvg(), xErrMinus(), xErrPlus(), xErrs(), xMax(), and xMin().

7  {
8  if (this->getParent()) this->getParent<Scatter1D>()->parseVariations();
9  }
T * getParent() const
Definition: Point.h:119

◆ operator=()

Point1D& YODA::Point1D::operator= ( const Point1D p)
inline

Copy assignment.

Definition at line 61 of file Point1D.h.

References YODA::Point< N >::getParent(), and YODA::Point< N >::setParent().

61  {
62  _x = p._x;
63  _ex = p._ex;
64  this->setParent( p.getParent() );
65  return *this;
66  }
void setParent(Scatter *parent)
Definition: Point.h:114

◆ scale()

void YODA::Point1D::scale ( size_t  i,
double  scale 
)
inlinevirtual

Scaling along direction i.

Implements YODA::Point< N >.

Definition at line 209 of file Point1D.h.

References scaleX().

209  {
210  switch (i) {
211  case 1: scaleX(scale); break;
212  default: throw RangeError("Invalid axis int, must be in range 1..dim");
213  }
214  }
void scale(size_t i, double scale)
Scaling along direction i.
Definition: Point1D.h:209
void scaleX(double scalex)
Scaling of x axis.
Definition: Point1D.h:201

◆ scaleX()

void YODA::Point1D::scaleX ( double  scalex)
inline

Scaling of x axis.

Definition at line 201 of file Point1D.h.

References setX(), setXErrs(), x(), xErrMinus(), and xErrPlus().

Referenced by scale().

201  {
202  setX(x()*scalex);
203  for (const auto &source : _ex){
204  setXErrs(xErrMinus()*scalex, xErrPlus()*scalex, source.first);
205  }
206  }
double x() const
Get x value.
Definition: Point1D.h:81
double xErrMinus(std::string source="") const
Get negative x-error value.
Definition: Point1D.h:102
void setXErrs(double ex, std::string source="")
Set symmetric x error (alias)
Definition: Point1D.h:141
double xErrPlus(std::string source="") const
Get positive x-error value.
Definition: Point1D.h:109
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ set() [1/3]

void YODA::Point1D::set ( size_t  i,
double  val,
double  e,
std::string  source = "" 
)
inlinevirtual

Set value and symmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 292 of file Point1D.h.

References setX().

292  {
293  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
294  setX(val, e, source);
295  }
double val(size_t i) const
Get the point value for direction i.
Definition: Point1D.h:223
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ set() [2/3]

void YODA::Point1D::set ( size_t  i,
double  val,
double  eminus,
double  eplus,
std::string  source = "" 
)
inlinevirtual

Set value and asymmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 297 of file Point1D.h.

References setX().

297  {
298  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
299  setX(val, eminus, eplus, source);
300  }
double val(size_t i) const
Get the point value for direction i.
Definition: Point1D.h:223
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ set() [3/3]

void YODA::Point1D::set ( size_t  i,
double  val,
std::pair< double, double > &  e,
std::string  source = "" 
)
inlinevirtual

Set value and asymmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 302 of file Point1D.h.

References setX().

302  {
303  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
304  setX(val, e, source);
305  }
double val(size_t i) const
Get the point value for direction i.
Definition: Point1D.h:223
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ setErr()

void YODA::Point1D::setErr ( size_t  i,
double  e,
std::string  source = "" 
)
inlinevirtual

Set symmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 276 of file Point1D.h.

References setXErr().

276  {
277  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
278  setXErr(e, source);
279  }
void setXErr(double ex, std::string source="")
Set symmetric x error.
Definition: Point1D.h:135

◆ setErrMinus()

void YODA::Point1D::setErrMinus ( size_t  i,
double  eminus,
std::string  source = "" 
)
inlinevirtual

Set negative error for direction i.

Implements YODA::Point< N >.

Definition at line 265 of file Point1D.h.

References setXErrMinus().

265  {
266  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
267  setXErrMinus(eminus, source);
268  }
void setXErrMinus(double exminus, std::string source="")
Set negative x error.
Definition: Point1D.h:123

◆ setErrPlus()

void YODA::Point1D::setErrPlus ( size_t  i,
double  eplus,
std::string  source = "" 
)
inlinevirtual

Set positive error for direction i.

Implements YODA::Point< N >.

Definition at line 270 of file Point1D.h.

References setXErrPlus().

270  {
271  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
272  setXErrPlus(eplus, source);
273  }
void setXErrPlus(double explus, std::string source="")
Set positive x error.
Definition: Point1D.h:129

◆ setErrs() [1/2]

void YODA::Point1D::setErrs ( size_t  i,
double  eminus,
double  eplus,
std::string  source = "" 
)
inlinevirtual

Set asymmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 281 of file Point1D.h.

References setXErrs().

281  {
282  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
283  setXErrs(eminus, eplus, source);
284  }
void setXErrs(double ex, std::string source="")
Set symmetric x error (alias)
Definition: Point1D.h:141

◆ setErrs() [2/2]

void YODA::Point1D::setErrs ( size_t  i,
std::pair< double, double > &  e,
std::string  source = "" 
)
inlinevirtual

Set asymmetric error for direction i.

Implements YODA::Point< N >.

Definition at line 286 of file Point1D.h.

References setXErrs().

286  {
287  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
288  setXErrs(e, source);
289  }
void setXErrs(double ex, std::string source="")
Set symmetric x error (alias)
Definition: Point1D.h:141

◆ setVal()

void YODA::Point1D::setVal ( size_t  i,
double  val 
)
inlinevirtual

Set the point value for direction i.

Implements YODA::Point< N >.

Definition at line 228 of file Point1D.h.

References setX().

228  {
229  if (i != 1) throw RangeError("Invalid axis int, must be in range 1..dim");
230  setX(val);
231  }
double val(size_t i) const
Get the point value for direction i.
Definition: Point1D.h:223
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ setX() [1/4]

void YODA::Point1D::setX ( double  x)
inline

Set x value.

Definition at line 84 of file Point1D.h.

References x().

Referenced by YODA::efficiency(), scaleX(), set(), setVal(), setX(), and YODA::transformX().

84 { _x = x; }
double x() const
Get x value.
Definition: Point1D.h:81

◆ setX() [2/4]

void YODA::Point1D::setX ( double  x,
double  ex,
std::string  source = "" 
)
inline

Set x value and symmetric error.

Definition at line 177 of file Point1D.h.

References setX(), and setXErr().

177  {
178  setX(x);
179  setXErr(ex, source);
180  }
double x() const
Get x value.
Definition: Point1D.h:81
void setXErr(double ex, std::string source="")
Set symmetric x error.
Definition: Point1D.h:135
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ setX() [3/4]

void YODA::Point1D::setX ( double  x,
double  exminus,
double  explus,
std::string  source = "" 
)
inline

Set x value and asymmetric error.

Definition at line 183 of file Point1D.h.

References setX(), and setXErrs().

183  {
184  setX(x);
185  setXErrs(exminus, explus, source);
186  }
double x() const
Get x value.
Definition: Point1D.h:81
void setXErrs(double ex, std::string source="")
Set symmetric x error (alias)
Definition: Point1D.h:141
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ setX() [4/4]

void YODA::Point1D::setX ( double  x,
std::pair< double, double > &  ex,
std::string  source = "" 
)
inline

Set x value and asymmetric error.

Definition at line 189 of file Point1D.h.

References setX(), and setXErrs().

189  {
190  setX(x);
191  setXErrs(ex, source);
192  }
double x() const
Get x value.
Definition: Point1D.h:81
void setXErrs(double ex, std::string source="")
Set symmetric x error (alias)
Definition: Point1D.h:141
void setX(double x)
Set x value.
Definition: Point1D.h:84

◆ setXErr()

void YODA::Point1D::setXErr ( double  ex,
std::string  source = "" 
)
inline

Set symmetric x error.

Definition at line 135 of file Point1D.h.

References setXErrMinus(), and setXErrPlus().

Referenced by setErr(), setX(), and setXErrs().

135  {
136  setXErrMinus(ex, source);
137  setXErrPlus(ex, source);
138  }
void setXErrMinus(double exminus, std::string source="")
Set negative x error.
Definition: Point1D.h:123
void setXErrPlus(double explus, std::string source="")
Set positive x error.
Definition: Point1D.h:129

◆ setXErrMinus()

void YODA::Point1D::setXErrMinus ( double  exminus,
std::string  source = "" 
)
inline

Set negative x error.

Definition at line 123 of file Point1D.h.

Referenced by setErrMinus(), setXErr(), setXErrs(), and YODA::transformX().

123  {
124  if (!_ex.count(source)) _ex[source] = std::make_pair(0.,0.);
125  _ex.at(source).first = exminus;
126  }

◆ setXErrPlus()

void YODA::Point1D::setXErrPlus ( double  explus,
std::string  source = "" 
)
inline

Set positive x error.

Definition at line 129 of file Point1D.h.

Referenced by setErrPlus(), setXErr(), setXErrs(), and YODA::transformX().

129  {
130  if (!_ex.count(source)) _ex[source] = std::make_pair(0.,0.);
131  _ex.at(source).second = explus;
132  }

◆ setXErrs() [1/3]

void YODA::Point1D::setXErrs ( double  ex,
std::string  source = "" 
)
inline

Set symmetric x error (alias)

Definition at line 141 of file Point1D.h.

References setXErr().

Referenced by YODA::Scatter1D::parseVariations(), scaleX(), setErrs(), and setX().

141  {
142  setXErr(ex, source);
143  }
void setXErr(double ex, std::string source="")
Set symmetric x error.
Definition: Point1D.h:135

◆ setXErrs() [2/3]

void YODA::Point1D::setXErrs ( double  exminus,
double  explus,
std::string  source = "" 
)
inline

Set asymmetric x error.

Definition at line 146 of file Point1D.h.

References setXErrMinus(), and setXErrPlus().

146  {
147  setXErrMinus(exminus, source);
148  setXErrPlus(explus, source);
149  }
void setXErrMinus(double exminus, std::string source="")
Set negative x error.
Definition: Point1D.h:123
void setXErrPlus(double explus, std::string source="")
Set positive x error.
Definition: Point1D.h:129

◆ setXErrs() [3/3]

void YODA::Point1D::setXErrs ( const std::pair< double, double > &  ex,
std::string  source = "" 
)
inline

Set asymmetric x error.

Definition at line 152 of file Point1D.h.

152  {
153  _ex[source] = ex;
154  }

◆ val()

double YODA::Point1D::val ( size_t  i) const
inlinevirtual

Get the point value for direction i.

Implements YODA::Point< N >.

Definition at line 223 of file Point1D.h.

References x().

223  {
224  if (i == 0 || i > 1) throw RangeError("Invalid axis int, must be in range 1..dim");
225  return x();
226  }
double x() const
Get x value.
Definition: Point1D.h:81

◆ x()

double YODA::Point1D::x ( ) const
inline

Get x value.

Definition at line 81 of file Point1D.h.

Referenced by YODA::operator<(), YODA::operator==(), scaleX(), setX(), YODA::transformX(), and val().

81 { return _x; }

◆ xErrAvg()

double YODA::Point1D::xErrAvg ( std::string  source = "") const
inline

Get average x-error value.

Definition at line 116 of file Point1D.h.

References getVariationsFromParent().

Referenced by errAvg().

116  {
117  if (source!="") getVariationsFromParent();
118  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
119  return (_ex.at(source).first + _ex.at(source).second)/2.0;
120  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ xErrMinus()

double YODA::Point1D::xErrMinus ( std::string  source = "") const
inline

Get negative x-error value.

Definition at line 102 of file Point1D.h.

References getVariationsFromParent().

Referenced by errMinus(), YODA::operator<(), YODA::operator==(), and scaleX().

102  {
103  if (source!="") getVariationsFromParent();
104  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
105  return _ex.at(source).first;
106  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ xErrPlus()

double YODA::Point1D::xErrPlus ( std::string  source = "") const
inline

Get positive x-error value.

Definition at line 109 of file Point1D.h.

References getVariationsFromParent().

Referenced by errPlus(), YODA::operator<(), YODA::operator==(), and scaleX().

109  {
110  if (source!="") getVariationsFromParent();
111  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
112  return _ex.at(source).second;
113  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ xErrs()

const std::pair<double,double>& YODA::Point1D::xErrs ( std::string  source = "") const
inline

Get x-error values.

Definition at line 95 of file Point1D.h.

References getVariationsFromParent().

Referenced by errs().

95  {
96  if (source!="") getVariationsFromParent();
97  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
98  return _ex.at(source);
99  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ xMax()

double YODA::Point1D::xMax ( std::string  source = "") const
inline

Get value plus positive x-error.

Definition at line 164 of file Point1D.h.

References getVariationsFromParent().

Referenced by YODA::transformX().

164  {
165  if (source!="") getVariationsFromParent();
166  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
167  return _x + _ex.at(source).second;
168  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

◆ xMin()

double YODA::Point1D::xMin ( std::string  source = "") const
inline

Get value minus negative x-error.

Definition at line 157 of file Point1D.h.

References getVariationsFromParent().

Referenced by YODA::transformX().

157  {
158  if (source!="") getVariationsFromParent();
159  if (!_ex.count(source)) throw RangeError("xErrs has no such key: "+source);
160  return _x - _ex.at(source).first;
161  }
void getVariationsFromParent() const
Parse the variations annotation on the parent scatter.
Definition: Point1D.cc:7

The documentation for this class was generated from the following files: