library: libRooFit
#include "RooProdPdf.h"

RooProdPdf


class description - header file - source file - inheritance tree (.pdf)

class RooProdPdf : public RooAbsPdf

Inheritance Chart:
TObject
<-
TNamed
RooPrintable
<-
RooAbsArg
<-
RooAbsReal
<-
RooAbsPdf
<-
RooProdPdf

    protected:
Double_t calculate(const RooArgList* partIntList, const RooLinkedList* normSetList) const void clearCache() void factorizeProduct(const RooArgSet& normSet, const RooArgSet& intSet, RooLinkedList& termList, RooLinkedList& normList, RooLinkedList& impDepList, RooLinkedList& crossDepList, RooLinkedList& intList) const RooArgSet* findPdfNSet(RooAbsPdf& pdf) const virtual RooAbsGenContext* genContext(const RooArgSet& vars, const RooDataSet* prototype = 0, const RooArgSet* auxProto = 0, Bool_t verbose = kFALSE) const void getPartIntList(const RooArgSet* nset, const RooArgSet* iset, RooArgList*& partList, RooLinkedList*& nsetList, Int_t& code, const char* isetRangeName = "0") const void groupProductTerms(RooLinkedList& groupedTerms, RooArgSet& outerIntDeps, const RooLinkedList& terms, const RooLinkedList& norms, const RooLinkedList& imps, const RooLinkedList& ints, const RooLinkedList& cross) const void initializeFromCmdArgList(const RooArgSet& fullPdfSet, const RooLinkedList& l) const char* makeRGPPName(const char* pfx, const RooArgSet& term, const RooArgSet& iset, const RooArgSet& nset, const char* isetRangeName) const virtual void operModeHook() virtual void printCompactTreeHook(ostream& os, const char* indent = "") RooAbsReal* processProductTerm(const RooArgSet* nset, const RooArgSet* iset, const char* isetRangeName, const RooArgSet* term, const RooArgSet& termNSet, const RooArgSet& termISet, Bool_t& isOwned, Bool_t forceWrap = kFALSE) const virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) void useDefaultGen(Bool_t flag = kTRUE) public:
RooProdPdf(const char* name, const char* title, Double_t cutOff = 0) RooProdPdf(const char* name, const char* title, RooAbsPdf& pdf1, RooAbsPdf& pdf2, Double_t cutOff = 0) RooProdPdf(const char* name, const char* title, const RooArgList& pdfList, Double_t cutOff = 0) RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet, const RooLinkedList& cmdArgList) RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet, const RooCmdArg& arg1, const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg()) RooProdPdf(const RooProdPdf& other, const char* name = "0") virtual ~RooProdPdf() virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName = "0") const virtual Bool_t checkObservables(const RooArgSet* nset) const static TClass* Class() virtual TObject* clone(const char* newname) const virtual Double_t evaluate() const virtual Double_t expectedEvents(const RooArgSet* nset) const virtual Double_t expectedEvents(const RooArgSet& nset) const virtual RooAbsPdf::ExtendMode extendMode() const virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const virtual void generateEvent(Int_t code) virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName = "0") const virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet& generateVars, Bool_t staticInitOK = kTRUE) const virtual Double_t getVal(const RooArgSet* set = 0) const virtual void initGenerator(Int_t code) virtual TClass* IsA() const virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const const RooArgList& pdfList() const virtual Bool_t selfNormalized() const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
RooNormListManager _partListMgr Partial integral list manager RooNormListManager _partOwnedListMgr Partial integral list manager for owned components RooLinkedList _partNormListCache[10] Cache of normalization lists RooAICRegistry _genCode Registry of composite direct generator codes RooArgSet* _curNormSet ! Double_t _cutOff Cutoff parameter for running product RooListProxy _pdfList List of PDF components RooLinkedList _pdfNSetList List of PDF component normalization sets TIterator* _pdfIter ! Iterator of PDF list Int_t _extendedIndex Index of extended PDF (if any) Bool_t _useDefaultGen Use default or distributed event generator

