Logo ROOT   master
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"
18 class RooAbsPdf;
19 class RooArgSet;
20 class RooDataSet;
21 class RooAbsReal;
22 
24 public:
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_t verbose=kFALSE, const RooArgSet* forceDirect=0);
29  virtual ~RooEffGenContext();
30 
31 protected:
32  void initGenerator(const RooArgSet &theEvent);
33  void generateEvent(RooArgSet &theEvent, Int_t remaining);
34 
35 private:
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  ClassDef(RooEffGenContext, 1) // Context for generating a dataset from a PDF
43 };
44 #endif
void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooArgSet * _cloneSet
RooAbsReal * _eff
virtual ~RooEffGenContext()
Destructor.
#define ClassDef(name, id)
Definition: Rtypes.h:322
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooEffGenContext(const RooAbsPdf &model, const RooAbsPdf &pdf, const RooAbsReal &eff, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, const RooArgSet *forceDirect=0)
Constructor of generator context for RooEffProd products.
void generateEvent(RooArgSet &theEvent, Int_t remaining)
Generate one event.
RooEffGenContext is a specialized generator context for p.d.fs represented by class RooEffProd...
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
const Bool_t kFALSE
Definition: RtypesCore.h:90
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooAbsGenContext * _generator
RooAbsPdf, the base class of all PDFs
Definition: RooAbsPdf.h:40