Logo ROOT  
Reference Guide
Go to the documentation of this file.
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 *****************************************************************************/
14#ifndef ROO_GAMMA
15#define ROO_GAMMA
17#include "RooAbsPdf.h"
18#include "RooRealProxy.h"
20class RooGamma : public RooAbsPdf {
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=0) ;
26 TObject* clone(const char* newname) const override { return new RooGamma(*this,newname); }
27 inline ~RooGamma() override { }
29 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const override ;
30 Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const override ;
32 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const override;
33 void generateEvent(Int_t code) override;
42 Double_t evaluate() const override ;
43 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooBatchCompute::DataMap&) const override;
44 inline bool canComputeBatchWithCuda() const override { return true; }
48 ClassDefOverride(RooGamma,1) // Gaussian PDF
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
char name[80]
Definition: TGX11.cxx:110
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:63
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
Implementation of the Gamma PDF for RooFit/RooStats.
Definition: RooGamma.h:20
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Definition: RooGamma.cxx:98
RooRealProxy beta
Definition: RooGamma.h:39
Double_t evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooGamma.cxx:83
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooBatchCompute::DataMap &) const override
Compute multiple values of Gamma PDF.
Definition: RooGamma.cxx:90
TObject * clone(const char *newname) const override
Definition: RooGamma.h:26
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition: RooGamma.cxx:106
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const override
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
Definition: RooGamma.cxx:117
~RooGamma() override
Definition: RooGamma.h:27
Definition: RooGamma.h:22
RooRealProxy x
Definition: RooGamma.h:37
void generateEvent(Int_t code) override
algorithm adapted from code example in: Marsaglia, G.
Definition: RooGamma.cxx:132
RooRealProxy gamma
Definition: RooGamma.h:38
RooRealProxy mu
Definition: RooGamma.h:40
bool canComputeBatchWithCuda() const override
Definition: RooGamma.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
std::map< DataKey, RooSpan< const double > > DataMap
static void output()