Logo ROOT  
Reference Guide
RooConvGenContext.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooConvGenContext.h,v 1.12 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_CONV_GEN_CONTEXT
17#define ROO_CONV_GEN_CONTEXT
18
19#include "RooAbsGenContext.h"
20#include "RooArgSet.h"
21
23class RooDataSet;
24class RooRealIntegral;
25class RooAcceptReject;
26class TRandom;
27class RooRealVar ;
28class RooNumConvPdf ;
29class RooFFTConvPdf ;
30
32public:
33 RooConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
34 const RooArgSet* auxProto=0, bool _verbose= false);
35 RooConvGenContext(const RooNumConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
36 const RooArgSet* auxProto=0, bool _verbose= false);
37 RooConvGenContext(const RooAbsAnaConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
38 const RooArgSet* auxProto=0, bool _verbose= false);
39 ~RooConvGenContext() override;
40
41 void setProtoDataOrder(Int_t* lut) override ;
42
43 void attach(const RooArgSet& params) override ;
44
45 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
46
47 void initGenerator(const RooArgSet &theEvent) override;
48 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
49
50protected:
51
53
54 RooAbsGenContext* _pdfGen ; ///< Physics model generator context
55 RooAbsGenContext* _modelGen ; ///< Resolution model generator context
56 TString _convVarName ; ///< Name of convolution variable
57 RooArgSet* _pdfVarsOwned ; ///< Owning version of pdfVars ;
58 RooArgSet* _modelVarsOwned ; ///< Owning version of modelVars ;
59 RooArgSet* _pdfVars ; ///< Holder of PDF x truth event
60 RooArgSet* _modelVars ; ///< Holder of resModel event
61 RooArgSet* _pdfCloneSet ; ///< Owner of PDF clone
62 RooArgSet* _modelCloneSet ; ///< Owner of resModel clone
63 RooRealVar* _cvModel{nullptr}; ///< Convolution variable in resModel event
64 RooRealVar* _cvPdf{nullptr}; ///< Convolution variable in PDFxTruth event
65 RooRealVar* _cvOut{nullptr}; ///< Convolution variable in output event
66
67 ClassDefOverride(RooConvGenContext,0) // Context for generating a dataset from a PDF
68};
69
70#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
static void indent(ostringstream &buf, int indent_level)
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
bool _verbose
Verbose messaging?
Class RooAcceptReject is a generic toy monte carlo generator implement the accept/reject sampling tec...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
RooArgSet * _modelCloneSet
Owner of resModel clone.
RooArgSet * _modelVarsOwned
Owning version of modelVars ;.
RooConvGenContext(const RooConvGenContext &other)
RooAbsGenContext * _pdfGen
Physics model generator context.
RooAbsGenContext * _modelGen
Resolution model generator context.
void setProtoDataOrder(Int_t *lut) override
Set the traversal order for events in the prototype dataset The argument is a array of integers with ...
RooArgSet * _pdfCloneSet
Owner of PDF clone.
~RooConvGenContext() override
Destructor.
RooArgSet * _pdfVarsOwned
Owning version of pdfVars ;.
RooRealVar * _cvPdf
Convolution variable in PDFxTruth event.
void attach(const RooArgSet &params) override
Attach given set of arguments to internal clones of pdf and resolution model.
RooRealVar * _cvOut
Convolution variable in output event.
RooRealVar * _cvModel
Convolution variable in resModel event.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
Generate a single event.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator context, attaches the context to the supplied event container.
TString _convVarName
Name of convolution variable.
RooArgSet * _pdfVars
Holder of PDF x truth event.
RooConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool _verbose=false)
Constructor for specialized generator context for FFT numerical convolutions.
RooArgSet * _modelVars
Holder of resModel event.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print the details of this generator context.
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:55
PDF for the numerical (FFT) convolution of two PDFs.
Definition: RooFFTConvPdf.h:25
Numeric 1-dimensional convolution operator PDF.
Definition: RooNumConvPdf.h:26
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
Basic string class.
Definition: TString.h:136