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 
23 class RooDataSet;
24 class RooRealIntegral;
25 class RooAcceptReject;
26 class RooDataHist;
27 class TRandom;
28 class TIterator;
29 
31 public:
32  RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
33  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
34  virtual ~RooBinnedGenContext();
35 
36  RooDataSet* generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE) ;
37 
38  virtual void setProtoDataOrder(Int_t*) {}
39 
40  virtual void attach(const RooArgSet& params) ;
41 
42  virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
43 
44  virtual void setExpectedData(Bool_t) ;
45 
46 protected:
47 
48  virtual void initGenerator(const RooArgSet &theEvent);
49  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
50 
52 
53  const RooArgSet* _vars ;
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_t _expectedData ; // Asimov?
58 
59  ClassDef(RooBinnedGenContext,0) // Specialized context for generating a dataset from a binned pdf
60 };
61 
62 #endif
RooBinnedGenContext::setExpectedData
virtual void setExpectedData(Bool_t)
Definition: RooBinnedGenContext.cxx:131
RooArgSet.h
RooBinnedGenContext::generate
RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
Definition: RooBinnedGenContext.cxx:139
RooBinnedGenContext::generateEvent
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is not implemented for this context
Definition: RooBinnedGenContext.cxx:247
RooBinnedGenContext::_pdf
RooAbsPdf * _pdf
Definition: RooBinnedGenContext.h:55
RooAbsGenContext.h
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooBinnedGenContext::RooBinnedGenContext
RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
Constructor.
Definition: RooBinnedGenContext.cxx:49
RooBinnedGenContext::initGenerator
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator contex.
Definition: RooBinnedGenContext.cxx:122
TString
Definition: TString.h:136
bool
TIterator
Definition: TIterator.h:30
RooRealIntegral
Definition: RooRealIntegral.h:34
RooBinnedGenContext::_expectedData
Bool_t _expectedData
Definition: RooBinnedGenContext.h:57
RooDataHist
Definition: RooDataHist.h:39
TRandom
Definition: TRandom.h:27
RooAbsGenContext::_verbose
Bool_t _verbose
Definition: RooAbsGenContext.h:80
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooBinnedGenContext
Definition: RooBinnedGenContext.h:30
RooBinnedGenContext::_hist
RooDataHist * _hist
Definition: RooBinnedGenContext.h:56
RooAcceptReject
Definition: RooAcceptReject.h:29
RooAbsGenContext
Definition: RooAbsGenContext.h:26
RooBinnedGenContext::printMultiline
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of the context.
Definition: RooBinnedGenContext.cxx:257
RooBinnedGenContext::_vars
const RooArgSet * _vars
Definition: RooBinnedGenContext.h:53
RooBinnedGenContext::setProtoDataOrder
virtual void setProtoDataOrder(Int_t *)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
Definition: RooBinnedGenContext.h:38
Double_t
double Double_t
Definition: RtypesCore.h:59
RooBinnedGenContext::attach
virtual void attach(const RooArgSet &params)
Attach given set of variables to internal p.d.f. clone.
Definition: RooBinnedGenContext.cxx:110
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
Definition: RooDataSet.h:33
make_cnn_model.model
model
Definition: make_cnn_model.py:6
RooAbsPdf
Definition: RooAbsPdf.h:40
RooBinnedGenContext::~RooBinnedGenContext
virtual ~RooBinnedGenContext()
Destructor. Delete all owned subgenerator contexts.
Definition: RooBinnedGenContext.cxx:98
RooBinnedGenContext::_pdfSet
RooArgSet * _pdfSet
Definition: RooBinnedGenContext.h:54
RooArgSet
Definition: RooArgSet.h:28
int