Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooLognormal.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * @(#)root/roofit:$Id$ *
4 * *
5 * RooFit Lognormal PDF *
6 * *
7 * Author: Gregory Schott and Stefan Schmitz *
8 * *
9 *****************************************************************************/
10
11#ifndef ROO_LOGNORMAL
12#define ROO_LOGNORMAL
13
14#include <RooAbsPdf.h>
15#include <RooRealProxy.h>
16
17class RooLognormal : public RooAbsPdf {
18public:
20 RooLognormal(const char *name, const char *title, RooAbsReal &_x, RooAbsReal &_m0, RooAbsReal &_k,
21 bool useStandardParametrization = false);
22 RooLognormal(const RooLognormal &other, const char *name = nullptr);
23 TObject *clone(const char *newname) const override { return new RooLognormal(*this, newname); }
24
25 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
26 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
27
28 Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK = true) const override;
29 void generateEvent(Int_t code) override;
30
31 /// Get the x variable.
32 RooAbsReal const &getX() const { return x.arg(); }
33
34 /// Get the median parameter.
35 RooAbsReal const &getMedian() const { return m0.arg(); }
36
37 /// Get the shape parameter.
38 RooAbsReal const &getShapeK() const { return k.arg(); }
39
41
42protected:
43 RooRealProxy x; ///< the variable
44 RooRealProxy m0; ///< the median, exp(mu)
45 RooRealProxy k; ///< the shape parameter, exp(sigma)
47
48 double evaluate() const override;
49 void doEval(RooFit::EvalContext &) const override;
50 inline bool canComputeBatchWithCuda() const override { return true; }
51
52private:
53 ClassDefOverride(RooLognormal, 2) // log-normal PDF
54};
55
56#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
RooFit Lognormal PDF.
void doEval(RooFit::EvalContext &) const override
Compute multiple values of Lognormal distribution.
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const override
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
TObject * clone(const char *newname) const override
RooRealProxy k
the shape parameter, exp(sigma)
void generateEvent(Int_t code) override
Interface for generation of an event using the algorithm corresponding to the specified code.
bool _useStandardParametrization
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
bool canComputeBatchWithCuda() const override
bool useStandardParametrization() const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
RooAbsReal const & getMedian() const
Get the median parameter.
RooRealProxy x
the variable
RooRealProxy m0
the median, exp(mu)
double evaluate() const override
ln(k)<1 would correspond to sigma < 0 in the parameterization resulting by transforming a normal rand...
RooAbsReal const & getShapeK() const
Get the shape parameter.
RooAbsReal const & getX() const
Get the x variable.
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41