Logo ROOT  
Reference Guide
RooSimSplitGenContext.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_SIM_SPLIT_GEN_CONTEXT
17 #define ROO_SIM_SPLIT_GEN_CONTEXT
18 
19 #include "RooAbsGenContext.h"
20 #include "RooArgSet.h"
21 #include <vector>
22 
23 class RooSimultaneous;
24 class RooDataSet;
26 
28 public:
29  RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, Bool_t _verbose= kFALSE, Bool_t autoBinned=kTRUE, const char* binnedTag="");
30  virtual ~RooSimSplitGenContext();
31  virtual void setProtoDataOrder(Int_t* lut) ;
32 
33  virtual void attach(const RooArgSet& params) ;
34 
35  virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
36 
37  virtual RooDataSet *generate(Double_t nEvents= 0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE);
38 
39  virtual void setExpectedData(Bool_t) ;
40 
41 protected:
42 
43  virtual void initGenerator(const RooArgSet &theEvent);
44  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
45 
46  RooDataSet* createDataSet(const char* name, const char* title, const RooArgSet& obs) ;
47 
49 
50  RooAbsCategoryLValue* _idxCat ; // Clone of index category
51  RooArgSet* _idxCatSet ; // Owner of index category components
52  const RooSimultaneous *_pdf ; // Original PDF
53  std::vector<RooAbsGenContext*> _gcList ; // List of component generator contexts
54  std::vector<int> _gcIndex ; // Index value corresponding to component
55  TString _idxCatName ; // Name of index category
56  Int_t _numPdf ; // Number of generated PDFs
57  Double_t* _fracThresh ; // fraction thresholds
58 
59  RooArgSet _allVarsPdf ; // All pdf variables
60  TIterator* _proxyIter ; // Iterator over pdf proxies
61 
62  ClassDef(RooSimSplitGenContext,0) // Context for efficiently generating a dataset from a RooSimultaneous PDF
63 };
64 
65 #endif
RooSimSplitGenContext::setExpectedData
virtual void setExpectedData(Bool_t)
Forward to components.
Definition: RooSimSplitGenContext.cxx:303
RooSimSplitGenContext::RooSimSplitGenContext
RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, Bool_t _verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="")
Constructor of specialized generator context for RooSimultaneous p.d.f.s.
Definition: RooSimSplitGenContext.cxx:54
RooSimSplitGenContext::_idxCat
RooAbsCategoryLValue * _idxCat
Definition: RooSimSplitGenContext.h:50
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooSimSplitGenContext
RooSimSplitGenContext is an efficient implementation of the generator context specific for RooSimulta...
Definition: RooSimSplitGenContext.h:27
RooArgSet.h
RooSimSplitGenContext::_pdf
const RooSimultaneous * _pdf
Definition: RooSimSplitGenContext.h:52
RooSimSplitGenContext::generate
virtual 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: RooSimSplitGenContext.cxx:211
RooAbsGenContext.h
RooSimSplitGenContext::printMultiline
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
Definition: RooSimSplitGenContext.cxx:345
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
TString
Basic string class.
Definition: TString.h:136
RooSimSplitGenContext::_allVarsPdf
RooArgSet _allVarsPdf
Definition: RooSimSplitGenContext.h:59
RooSimSplitGenContext::_idxCatName
TString _idxCatName
Definition: RooSimSplitGenContext.h:55
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
RooSimSplitGenContext::~RooSimSplitGenContext
virtual ~RooSimSplitGenContext()
Destructor. Delete all owned subgenerator contexts.
Definition: RooSimSplitGenContext.cxx:159
RooSimSplitGenContext::generateEvent
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is empty because it is not used in this type of context
Definition: RooSimSplitGenContext.cxx:325
RooSimSplitGenContext::_numPdf
Int_t _numPdf
Definition: RooSimSplitGenContext.h:56
RooSimSplitGenContext::attach
virtual void attach(const RooArgSet &params)
Attach the index category clone to the given event buffer.
Definition: RooSimSplitGenContext.cxx:174
RooAbsGenContext::_verbose
Bool_t _verbose
Definition: RooAbsGenContext.h:80
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
RooAbsGenContext
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
Definition: RooAbsGenContext.h:26
RooSimSplitGenContext::_idxCatSet
RooArgSet * _idxCatSet
Definition: RooSimSplitGenContext.h:51
RooSimSplitGenContext::_gcIndex
std::vector< int > _gcIndex
Definition: RooSimSplitGenContext.h:54
Double_t
double Double_t
Definition: RtypesCore.h:59
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooSimSplitGenContext::_gcList
std::vector< RooAbsGenContext * > _gcList
Definition: RooSimSplitGenContext.h:53
RooSimSplitGenContext::setProtoDataOrder
virtual void setProtoDataOrder(Int_t *lut)
this method is empty because proto datasets are not supported by this context
Definition: RooSimSplitGenContext.cxx:336
RooSimSplitGenContext::RooSimSplitGenContext
RooSimSplitGenContext(const RooSimSplitGenContext &other)
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
make_cnn_model.model
model
Definition: make_cnn_model.py:6
RooSimSplitGenContext::_fracThresh
Double_t * _fracThresh
Definition: RooSimSplitGenContext.h:57
RooSimultaneous
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
Definition: RooSimultaneous.h:37
RooSimSplitGenContext::initGenerator
virtual void initGenerator(const RooArgSet &theEvent)
Perform one-time initialization of generator context.
Definition: RooSimSplitGenContext.cxx:191
RooAbsCategoryLValue
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
Definition: RooAbsCategoryLValue.h:25
RooSimSplitGenContext::_proxyIter
TIterator * _proxyIter
Definition: RooSimSplitGenContext.h:60
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
RooSimSplitGenContext::createDataSet
RooDataSet * createDataSet(const char *name, const char *title, const RooArgSet &obs)
this method is empty because it is not used by this context
Definition: RooSimSplitGenContext.cxx:315
int