Logo ROOT  
Reference Guide
Go to the documentation of this file.
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooLinearVar.h,v 1.19 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_LINEAR_VAR
17#define ROO_LINEAR_VAR
19#include <cmath>
20#include <cfloat>
21#include <string>
22#include <list>
23#include "RooAbsRealLValue.h"
24#include "RooRealProxy.h"
25#include "RooFormula.h"
26#include "RooLinTransBinning.h"
28class RooArgSet ;
32 // Constructors, assignment etc.
34 RooLinearVar(const char *name, const char *title, RooAbsRealLValue& variable, const RooAbsReal& slope, const RooAbsReal& offset, const char *unit= "") ;
35 RooLinearVar(const RooLinearVar& other, const char* name=nullptr);
36 TObject* clone(const char* newname) const override { return new RooLinearVar(*this,newname); }
37 ~RooLinearVar() override ;
39 // Parameter value and error accessors
40 void setVal(double value) override ;
42 // Jacobian and limits
43 bool hasBinning(const char* name) const override ;
44 const RooAbsBinning& getBinning(const char* name=nullptr, bool verbose=true, bool createOnTheFly=false) const override ;
45 RooAbsBinning& getBinning(const char* name=nullptr, bool verbose=true, bool createOnTheFly=false) override ;
46 std::list<std::string> getBinningNames() const override;
48 double jacobian() const override ;
49 bool isJacobianOK(const RooArgSet& depList) const override ;
51 // I/O streaming interface (machine readable)
52 bool readFromStream(std::istream& is, bool compact, bool verbose=false) override ;
53 void writeToStream(std::ostream& os, bool compact) const override ;
55 // Printing interface (human readable)
57 using RooAbsRealLValue::operator= ;
62 double evaluate() const override ;
67 RooRealProxy _slope ; ///< Slope of transformation
68 RooRealProxy _offset ; ///< Offset of transformation
70 ClassDefOverride(RooLinearVar,2) // Lvalue linear transformation function
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char name[80]
Definition: TGX11.cxx:110
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
Definition: RooAbsBinning.h:25
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual void setVal(double value)=0
Set the current value of the object. Needs to be overridden by implementations.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
virtual double offset() const
Definition: RooAbsReal.h:380
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:56
RooLinTransBinning is a special binning implementation for RooLinearVar that transforms the binning o...
RooLinearVar is the most general form of a derived real-valued object that can be used by RooRealInte...
Definition: RooLinearVar.h:30
RooRealProxy _slope
Slope of transformation.
Definition: RooLinearVar.h:67
bool hasBinning(const char *name) const override
Returns true if binning with given name exists.If a given binning exists on the input variable,...
TObject * clone(const char *newname) const override
Definition: RooLinearVar.h:36
RooLinkedList _altBinning
Definition: RooLinearVar.h:65
std::list< std::string > getBinningNames() const override
Get a list of all binning names.
RooLinTransBinning _binning
Definition: RooLinearVar.h:64
double jacobian() const override
Return value of Jacobian associated with the transformation.
double evaluate() const override
Calculate current value of this object.
void writeToStream(std::ostream &os, bool compact) const override
Write object contents to stream.
bool isJacobianOK(const RooArgSet &depList) const override
Returns true if Jacobian term associated with current expression tree is indeed constant.
void setVal(double value) override
Assign given value to linear transformation: sets input variable to (value-offset)/slope If slope is ...
RooRealProxy _offset
Offset of transformation.
Definition: RooLinearVar.h:68
bool readFromStream(std::istream &is, bool compact, bool verbose=false) override
Read object contents from stream.
RooTemplateProxy< RooAbsRealLValue > _var
Input observable.
Definition: RooLinearVar.h:66
const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const override
Const version of getBinning()
~RooLinearVar() override
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:38
Mother of all ROOT objects.
Definition: TObject.h:41