Logo ROOT  
Reference Guide
RooFoamGenerator.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_FOAM_GENERATOR
17 #define ROO_FOAM_GENERATOR
18 
19 #include "RooAbsNumGenerator.h"
20 #include "RooPrintable.h"
21 #include "RooArgSet.h"
22 
23 class RooAbsReal;
24 class RooRealVar;
25 class RooDataSet;
26 
27 class TFoam ;
28 class RooTFoamBinding ;
29 class RooNumGenFactory ;
30 
32 public:
33  RooFoamGenerator() : _binding(0), _tfoam(0), _xmin(0), _range(0), _vec(0) {} ;
34  RooFoamGenerator(const RooAbsReal &func, const RooArgSet &genVars, const RooNumGenConfig& config, Bool_t verbose=kFALSE, const RooAbsReal* maxFuncVal=0);
35  RooAbsNumGenerator* clone(const RooAbsReal& func, const RooArgSet& genVars, const RooArgSet& /*condVars*/,
36  const RooNumGenConfig& config, Bool_t verbose=kFALSE, const RooAbsReal* maxFuncVal=0) const {
37  return new RooFoamGenerator(func,genVars,config,verbose,maxFuncVal) ;
38  }
39  virtual ~RooFoamGenerator();
40 
41  const RooArgSet *generateEvent(UInt_t remaining, Double_t& resampleRatio);
42 
43  TFoam& engine() { return *_tfoam; }
44 
45  virtual Bool_t canSampleConditional() const { return kFALSE ; }
46  virtual Bool_t canSampleCategories() const { return kFALSE ; }
47 
48 protected:
49 
50  friend class RooNumGenFactory ;
51  static void registerSampler(RooNumGenFactory& fact) ;
52 
53  RooTFoamBinding* _binding ; // Binding of RooAbsReal to TFoam function interface
54  TFoam* _tfoam ; // Instance of TFOAM generator
55  Double_t* _xmin ; // Lower bound of observables to be generated ;
56  Double_t* _range ; // Range of observables to be generated ;
57  Double_t* _vec ; // Transfer array for FOAM output
58 
59 
60  ClassDef(RooFoamGenerator,0) // Context for generating a dataset from a PDF using the TFoam class
61 };
62 
63 #endif
RooFoamGenerator::_tfoam
TFoam * _tfoam
Definition: RooFoamGenerator.h:54
RooFoamGenerator::_range
Double_t * _range
Definition: RooFoamGenerator.h:56
RooFoamGenerator::_xmin
Double_t * _xmin
Definition: RooFoamGenerator.h:55
RooFoamGenerator::registerSampler
static void registerSampler(RooNumGenFactory &fact)
Register RooIntegrator1D, is parameters and capabilities with RooNumIntFactory.
Definition: RooFoamGenerator.cxx:70
RooArgSet.h
RooPrintable.h
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooFoamGenerator::RooFoamGenerator
RooFoamGenerator()
Definition: RooFoamGenerator.h:33
RooNumGenFactory
RooNumGenFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Definition: RooNumGenFactory.h:30
bool
TFoam
TFoam is the main class of the multi-dimensional general purpose Monte Carlo event generator (integra...
Definition: TFoam.h:21
RooFoamGenerator::_binding
RooTFoamBinding * _binding
Definition: RooFoamGenerator.h:53
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsNumGenerator
Class RooAbsNumGenerator is the abstract base class for MC event generator implementations like RooAc...
Definition: RooAbsNumGenerator.h:30
unsigned int
Double_t
double Double_t
Definition: RtypesCore.h:59
RooFoamGenerator
Class RooFoamGenerator is a generic toy monte carlo generator that implement the TFOAM sampling techn...
Definition: RooFoamGenerator.h:31
RooNumGenConfig
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Definition: RooNumGenConfig.h:25
RooFoamGenerator::clone
RooAbsNumGenerator * clone(const RooAbsReal &func, const RooArgSet &genVars, const RooArgSet &, const RooNumGenConfig &config, Bool_t verbose=kFALSE, const RooAbsReal *maxFuncVal=0) const
Definition: RooFoamGenerator.h:35
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooTFoamBinding
Lightweight interface adaptor that binds a RooAbsPdf to TFOAM.
Definition: RooTFoamBinding.h:24
RooFoamGenerator::canSampleConditional
virtual Bool_t canSampleConditional() const
Definition: RooFoamGenerator.h:45
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooFoamGenerator::canSampleCategories
virtual Bool_t canSampleCategories() const
Definition: RooFoamGenerator.h:46
RooFoamGenerator::~RooFoamGenerator
virtual ~RooFoamGenerator()
Destructor.
Definition: RooFoamGenerator.cxx:126
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
RooFoamGenerator::engine
TFoam & engine()
Definition: RooFoamGenerator.h:43
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
RooFoamGenerator::generateEvent
const RooArgSet * generateEvent(UInt_t remaining, Double_t &resampleRatio)
are we actually generating anything? (the cache always contains at least our function value)
Definition: RooFoamGenerator.cxx:140
RooFoamGenerator::_vec
Double_t * _vec
Definition: RooFoamGenerator.h:57
RooAbsNumGenerator.h