Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// Author: Stephan Hageboeck, CERN, May 2019
3 * Project: RooFit *
4 * Authors: *
5 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
6 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
7 * *
8 * Copyright (c) 2000-2005, Regents of the University of California *
9 * and Stanford University. All rights reserved. *
10 * *
11 * Redistribution and use in source and binary forms, *
12 * with or without modification, are permitted according to the terms *
13 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
14 *****************************************************************************/
15#ifndef ROO_JOHNSON
16#define ROO_JOHNSON
18#include "RooAbsPdf.h"
19#include "RooRealProxy.h"
20#include "RooConstVar.h"
22class RooRealVar;
24class RooJohnson final : public RooAbsPdf {
26 RooJohnson() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
28 RooJohnson(const char *name, const char *title,
29 RooAbsReal& mass, RooAbsReal& mu, RooAbsReal& lambda,
31 double massThreshold = -std::numeric_limits<double>::max());
33 RooJohnson(const RooJohnson& other, const char* newName = nullptr);
35 ~RooJohnson() override = default;
37 TObject* clone(const char* newname) const override {
38 return new RooJohnson(*this,newname);
39 }
41 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const override;
42 double analyticalIntegral(Int_t code, const char* rangeName=0) const override;
44 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
45 void generateEvent(Int_t code) override;
57 double _massThreshold{-1.E300};
59 double evaluate() const override;
60 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
61 inline bool canComputeBatchWithCuda() const override { return true; }
#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:64
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
Johnson's distribution.
Definition: RooJohnson.h:24
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooJohnson.cxx:97
double analyticalIntegral(Int_t code, const char *rangeName=0) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition: RooJohnson.cxx:138
RooRealProxy _mass
Definition: RooJohnson.h:50
TObject * clone(const char *newname) const override
Definition: RooJohnson.h:37
RooRealProxy _delta
Definition: RooJohnson.h:55
RooRealProxy _gamma
Definition: RooJohnson.h:54
void generateEvent(Int_t code) override
Generate events based on code obtained by getGenerator().
Definition: RooJohnson.cxx:216
~RooJohnson() override=default
RooRealProxy _mu
Definition: RooJohnson.h:51
RooRealProxy _lambda
Definition: RooJohnson.h:52
double _massThreshold
Definition: RooJohnson.h:57
bool canComputeBatchWithCuda() const override
Definition: RooJohnson.h:61
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of the Johnson distribution.
Definition: RooJohnson.cxx:115
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const override
Advertise which kind of direct event generation is supported.
Definition: RooJohnson.cxx:202
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Definition: RooJohnson.cxx:125
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
Mother of all ROOT objects.
Definition: TObject.h:37
double gamma(double x)
std::map< DataKey, RooSpan< const double > > DataMap
Definition: DataMap.h:59
static void output()