Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
23class RooSimultaneous;
24class RooDataSet;
26
28public:
29 RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, bool _verbose= false, bool autoBinned=true, const char* binnedTag="");
30 ~RooSimSplitGenContext() override;
31 void setProtoDataOrder(Int_t* lut) override ;
32
33 void attach(const RooArgSet& params) override ;
34
35 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
36
37 RooDataSet *generate(double nEvents= 0, bool skipInit=false, bool extendedMode=false) override;
38
39 void setExpectedData(bool) override ;
40
41protected:
42
43 void initGenerator(const RooArgSet &theEvent) override;
44 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
45
46 RooDataSet* createDataSet(const char* name, const char* title, const RooArgSet& obs) override ;
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* _fracThresh ; ///< fraction thresholds
58
59 RooArgSet _allVarsPdf ; ///< All pdf variables
60
61 ClassDefOverride(RooSimSplitGenContext,0) // Context for efficiently generating a dataset from a RooSimultaneous PDF
62};
63
64#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects that represent a discrete value that can be set from the outside,...
Abstract base class for generator contexts of RooAbsPdf objects.
bool _verbose
Verbose messaging?
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Container class to hold unbinned data.
Definition RooDataSet.h:34
Efficient implementation of the generator context specific for RooSimultaneous PDFs when generating m...
void setExpectedData(bool) override
Forward to components.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
this method is empty because it is not used in this type of context
std::vector< RooAbsGenContext * > _gcList
List of component generator contexts.
RooArgSet _allVarsPdf
All pdf variables.
void attach(const RooArgSet &params) override
Attach the index category clone to the given event buffer.
void initGenerator(const RooArgSet &theEvent) override
Perform one-time initialization of generator context.
double * _fracThresh
fraction thresholds
RooDataSet * createDataSet(const char *name, const char *title, const RooArgSet &obs) override
this method is empty because it is not used by this context
Int_t _numPdf
Number of generated PDFs.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Detailed printing interface.
RooArgSet _idxCatSet
Owner of index category components.
const RooSimultaneous * _pdf
Original PDF.
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...
std::vector< int > _gcIndex
Index value corresponding to component.
void setProtoDataOrder(Int_t *lut) override
this method is empty because proto datasets are not supported by this context
~RooSimSplitGenContext() override
Destructor. Delete all owned subgenerator contexts.
RooAbsCategoryLValue * _idxCat
Clone of index category.
TString _idxCatName
Name of index category.
RooSimSplitGenContext(const RooSimSplitGenContext &other)
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
Basic string class.
Definition TString.h:139