Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
23 class RooEffGenContext : public RooAbsGenContext {
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