RootTalk


ROOT Discussion Forums

RooGraphVar

Some general interest ROOT macros and programs provided by ROOT users. If you have such macros or programs you can put them here.

Moderator: rootdev

RooGraphVar

Postby schliteur » Mon Dec 08, 2014 18:10

Hi everyone,
I was looking since yesterday for something which seems not to exist in Roofit.
I wanted to have a variable (inherited from RooAbsReal) which takes values from a TGraph given one server variable. So I have written a class called "RooGraphVar" . I put it in attachement and feel free to use it (you need to compile it with .L RooGraphVar.cxx+).

Here is an example with red crosses representing the TGraph (variable x), the blue solid line is a RooPlot of an RooGraphVar object with linear interpolation and the purple line a RooPlot of an RooGraphVar object with a spline interpolation.
Attachments
RooGraphVar_Example.png
RooGraphVar_Example.png (10.18 KiB) Viewed 255 times
RooGraphVar.h
(1.4 KiB) Downloaded 5 times
RooGraphVar.cxx
(2.63 KiB) Downloaded 6 times
schliteur
 
Posts: 6
Joined: Tue Sep 03, 2013 21:20

Return to Users' Contributions

Who is online

Users browsing this forum: No registered users and 1 guest