Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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= nullptr,
34 const RooArgSet* auxProto=nullptr, bool _verbose= false);
35 RooConvGenContext(const RooNumConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= nullptr,
36 const RooArgSet* auxProto=nullptr, bool _verbose= false);
37 RooConvGenContext(const RooAbsAnaConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= nullptr,
38 const RooArgSet* auxProto=nullptr, bool _verbose= false);
39
40 void setProtoDataOrder(Int_t* lut) override ;
41
42 void attach(const RooArgSet& params) override ;
43
44 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
45
46 void initGenerator(const RooArgSet &theEvent) override;
47 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
48
49protected:
50
52
53 std::unique_ptr<RooAbsGenContext> _pdfGen ; ///< Physics model generator context
54 std::unique_ptr<RooAbsGenContext> _modelGen ; ///< Resolution model generator context
55 TString _convVarName ; ///< Name of convolution variable
56 std::unique_ptr<RooArgSet> _pdfVarsOwned ; ///< Owning version of pdfVars ;
57 std::unique_ptr<RooArgSet> _modelVarsOwned ; ///< Owning version of modelVars ;
58 std::unique_ptr<RooArgSet> _pdfVars ; ///< Holder of PDF x truth event
59 std::unique_ptr<RooArgSet> _modelVars ; ///< Holder of resModel event
60 std::unique_ptr<RooArgSet> _pdfCloneSet ; ///< Owner of PDF clone
61 std::unique_ptr<RooArgSet> _modelCloneSet ; ///< Owner of resModel clone
62 RooRealVar* _cvModel{nullptr}; ///< Convolution variable in resModel event
63 RooRealVar* _cvPdf{nullptr}; ///< Convolution variable in PDFxTruth event
64 RooRealVar* _cvOut{nullptr}; ///< Convolution variable in output event
65
66 ClassDefOverride(RooConvGenContext,0) // Context for generating a dataset from a PDF
67};
68
69#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
Base class for PDFs that represent a physics model that can be analytically convolved with a resoluti...
Abstract base class for generator contexts of RooAbsPdf objects.
bool _verbose
Verbose messaging?
Generic Monte Carlo toy generator implement the accept/reject sampling technique on any positively va...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Efficient implementation of the generator context specific for RooAbsAnaConvPdf objects.
std::unique_ptr< RooAbsGenContext > _modelGen
Resolution model generator context.
RooConvGenContext(const RooConvGenContext &other)
std::unique_ptr< RooArgSet > _pdfCloneSet
Owner of PDF clone.
void setProtoDataOrder(Int_t *lut) override
Set the traversal order for events in the prototype dataset The argument is a array of integers with ...
std::unique_ptr< RooArgSet > _pdfVars
Holder of PDF x truth event.
std::unique_ptr< RooArgSet > _modelVars
Holder of resModel event.
RooRealVar * _cvPdf
Convolution variable in PDFxTruth event.
std::unique_ptr< RooArgSet > _modelVarsOwned
Owning version of modelVars ;.
void attach(const RooArgSet &params) override
Attach given set of arguments to internal clones of pdf and resolution model.
std::unique_ptr< RooArgSet > _modelCloneSet
Owner of resModel clone.
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.
std::unique_ptr< RooArgSet > _pdfVarsOwned
Owning version of pdfVars ;.
TString _convVarName
Name of convolution variable.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print the details of this generator context.
std::unique_ptr< RooAbsGenContext > _pdfGen
Physics model generator context.
Container class to hold unbinned data.
Definition RooDataSet.h:57
PDF for the numerical (FFT) convolution of two PDFs.
Numeric 1-dimensional convolution operator PDF.
Performs hybrid numerical/analytical integrals of RooAbsReal objects.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
Basic string class.
Definition TString.h:139