Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooScaledFunc.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooScaledFunc.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
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-2005, 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#ifndef ROO_SCALED_FUNC
17#define ROO_SCALED_FUNC
18
19#include "RooAbsFunc.h"
20#include <list>
21
22class RooScaledFunc : public RooAbsFunc {
23public:
24 inline RooScaledFunc(const RooAbsFunc &func, double scaleFactor) :
25 RooAbsFunc(func.getDimension()), _func(&func), _scaleFactor(scaleFactor) { }
26 inline ~RooScaledFunc() override { }
27
28 inline double operator()(const double xvector[]) const override {
29 return _scaleFactor*(*_func)(xvector);
30 }
31 inline double getMinLimit(UInt_t index) const override { return _func->getMinLimit(index); }
32 inline double getMaxLimit(UInt_t index) const override { return _func->getMaxLimit(index); }
33
34 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override {
35 return _func->plotSamplingHint(obs,xlo,xhi) ;
36 }
37
38protected:
41
42 ClassDefOverride(RooScaledFunc,0) // Function binding applying scaling to another function binding
43};
44
45#endif
46
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition RooAbsFunc.h:27
virtual double getMaxLimit(UInt_t dimension) const =0
virtual double getMinLimit(UInt_t dimension) const =0
UInt_t getDimension() const
Definition RooAbsFunc.h:33
virtual std::list< double > * plotSamplingHint(RooAbsRealLValue &, double, double) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
Definition RooAbsFunc.h:73
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Lightweight RooAbsFunction implementation that applies a constant scale factor to another RooAbsFunc.
const RooAbsFunc * _func
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...
double getMinLimit(UInt_t index) const override
double operator()(const double xvector[]) const override
double _scaleFactor
~RooScaledFunc() override
double getMaxLimit(UInt_t index) const override
RooScaledFunc(const RooAbsFunc &func, double scaleFactor)