RooAddGenContext.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooAddGenContext.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_ADD_GEN_CONTEXT
00017 #define ROO_ADD_GEN_CONTEXT
00018 
00019 #include "RooAbsGenContext.h"
00020 #include "RooArgSet.h"
00021 
00022 class RooAddPdf;
00023 class RooAddModel;
00024 class RooDataSet;
00025 class RooRealIntegral;
00026 class RooAcceptReject;
00027 class TRandom;
00028 class TIterator;
00029 
00030 class RooAddGenContext : public RooAbsGenContext {
00031 public:
00032   RooAddGenContext(const RooAddPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
00033                    const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
00034   RooAddGenContext(const RooAddModel &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
00035                    const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
00036   virtual ~RooAddGenContext();
00037 
00038   virtual void setProtoDataOrder(Int_t* lut) ;
00039 
00040   virtual void attach(const RooArgSet& params) ;
00041 
00042   virtual void printMultiline(ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
00043 
00044 protected:
00045 
00046   virtual void initGenerator(const RooArgSet &theEvent);
00047   virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
00048   void updateThresholds() ;
00049 
00050   RooAddGenContext(const RooAddGenContext& other) ;
00051 
00052   const RooArgSet* _vars ;       
00053   RooArgSet* _pdfSet ;           //  Set owned all nodes of internal clone of p.d.f
00054   RooAbsPdf *_pdf ;              //  Pointer to cloned p.d.f
00055   TList _gcList ;                //  List of component generator contexts
00056   Int_t  _nComp ;                //  Number of PDF components
00057   Double_t* _coefThresh ;        //[_nComp] Array of coefficient thresholds 
00058   Bool_t _isModel ;              // Are we generating from a RooAddPdf or a RooAddModel
00059 
00060   ClassDef(RooAddGenContext,0) // Specialized context for generating a dataset from a RooAddPdf
00061 };
00062 
00063 #endif

Generated on Tue Jul 5 14:26:04 2011 for ROOT_528-00b_version by  doxygen 1.5.1