Logo ROOT  
Reference Guide
Go to the documentation of this file.
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 *****************************************************************************/
15#include "RooAbsPdf.h"
16#include "RooRealProxy.h"
17#include "RooAbsReal.h"
18#include "RooObjCacheManager.h"
19#include "RooSetProxy.h"
21class RooProjectedPdf : public RooAbsPdf {
25 RooProjectedPdf(const char *name, const char *title, RooAbsReal& _intpdf, const RooArgSet& intObs);
26 RooProjectedPdf(const RooProjectedPdf& other, const char* name=0) ;
27 virtual TObject* clone(const char* newname) const { return new RooProjectedPdf(*this,newname); }
28 inline virtual ~RooProjectedPdf() { }
30 // Analytical integration support
31 virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const ;
32 virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
33 virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const ;
35 virtual Double_t getValV(const RooArgSet* set=0) const ;
37 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
38 void initGenerator(Int_t /*code*/) {} ; // optional pre-generation initialization
39 void generateEvent(Int_t code);
41 virtual Bool_t selfNormalized() const { return kTRUE ; }
43 // Handle projection of projection explicitly
44 virtual RooAbsPdf* createProjection(const RooArgSet& iset) ;
46 void printMetaArgs(std::ostream& os) const ;
51 RooRealProxy intpdf ; // p.d.f that is integrated
52 RooSetProxy intobs ; // observables that p.d.f is integrated over
53 RooSetProxy deps ; // dependents of this p.d.f
56 public:
57 virtual ~CacheElem() { delete _projection ; } ;
58 // Payload
60 // Cache management functions
62 virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, Int_t) ;
63 } ;
64 mutable RooObjCacheManager _cacheMgr ; //! The cache manager
66 Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
68 mutable RooArgSet* _curNormSet ; //!
70 const RooAbsReal* getProjection(const RooArgSet* iset, const RooArgSet* nset, const char* rangeName, int& code) const ;
71 Double_t evaluate() const ;
75 ClassDef(RooProjectedPdf,1) // Operator p.d.f calculating projection of another p.d.f
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:71
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
virtual RooArgList containedArgs(Action)
Return RooAbsArg elements contained in projection cache element.
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Print contents of cache when printing self as part of object tree.
Class RooProjectedPdf is a RooAbsPdf implementation that represent a projection of a given input p....
void generateEvent(Int_t code)
No internal generator is implemented.
virtual TObject * clone(const char *newname) const
void printMetaArgs(std::ostream &os) const
Customized printing of arguments of a RooRealIntegral to more intuitively reflect the contents of the...
RooRealProxy intpdf
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
Force RooRealIntegral to relegate integration of all observables to internal logic.
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
No internal generator is implemented.
virtual Double_t getValV(const RooArgSet *set=0) const
Special version of getVal() overrides RooAbsReal::getValF() to save value of current normalization se...
RooObjCacheManager _cacheMgr
virtual ~RooProjectedPdf()
RooArgSet * _curNormSet
virtual Bool_t selfNormalized() const
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Return analytical integral represent by appropriate element of projection cache.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Mark all requested variables as internally integrated.
Double_t evaluate() const
Evaluate projected p.d.f.
Default constructor.
const RooAbsReal * getProjection(const RooArgSet *iset, const RooArgSet *nset, const char *rangeName, int &code) const
Retrieve object representing projection integral of input p.d.f over observables iset,...
void initGenerator(Int_t)
Interface for one-time initialization to setup the generator for the specified code.
Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t, Bool_t, Bool_t)
The cache manager.
RooSetProxy intobs
RooSetProxy deps
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Special version of RooAbsReal::createProjection that deals with projections of projections.
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
Mother of all ROOT objects.
Definition: TObject.h:37