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#include <list>
22
23class RooProdPdf;
24class RooDataSet;
25class RooRealIntegral;
26class RooAcceptReject;
27class TRandom;
28class RooSuperCategory ;
29
31public:
32 RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype= nullptr,
33 const RooArgSet* auxProto=nullptr, bool _verbose= false);
34 ~RooProdGenContext() override;
35
36 void setProtoDataOrder(Int_t* lut) override ;
37 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
38
39 void attach(const RooArgSet& params) override ;
40
41protected:
42
43 void initGenerator(const RooArgSet &theEvent) override;
44 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
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
59 double * _ccdTable ;
60 const RooProdPdf *_pdf ; ///< Original PDF
61 std::list<RooAbsGenContext*> _gcList ; ///< List of component generator contexts
62 RooArgSet _ownedMultiProds ; ///< Owned auxiliary multi-term product PDFs
63
64 ClassDefOverride(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf
65};
66
67#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
static void indent(ostringstream &buf, int indent_level)
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
bool _verbose
Verbose messaging?
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:56
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:55
RooProdGenContext is an efficient implementation of the generator context specific for RooProdPdf PDF...
void setProtoDataOrder(Int_t *lut) override
Set the traversal order of the prototype dataset by the given lookup table.
RooArgSet * _ccdCloneSet
RooArgSet * _pdfCloneSet
void attach(const RooArgSet &params) override
Attach generator to given event buffer.
RooArgSet _ownedMultiProds
Owned auxiliary multi-term product PDFs.
RooArgSet _commonCats
Common category dependents.
RooSuperCategory * _ccdSuper
SuperCategory of Common category dependents.
RooProdGenContext(const RooProdGenContext &other)
std::list< RooAbsGenContext * > _gcList
List of component generator contexts.
const RooProdPdf * _pdf
Original PDF.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator context, forward to component generators.
RooRealIntegral * _pdfCcdInt
RooArgSet _uniObs
Observable to be generated with flat distribution.
~RooProdGenContext() override
Destructor. Delete all owned subgenerator contexts.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
Generate a single event of the product by generating the components of the products sequentially.
RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool _verbose=false)
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Detailed printing interface.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:33
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
The RooSuperCategory can join several RooAbsCategoryLValue objects into a single category.
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
Basic string class.
Definition: TString.h:136