00001 /******************************************************************************* 00002 * Project: BaBar detector at the SLAC PEP-II B-factory 00003 * Package: EvtGenBase 00004 * File: $Id: EvtPoint1D.hh,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $ 00005 * Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002 00006 * 00007 * Copyright (C) 2002 Caltech 00008 *******************************************************************************/ 00009 00010 // Point on a finite 1-D interval. isValid shows whether for a given specification, 00011 // the coordinate _value is inside the interval defined by _min, _max. 00012 00013 #ifndef EVT_POINT_1D_HH 00014 #define EVT_POINT_1D_HH 00015 00016 class EvtPoint1D { 00017 public: 00018 00019 EvtPoint1D(); 00020 EvtPoint1D(double value); 00021 EvtPoint1D(double min, double max, double value); 00022 ~EvtPoint1D(); 00023 00024 bool isValid() const 00025 { 00026 return _valid; 00027 } 00028 00029 double value() const 00030 { 00031 return _value; 00032 } 00033 00034 void print() const; 00035 00036 private: 00037 00038 double _min; // interval minimum 00039 double _max; // interval maximum 00040 double _value; 00041 bool _valid; // valid point inside the interval? 00042 00043 }; 00044 00045 #endif 00046