Class Description

RooProdPdf(const char *name, const char *title, Double_t cutOff)
 Dummy constructor
RooProdPdf(const char *name, const char *title, RooAbsPdf& pdf1, RooAbsPdf& pdf2, Double_t cutOff)
 Constructor with 2 PDFs (most frequent use case).

 The optional cutOff parameter can be used as a speed optimization if
 one or more of the PDF have sizable regions with very small values,
 which would pull the entire product of PDFs to zero in those regions.

 After each PDF multiplication, the running product is compared with
 the cutOff parameter. If the running product is smaller than the
 cutOff value, the product series is terminated and remaining PDFs
 are not evaluated.

 There is no magic value of the cutOff, the user should experiment
 to find the appropriate balance between speed and precision.
 If a cutoff is specified, the PDFs most likely to be small should
 be put first in the product. The default cutOff value is zero.
RooProdPdf(const char* name, const char* title, const RooArgList& pdfList, Double_t cutOff)
 Constructor from a list of PDFs

 The optional cutOff parameter can be used as a speed optimization if
 one or more of the PDF have sizable regions with very small values,
 which would pull the entire product of PDFs to zero in those regions.

 After each PDF multiplication, the running product is compared with
 the cutOff parameter. If the running product is smaller than the
 cutOff value, the product series is terminated and remaining PDFs
 are not evaluated.

 There is no magic value of the cutOff, the user should experiment
 to find the appropriate balance between speed and precision.
 If a cutoff is specified, the PDFs most likely to be small should
 be put first in the product. The default cutOff value is zero.
cout << " RooProdPdf(" << GetName() << ")
RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet, const RooCmdArg& arg1, const RooCmdArg& arg2, const RooCmdArg& arg3, const RooCmdArg& arg4, const RooCmdArg& arg5, const RooCmdArg& arg6, const RooCmdArg& arg7, const RooCmdArg& arg8)
 Constructor from named argument list

 fullPdf -- Set of 'regular' PDFS that are normalized over all their observables
 ConditionalPdf(pdfSet,depSet) -- Add PDF to product with condition that it
                                  only be normalized over specified observables
                                  any remaining observables will be conditional
                                  observables


 For example, given a PDF F(x,y) and G(y)

 RooProdPdf("P","P",G,Partial(F,x)) will construct a 2-dimensional PDF as follows:

   P(x,y) = G(y)/Int[y]G(y) * F(x,y)/Int[x]G(x,y)

 which is a well normalized and properly defined PDF, but different from the

  P'(x,y) = F(x,y)*G(y) / Int[x,y] F(x,y)*G(y)

 In the former case the y distribution of P is identical to that of G, while
 F only is used to determine the correlation between X and Y. In the latter
 case the Y distribution is defined by the product of F and G.

 This P(x,y) construction is analoguous to generating events from F(x,y) with
 a prototype dataset sampled from G(y)
RooProdPdf(const char* name, const char* title, const RooArgSet& fullPdfSet, const RooLinkedList& cmdArgList)
   cout << "RooProdPdf::ctor" << endl ;
   cmdArgList.Print("v") ;
void initializeFromCmdArgList(const RooArgSet& fullPdfSet, const RooLinkedList& l)
 Initialize RooProdPdf from a list of RooCmdArg configuration arguments
~RooProdPdf()
 Destructor
Double_t getVal(const RooArgSet* set)
Double_t evaluate()
 Calculate current unnormalized value of object
Double_t calculate(const RooArgList* partIntList, const RooLinkedList* normSetList)
 Calculate running product of pdfs, skipping factorized components
void factorizeProduct(const RooArgSet& normSet, const RooArgSet& intSet, RooLinkedList& termList, RooLinkedList& normList, RooLinkedList& impDepList, RooLinkedList& crossDepList, RooLinkedList& intList)
 Factorize product in irreducible terms for given choice of integration/normalization
void getPartIntList(const RooArgSet* nset, const RooArgSet* iset, pRooArgList& partList, pRooLinkedList& nsetList, Int_t& code, const char* isetRangeName)
 Check if this configuration was created before
