BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtIntervalFlatPdf.cc
Go to the documentation of this file.
1#include "EvtGenBase/EvtPatches.hh"
2/*******************************************************************************
3 * Project: BaBar detector at the SLAC PEP-II B-factory
4 * Package: EvtGenBase
5 * File: $Id: EvtIntervalFlatPdf.cc,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $
6 * Author: Alexei Dvoretskii, [email protected], 2001-2002
7 *
8 * Copyright (C) 2002 Caltech
9 *******************************************************************************/
10
11#include "EvtGenBase/EvtPatches.hh"
12#include <assert.h>
13#include "EvtGenBase/EvtIntervalFlatPdf.hh"
14#include "EvtGenBase/EvtRandom.hh"
15
17 : EvtPdf<EvtPoint1D>(), _min(min), _max(max)
18{
19 assert(max >= min);
20}
21
23 : EvtPdf<EvtPoint1D>(other), _min(other._min), _max(other._max)
24{}
25
27{}
28
30{
31 return new EvtIntervalFlatPdf(*this);
32}
33
34double EvtIntervalFlatPdf::pdf(const EvtPoint1D&) const
35{
36 return 1.;
37}
38
40{
41 return EvtValError(_max-_min,0.);
42}
43
45{
47}