Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// Author: Rahul Balasubramanian, Nikhef 01 Apr 2021
4 * RooFit
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-2019, 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 *****************************************************************************/
17#ifndef ROO_RATIO
18#define ROO_RATIO
20#include "RooAbsReal.h"
21#include "RooProduct.h"
22#include "RooRealProxy.h"
24#include <list>
26class RooRealVar;
27class RooArgList;
28class RooProduct;
30class RooRatio : public RooAbsReal {
32 RooRatio();
33 RooRatio(const char *name, const char *title, double numerator,
34 double denominator);
35 RooRatio(const char *name, const char *title, double numerator,
36 RooAbsReal &denominator);
37 RooRatio(const char *name, const char *title, RooAbsReal &numerator,
38 double denominator);
39 RooRatio(const char *name, const char *title, RooAbsReal &numerator,
40 RooAbsReal &denominator);
41 RooRatio(const char *name, const char *title,
42 const RooArgList &num, const RooArgList &denom);
44 RooRatio(const RooRatio &other, const char *name = 0);
45 TObject *clone(const char *newname) const override {
46 return new RooRatio(*this, newname);
47 }
48 ~RooRatio() override;
51 double evaluate() const override;
52 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
53 inline bool canComputeBatchWithCuda() const override { return true; }
58 ClassDefOverride(RooRatio, 2) // Ratio of two RooAbsReal and/or numbers
#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
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:22
A RooProduct represents the product of a given set of RooAbsReal objects.
Definition: RooProduct.h:29
A RooRatio represents the ratio of two given RooAbsReal objects.
Definition: RooRatio.h:30
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Evaluate in batch mode.
Definition: RooRatio.cxx:113
RooRealProxy _numerator
Definition: RooRatio.h:55
~RooRatio() override
Definition: RooRatio.cxx:93
bool canComputeBatchWithCuda() const override
Definition: RooRatio.h:53
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooRatio.cxx:99
Definition: RooRatio.cxx:40
TObject * clone(const char *newname) const override
Definition: RooRatio.h:45
RooRealProxy _denominator
Definition: RooRatio.h:56
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
Mother of all ROOT objects.
Definition: TObject.h:37
static void output()