Logo ROOT   6.12/07
Reference Guide
RooExtendPdf.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooExtendPdf.h,v 1.12 2007/07/16 21:04:28 wouter Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_EXTEND_PDF
17 #define ROO_EXTEND_PDF
18 
19 #include "RooAbsPdf.h"
20 #include "RooRealProxy.h"
21 
22 class RooExtendPdf : public RooAbsPdf {
23 public:
24 
25  RooExtendPdf() ;
26  RooExtendPdf(const char *name, const char *title, const RooAbsPdf& pdf,
27  const RooAbsReal& norm, const char* rangeName=0) ;
28  RooExtendPdf(const RooExtendPdf& other, const char* name=0) ;
29  virtual TObject* clone(const char* newname) const { return new RooExtendPdf(*this,newname) ; }
30  virtual ~RooExtendPdf() ;
31 
32  Double_t evaluate() const { return _pdf ; }
33 
34  Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const { return kTRUE ; }
35  Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const {
36  // Forward determination of analytical integration capabilities to input p.d.f
37  return ((RooAbsPdf&)_pdf.arg()).getAnalyticalIntegralWN(allVars, analVars, normSet, rangeName) ;
38  }
39  Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const {
40  // Forward calculation of analytical integrals to input p.d.f
41  return ((RooAbsPdf&)_pdf.arg()).analyticalIntegralWN(code, normSet, rangeName) ;
42  }
43 
44  virtual Bool_t selfNormalized() const { return kTRUE ; }
45  virtual ExtendMode extendMode() const { return CanBeExtended ; }
46  virtual Double_t expectedEvents(const RooArgSet* nset) const ;
47  virtual Double_t expectedEvents(const RooArgSet& nset) const { return expectedEvents(&nset) ; }
48 
49 protected:
50 
51  RooRealProxy _pdf ; // Input p.d.f
52  RooRealProxy _n ; // Number of expected events
53  const TNamed* _rangeName ; // Name of subset range
54 
55 
56  ClassDef(RooExtendPdf,1) // Wrapper p.d.f adding an extended likelihood term to an existing p.d.f
57 };
58 
59 #endif
virtual ExtendMode extendMode() const
Definition: RooExtendPdf.h:45
virtual TObject * clone(const char *newname) const
Definition: RooExtendPdf.h:29
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
Definition: RooExtendPdf.h:35
virtual ~RooExtendPdf()
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t selfNormalized() const
Definition: RooExtendPdf.h:44
#define ClassDef(name, id)
Definition: Rtypes.h:320
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
const TNamed * _rangeName
Definition: RooExtendPdf.h:53
Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooExtendPdf.h:34
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
Double_t evaluate() const
Definition: RooExtendPdf.h:32
RooRealProxy _n
Definition: RooExtendPdf.h:52
RooRealProxy _pdf
Definition: RooExtendPdf.h:51
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
virtual Double_t expectedEvents(const RooArgSet &nset) const
Definition: RooExtendPdf.h:47
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
Definition: RooExtendPdf.h:39
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
const RooAbsReal & arg() const
Definition: RooRealProxy.h:43
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109