ROOT  6.06/09
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 * _cloneSet
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
RooAbsReal * _eff
virtual ~RooEffGenContext()
Destructor.
#define ClassDef(name, id)
Definition: Rtypes.h:254
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.
bool verbose
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooAbsGenContext * _generator
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41