File indexing completed on 2025-01-18 10:11:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_GEN_CONTEXT
0017 #define ROO_GEN_CONTEXT
0018
0019 #include "RooAbsGenContext.h"
0020 #include "RooArgSet.h"
0021
0022 class RooAbsPdf;
0023 class RooDataSet;
0024 class RooAcceptReject;
0025 class TRandom;
0026 class RooRealVar ;
0027 class RooAbsNumGenerator ;
0028
0029 class RooGenContext : public RooAbsGenContext {
0030 public:
0031 RooGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype= nullptr,
0032 const RooArgSet* auxProto=nullptr, bool verbose=false, const RooArgSet* forceDirect=nullptr);
0033 ~RooGenContext() override;
0034
0035 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
0036
0037 void attach(const RooArgSet& params) override ;
0038
0039 protected:
0040
0041 void initGenerator(const RooArgSet &theEvent) override;
0042 void generateEvent(RooArgSet &theEvent, Int_t remaining) override;
0043
0044 RooArgSet _cloneSet;
0045 RooAbsPdf *_pdfClone = nullptr;
0046 RooArgSet _directVars,_uniformVars,_otherVars;
0047 Int_t _code;
0048 double _maxProb{0.}, _area{0.}, _norm{0.};
0049 std::unique_ptr<RooAbsReal> _acceptRejectFunc;
0050 std::unique_ptr<RooAbsNumGenerator> _generator;
0051 std::unique_ptr<RooRealVar> _maxVar;
0052 Int_t _updateFMaxPerEvent ;
0053
0054 ClassDefOverride(RooGenContext,0)
0055 };
0056
0057 #endif