Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooRatio.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Author:
4 * Rahul Balasubramanian, Nikhef 01 Apr 2021
5 *
6 * Copyright (c) 2023, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef RooFit_RooRatio_h
14#define RooFit_RooRatio_h
15
16#include <RooAbsReal.h>
17#include <RooRealProxy.h>
18
19class RooArgList;
20
21class RooRatio : public RooAbsReal {
22public:
23 RooRatio();
24 RooRatio(const char *name, const char *title, double numerator, double denominator);
25 RooRatio(const char *name, const char *title, double numerator, RooAbsReal &denominator);
26 RooRatio(const char *name, const char *title, RooAbsReal &numerator, double denominator);
27 RooRatio(const char *name, const char *title, RooAbsReal &numerator, RooAbsReal &denominator);
28 RooRatio(const char *name, const char *title, const RooArgList &num, const RooArgList &denom);
29
30 RooRatio(const RooRatio &other, const char *name = nullptr);
31 TObject *clone(const char *newname) const override { return new RooRatio(*this, newname); }
32 ~RooRatio() override;
33
34 RooAbsReal const &numerator() const { return *_numerator; }
35 RooAbsReal const &denominator() const { return *_denominator; }
36
37protected:
38 double evaluate() const override;
39 void doEval(RooFit::EvalContext &) const override;
40 inline bool canComputeBatchWithCuda() const override { return true; }
41
44
45 ClassDefOverride(RooRatio, 2) // Ratio of two RooAbsReal and/or numbers
46};
47
48#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
Represents the ratio of two RooAbsReal objects.
Definition RooRatio.h:21
RooRealProxy _numerator
Definition RooRatio.h:42
~RooRatio() override
Definition RooRatio.cxx:101
bool canComputeBatchWithCuda() const override
Definition RooRatio.h:40
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition RooRatio.cxx:114
TObject * clone(const char *newname) const override
Definition RooRatio.h:31
RooAbsReal const & numerator() const
Definition RooRatio.h:34
void doEval(RooFit::EvalContext &) const override
Evaluate in batch mode.
Definition RooRatio.cxx:121
RooRealProxy _denominator
Definition RooRatio.h:43
RooAbsReal const & denominator() const
Definition RooRatio.h:35
Mother of all ROOT objects.
Definition TObject.h:41