MINT2
RooEffConvGenContext.h
Go to the documentation of this file.
1 #ifndef ROO_EFF_CONV_GEN_CONTEXT
2 #define ROO_EFF_CONV_GEN_CONTEXT
3 
4 // use C preprocessor to smuggle in a friend class into RooAbsGenContext
5 //
6 // *** this is an ugly hack but seems to work well enough for now, and is
7 // *** better than hacking the header files that come with ROOT for now...
8 #define RooEffGenContext RooEffGenContext; friend class RooEffConvGenContext
9 #include <RooConvGenContext.h>
10 #undef RooEffGenContext
11 
12 class RooAbsAnaConvPdf;
13 class RooDataSet;
14 class RooAbsReal;
15 class RooArgSet;
16 
17 class RooEffConvGenContext : public RooConvGenContext {
18 public:
19  RooEffConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
20  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
21  RooEffConvGenContext(const RooNumConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
22  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
23  RooEffConvGenContext(const RooAbsAnaConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
24  const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
25  virtual ~RooEffConvGenContext();
26 
27  virtual void attach(const RooArgSet& params);
28 
29 protected:
30 
31  // attach and initGenerator do the same thing
32  virtual void initGenerator(const RooArgSet& theEvent);
33  virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
34 
36 
37 private:
38 
39  void initEfficiency();
40  const RooAbsReal* efficiency();
41 
42  double _maxEff;
43 
44  //ClassDef(RooEffConvGenContext,0) // Context for generating a dataset from a PDF
45 };
46 
47 #endif
RooEffConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
virtual void initGenerator(const RooArgSet &theEvent)
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
const RooAbsReal * efficiency()
virtual void attach(const RooArgSet &params)