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