Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 virtual TObject *clone(const char *newname) const {
46 return new RooRatio(*this, newname);
47 }
48 virtual ~RooRatio();
49
50protected:
51 double evaluate() const;
52 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const;
53 inline bool canComputeBatchWithCuda() const { return true; }
54
57
58 ClassDef(RooRatio, 2) // Ratio of two RooAbsReal and/or numbers
59};
60
61#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
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
bool canComputeBatchWithCuda() const
Definition RooRatio.h:53
RooRealProxy _numerator
Definition RooRatio.h:55
double evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition RooRatio.cxx:99
virtual TObject * clone(const char *newname) const
Definition RooRatio.h:45
RooRealProxy _denominator
Definition RooRatio.h:56
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const
Evaluate in batch mode.
Definition RooRatio.cxx:113
virtual ~RooRatio()
Definition RooRatio.cxx:93
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
Mother of all ROOT objects.
Definition TObject.h:41
static void output(int code)
Definition gifencode.c:226