Logo ROOT  
Reference Guide
RooEffGenContext.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooEffGenContext.h,v 1.2 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * GR, Gerhard Raven, NIKHEF/VU, Gerhard.Raven@nikhf.nl *
7 * *
8 * Copyright (c) 2005, NIKHEF. All rights reserved. *
9 * *
10 * Redistribution and use in source and binary forms, *
11 * with or without modification, are permitted according to the terms *
12 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
13 *****************************************************************************/
14#ifndef ROO_EFF_GEN_CONTEXT
15#define ROO_EFF_GEN_CONTEXT
16
17#include "RooAbsGenContext.h"
18class RooAbsPdf;
19class RooArgSet;
20class RooDataSet;
21class RooAbsReal;
22
24public:
25 RooEffGenContext(const RooAbsPdf &model,
26 const RooAbsPdf &pdf,const RooAbsReal& eff,
27 const RooArgSet &vars, const RooDataSet *prototype= 0,
28 const RooArgSet* auxProto=0, bool verbose=false, const RooArgSet* forceDirect=0);
29 ~RooEffGenContext() override;
30
31protected:
32 void initGenerator(const RooArgSet &theEvent) override;
33 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
34
35private:
36 RooArgSet* _cloneSet; ///< Internal clone of p.d.f.
37 RooAbsReal* _eff; ///< Pointer to efficiency function
38 RooAbsGenContext* _generator; ///< Generator context for p.d.f
39 RooArgSet* _vars; ///< Vars to generate
40 double _maxEff; ///< Maximum of efficiency in vars
41
42 ClassDefOverride(RooEffGenContext, 1) // Context for generating a dataset from a PDF
43};
44#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:64
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:55
RooEffGenContext is a specialized generator context for p.d.fs represented by class RooEffProd,...
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
Generate one event.
RooArgSet * _cloneSet
Internal clone of p.d.f.
RooEffGenContext(const RooAbsPdf &model, const RooAbsPdf &pdf, const RooAbsReal &eff, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool verbose=false, const RooArgSet *forceDirect=0)
Constructor of generator context for RooEffProd products.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator.
RooArgSet * _vars
Vars to generate.
RooAbsGenContext * _generator
Generator context for p.d.f.
~RooEffGenContext() override
Destructor.
double _maxEff
Maximum of efficiency in vars.
RooAbsReal * _eff
Pointer to efficiency function.