Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
FlexibleInterpVar.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id: cranmer $
2// Author: Kyle Cranmer, Akira Shibata
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOSTATS_FLEXIBLEINTERPVAR
12#define ROOSTATS_FLEXIBLEINTERPVAR
13
14#include <RooAbsReal.h>
15#include <RooListProxy.h>
16
17#include <vector>
18
19namespace RooStats{
20namespace HistFactory{
21
23 public:
24
26
27 FlexibleInterpVar(const char *name, const char *title,
29 double nominal, std::vector<double> const& low, std::vector<double> const& high);
30
31 FlexibleInterpVar(const char *name, const char *title,
32 const RooArgList& _paramList, double nominal, std::vector<double> const& low,
33 std::vector<double> const& high,std::vector<int> const& code);
34
35 FlexibleInterpVar(const char *name, const char *title);
36 FlexibleInterpVar(const FlexibleInterpVar&, const char*);
37
38 void setInterpCode(RooAbsReal& param, int code);
39 void setAllInterpCodes(int code);
40 void setGlobalBoundary(double boundary) {_interpBoundary = boundary;}
41 void setNominal(double newNominal);
42 void setLow(RooAbsReal& param, double newLow);
43 void setHigh(RooAbsReal& param, double newHigh);
44
46 const std::vector<int>& interpolationCodes() const { return _interpCode; }
47
48 TObject* clone(const char* newname) const override { return new FlexibleInterpVar(*this, newname); }
49 ~FlexibleInterpVar() override ;
50
51 void printMultiline(std::ostream& os, Int_t contents, bool verbose = false, TString indent = "") const override;
52 virtual void printFlexibleInterpVars(std::ostream& os) const;
53
54 const RooListProxy& variables() const { return _paramList; }
55 double nominal() const { return _nominal; }
56 const std::vector<double>& low() const { return _low; }
57 const std::vector<double>& high() const { return _high; }
58
59 void doEval(RooFit::EvalContext &) const override;
60
61 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
62
63 protected:
64
66 double _nominal = 0.0;
67 std::vector<double> _low;
68 std::vector<double> _high;
69 std::vector<int> _interpCode;
70 double _interpBoundary = 1.0;
71
72 double evaluate() const override;
73
75 };
76}
77}
78
79#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
A class to maintain the context for squashing of RooFit models into code.
void doEval(RooFit::EvalContext &) const override
Base function for computing multiple values of a RooAbsReal.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Interface for detailed printing of object.
void setInterpCode(RooAbsReal &param, int code)
void setLow(RooAbsReal &param, double newLow)
void setHigh(RooAbsReal &param, double newHigh)
const std::vector< int > & interpolationCodes() const
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
const RooListProxy & variables() const
double evaluate() const override
Calculate and return value of polynomial.
TObject * clone(const char *newname) const override
const std::vector< double > & high() const
const std::vector< double > & low() const
virtual void printFlexibleInterpVars(std::ostream &os) const
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
Namespace for the RooStats classes.
Definition Asimov.h:19