EvtIntervalFlatPdf Class Reference

#include <EvtIntervalFlatPdf.hh>

Inheritance diagram for EvtIntervalFlatPdf:

EvtPdf< EvtPoint1D > List of all members.

Public Member Functions

 EvtIntervalFlatPdf (double min, double max)
 EvtIntervalFlatPdf (const EvtIntervalFlatPdf &other)
virtual ~EvtIntervalFlatPdf ()
virtual EvtPdf< EvtPoint1D > * clone () const
virtual EvtValError compute_integral () const
virtual EvtPoint1D randomPoint ()
double evaluate (const EvtPoint1D &p) const
EvtPdfMax< EvtPoint1DfindMax (const EvtPdf< EvtPoint1D > &pc, int N)
EvtValError findGenEff (const EvtPdf< EvtPoint1D > &pc, int N, int nFindMax)
void setItg (EvtValError itg)
EvtValError getItg () const
EvtValError getItg (int N) const
virtual EvtValError compute_integral (int N) const
EvtValError compute_mc_integral (const EvtPdf< EvtPoint1D > &pc, int N)
EvtPredGen< EvtPdfGen< EvtPoint1D >,
EvtPdfPred< EvtPoint1D > > 
accRejGen (const EvtPdf< EvtPoint1D > &pc, int nMax, double factor=1.)

Protected Member Functions

virtual double pdf (const EvtPoint1D &) const

Protected Attributes

double _min
double _max
EvtValError _itg

Detailed Description

Definition at line 21 of file EvtIntervalFlatPdf.hh.


Constructor & Destructor Documentation

EvtIntervalFlatPdf::EvtIntervalFlatPdf ( double  min,
double  max 
)

Definition at line 16 of file EvtIntervalFlatPdf.cc.

Referenced by clone().

00017   : EvtPdf<EvtPoint1D>(), _min(min), _max(max)
00018 {
00019   assert(max >= min);
00020 }

EvtIntervalFlatPdf::EvtIntervalFlatPdf ( const EvtIntervalFlatPdf other  ) 

Definition at line 22 of file EvtIntervalFlatPdf.cc.

00023   : EvtPdf<EvtPoint1D>(other), _min(other._min), _max(other._max)
00024 {}

EvtIntervalFlatPdf::~EvtIntervalFlatPdf (  )  [virtual]

Definition at line 26 of file EvtIntervalFlatPdf.cc.

00027 {}


Member Function Documentation

EvtPredGen<EvtPdfGen<EvtPoint1D >,EvtPdfPred<EvtPoint1D > > EvtPdf< EvtPoint1D >::accRejGen ( const EvtPdf< EvtPoint1D > &  pc,
int  nMax,
double  factor = 1. 
) [inherited]

EvtPdf< EvtPoint1D > * EvtIntervalFlatPdf::clone (  )  const [virtual]

Implements EvtPdf< EvtPoint1D >.

Definition at line 29 of file EvtIntervalFlatPdf.cc.

References EvtIntervalFlatPdf().

00030 {
00031   return new EvtIntervalFlatPdf(*this);
00032 }

virtual EvtValError EvtPdf< EvtPoint1D >::compute_integral ( int  N  )  const [inline, virtual, inherited]

Definition at line 95 of file EvtPdf.hh.

References EvtPdf< T >::compute_integral().

00095 { return compute_integral(); }

EvtValError EvtIntervalFlatPdf::compute_integral (  )  const [virtual]

Reimplemented from EvtPdf< EvtPoint1D >.

Definition at line 39 of file EvtIntervalFlatPdf.cc.

References _max, and _min.

00040 {
00041   return EvtValError(_max-_min,0.);
00042 }

EvtValError EvtPdf< EvtPoint1D >::compute_mc_integral ( const EvtPdf< EvtPoint1D > &  pc,
int  N 
) [inherited]

double EvtPdf< EvtPoint1D >::evaluate ( const EvtPoint1D p  )  const [inline, inherited]

Definition at line 65 of file EvtPdf.hh.

References EvtPdf< T >::pdf().

00065                                     { 
00066     if(p.isValid()) return pdf(p); 
00067     else return 0.;
00068   }

EvtValError EvtPdf< EvtPoint1D >::findGenEff ( const EvtPdf< EvtPoint1D > &  pc,
int  N,
int  nFindMax 
) [inherited]

EvtPdfMax<EvtPoint1D > EvtPdf< EvtPoint1D >::findMax ( const EvtPdf< EvtPoint1D > &  pc,
int  N 
) [inherited]

EvtValError EvtPdf< EvtPoint1D >::getItg ( int  N  )  const [inline, inherited]

Definition at line 87 of file EvtPdf.hh.

References EvtPdf< T >::_itg, EvtPdf< T >::compute_integral(), and EvtValError::valueKnown().

00087                                   {
00088     if(!_itg.valueKnown()) _itg = compute_integral(N);
00089     return _itg;
00090   }

EvtValError EvtPdf< EvtPoint1D >::getItg (  )  const [inline, inherited]

Definition at line 83 of file EvtPdf.hh.

References EvtPdf< T >::_itg, EvtPdf< T >::compute_integral(), and EvtValError::valueKnown().

00083                              {
00084     if(!_itg.valueKnown()) _itg = compute_integral();
00085     return _itg;
00086   }

double EvtIntervalFlatPdf::pdf ( const EvtPoint1D  )  const [protected, virtual]

Implements EvtPdf< EvtPoint1D >.

Definition at line 34 of file EvtIntervalFlatPdf.cc.

00035 {
00036   return 1.;
00037 }

EvtPoint1D EvtIntervalFlatPdf::randomPoint (  )  [virtual]

Reimplemented from EvtPdf< EvtPoint1D >.

Definition at line 44 of file EvtIntervalFlatPdf.cc.

References _max, _min, and EvtRandom::Flat().

00045 {
00046   return EvtPoint1D(_min,_max,EvtRandom::Flat(_min,_max));
00047 }

void EvtPdf< EvtPoint1D >::setItg ( EvtValError  itg  )  [inline, inherited]

Definition at line 81 of file EvtPdf.hh.

References EvtPdf< T >::_itg.

00081 {_itg = itg; }


Member Data Documentation

EvtValError EvtPdf< EvtPoint1D >::_itg [mutable, protected, inherited]

Definition at line 111 of file EvtPdf.hh.

double EvtIntervalFlatPdf::_max [protected]

Definition at line 37 of file EvtIntervalFlatPdf.hh.

Referenced by compute_integral(), and randomPoint().

double EvtIntervalFlatPdf::_min [protected]

Definition at line 36 of file EvtIntervalFlatPdf.hh.

Referenced by compute_integral(), and randomPoint().


Generated on Tue Nov 29 23:19:03 2016 for BOSS_7.0.2 by  doxygen 1.4.7