ROOT  6.06/09
Reference Guide
RooNumCdf.cxx
Go to the documentation of this file.
1  /*****************************************************************************
2  * Project: RooFit *
3  * *
4  * Copyright (c) 2000-2005, Regents of the University of California *
5  * and Stanford University. All rights reserved. *
6  * *
7  * Redistribution and use in source and binary forms, *
8  * with or without modification, are permitted according to the terms *
9  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
10  *****************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////////
13 //
14 // BEGIN_HTML
15 // Class RooNumCdf is an implementation of RooNumRunningInt specialized
16 // to calculate cumulative distribution functions from p.d.f.s. The main
17 // difference between RooNumCdf and RooNumRunningInt is that this class
18 // imposes special end-point conditions on the interpolated histogram
19 // that represents the output so that the value at the lower bound is
20 // guaranteed to converge to exactly zero and that the value at the
21 // upper bound is guaranteed to converge to exactly one, at all interpolation
22 // orders.
23 // END_HTML
24 //
25 
26 #include "Riostream.h"
27 
28 #include "RooAbsPdf.h"
29 #include "RooNumCdf.h"
30 #include "RooAbsReal.h"
31 #include "RooMsgService.h"
32 #include "RooDataHist.h"
33 #include "RooHistPdf.h"
34 #include "RooRealVar.h"
35 
36 using namespace std;
37 
39  ;
40 
41 
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Construct a cumulative distribution function from given input p.d.f over observable x.
45 /// using a numeric sampling algorithm. Use binning named 'bname' to control sampling
46 /// granularity
47 
48 RooNumCdf::RooNumCdf(const char *name, const char *title, RooAbsPdf& _pdf, RooRealVar& _x, const char* bname) :
49  RooNumRunningInt(name,title,_pdf,_x,bname)
50  {
51  }
52 
53 
54 
55 ////////////////////////////////////////////////////////////////////////////////
56 /// Copy constructor
57 
58 RooNumCdf::RooNumCdf(const RooNumCdf& other, const char* name) :
59  RooNumRunningInt(other,name)
60  {
61  }
62 
63 
64 
65 ////////////////////////////////////////////////////////////////////////////////
66 /// Destructor
67 
69 {
70 }
71 
72 
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Fill cache using running integral cache elements calculate()
76 /// method with specification of cdf-specific boundary conditions
77 
79 {
80  RICacheElem& riCache = static_cast<RICacheElem&>(cache) ;
81  riCache.calculate(kTRUE) ;
82 }
83 
84 
virtual void fillCacheObject(FuncCacheElem &cacheFunc) const
Fill cache using running integral cache elements calculate() method with specification of cdf-specifi...
Definition: RooNumCdf.cxx:78
STL namespace.
virtual ~RooNumCdf()
Destructor.
Definition: RooNumCdf.cxx:68
void calculate(Bool_t cdfmode)
Calculate the numeric running integral and store the result in the cache histogram provided by RooAbs...
ClassImp(RooNumCdf)
#define name(a, b)
Definition: linkTestLib0.cpp:5
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooNumCdf(const char *name, const char *title, RooAbsPdf &_pdf, RooRealVar &_x, const char *binningName="cache")
Construct a cumulative distribution function from given input p.d.f over observable x...
Definition: RooNumCdf.cxx:48
const Bool_t kTRUE
Definition: Rtypes.h:91