Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAcceptReject.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * File: $Id: RooAcceptReject.h,v 1.16 2007/05/11 09:11:30 verkerke Exp $
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_ACCEPT_REJECT
19#define ROO_ACCEPT_REJECT
20
21#include "RooAbsNumGenerator.h"
22#include "RooPrintable.h"
23#include "RooArgSet.h"
24
25class RooAbsReal;
26class RooRealVar;
27class RooDataSet;
28class RooRealBinding;
29class RooNumGenFactory ;
30
32public:
34 // coverity[UNINIT_CTOR]
35 } ;
36 RooAcceptReject(const RooAbsReal &func, const RooArgSet &genVars, const RooNumGenConfig& config, bool verbose=false, const RooAbsReal* maxFuncVal=nullptr);
37 RooAbsNumGenerator* clone(const RooAbsReal& func, const RooArgSet& genVars, const RooArgSet& /*condVars*/,
38 const RooNumGenConfig& config, bool verbose=false, const RooAbsReal* maxFuncVal=nullptr) const override {
39 return new RooAcceptReject(func,genVars,config,verbose,maxFuncVal) ;
40 }
41
42 const RooArgSet *generateEvent(UInt_t remaining, double& resampleRatio) override;
43 double getFuncMax() override ;
44
45
46 // Advertisement of capabilities
47 bool canSampleConditional() const override { return true ; }
48 bool canSampleCategories() const override { return true ; }
49
50 std::string const& generatorName() const override;
51
52protected:
53
54 friend class RooNumGenFactory ;
56
57 void addEventToCache();
59
60 double _maxFuncVal, _funcSum; ///< Maximum function value found, and sum of all samples made
61 UInt_t _realSampleDim; ///< Number of real dimensions to be sampled
62 UInt_t _catSampleMult; ///< Number of discrete dimensions to be sampled
63 UInt_t _minTrials; ///< Minimum number of max.finding trials, total number of samples
64 UInt_t _totalEvents; ///< Total number of function samples
65 UInt_t _eventsUsed; ///< Accepted number of function samples
66
67 UInt_t _minTrialsArray[4]; ///< Minimum number of trials samples for 1,2,3 dimensional problems
68};
69
70#endif
71
72/// \endcond
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.
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
Variable that can be changed from the outside.
Definition RooRealVar.h:37