Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooLegacyExpPoly.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_RooLegacyExpPoly_h
12#define RooFit_RooLegacyExpPoly_h
13
14#include <RooAbsPdf.h>
15#include <RooRealProxy.h>
16#include <RooListProxy.h>
17
19public:
21 RooLegacyExpPoly(const char *name, const char *title, RooAbsReal &x, const RooArgList &coefList, int lowestOrder = 1);
22
23 RooLegacyExpPoly(const RooLegacyExpPoly &other, const char *name = nullptr);
24 TObject *clone(const char *newname) const override { return new RooLegacyExpPoly(*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
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
RooLegacyExpPoly implements a polynomial PDF of the form.
int getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double evaluateLog() const
bool canComputeBatchWithCuda() const override
RooArgList const & coefList() const
Get the coefficient list.
RooListProxy _coefList
RooAbsReal const & x() const
Get the x variable.
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...
std::string getFormulaExpression(bool expand) const
double evaluate() const override
Evaluation.
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.
TObject * clone(const char *newname) const override
int lowestOrder() const
Return the order for the first coefficient in the list.
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41