Logo ROOT  
Reference Guide
Go to the documentation of this file.
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
19#include "RooAbsPdf.h"
20#include "RooRealProxy.h"
22class RooExtendPdf : public RooAbsPdf {
25 RooExtendPdf() ;
26 RooExtendPdf(const char *name, const char *title, RooAbsPdf& pdf,
27 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() ;
32 Double_t evaluate() const { return _pdf ; }
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 _pdf->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 _pdf->analyticalIntegralWN(code, normSet, rangeName) ;
42 }
44 virtual Bool_t selfNormalized() const { return kTRUE ; }
45 virtual ExtendMode extendMode() const { return CanBeExtended ; }
46 virtual Double_t expectedEvents(const RooArgSet* nset) const ;
51 RooTemplateProxy<RooAbsReal> _n; // Number of expected events
52 const TNamed* _rangeName ; // Name of subset range
55 ClassDef(RooExtendPdf,2) // Wrapper p.d.f adding an extended likelihood term to an existing p.d.f
int Int_t
Definition: RtypesCore.h:45
bool Bool_t
Definition: RtypesCore.h:63
double Double_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDef(name, id)
Definition: Rtypes.h:325
char name[80]
Definition: TGX11.cxx:110
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
@ CanBeExtended
Definition: RooAbsPdf.h:257
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:35
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
Definition: RooExtendPdf.h:22
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooExtendPdf.h:32
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
Definition: RooExtendPdf.h:45
RooTemplateProxy< RooAbsPdf > _pdf
Definition: RooExtendPdf.h:50
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
const TNamed * _rangeName
Definition: RooExtendPdf.h:52
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
Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooExtendPdf.h:34
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return the number of expected events over the full range of all variables.
RooTemplateProxy< RooAbsReal > _n
Definition: RooExtendPdf.h:51
virtual Bool_t selfNormalized() const
Shows if a PDF is self-normalized, which means that no attempt is made to add a normalization term.
Definition: RooExtendPdf.h:44
virtual ~RooExtendPdf()
virtual TObject * clone(const char *newname) const
Definition: RooExtendPdf.h:29
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Mother of all ROOT objects.
Definition: TObject.h:37