60 _binning(variable.getBinning(),slope.getVal(),offs.getVal()),
61 _var(
"var",
"variable",this,variable,true,true),
62 _slope(
"slope",
"slope",this,(
RooAbsReal&)slope),
63 _offset(
"offset",
"offset",this,(
RooAbsReal&)offs)
68 ss <<
"RooLinearVar::RooLinearVar(" <<
GetName()
69 <<
"): ERROR, slope(" << slope.
GetName() <<
") and offset("
70 << offs.
GetName() <<
") may not depend on variable("
72 const std::string errMsg = ss.str();
73 coutE(InputArguments) << errMsg << std::endl;
74 throw std::invalid_argument(errMsg);
91 _binning(other._binning),
92 _var(
"var",this,other._var),
93 _slope(
"slope",this,other._slope),
94 _offset(
"offset",this,other._offset)
130 coutE(Eval) <<
"RooLinearVar::setVal(" <<
GetName() <<
"): ERROR: slope is zero, cannot invert relation" << std::endl ;
231 return *transBinning ;
249 std::list<std::string> binningNames(1,
"");
252 binningNames.push_back(binning->GetName());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Common abstract base class for objects that represent a value and a "shape" in RooFit.
bool dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=nullptr) const
Check whether this object depends on values from an element in the serverList.
Abstract base class for RooRealVar binning definitions.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
virtual double jacobian() const
virtual const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const =0
Retrieve binning configuration with given name or default binning.
virtual bool isJacobianOK(const RooArgSet &depList) const
virtual void setVal(double value)=0
Set the current value of the object. Needs to be overridden by implementations.
virtual bool hasBinning(const char *name) const =0
Check if binning with given name has been defined.
bool hasRange(const char *name) const override
Check if variable has a binning with given name.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Special binning implementation for RooLinearVar that transforms the binning of the RooLinearVar input...
void updateInput(const RooAbsBinning &input, double slope=1.0, double offset=0.0)
Update the slope and offset parameters and the pointer to the input binning.
RooLinearVar is the most general form of a derived real-valued object that can be used by RooRealInte...
RooRealProxy _slope
Slope of transformation.
bool hasBinning(const char *name) const override
Returns true if binning with given name exists.If a given binning exists on the input variable,...
RooLinkedList _altBinning
!
std::list< std::string > getBinningNames() const override
Get a list of all binning names.
RooLinTransBinning _binning
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.
bool readFromStream(std::istream &is, bool compact, bool verbose=false) override
Read object contents from stream.
RooTemplateProxy< RooAbsRealLValue > _var
Input observable.
const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const override
Const version of getBinning()
~RooLinearVar() override
Destructor.
void Delete(Option_t *o=nullptr) override
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
TObject * FindObject(const char *name) const override
Return pointer to object with given name.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.