Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooExpPoly.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 *
4 * Copyright (c) 2022, CERN
5 *
6 * Redistribution and use in source and binary forms,
7 * with or without modification, are permitted according to the terms
8 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
9 */
10
11#ifndef RooFit_RooExpPoly_h
12#define RooFit_RooExpPoly_h
13
14#include <RooAbsPdf.h>
15#include <RooRealProxy.h>
16#include <RooListProxy.h>
17
18class RooExpPoly : public RooAbsPdf {
19public:
21 RooExpPoly(const char *name, const char *title, RooAbsReal &x, const RooArgList &coefList, int lowestOrder = 1);
22
23 RooExpPoly(const RooExpPoly &other, const char *name = nullptr);
24 TObject *clone(const char *newname) const override { return new RooExpPoly(*this, newname); }
25
26 /// Get the x variable.
27 RooAbsReal const &x() const { return _x.arg(); }
28
29 /// Get the coefficient list.
30 RooArgList const &coefList() const { return _coefList; }
31
32 /// Return the order for the first coefficient in the list.
33 int lowestOrder() const { return _lowestOrder; }
34
35 double getLogVal(const RooArgSet *nset) const override;
36
37 std::string getFormulaExpression(bool expand) const;
38
39 int getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
40 double analyticalIntegral(int code, const char *rangeName = nullptr) const override;
41
42 void adjustLimits();
43
44protected:
48
49 // CUDA support
50 void doEval(RooFit::EvalContext &) const override;
51 inline bool canComputeBatchWithCuda() const override { return true; }
52
53 /// Evaluation
54 double evaluate() const override;
55 double evaluateLog() const;
56
57 ClassDefOverride(RooExpPoly, 1) // ExpPoly PDF
58};
59
60#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
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
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
RooExpPoly implements a polynomial PDF of the form.
Definition RooExpPoly.h:18
double evaluate() const override
Evaluation.
double evaluateLog() const
std::string getFormulaExpression(bool expand) const
int lowestOrder() const
Return the order for the first coefficient in the list.
Definition RooExpPoly.h:33
TObject * clone(const char *newname) const override
Definition RooExpPoly.h:24
void doEval(RooFit::EvalContext &) const override
Compute multiple values of ExpPoly distribution.
double analyticalIntegral(int code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
bool canComputeBatchWithCuda() const override
Definition RooExpPoly.h:51
RooListProxy _coefList
Definition RooExpPoly.h:46
int getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double getLogVal(const RooArgSet *nset) const override
Return the log of the current value with given normalization An error message is printed if the argum...
void adjustLimits()
RooRealProxy _x
Definition RooExpPoly.h:45
int _lowestOrder
Definition RooExpPoly.h:47
RooAbsReal const & x() const
Get the x variable.
Definition RooExpPoly.h:27
RooArgList const & coefList() const
Get the coefficient list.
Definition RooExpPoly.h:30
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41