Logo ROOT  
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 \file RooNumCdf.cxx
14 \class RooNumCdf
15 \ingroup Roofitcore
16 
17 Class RooNumCdf is an implementation of RooNumRunningInt specialized
18 to calculate cumulative distribution functions from p.d.f.s. The main
19 difference between RooNumCdf and RooNumRunningInt is that this class
20 imposes special end-point conditions on the interpolated histogram
21 that represents the output so that the value at the lower bound is
22 guaranteed to converge to exactly zero and that the value at the
23 upper bound is guaranteed to converge to exactly one, at all interpolation
24 orders.
25 **/
26 
27 #include "Riostream.h"
28 
29 #include "RooAbsPdf.h"
30 #include "RooNumCdf.h"
31 #include "RooAbsReal.h"
32 #include "RooMsgService.h"
33 #include "RooDataHist.h"
34 #include "RooHistPdf.h"
35 #include "RooRealVar.h"
36 
37 using namespace std;
38 
40  ;
41 
42 
43 
44 ////////////////////////////////////////////////////////////////////////////////
45 /// Construct a cumulative distribution function from given input p.d.f over observable x.
46 /// using a numeric sampling algorithm. Use binning named 'bname' to control sampling
47 /// granularity
48 
49 RooNumCdf::RooNumCdf(const char *name, const char *title, RooAbsPdf& _pdf, RooRealVar& _x, const char* bname) :
50  RooNumRunningInt(name,title,_pdf,_x,bname)
51  {
52  }
53 
54 
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Copy constructor
58 
59 RooNumCdf::RooNumCdf(const RooNumCdf& other, const char* name) :
60  RooNumRunningInt(other,name)
61  {
62  }
63 
64 
65 
66 ////////////////////////////////////////////////////////////////////////////////
67 /// Destructor
68 
70 {
71 }
72 
73 
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// Fill cache using running integral cache elements calculate()
77 /// method with specification of cdf-specific boundary conditions
78 
80 {
81  RICacheElem& riCache = static_cast<RICacheElem&>(cache) ;
82  riCache.calculate(kTRUE) ;
83 }
84 
85 
RooNumRunningInt::RICacheElem::calculate
void calculate(Bool_t cdfmode)
Calculate the numeric running integral and store the result in the cache histogram provided by RooAbs...
Definition: RooNumRunningInt.cxx:150
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooAbsReal.h
RooMsgService.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
RooNumCdf
Class RooNumCdf is an implementation of RooNumRunningInt specialized to calculate cumulative distribu...
Definition: RooNumCdf.h:17
RooNumCdf.h
RooAbsPdf.h
RooDataHist.h
RooNumRunningInt::RICacheElem
Definition: RooNumRunningInt.h:29
RooRealVar.h
RooNumRunningInt
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral.
Definition: RooNumRunningInt.h:20
RooHistPdf.h
name
char name[80]
Definition: TGX11.cxx:110
RooNumCdf::~RooNumCdf
virtual ~RooNumCdf()
Destructor.
Definition: RooNumCdf.cxx:69
RooNumCdf::RooNumCdf
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:49
RooNumCdf::fillCacheObject
virtual void fillCacheObject(FuncCacheElem &cacheFunc) const
Fill cache using running integral cache elements calculate() method with specification of cdf-specifi...
Definition: RooNumCdf.cxx:79
RooAbsPdf
Definition: RooAbsPdf.h:41
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
Riostream.h
RooAbsCachedReal::FuncCacheElem
Definition: RooAbsCachedReal.h:59