RooProdGenContext.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooProdGenContext.h,v 1.15 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_PROD_GEN_CONTEXT
00017 #define ROO_PROD_GEN_CONTEXT
00018 
00019 #include "TList.h"
00020 #include "RooAbsGenContext.h"
00021 #include "RooArgSet.h"
00022 
00023 class RooProdPdf;
00024 class RooDataSet;
00025 class RooRealIntegral;
00026 class RooAcceptReject;
00027 class TRandom;
00028 class TIterator;
00029 class RooSuperCategory ;
00030 
00031 class RooProdGenContext : public RooAbsGenContext {
00032 public:
00033   RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
00034                     const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
00035   virtual ~RooProdGenContext();
00036 
00037   virtual void setProtoDataOrder(Int_t* lut) ;
00038   virtual void printMultiline(ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
00039 
00040   virtual void attach(const RooArgSet& params) ;
00041 
00042 protected:
00043 
00044   virtual void initGenerator(const RooArgSet &theEvent);
00045   virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
00046 
00047   void updateCCDTable() ;
00048 
00049 
00050   RooProdGenContext(const RooProdGenContext& other) ;
00051   
00052   RooArgSet _commonCats ;        // Common category dependents
00053   RooArgSet* _ccdCloneSet ;
00054   RooSuperCategory* _ccdSuper ;  // SuperCategory of Common category dependents
00055   RooArgSet* _pdfCloneSet ;
00056   RooAbsPdf* _pdfClone ;
00057   RooRealIntegral* _pdfCcdInt ;
00058   RooArgSet _uniObs ;            // Observable to be generated with flat distribution
00059   TIterator* _uniIter ;          // Iterator over uniform observables
00060   Bool_t _ccdRefresh ;
00061   Double_t * _ccdTable ;
00062   const RooProdPdf *_pdf ;       //  Original PDF
00063   TList _gcList ;                //  List of component generator contexts
00064   TIterator* _gcIter ;           //! Iterator over gcList
00065   RooArgSet _ownedMultiProds ;   //  Owned auxilary multi-term product PDFs
00066 
00067   ClassDef(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf
00068 };
00069 
00070 #endif

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