Logo ROOT  
Reference Guide
RooRatio.h
Go to the documentation of this file.
1// Author: Rahul Balasubramanian, Nikhef 01 Apr 2021
2
3/*****************************************************************************
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 *****************************************************************************/
16
17#ifndef ROO_RATIO
18#define ROO_RATIO
19
20#include "RooAbsReal.h"
21#include "RooProduct.h"
22#include "RooRealProxy.h"
23
24#include <list>
25
26class RooRealVar;
27class RooArgList;
28class RooProduct;
29
30class RooRatio : public RooAbsReal {
31public:
32 RooRatio();
33 RooRatio(const char *name, const char *title, Double_t numerator,
34 Double_t denominator);
35 RooRatio(const char *name, const char *title, Double_t numerator,
36 RooAbsReal &denominator);
37 RooRatio(const char *name, const char *title, RooAbsReal &numerator,
38 Double_t 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);
43
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;
49
50protected:
51 Double_t evaluate() const override;
52 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooBatchCompute::DataMap&) const override;
53 inline bool canComputeBatchWithCuda() const override { return true; }
54
57
58 ClassDefOverride(RooRatio, 2) // Ratio of two RooAbsReal and/or numbers
59};
60
61#endif
#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
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
Double_t evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooRatio.cxx:99
RooRealProxy _numerator
Definition: RooRatio.h:55
~RooRatio() override
Definition: RooRatio.cxx:93
bool canComputeBatchWithCuda() const override
Definition: RooRatio.h:53
RooRatio()
Definition: RooRatio.cxx:40
TObject * clone(const char *newname) const override
Definition: RooRatio.h:45
RooRealProxy _denominator
Definition: RooRatio.h:56
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooBatchCompute::DataMap &) const override
Evaluate in batch mode.
Definition: RooRatio.cxx:113
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
Mother of all ROOT objects.
Definition: TObject.h:37
std::map< DataKey, RooSpan< const double > > DataMap
static void output()