Logo ROOT   6.10/09
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 
22 class RooAbsAnaConvPdf;
23 class RooDataSet;
24 class RooRealIntegral;
25 class RooAcceptReject;
26 class TRandom;
27 class TIterator;
28 class RooRealVar ;
29 class RooNumConvPdf ;
30 class RooFFTConvPdf ;
31 
33 public:
34  RooConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
35  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
36  RooConvGenContext(const RooNumConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
37  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
38  RooConvGenContext(const RooAbsAnaConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
39  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
40  virtual ~RooConvGenContext();
41 
42  virtual void setProtoDataOrder(Int_t* lut) ;
43 
44  virtual void attach(const RooArgSet& params) ;
45 
46  virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
47 
48  virtual void initGenerator(const RooArgSet &theEvent);
49  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
50 
51 protected:
52 
53  RooConvGenContext(const RooConvGenContext& other) ;
54 
55  RooAbsGenContext* _pdfGen ; // Physics model generator context
56  RooAbsGenContext* _modelGen ; // Resolution model generator context
57  TString _convVarName ; // Name of convolution variable
58  RooArgSet* _pdfVarsOwned ; // Owning version of pdfVars ;
59  RooArgSet* _modelVarsOwned ; // Owning version of modelVars ;
60  RooArgSet* _pdfVars ; // Holder of PDF x truth event
61  RooArgSet* _modelVars ; // Holder of resModel event
62  RooArgSet* _pdfCloneSet ; // Owner of PDF clone
63  RooArgSet* _modelCloneSet ; // Owner of resModel clone
64  RooRealVar* _cvModel ; // Convolution variable in resModel event
65  RooRealVar* _cvPdf ; // Convolution variable in PDFxTruth event
66  RooRealVar* _cvOut ; // Convolution variable in output event
67 
68  ClassDef(RooConvGenContext,0) // Context for generating a dataset from a PDF
69 };
70 
71 #endif
RooArgSet * _modelCloneSet
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Iterator abstract base class.
Definition: TIterator.h:30
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order for events in the prototype dataset The argument is a array of integers with ...
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator context, attaches the context to the supplied event container...
virtual ~RooConvGenContext()
Destructor.
virtual void attach(const RooArgSet &params)
Attach given set of arguments to internal clones of pdf and resolution model.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
#define ClassDef(name, id)
Definition: Rtypes.h:297
RooArgSet * _pdfCloneSet
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
Generate a single event.
RooConvGenContext is an efficient implementation of the generator context specific for RooAbsAnaConvP...
RooArgSet * _modelVars
RooAbsGenContext * _pdfGen
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
Class RooAcceptReject is a generic toy monte carlo generator implement the accept/reject sampling tec...
RooAbsGenContext * _modelGen
bool verbose
RooArgSet * _modelVarsOwned
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:29
RooArgSet * _pdfVarsOwned
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
Constructor for specialized generator context for FFT numerical convolutions.
RooRealVar * _cvModel
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of this generator context.
Numeric 1-dimensional convolution operator PDF.
Definition: RooNumConvPdf.h:26