Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooGamma.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels
4 *
5 * authors: Stefan A. Schmitz, Gregory Schott
6 * implementation of the Gamma distribution (class structure derived
7 * from the class RooGaussian by Wouter Verkerke and David Kirkby)
8 *
9 * Redistribution and use in source and binary forms, *
10 * with or without modification, are permitted according to the terms *
11 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
12 *****************************************************************************/
13
14#ifndef ROO_GAMMA
15#define ROO_GAMMA
16
17#include "RooAbsPdf.h"
18#include "RooRealProxy.h"
19
20class RooGamma : public RooAbsPdf {
21public:
22 RooGamma() {} ;
23 RooGamma(const char *name, const char *title,
24 RooAbsReal& _x, RooAbsReal& _gamma, RooAbsReal& _beta, RooAbsReal& _mu);
25 RooGamma(const RooGamma& other, const char* name=nullptr) ;
26 TObject* clone(const char* newname) const override { return new RooGamma(*this,newname); }
27
28 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
29 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
30
31 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
32 void generateEvent(Int_t code) override;
33
34 RooAbsReal const &getX() const { return *x; }
35 RooAbsReal const &getGamma() const { return *gamma; }
36 RooAbsReal const &getBeta() const { return *beta; }
37 RooAbsReal const &getMu() const { return *mu; }
38
39protected:
40
45
46 double evaluate() const override ;
47 void doEval(RooFit::EvalContext &) const override;
48 inline bool canComputeBatchWithCuda() const override { return true; }
49
50private:
51
52 ClassDefOverride(RooGamma,1) // Gaussian PDF
53};
54
55#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
Implementation of the Gamma PDF for RooFit/RooStats.
Definition RooGamma.h:20
RooRealProxy beta
Definition RooGamma.h:43
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...
Definition RooGamma.cxx:149
RooAbsReal const & getX() const
Definition RooGamma.h:34
TObject * clone(const char *newname) const override
Definition RooGamma.h:26
void doEval(RooFit::EvalContext &) const override
Compute multiple values of Gamma PDF.
Definition RooGamma.cxx:90
RooAbsReal const & getGamma() const
Definition RooGamma.h:35
RooGamma()
Definition RooGamma.h:22
RooAbsReal const & getBeta() const
Definition RooGamma.h:36
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition RooGamma.cxx:106
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition RooGamma.cxx:83
RooRealProxy x
Definition RooGamma.h:41
RooAbsReal const & getMu() const
Definition RooGamma.h:37
void generateEvent(Int_t code) override
algorithm adapted from code example in: Marsaglia, G.
Definition RooGamma.cxx:165
RooRealProxy gamma
Definition RooGamma.h:42
RooRealProxy mu
Definition RooGamma.h:44
bool canComputeBatchWithCuda() const override
Definition RooGamma.h:48
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Definition RooGamma.cxx:98
Mother of all ROOT objects.
Definition TObject.h:41