Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooEffProd.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id: RooEffProd.h,v 1.2 2007/05/11 10:14:56 verkerke Exp $
5 * Authors: *
6 * GR, Gerhard Raven, NIKHEF/VU *
7 * *
8 * Redistribution and use in source and binary forms, *
9 * with or without modification, are permitted according to the terms *
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
11 *****************************************************************************/
12#ifndef ROO_EFF_PROD
13#define ROO_EFF_PROD
14
15#include "RooAbsPdf.h"
16#include "RooRealProxy.h"
17#include "RooObjCacheManager.h"
18
19class RooEffProd: public RooAbsPdf {
20public:
21 // Constructors, assignment etc
23 RooEffProd(const char *name, const char *title, RooAbsPdf& pdf, RooAbsReal& efficiency);
24 RooEffProd(const RooEffProd& other, const char* name=nullptr);
25
26 TObject* clone(const char* newname) const override { return new RooEffProd(*this,newname); }
27
28 RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype,
29 const RooArgSet* auxProto, bool verbose) const override;
30
31protected:
32
33 // Function evaluation
34 double evaluate() const override ;
35 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
36
37
38 RooRealProxy _pdf ; ///< Probability Density function
39 RooRealProxy _eff; ///< Efficiency function
40
41 ClassDefOverride(RooEffProd,2) // Product operator p.d.f of (PDF x efficiency) implementing optimized generator context
42};
43
44#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract base class for generator contexts of RooAbsPdf objects.
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Container class to hold unbinned data.
Definition RooDataSet.h:57
The class RooEffProd implements the product of a PDF with an efficiency function.
Definition RooEffProd.h:19
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype, const RooArgSet *auxProto, bool verbose) const override
Return specialized generator context for RooEffProds that implements generation in a more efficient w...
TObject * clone(const char *newname) const override
Definition RooEffProd.h:26
RooRealProxy _pdf
Probability Density function.
Definition RooEffProd.h:38
RooRealProxy _eff
Efficiency function.
Definition RooEffProd.h:39
double evaluate() const override
Calculate and return 'raw' unnormalized value of p.d.f.
A class to maintain the context for squashing of RooFit models into code.
Mother of all ROOT objects.
Definition TObject.h:41