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 
23 class RooProdPdf;
24 class RooDataSet;
25 class RooRealIntegral;
26 class RooAcceptReject;
27 class TRandom;
28 class TIterator;
29 class RooSuperCategory ;
30 
32 public:
33  RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
34  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
35  virtual ~RooProdGenContext();
36 
37  virtual void setProtoDataOrder(Int_t* lut) ;
38  virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
39 
40  virtual void attach(const RooArgSet& params) ;
41 
42 protected:
43 
44  virtual void initGenerator(const RooArgSet &theEvent);
45  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
46 
47  void updateCCDTable() ;
48 
49 
51 
52  RooArgSet _commonCats ; // Common category dependents
54  RooSuperCategory* _ccdSuper ; // SuperCategory of Common category dependents
58  RooArgSet _uniObs ; // Observable to be generated with flat distribution
59  TIterator* _uniIter ; // Iterator over uniform observables
62  const RooProdPdf *_pdf ; // Original PDF
63  std::list<RooAbsGenContext*> _gcList ; // List of component generator contexts
64  RooArgSet _ownedMultiProds ; // Owned auxilary multi-term product PDFs
65 
66  ClassDef(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf
67 };
68 
69 #endif
RooProdGenContext::_ccdRefresh
Bool_t _ccdRefresh
Definition: RooProdGenContext.h:60
RooArgSet.h
RooProdGenContext
RooProdGenContext is an efficient implementation of the generator context specific for RooProdPdf PDF...
Definition: RooProdGenContext.h:31
RooProdGenContext::updateCCDTable
void updateCCDTable()
RooProdGenContext::_uniIter
TIterator * _uniIter
Definition: RooProdGenContext.h:59
RooProdGenContext::_pdfCloneSet
RooArgSet * _pdfCloneSet
Definition: RooProdGenContext.h:55
RooAbsGenContext.h
RooProdGenContext::_uniObs
RooArgSet _uniObs
Definition: RooProdGenContext.h:58
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooProdGenContext::attach
virtual void attach(const RooArgSet &params)
Attach generator to given event buffer.
Definition: RooProdGenContext.cxx:326
RooProdGenContext::_ccdCloneSet
RooArgSet * _ccdCloneSet
Definition: RooProdGenContext.h:53
RooProdGenContext::RooProdGenContext
RooProdGenContext(const RooProdGenContext &other)
TString
Basic string class.
Definition: TString.h:136
RooProdGenContext::_pdfClone
RooAbsPdf * _pdfClone
Definition: RooProdGenContext.h:56
RooProdGenContext::printMultiline
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
Definition: RooProdGenContext.cxx:399
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
RooProdGenContext::_pdf
const RooProdPdf * _pdf
Definition: RooProdGenContext.h:62
RooRealIntegral
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
Definition: RooRealIntegral.h:34
RooProdGenContext::_ownedMultiProds
RooArgSet _ownedMultiProds
Definition: RooProdGenContext.h:64
RooProdGenContext::generateEvent
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
Generate a single event of the product by generating the components of the products sequentially.
Definition: RooProdGenContext.cxx:354
RooProdGenContext::_gcList
std::list< RooAbsGenContext * > _gcList
Definition: RooProdGenContext.h:63
TRandom
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
RooAbsGenContext::_verbose
Bool_t _verbose
Definition: RooAbsGenContext.h:80
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooProdGenContext::_ccdSuper
RooSuperCategory * _ccdSuper
Definition: RooProdGenContext.h:54
RooAcceptReject
Class RooAcceptReject is a generic toy monte carlo generator implement the accept/reject sampling tec...
Definition: RooAcceptReject.h:29
RooAbsGenContext
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
Definition: RooAbsGenContext.h:26
RooProdGenContext::initGenerator
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator context, forward to component generators.
Definition: RooProdGenContext.cxx:338
RooProdGenContext::RooProdGenContext
RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
Definition: RooProdGenContext.cxx:48
Double_t
double Double_t
Definition: RtypesCore.h:59
RooSuperCategory
The RooSuperCategory can join several RooAbsCategoryLValue objects into a single category.
Definition: RooSuperCategory.h:27
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooProdGenContext::_pdfCcdInt
RooRealIntegral * _pdfCcdInt
Definition: RooProdGenContext.h:57
RooProdGenContext::~RooProdGenContext
virtual ~RooProdGenContext()
Destructor. Delete all owned subgenerator contexts.
Definition: RooProdGenContext.cxx:314
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooProdGenContext::_commonCats
RooArgSet _commonCats
Definition: RooProdGenContext.h:52
make_cnn_model.model
model
Definition: make_cnn_model.py:6
RooAbsPdf
Definition: RooAbsPdf.h:43
RooProdGenContext::_ccdTable
Double_t * _ccdTable
Definition: RooProdGenContext.h:61
RooProdPdf
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:37
RooProdGenContext::setProtoDataOrder
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of the prototype dataset by the given lookup table.
Definition: RooProdGenContext.cxx:383
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
int