Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooExponential.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id: RooExponential.h,v 1.10 2007/07/12 20:30:49 wouter 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_EXPONENTIAL
17#define ROO_EXPONENTIAL
18
19#include <RooAbsPdf.h>
20#include <RooRealProxy.h>
21
22class RooExponential : public RooAbsPdf {
23public:
25 RooExponential(const char *name, const char *title, RooAbsReal &variable, RooAbsReal &coefficient,
26 bool negateCoefficient = false);
27 RooExponential(const RooExponential &other, const char *name = nullptr);
28 TObject *clone(const char *newname) const override { return new RooExponential(*this, newname); }
29
30 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
31 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
32
33 /// Get the x variable.
34 RooAbsReal const &variable() const { return x.arg(); }
35
36 /// Get the coefficient "c".
37 RooAbsReal const &coefficient() const { return c.arg(); }
38
39 bool negateCoefficient() const { return _negateCoefficient; }
40
41protected:
44 bool _negateCoefficient = false;
45
46 double evaluate() const override;
47 void doEval(RooFit::EvalContext &) const override;
48 inline bool canComputeBatchWithCuda() const override { return true; }
49
50private:
51 ClassDefOverride(RooExponential, 2) // Exponential PDF
52};
53
54#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
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
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Exponential PDF.
void doEval(RooFit::EvalContext &) const override
Compute multiple values of Exponential distribution.
RooRealProxy c
bool negateCoefficient() const
RooAbsReal const & coefficient() const
Get the coefficient "c".
bool canComputeBatchWithCuda() const override
TObject * clone(const char *newname) const override
RooAbsReal const & variable() const
Get the x variable.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooRealProxy x
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41