00001 /******************************************************************************* 00002 * Project: BaBar detector at the SLAC PEP-II B-factory 00003 * Package: EvtGenBase 00004 * File: $Id: EvtIntegPdf1D.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 // Analytically integrable one dimensional PDF. 00011 00012 #ifndef EVT_INTEG_PDF_1D_HH 00013 #define EVT_INTEG_PDF_1D_HH 00014 00015 #include "EvtGenBase/EvtPdf.hh" 00016 #include "EvtGenBase/EvtPoint1D.hh" 00017 00018 class EvtIntegPdf1D : public EvtPdf<EvtPoint1D> { 00019 00020 public: 00021 00022 EvtIntegPdf1D(double min, double max); 00023 EvtIntegPdf1D(const EvtIntegPdf1D&); 00024 virtual ~EvtIntegPdf1D(); 00025 00026 // Pdf integral function and its inverse to be defined in subclasses 00027 00028 virtual double pdfIntegral(double x) const = 0; 00029 virtual double pdfIntegralInverse(double x) const = 0; 00030 00031 virtual EvtValError compute_integral() const; 00032 virtual EvtPoint1D randomPoint(); 00033 00034 protected: 00035 00036 double _min; 00037 double _max; 00038 }; 00039 00040 00041 #endif 00042 00043