Log of /trunk/hist/hist/inc/TGraph2D.h
Parent Directory
Revision
44507 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by
axel
File length: 7173 byte(s)
Diff to
previous 36165
Remove
using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.
Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.
Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.
Revision
31491 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 1 18:11:55 2009 UTC (5 years, 1 month ago) by
moneta
File length: 6532 byte(s)
Diff to
previous 31207
Merge the changes from David in the dev branch (up to rev 31490) to return the TFitResultPtr from the Fit methods of
TGraph, TGraph2D, TMultiGraph, THnSparse
Revision
31207 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 16 16:52:00 2009 UTC (5 years, 2 months ago) by
moneta
File length: 6494 byte(s)
Diff to
previous 27838
merge from https://root.cern.ch/svn/root/branches/dev/mathDev/hist/hist up to revision 31170
from David and myself
Summary of major changes:
- TFitResult, TFitResultPtr
- add new class TFitResult which extend FitResult with TNamed for the I/O. The result of the fit , including covariance and correlation matrix, minos errors, etc... can then be stored in a file
- add a class TFitResultPtr which behaves like a pointer to TFitResult and can be converted to an integer. This class is now returned by TH1::Fit and TGraph::Fit. By default the class contains only the returned integer status of the fit. If option "S" is used the class contains a pointer to TFitResult which can be retrieved using the -> or * operators (like a smart pointer)
The conversion to int provides backward compatibility with the old signature ( int TH1::Fit )
- TH1, TGraph, TGraph2D, TMultiGraph
change from int Fit(....) to TFitResultPtr Fit(.....)
remove internal function DoFit
- THnSparse
add functionality for fitting a sparse histogram. Default method is the likelihood one. Chi2 can be used with the new option "X"
- FOption
- add some new options for fitting:
"S" for storing the fit resul
"X" for forcing chi2 fit in case of THnSParse
"EX0" for neglecting errors in X when fitting TGraphErrors
- WrappedMultiTF1
- make the wrapper for TF1 multi-dim function implementing the gradient interface
Minos changes:
TH1:
- add check of compatibility for each bins when using Add on variable bin histograms
TH3:
- fix a bug in setting the entries for a projected 2d profile when using weights
THNSParse:
- set also the entries (and reset statistics) in the projected sparse histogram
TFormula:
- define the number for the 2d function like xygaus or xylandau
HFItInterface:
improve filling data for histograms (add support for bin volume normalization)
add initialization for exponential and 2d gaus functions
Revision
25487 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 22 12:44:13 2008 UTC (6 years, 4 months ago) by
moneta
File length: 6567 byte(s)
Diff to
previous 22992
Import changes from math development branch, in particular a re-implementation of
fitting methods for the histogram and graph objects.
NOTE: Since some files are removed, a make clean-hist is needed in order to be able
to compile hist after an svn update.
The implementation of TH1::Fit, TGraph::Fit, TGraph2D::Fit and TMultiGraph::Fit is
done in a common function implemented in HFitImpl.cxx (HFit::Fit).
In addition the file HFitInterface.h define ROOT::Fit::FitObject functions passing
option directly via Foption class and not by a string. They are used by the FitPanel.
Remove previously existing files THistFitInterface.cxx (and *.h) and
TGraphFitInterface.cxx (and *.h). The code is now in the HFitInterface.cxx (and *.h)
files.
Use plugin manager directly to open the Fit Panel. Do not pass anymore via the THistPainter.
Changes in TH1::FitPanel, TGraph::FitPanel.
Add FitPanel() method for TGraph2D and TMultiGraph.
Add new class TBackCompFitter, providing a backward compatible implementation of
TVirtualFitter using the new fitting class. It is constructed from the fitter class
and can be used to retrieve the fit information (result and configuration) via the
TVirtualFitter API from FitConfig and FitResult. A static istance is created after
calling the Fit method.
Other changes are:
TGraph:
- when creating a graph from an histogram, don't use the same name.
Otherwise it will conflict later with histogram created internally by the TGraph.
TH2:
add protected method TH2::DoFitSlices and TH2::DoProfile as common implementations
for (FitSlicesX,FitSclicesY) and (ProfileX, ProfileY).
pass the global statistics in DoProjection when range is (1,NBIN)
TBinimialEfficiencyFit:
add possibility to set verbose option, and set different precision and
max iterations for minimizing.
Revision
22992 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Apr 5 09:43:01 2008 UTC (6 years, 9 months ago) by
pcanal
File length: 6439 byte(s)
Diff to
previous 22694
Use the DirectoryAutoAdd facility for the classes:
TTree, TH1, TEventList, TEntryList, TGraph2D
(and hence their derived classes).
The instances of those classes are now added automatically
to the current directory only when Constructe'd with arguments or Clone'd
and to the directory they are read from when their are stored
directly in a TKey. [Note: the default constructor never adds
the object to the current directory]
The directory auto add can still be disabled for instance
of TH1 and TGraph2D by setting TH1::AddDirectory.
Additionally one can disable the directory auto add for
a specific class by doing:
TClass::GetClass("myclass")->SetDirectoryAutoAdd(0)
However you might want to also be able to restore the
behavior in which case you ought to do:
TClass *cl = TClass::GetClass("myclass");
ROOT::DirAutoAdd_t func = cl->GetDirectoryAutoAdd();
cl->SetDirectoryAutoAdd(0);
TROOT::ReadingObject is marked as deprecated.. It is still
set (as it was) but is no longer used by the above mention
classes.
NOTE: One side effect of this change, is that instnace
of TTree, TH1, TEventList, TEntryList, TGraph2D that are
retrieved from a TMessage (i.e. from a socket) no longer
auto register themselves to the current ROOT directory.
Add a new optional parameter to TDirectory::Append: 'replace'
If replace is true (the default is false), the Append will
first remove from the directory any existing object and
print the message:
Replacing existing OldClass: thename (Potential memory leak).
Add a new option parameter to TDirectory::CloneObject: 'autoadd'
If autoadd is true (the default), CloneObject will call the
object 'DirectoryAutoAdd' function (if any)
In TDirectory::CloneObject add support for multiple inheritance
from TObject where TObject is not the left most base class.
Fix memory leak in TGraph2D::operator= (and add TGraph2D::Clear)
Cleanup some documentation
Revision
15672 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 3 16:10:46 2006 UTC (8 years, 6 months ago) by
brun
Original Path:
trunk/hist/inc/TGraph2D.h
File length: 6156 byte(s)
Diff to
previous 13399
from Axel:
Change the signature of SavePrimitive from
void SavePrimitive(ofstream &out, Option_t *option);
to
void SavePrimitive(ostream &out, Option_t *option = "");
With this change one can do, eg
myhist.SavePrimitive(std::cout);
WARNING: do rm -f tree/src/*.o
Revision
13399 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 29 14:43:59 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/hist/inc/TGraph2D.h
File length: 6152 byte(s)
Diff to
previous 12547
From Anna:
Implement new functions in the TVirtualFitter and corresponding
implementations to compute the confidence intervals.
Two kinds of interfaces are implemented, eg
void TFitter::GetConfidenceIntervals(Int_t n, Int_t ndim, Double_t *x, Double_t *ci, Double_t cl)
//Computes point-by-point confidence intervals for the fitted function
//Parameters:
//n - number of points
//ndim - dimensions of points
//x - points, at which to compute the intervals, for ndim > 1
// should be in order: (x0,y0, x1, y1, ... xn, yn)
//ci - computed intervals are returned in this array
//cl - confidence level, default=0.95
//NOTE, that the intervals are approximate for nonlinear(in parameters) models
void TFitter::GetConfidenceIntervals(TObject *obj, Double_t cl)
//Computes confidence intervals at level cl. Default is 0.95
//The TObject parameter can be a TGraphErrors, a TGraph2DErrors or a TH1,2,3.
//For Graphs, confidence intervals are computed for each point,
//the value of the graph at that point is set to the function value at that
//point, and the graph y-errors (or z-errors) are set to the value of
//the confidence interval at that point.
//For Histograms, confidence intervals are computed for each bin center
//The bin content of this bin is then set to the function value at the bin
//center, and the bin error is set to the confidence interval value.
//NOTE: confidence intervals are approximate for nonlinear models!
//
//Allowed combinations:
//Fitted object Passed object
//TGraph TGraphErrors, TH1
//TGraphErrors, AsymmErrors TGraphErrors, TH1
//TH1 TGraphErrors, TH1
//TGraph2D TGraph2DErrors, TH2
//TGraph2DErrors TGraph2DErrors, TH2
//TH2 TGraph2DErrors, TH2
//TH3 TH3
Revision
11876 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 25 20:33:16 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/hist/inc/TGraph2D.h
File length: 6011 byte(s)
Diff to
previous 11161
From Olivier:
- New function SetHistogram. It allows to define the histogram to be
filled. This is useful to set the range of the X and Y axis.
Example:
void graph2dhist()
{
TCanvas *c = new TCanvas("c","Graph2D example",0,0,700,600);
Double_t x, y, z, P = 6.;
Int_t np = 300; // generate this many nodes
TGraph2D *dt = new TGraph2D();
TH2D* h2 = new TH2D("h2","h2",40,-6,6,40,-10,10);
dt->SetHistogram(h2);
TRandom *r = new TRandom();
for (Int_t N=0; N<np; N++) {
x = 2*P*(r->Rndm(N))-P;
y = 2*P*(r->Rndm(N))-P;
z = (sin(x)/x)*(sin(y)/y)+0.2;
dt->SetPoint(N,x,y,z);
}
gStyle->SetPalette(1);
dt->Draw("TRI1 p0");
}
- Fix a mistake in SetNpx and SetNpy
Revision
9096 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 2 15:45:24 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/hist/inc/TGraph2D.h
File length: 5839 byte(s)
Diff to
previous 8048
From Olivier:
- It is now possible to change the maximum number of iterations done to
find Delaunay's triangles from TGraph2D. Example:
TGraph2D* gr = new TGraph2D();
gr->SetMaxIter(20);
The default value is 100000.
Revision
7998 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Fri Jan 23 23:30:31 2004 UTC (11 years ago) by
brun
Original Path:
trunk/hist/inc/TGraph2D.h
File length: 5592 byte(s)
From Olivier:
TGraph2D is now split into 3 classes:
- TGraph2D (now in hist) to handle the basic graph 2d data
- TGraphDelaunay (in hist) to generate a Delaunay triangulation of a TGraph2D.
- TGraphPainter (in histpainter) to paint a TGraphDelaunay (used via
THistPainter)
- New function GetContourList in TGraph2D
- New option CONT5: draws a TGraph2D as a contour (using Delaunay
triangles).
- New TGraph2D constructor (from a TH2).
The class TSpectrum2 has been removed (still waiting for fixes from Miroslav)
NOTE: it is recommended to make distclean make
or at least
rm hist/src/G* graph/src/G*
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.