Logo ROOT  
Reference Guide
RooBinnedGenContext.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
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_BINNED_GEN_CONTEXT
17#define ROO_BINNED_GEN_CONTEXT
18
19#include "RooAbsGenContext.h"
20#include "RooArgSet.h"
21
22
23class RooDataSet;
24class RooRealIntegral;
25class RooAcceptReject;
26class RooDataHist;
27class TRandom;
28class TIterator;
29
31public:
32 RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
33 const RooArgSet* auxProto=0, bool _verbose= false);
34 ~RooBinnedGenContext() override;
35
36 RooDataSet* generate(double nEvents=0, bool skipInit=false, bool extendedMode=false) override ;
37
38 void setProtoDataOrder(Int_t*) override {}
39
40 void attach(const RooArgSet& params) override ;
41
42 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
43
44 void setExpectedData(bool) override ;
45
46protected:
47
48 void initGenerator(const RooArgSet &theEvent) override;
49 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
50
52
54 RooArgSet* _pdfSet ; ///< Set owned all nodes of internal clone of p.d.f
55 RooAbsPdf *_pdf ; ///< Pointer to cloned p.d.f
56 RooDataHist* _hist ; ///< Histogram
57 bool _expectedData ; ///< Asimov?
58
59 ClassDefOverride(RooBinnedGenContext,0) // Specialized context for generating a dataset from a binned pdf
60};
61
62#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:57
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs.
RooAbsPdf * _pdf
Pointer to cloned p.d.f.
~RooBinnedGenContext() override
Destructor. Delete all owned subgenerator contexts.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
this method is not implemented for this context
void setProtoDataOrder(Int_t *) override
Set the traversal order of prototype data to that in the lookup tables passed as argument.
RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool _verbose=false)
Constructor.
RooBinnedGenContext(const RooBinnedGenContext &other)
const RooArgSet * _vars
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print the details of the context.
RooDataSet * generate(double nEvents=0, bool skipInit=false, bool extendedMode=false) override
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
void setExpectedData(bool) override
RooDataHist * _hist
Histogram.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator contex.
void attach(const RooArgSet &params) override
Attach given set of variables to internal p.d.f. clone.
RooArgSet * _pdfSet
Set owned all nodes of internal clone of p.d.f.
The RooDataHist is a container class to hold N-dimensional binned data.
Definition: RooDataHist.h:45
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:55
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
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:136