Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAbsNumGenerator Class Referenceabstract

Abstract base class for MC event generator implementations like RooAcceptReject and RooFoam.

Definition at line 28 of file RooAbsNumGenerator.h.

Public Member Functions

 RooAbsNumGenerator ()
 
 RooAbsNumGenerator (const RooAbsReal &func, const RooArgSet &genVars, bool verbose=false, const RooAbsReal *maxFuncVal=nullptr)
 Initialize an accept-reject generator for the specified distribution function, which must be non-negative but does not need to be normalized over the variables to be generated, genVars.
 
virtual ~RooAbsNumGenerator ()
 
void attachParameters (const RooArgSet &vars)
 Reattach original parameters to function clone.
 
virtual bool canSampleCategories () const
 
virtual bool canSampleConditional () const
 
virtual RooAbsNumGeneratorclone (const RooAbsReal &, const RooArgSet &genVars, const RooArgSet &condVars, const RooNumGenConfig &config, bool verbose=false, const RooAbsReal *maxFuncVal=nullptr) const =0
 
virtual const RooArgSetgenerateEvent (UInt_t remaining, double &resampleRatio)=0
 
virtual std::string const & generatorName () const =0
 Return unique name of generator implementation.
 
virtual double getFuncMax ()
 
bool isValid () const
 
bool isVerbose () const
 
void setVerbose (bool verbose=true)
 

Protected Attributes

std::unique_ptr< RooDataSet_cache
 Dataset holding generared values of observables.
 
RooArgSet _catVars
 Set of discrete observabeles.
 
RooArgSet _cloneSet
 Set owning clone of input function.
 
RooAbsReal_funcClone = nullptr
 Pointer to top level node of cloned function.
 
const RooAbsReal_funcMaxVal = nullptr
 Container for maximum function value.
 
RooRealVar_funcValPtr = nullptr
 RRV storing function value in output dataset.
 
std::unique_ptr< RooAbsArg_funcValStore
 RRV storing function value in context.
 
bool _isValid = false
 Valid flag.
 
RooArgSet _realVars
 Set of real valued observabeles.
 
bool _verbose = false
 Verbose flag.
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/roofit/roofitcore/src/RooAbsNumGenerator.h>

Inheritance diagram for RooAbsNumGenerator:
[legend]

Constructor & Destructor Documentation

◆ RooAbsNumGenerator() [1/2]

RooAbsNumGenerator::RooAbsNumGenerator ( )
default

◆ RooAbsNumGenerator() [2/2]

RooAbsNumGenerator::RooAbsNumGenerator ( const RooAbsReal func,
const RooArgSet genVars,
bool  verbose = false,
const RooAbsReal maxFuncVal = nullptr 
)

Initialize an accept-reject generator for the specified distribution function, which must be non-negative but does not need to be normalized over the variables to be generated, genVars.

The function and its dependents are cloned and so will not be disturbed during the generation process.

Definition at line 52 of file RooAbsNumGenerator.cxx.

◆ ~RooAbsNumGenerator()

RooAbsNumGenerator::~RooAbsNumGenerator ( )
virtualdefault

Member Function Documentation

◆ attachParameters()

void RooAbsNumGenerator::attachParameters ( const RooArgSet vars)

Reattach original parameters to function clone.

Definition at line 146 of file RooAbsNumGenerator.cxx.

◆ canSampleCategories()

virtual bool RooAbsNumGenerator::canSampleCategories ( ) const
inlinevirtual

Reimplemented in RooAcceptReject, and RooFoamGenerator.

Definition at line 56 of file RooAbsNumGenerator.h.

◆ canSampleConditional()

virtual bool RooAbsNumGenerator::canSampleConditional ( ) const
inlinevirtual

Reimplemented in RooAcceptReject, and RooFoamGenerator.

Definition at line 57 of file RooAbsNumGenerator.h.

◆ clone()

virtual RooAbsNumGenerator * RooAbsNumGenerator::clone ( const RooAbsReal ,
const RooArgSet genVars,
const RooArgSet condVars,
const RooNumGenConfig config,
bool  verbose = false,
const RooAbsReal maxFuncVal = nullptr 
) const
pure virtual

Implemented in RooAcceptReject, and RooFoamGenerator.

◆ generateEvent()

virtual const RooArgSet * RooAbsNumGenerator::generateEvent ( UInt_t  remaining,
double resampleRatio 
)
pure virtual

Implemented in RooAcceptReject, and RooFoamGenerator.

◆ generatorName()

virtual std::string const & RooAbsNumGenerator::generatorName ( ) const
pure virtual

Return unique name of generator implementation.

Implemented in RooAcceptReject, and RooFoamGenerator.

◆ getFuncMax()

virtual double RooAbsNumGenerator::getFuncMax ( )
inlinevirtual

Reimplemented in RooAcceptReject.

Definition at line 51 of file RooAbsNumGenerator.h.

◆ isValid()

bool RooAbsNumGenerator::isValid ( ) const
inline

Definition at line 35 of file RooAbsNumGenerator.h.

◆ isVerbose()

bool RooAbsNumGenerator::isVerbose ( ) const
inline

Definition at line 45 of file RooAbsNumGenerator.h.

◆ setVerbose()

void RooAbsNumGenerator::setVerbose ( bool  verbose = true)
inline

Definition at line 41 of file RooAbsNumGenerator.h.

Member Data Documentation

◆ _cache

std::unique_ptr<RooDataSet> RooAbsNumGenerator::_cache
protected

Dataset holding generared values of observables.

Definition at line 73 of file RooAbsNumGenerator.h.

◆ _catVars

RooArgSet RooAbsNumGenerator::_catVars
protected

Set of discrete observabeles.

Definition at line 67 of file RooAbsNumGenerator.h.

◆ _cloneSet

RooArgSet RooAbsNumGenerator::_cloneSet
protected

Set owning clone of input function.

Definition at line 64 of file RooAbsNumGenerator.h.

◆ _funcClone

RooAbsReal* RooAbsNumGenerator::_funcClone = nullptr
protected

Pointer to top level node of cloned function.

Definition at line 65 of file RooAbsNumGenerator.h.

◆ _funcMaxVal

const RooAbsReal* RooAbsNumGenerator::_funcMaxVal = nullptr
protected

Container for maximum function value.

Definition at line 66 of file RooAbsNumGenerator.h.

◆ _funcValPtr

RooRealVar* RooAbsNumGenerator::_funcValPtr = nullptr
protected

RRV storing function value in output dataset.

Definition at line 72 of file RooAbsNumGenerator.h.

◆ _funcValStore

std::unique_ptr<RooAbsArg> RooAbsNumGenerator::_funcValStore
protected

RRV storing function value in context.

Definition at line 71 of file RooAbsNumGenerator.h.

◆ _isValid

bool RooAbsNumGenerator::_isValid = false
protected

Valid flag.

Definition at line 70 of file RooAbsNumGenerator.h.

◆ _realVars

RooArgSet RooAbsNumGenerator::_realVars
protected

Set of real valued observabeles.

Definition at line 68 of file RooAbsNumGenerator.h.

◆ _verbose

bool RooAbsNumGenerator::_verbose = false
protected

Verbose flag.

Definition at line 69 of file RooAbsNumGenerator.h.

  • roofit/roofitcore/src/RooAbsNumGenerator.h
  • roofit/roofitcore/src/RooAbsNumGenerator.cxx