Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFoamGenerator.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * File: $Id$
7 * Authors: *
8 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
10 * *
11 * Copyright (c) 2000-2005, Regents of the University of California *
12 * and Stanford University. All rights reserved. *
13 * *
14 * Redistribution and use in source and binary forms, *
15 * with or without modification, are permitted according to the terms *
16 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
17 *****************************************************************************/
18#ifndef ROO_FOAM_GENERATOR
19#define ROO_FOAM_GENERATOR
20
21#include "RooAbsNumGenerator.h"
22#include "RooPrintable.h"
23#include "RooArgSet.h"
24
25#include <TFoamIntegrand.h>
26#include <TFoam.h>
27
28class RooAbsReal;
29class RooRealVar;
30class RooDataSet;
31
32class RooNumGenFactory ;
33
35public:
36 RooFoamGenerator() = default;
37 RooFoamGenerator(const RooAbsReal &func, const RooArgSet &genVars, const RooNumGenConfig& config, bool verbose=false, const RooAbsReal* maxFuncVal=nullptr);
38 RooAbsNumGenerator* clone(const RooAbsReal& func, const RooArgSet& genVars, const RooArgSet& /*condVars*/,
39 const RooNumGenConfig& config, bool verbose=false, const RooAbsReal* maxFuncVal=nullptr) const override {
40 return new RooFoamGenerator(func,genVars,config,verbose,maxFuncVal) ;
41 }
42
43 const RooArgSet *generateEvent(UInt_t remaining, double& resampleRatio) override;
44
45 TFoam& engine() { return *_tfoam; }
46
47 bool canSampleConditional() const override { return false ; }
48 bool canSampleCategories() const override { return false ; }
49
50 std::string const& generatorName() const override;
51
52protected:
53
54 friend class RooNumGenFactory ;
56
57 std::unique_ptr<TFoamIntegrand> _binding; ///< Binding of RooAbsReal to TFoam function interface
58 std::unique_ptr<TFoam> _tfoam; ///< Instance of TFOAM generator
59 std::vector<double> _xmin ; ///< Lower bound of observables to be generated ;
60 std::vector<double> _range; ///< Range of observables to be generated ;
61 std::vector<double> _vec; ///< Transfer array for FOAM output
62};
63
64#endif
65
66/// \endcond
std::vector< double > _vec
unsigned int UInt_t
Definition RtypesCore.h:46
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
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
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
TFoam is the main class of the multi-dimensional general purpose Monte Carlo event generator (integra...
Definition TFoam.h:21