void groupProductTerms(RooLinkedList& groupedTerms, RooArgSet& outerIntDeps, const RooLinkedList& terms, const RooLinkedList& norms, const RooLinkedList& imps, const RooLinkedList& ints, const RooLinkedList& /*cross*/)
{
 Start out with each term in its own group
TIterator* tIter = terms.MakeIterator() ;
RooArgSet* term ;
while((term=(RooArgSet*)tIter->Next())) {
RooLinkedList* group = new RooLinkedList ;
group->Add(term) ;
groupedTerms.Add(group) ;
}
delete tIter ;

 Make list of imported dependents that occur in any term
RooArgSet allImpDeps ;
TIterator* iIter = imps.MakeIterator() ;
RooArgSet *impDeps ;
while((impDeps=(RooArgSet*)iIter->Next())) {
allImpDeps.add(*impDeps,kFALSE) ;
}
delete iIter ;

 Make list of integrated dependents that occur in any term
RooArgSet allIntDeps ;
iIter = ints.MakeIterator() ;
RooArgSet *intDeps ;
while((intDeps=(RooArgSet*)iIter->Next())) {
allIntDeps.add(*intDeps,kFALSE) ;
}
delete iIter ;

   cout << "Complete lists of imported dependens" ; allImpDeps.Print("1") ;
   cout << "Complete lists of integrated dependens" ; allIntDeps.Print("1") ;
RooAbsReal* processProductTerm(const RooArgSet* nset, const RooArgSet* iset, const char* isetRangeName, const RooArgSet* term,const RooArgSet& termNSet, const RooArgSet& termISet, Bool_t& isOwned, Bool_t forceWrap)
 CASE I: factorizing term: term is integrated over all normalizing observables
 -----------------------------------------------------------------------------
 Check if all observbales of this term are integrated. If so the term cancels
const char* makeRGPPName(const char* pfx, const RooArgSet& term, const RooArgSet& iset, const RooArgSet& nset, const char* isetRangeName)
 Make an appropriate name for a RooGenProdProj object in getPartIntList()
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName)
 Determine which part (if any) of given integral can be performed analytically.
 If any analytical integration is possible, return integration scenario code.

 RooProdPdf implements two strategies in implementing analytical integrals

 First, PDF components whose entire set of dependents are requested to be integrated
 can be dropped from the product, as they will integrate out to 1 by construction
:
 Second, RooProdPdf queries each remaining component PDF for its analytical integration
 capability of the requested set ('allVars'). It finds the largest common set of variables
 that can be integrated by all remaining components. If such a set exists, it reconfirms that
 each component is capable of analytically integrating the common set, and combines the components
 individual integration codes into a single integration code valid for RooProdPdf.
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName)
 Return analytical integral defined by given scenario code
RooAbsPdf::ExtendMode extendMode()
Double_t expectedEvents(const RooArgSet* nset)
RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype, const RooArgSet* auxProto, Bool_t verbose)
Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK)
void initGenerator(Int_t code)
void generateEvent(Int_t code)
void operModeHook()
void clearCache()
   cout << "RooProdPdf::clearCache(" << GetName() << ") sterilizing cache content" << endl ;
void printCompactTreeHook(ostream& os, const char* indent)
Bool_t isDirectGenSafe(const RooAbsArg& arg)
 Only override base class behaviour if default generator method is enabled
RooArgSet* findPdfNSet(RooAbsPdf& pdf)
 Look up user specified normalization set for given input PDF component
TObject* clone(const char* newname)
Bool_t checkObservables(const RooArgSet* nset)
Bool_t forceAnalyticalInt(const RooAbsArg& dep)
Bool_t selfNormalized()
Double_t expectedEvents(const RooArgSet* nset)
const RooArgList& pdfList()
Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
void useDefaultGen(Bool_t flag=kTRUE)

Last update: Tue Jul 11 11:46:09 2006
Copyright (c) 2000-2005, Regents of the University of California *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.