Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooSimSplitGenContext.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_SIM_SPLIT_GEN_CONTEXT
0017 #define ROO_SIM_SPLIT_GEN_CONTEXT
0018 
0019 #include "RooAbsGenContext.h"
0020 #include "RooArgSet.h"
0021 #include <vector>
0022 
0023 class RooSimultaneous;
0024 class RooDataSet;
0025 class RooAbsCategoryLValue ;
0026 
0027 class RooSimSplitGenContext : public RooAbsGenContext {
0028 public:
0029   RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, bool _verbose= false, bool autoBinned=true, const char* binnedTag="");
0030   ~RooSimSplitGenContext() override;
0031   void setProtoDataOrder(Int_t* lut) override ;
0032 
0033   void attach(const RooArgSet& params) override ;
0034 
0035   void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
0036 
0037   RooDataSet *generate(double nEvents= 0, bool skipInit=false, bool extendedMode=false) override;
0038 
0039   void setExpectedData(bool) override ;
0040 
0041 protected:
0042 
0043   void initGenerator(const RooArgSet &theEvent) override;
0044   void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
0045 
0046   RooDataSet* createDataSet(const char* name, const char* title, const RooArgSet& obs) override ;
0047 
0048   RooSimSplitGenContext(const RooSimSplitGenContext& other) ;
0049 
0050   RooAbsCategoryLValue* _idxCat ;           ///< Clone of index category
0051   RooArgSet             _idxCatSet ;        ///< Owner of index category components
0052   const RooSimultaneous *_pdf ;             ///< Original PDF
0053   std::vector<RooAbsGenContext*> _gcList ;  ///< List of component generator contexts
0054   std::vector<int>               _gcIndex ; ///< Index value corresponding to component
0055   TString _idxCatName ;                     ///< Name of index category
0056   Int_t _numPdf ;                           ///< Number of generated PDFs
0057   double* _fracThresh ;                   ///< fraction thresholds
0058 
0059   RooArgSet _allVarsPdf ; ///< All pdf variables
0060 
0061   ClassDefOverride(RooSimSplitGenContext,0) // Context for efficiently generating a dataset from a RooSimultaneous PDF
0062 };
0063 
0064 #endif