Logo ROOT  
Reference Guide
RooProdGenContext.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooProdGenContext.h,v 1.15 2007/05/11 09:11:30 verkerke 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_PROD_GEN_CONTEXT
17#define ROO_PROD_GEN_CONTEXT
18
19#include "RooAbsGenContext.h"
20#include "RooArgSet.h"
21
22class RooProdPdf;
23class RooDataSet;
24class RooRealIntegral;
25class RooAcceptReject;
26class TRandom;
27class TIterator;
28class RooSuperCategory ;
29
31public:
32 RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
33 const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
34 virtual ~RooProdGenContext();
35
36 virtual void setProtoDataOrder(Int_t* lut) ;
37 virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
38
39 virtual void attach(const RooArgSet& params) ;
40
41protected:
42
43 virtual void initGenerator(const RooArgSet &theEvent);
44 virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
45
47
48
50
51 RooArgSet _commonCats ; // Common category dependents
53 RooSuperCategory* _ccdSuper ; // SuperCategory of Common category dependents
57 RooArgSet _uniObs ; // Observable to be generated with flat distribution
58 TIterator* _uniIter ; // Iterator over uniform observables
61 const RooProdPdf *_pdf ; // Original PDF
62 std::list<RooAbsGenContext*> _gcList ; // List of component generator contexts
63 RooArgSet _ownedMultiProds ; // Owned auxilary multi-term product PDFs
64
65 ClassDef(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf
66};
67
68#endif
const Bool_t kFALSE
Definition: RtypesCore.h:90
double Double_t
Definition: RtypesCore.h:57
#define ClassDef(name, id)
Definition: Rtypes.h:322
static void indent(ostringstream &buf, int indent_level)
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
Class RooAcceptReject is a generic toy monte carlo generator implement the accept/reject sampling tec...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooProdGenContext is an efficient implementation of the generator context specific for RooProdPdf PDF...
RooArgSet * _ccdCloneSet
RooArgSet * _pdfCloneSet
RooArgSet _ownedMultiProds
RooSuperCategory * _ccdSuper
RooProdGenContext(const RooProdGenContext &other)
std::list< RooAbsGenContext * > _gcList
virtual void attach(const RooArgSet &params)
Attach generator to given event buffer.
const RooProdPdf * _pdf
RooRealIntegral * _pdfCcdInt
RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
Generate a single event of the product by generating the components of the products sequentially.
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of the prototype dataset by the given lookup table.
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator context, forward to component generators.
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
virtual ~RooProdGenContext()
Destructor. Delete all owned subgenerator contexts.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:31
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
The RooSuperCategory can join several RooAbsCategoryLValue objects into a single category.
Iterator abstract base class.
Definition: TIterator.h:30
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
Basic string class.
Definition: TString.h:131