StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtPoint1D.hh
1 /*******************************************************************************
2  * Project: BaBar detector at the SLAC PEP-II B-factory
3  * Package: EvtGenBase
4  * File: $Id: EvtPoint1D.hh,v 1.1 2016/09/23 18:37:32 jwebb Exp $
5  * Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
6  *
7  * Copyright (C) 2002 Caltech
8  *******************************************************************************/
9 
10 // Point on a finite 1-D interval. isValid shows whether for a given specification,
11 // the coordinate _value is inside the interval defined by _min, _max.
12 
13 #ifndef EVT_POINT_1D_HH
14 #define EVT_POINT_1D_HH
15 
16 class EvtPoint1D {
17 public:
18 
19  EvtPoint1D();
20  EvtPoint1D(double value);
21  EvtPoint1D(double min, double max, double value);
22  ~EvtPoint1D();
23 
24  bool isValid() const
25  {
26  return _valid;
27  }
28 
29  double value() const
30  {
31  return _value;
32  }
33 
34  void print() const;
35 
36 private:
37 
38  double _min; // interval minimum
39  double _max; // interval maximum
40  double _value;
41  bool _valid; // valid point inside the interval?
42 
43 };
44 
45 #endif
46