Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooStepFunction.h
Go to the documentation of this file.
1
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitModels *
6 * File: $Id$
7 * Authors: *
8 * Tristan du Pree, Nikhef, Amsterdam, tdupree@nikhef.nl *
9 * *
10 * Copyright (c) 2000-2005, Stanford University. All rights reserved. *
11 *
12 * *
13 * Redistribution and use in source and binary forms, *
14 * with or without modification, are permitted according to the terms *
15 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
16 *****************************************************************************/
17#ifndef ROO_STEP_FUNCTION
18#define ROO_STEP_FUNCTION
19
20#include <RooAbsReal.h>
21#include <RooListProxy.h>
22#include <RooRealProxy.h>
23
24class RooArgList ;
25
27 public:
28
30 RooStepFunction(const char *name, const char *title,
31 RooAbsReal& x, const RooArgList& coefList, const RooArgList& limits, bool interpolate=false) ;
32
33 RooStepFunction(const RooStepFunction& other, const char *name = nullptr);
34 TObject* clone(const char* newname=nullptr) const override { return new RooStepFunction(*this, newname); }
35
36 const RooArgList& coefficients() { return _coefList; }
37 const RooArgList& boundaries() { return _boundaryList; }
38
39 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
40
41 int getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override;
42 double analyticalIntegral(int code, const char* rangeName=nullptr) const override;
43
44 protected:
45
46 double evaluate() const override;
47
48 private:
49
53 bool _interpolate = false;
54 mutable std::vector<double> _coefCache; //!
55 mutable std::vector<double> _boundaryCache; //!
56
58};
59
60#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 that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:63
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
The Step Function is a binned function whose parameters are the heights of each bin.
const RooArgList & coefficients()
TObject * clone(const char *newname=nullptr) const override
const RooArgList & boundaries()
std::vector< double > _boundaryCache
RooListProxy _coefList
int getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
RooListProxy _boundaryList
double evaluate() const override
Transfer contents to std::vector for use below.
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
std::vector< double > _coefCache
double analyticalIntegral(int code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooRealProxy _x
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17