Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooEfficiency.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooEfficiency.h,v 1.6 2007/05/11 10:14:56 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_EFFICIENCY
17#define ROO_EFFICIENCY
18
19#include "RooAbsPdf.h"
20#include "RooCategoryProxy.h"
21#include "RooRealProxy.h"
22#include "TString.h"
23
24class RooEfficiency : public RooAbsPdf {
25public:
26 // Constructors, assignment etc
27 /// Default constructor
28 inline RooEfficiency() {
29 }
30 RooEfficiency(const char *name, const char *title, const RooAbsReal& effFunc, const RooAbsCategory& cat, const char* sigCatName);
31 RooEfficiency(const RooEfficiency& other, const char* name=nullptr);
32 TObject* clone(const char* newname) const override { return new RooEfficiency(*this,newname); }
33
34 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
35 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
36 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
37 std::string
38 buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override;
39
40protected:
41
42 // Function evaluation
43 double evaluate() const override ;
44 RooCategoryProxy _cat ; ///< Accept/reject categort
45 RooRealProxy _effFunc ; ///< Efficiency modeling function
46 TString _sigCatName ; ///< Name of accept state of accept/reject category
47
48 ClassDefOverride(RooEfficiency,1) // Generic PDF defined by string expression and list of variables
49};
50
51#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
A space to attach TBranches.
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:24
A PDF helper class to fit efficiencies parameterized by a supplied function F.
TObject * clone(const char *newname) const override
TString _sigCatName
Name of accept state of accept/reject category.
RooCategoryProxy _cat
Accept/reject categort.
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 ...
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooEfficiency()
Default constructor.
std::string buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override
This function defines the analytical integral translation for the class.
RooRealProxy _effFunc
Efficiency modeling function.
double evaluate() const override
Calculate the raw value of this p.d.f which is the effFunc value if cat==1 and it is (1-effFunc) if c...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
A class to maintain the context for squashing of RooFit models into code.
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139