Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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<std::unique_ptr<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 dataset from a RooProdPdf
65};
66
67#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
Abstract base class for generator contexts of RooAbsPdf objects.
bool _verbose
Verbose messaging?
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Generic Monte Carlo toy generator implement the accept/reject sampling technique on any positively va...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Container class to hold unbinned data.
Definition RooDataSet.h:57
Efficient implementation of the generator context specific for RooProdPdf PDFs.
std::list< std::unique_ptr< RooAbsGenContext > > _gcList
List of component generator contexts.
void setProtoDataOrder(Int_t *lut) override
Set the traversal order of the prototype dataset by the given lookup table.
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)
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.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Detailed printing interface.
Efficient implementation of a product of PDFs of the form.
Definition RooProdPdf.h:33
Performs hybrid numerical/analytical integrals of RooAbsReal objects.
Joins 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:139