Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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_t verbose=kFALSE, const RooArgSet* forceDirect=0);
29 virtual ~RooEffGenContext();
30
31protected:
32 void initGenerator(const RooArgSet &theEvent);
33 void generateEvent(RooArgSet &theEvent, Int_t remaining);
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 ClassDef(RooEffGenContext, 1) // Context for generating a dataset from a PDF
43};
44#endif
const Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDef(name, id)
Definition Rtypes.h:325
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:35
RooDataSet is a container class to hold unbinned data.
Definition RooDataSet.h:36
RooEffGenContext is a specialized generator context for p.d.fs represented by class RooEffProd,...
RooArgSet * _cloneSet
void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator.
virtual ~RooEffGenContext()
Destructor.
RooAbsGenContext * _generator
void generateEvent(RooArgSet &theEvent, Int_t remaining)
Generate one event.