ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooSimGenContext.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_SIM_GEN_CONTEXT
#define ROO_SIM_GEN_CONTEXT

#include "TList.h"
#include "RooAbsGenContext.h"
#include "RooArgSet.h"

class RooSimultaneous;
class RooDataSet;
class RooAbsCategoryLValue ;

class RooSimGenContext : public RooAbsGenContext {
public:
  RooSimGenContext(const RooSimultaneous &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
                   const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
  virtual ~RooSimGenContext();
  virtual void setProtoDataOrder(Int_t* lut) ;

  virtual void attach(const RooArgSet& params) ;

  virtual void printMultiline(ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;


protected:

  virtual void initGenerator(const RooArgSet &theEvent);
  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);

  RooSimGenContext(const RooSimGenContext& other) ;

  RooAbsCategoryLValue* _idxCat ; // Clone of index category
  RooArgSet*            _idxCatSet ; // Owner of index category components
  const RooDataSet *_prototype;   // Prototype data set
  const RooSimultaneous *_pdf ;   // Original PDF
  TList _gcList ;                 // List of component generator contexts
  Bool_t _haveIdxProto ;          // Flag set if generation of index is requested
  TString _idxCatName ;           // Name of index category
  Int_t _numPdf ;                 // Number of generated PDFs
  Double_t* _fracThresh ;         //[_numPdf] Fraction threshold array

  ClassDef(RooSimGenContext,0) // Context for efficiently generating a dataset from a RooSimultaneous PDF
};

#endif
 RooSimGenContext.h:1
 RooSimGenContext.h:2
 RooSimGenContext.h:3
 RooSimGenContext.h:4
 RooSimGenContext.h:5
 RooSimGenContext.h:6
 RooSimGenContext.h:7
 RooSimGenContext.h:8
 RooSimGenContext.h:9
 RooSimGenContext.h:10
 RooSimGenContext.h:11
 RooSimGenContext.h:12
 RooSimGenContext.h:13
 RooSimGenContext.h:14
 RooSimGenContext.h:15
 RooSimGenContext.h:16
 RooSimGenContext.h:17
 RooSimGenContext.h:18
 RooSimGenContext.h:19
 RooSimGenContext.h:20
 RooSimGenContext.h:21
 RooSimGenContext.h:22
 RooSimGenContext.h:23
 RooSimGenContext.h:24
 RooSimGenContext.h:25
 RooSimGenContext.h:26
 RooSimGenContext.h:27
 RooSimGenContext.h:28
 RooSimGenContext.h:29
 RooSimGenContext.h:30
 RooSimGenContext.h:31
 RooSimGenContext.h:32
 RooSimGenContext.h:33
 RooSimGenContext.h:34
 RooSimGenContext.h:35
 RooSimGenContext.h:36
 RooSimGenContext.h:37
 RooSimGenContext.h:38
 RooSimGenContext.h:39
 RooSimGenContext.h:40
 RooSimGenContext.h:41
 RooSimGenContext.h:42
 RooSimGenContext.h:43
 RooSimGenContext.h:44
 RooSimGenContext.h:45
 RooSimGenContext.h:46
 RooSimGenContext.h:47
 RooSimGenContext.h:48
 RooSimGenContext.h:49
 RooSimGenContext.h:50
 RooSimGenContext.h:51
 RooSimGenContext.h:52
 RooSimGenContext.h:53
 RooSimGenContext.h:54
 RooSimGenContext.h:55
 RooSimGenContext.h:56
 RooSimGenContext.h:57
 RooSimGenContext.h:58
 RooSimGenContext.h:59