Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:19

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id$
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_BINNED_GEN_CONTEXT
0017 #define ROO_BINNED_GEN_CONTEXT
0018 
0019 #include "RooAbsGenContext.h"
0020 #include "RooArgSet.h"
0021 
0022 
0023 class RooDataSet;
0024 class RooDataHist;
0025 
0026 class RooBinnedGenContext : public RooAbsGenContext {
0027 public:
0028   RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype= nullptr,
0029                    const RooArgSet* auxProto=nullptr, bool _verbose= false);
0030   ~RooBinnedGenContext() override;
0031 
0032   RooDataSet* generate(double nEvents=0.0, bool skipInit=false, bool extendedMode=false) override ;
0033 
0034   void setProtoDataOrder(Int_t*) override  {}
0035 
0036   void attach(const RooArgSet& params) override ;
0037 
0038   void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
0039 
0040   void setExpectedData(bool) override ;
0041 
0042 protected:
0043 
0044   void initGenerator(const RooArgSet &theEvent) override;
0045   void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
0046 
0047   RooBinnedGenContext(const RooBinnedGenContext& other) ;
0048 
0049   std::unique_ptr<RooArgSet> _vars;
0050   RooArgSet _pdfSet ;          ///<  Set owned all nodes of internal clone of p.d.f
0051   RooAbsPdf *_pdf ;             ///<  Pointer to cloned p.d.f
0052   std::unique_ptr<RooDataHist> _hist ;          ///< Histogram
0053   bool _expectedData ;        ///< Asimov?
0054 
0055   ClassDefOverride(RooBinnedGenContext,0) // Specialized context for generating a dataset from a binned pdf
0056 };
0057 
0058 #endif