ROOT Version 5.14/00 Release Notes
ROOT version 5.14/00 has been released December 15, 2006.
Binaries for all supported platforms are available at:
http://root.cern.ch/root/Version514.html
Versions for AFS have also been updated. See the list of supported
platforms:
http://root.cern.ch/Welcome.html
For more information, see:
http://root.cern.ch
The following people have contributed to this new version:
Ilka Antcheva,
Maarten Ballintijn,
Bertrand Bellenot,
Rene Brun,
Philippe Canal,
Federico Carminati,
Olivier Couet,
Matthieu Demaret,
Valeri Fine,
Leo Franco,
Markus Frank,
Fabrizio Furano,
Nikolai Gagunashvili,
Gerri Ganis,
Andrei Gheata,
Mihaela Gheata,
Daniel Haertl,
Antti Hahto,
Andy Hanushevsky,
Christian Holm Christensen,
Jan Iwaszkiewicz,
Anna Kreshuk,
Wim Lavrijsen,
Josef Leydold,
Sergei Linev,
Ben Lloyd,
David Gonzalez Maline,
Pere Mato,
Lorenzo Moneta,
Miroslav Morhac,
Axel Naumann,
Jan Fiete GrosseOetringhaus,
Eddy Offermann,
Valeriy Onuchin,
Andreas Peters,
Timur Pocheptsov,
Gilles Quemener,
Fons Rademakers,
Stefan Roiser,
Paul Russo,
Scott Snyder,
Alja Tadel,
Matevz Tadel,
Guido Volpi
New tutorials directory structure
The tutorials have been reorganized with new subdirectories.
fft: Fast Fourier Transform with the fftw package
fit: Several examples illustrating minimization/fitting
foam: Random generator in multidimensional space
geom: Examples of use of the geometry package (TGeo classes)
gl: Visualisation with OpenGL
graphics: Basic graphics
graphs: Use of TGraph, TGraphErrors, etc
gui: Scripts to create Graphics User Interface
hist: Histograming
image: Image Processing
io: Input/Output
math: Maths and Statistics functions
matrix: Matrices (TMatrix) examples
mlp: Neural networks with TMultiLayerPerceptron
net: Network classes (client/server examples)
physics: LorentzVectors, phase space
pyroot: python tutorials
pythia: Example with pythia6
quadp: Quadratic Programming
ruby: ruby tutorials
smatrix: Matrices with a templated package
spectrum: Peak finder, background, deconvolutions
splot: Example of the TSplot class (signal/background estimator)
sql: Interfaces to SQL (mysql, oracle, etc)
thread: Using Threads
tmva: Examples of the MultiVariate Analysis classes
tree: Creating Trees, Playing with Trees
unuran: Interface with the unuram random generator library
xml: Writing/Reading xml files
You can execute the scripts in $ROOTSYS/tutorials (or subdirectories)
by setting your current directory in the script directory or from any
user directory with write access.
Several tutorials create new files. If you have write access to
the tutorials directory, the new files will be created in the tutorials
directory, otherwise they will be created in the user directory.
CINT
Optimisation of the size of the dynamic structures to store the dictionaries.
This reduces considerably the size of the ROOT executable modules.
On Linux, the standard root.exe takes now about 15 MBytes instead of 30.
A few fixes and extensions:
 for exceptions caught by the call wrapper: print its type name if it derives from std::exception; always print its what()
 fix demangling for GCC>=3
 std::string::npos is size_t
 fix for temp files ending up in root directory on windows
 cintdlls fixed for solaris
Clarified the source code license statements.
Core
 The libraries libPostscript, libMinuit and libHtml are not linked anymore
with the root.exe. These libraries are dynamically loaded via the plugin manager.
 Support now, like with the rootrc file, a hierarchy of rootlogon.C macros.
At startup of TRint, three levels of logon macros will be executed: the system
logon $ROOTSYS/etc/system.rootlogon.C, the global user logon ~/.rootlogon.C
and the local ./.rootlogon.C. For backward compatibility also the logon macro
as specified by the Rint.Logon rootrc environment setting, by default
./rootlogon.C, will be executed. No logon macros will be executed when
the system is started with the n option.
 Implement large file support (> 2GB) for the RFIO plugin. Also support
building with old Castor 1 libraries.
 Cleanup of many ambiguous license statements, ROOT should now be in
such a state that is passes the stringent Debian legal tests for OS software.
 Updated Debian packaging
 New accessors in TMap and TPair:
TObject *TMap::operator()(const char *keyname) const {return GetValue(keyname);}
TObject *TMap::operator()(TObject *key) const { return GetValue(key); }
const char *TPair::GetTitle() { return fValue>GetName(); }
 Allow argument to the rmkdepend R option to specify a custom dictionary name.
Also added description of new rmkdepend features.
 New class TObjectSpy and TObjectRefSpy. These small classes monitor objects
for deletion via RecursiveRemvoe() and reflect the deletion by reverting
the internal pointer to zero. When this pointer is zero (via GetObject())
we know the object has been deleted. This avoids the unsafe
TestBit(kNotDeleted) hack. The spied object must have the kMustCleanup bit
set otherwise you will get an error. To be used in editor management.
 Add two convenience scripts to set ROOTSYS, PATH, LD_LIBRARY_PATH and
MANPATH for a specific ROOT installation. For how to use see the
$ROOTSYS/bin/thisroot.[c]sh files.
 Allow iterating over TString contents using
TString a("abc");
int i=0;
while (a[i++])
...
One used to get an assert saying a[3] being accessed.
 Improved TString::Tokenize():
Bool_t Tokenize(TString &tok, Ssiz_t &from, const char *delim) const
This method can be used like:
// String to be tokenized
TString myl = "tok1 tok2tok3";
TString tok;
Ssiz_t from = 0; // or the index where to start from
while (myl.Tokenize(tok, from, "[ ]")) {
if (!tok.IsNull()) {
// Analyse tok
...
}
}
 Implemented ability to set the history size or completely disable history for the prompt, either via rootrc setting Rint.HistSize/HistSave or ROOT_HIST=size[:save:]. This is e.g. useful to prevent batch jobs from cluttering the history.
 Split TRFIOFile and TCastorFile from libRFIO into two plugin
libraries libRFIO and libRCastor. This allows each to be linked
against independent librfio and libcastor libraries.
 New improved TAlienFile plugin.
 Port to Mac OS X Leopard Preview, including full 64 bit version.
 New class TAtomicCount providing thread safe atomic operations
on a long, like setting, getting, incrementing, decrementing.
To be used for thread safe reference counting.
 New system and process info methods in TSystem:
GetSysInfo(SysInfo_t*), GetCpuInfo(CpuInfo_t*),
GetMemInfo(MemInfo_t*) and GetProcInfo(ProcInfo_t*).
 New feature that allows the Printf() function to be redirected
to print via the ROOT ErrorHandler. This will allow third party frameworks
to also redirect Printf() messages to the message log. Redirection
will take place after setting gPrintViaErrorHandler=kTRUE.
 Removed the Assert and Check macros that
were declared obsolete in the previous pro release. The alternatives
are R__ASSERT and R__CHECK.
 Added TSystem::StackTrace() support for Mac OS X and improved
StackTrace() output on Linux.
PROOF
 WARNING :
 Starting with this release all TVirtualProof... abstract layer classes have been suppressed.
 New feature allowing to retrieve the log files for a given
session via the xproofd connection layer independently of the status of
the session. This is particularly useful when a session hangs or
disconnects unexpectedly. The logs are collected as a list of
TMacro objects into an instance of a new class called TProofLog,
created via TProofMgr::GetSessionLogs(). TProofLog provides methods to
browse and search the files.
 New packetizer TAdaptivePacketizer using new a
loadbalancing algorithm and improved data structures. The main
improvements are a more even distribution of network transfers in
querytime, allowing to avoid bottlenecks at the end of the query, and
the usage of a processingtimebased packet size, allowing to prevent
situations where the query is significantly sloweddown towards the end
because of a slow node.
 New feature allowing run time configuration of proofserv environment.
The client can pass a set of shell variables to PROOF. These variables can
be used to startup different versions of the proofserv, or they can instruct the
system to run proofserv under valgrind or tcheck, etc.
 New methods to allow easy setting and inspection of the special
PROOF control parameters (and other input parameters) like
PROOF_MaxSlavesPerNode. Instead of
proof>AddInput(new
TParameter<Long_t>("PROOF_MaxSlavesPerNode", 2);
one can use
proof>SetParameter("PROOF_MaxSlavesPerNode", 2);
 More extensive performance statistics maintained on the master
instead of on the client.
 Enhancements to the package manager:
 support package enabling on
client;
 support workers that appeared after the initial upload, but
before the package is enabled;
 the package manager keeps track of PROOF version and rebuilds packages
when PROOF version is changed. This feature is supported via the new "clean" argument passed to the PROOFINF/BUILD.sh script;
 the package PROOFINF/SETUP.C function now returns an int: if < 0 the package setup is considered to have failed and the
package will not add to the list of enabled packages.
 Number of enhancements in the Session Viewer GUI.
 Number of thread races fixed resulting in much larger
stability.
 Improvements in merging algorithm saving a lot of space in case large
objects (like TH3's) from many workers need to be merged.
 Stabilization of memory usage by fixing several memory leaks.
 Several improvements in the package manager. Packages are now
also build and enabled for the local client session. This allows
the TSelector Begin() and Terminate() methods to see the same
environment as the PROOF master and workers.
 Improvements in the packetizer.
2 parameters are introduced in to the query input list 
PROOF_PacketSize and PROOF_PacketAsAFraction.
PROOF_PacketSize can be used to directly set the
TPacketizer::fPacketSize being number of events in a packet.
PROOF_PacketAsAFraction sets fPacketAsAFraction which is used to
calculate the packet size:
fPacketSize = fTotalEntries / (fPacketAsAFraction * nslaves)
fPacketAsAFraction can be interpreted as follows:
assuming all slave have equal processing rate, packet size
is (#events processed by 1 slave) / fPacketSizeAsAFraction
Example of setting the parameter:
proof>SetParameter("PROOF_PacketAsAFraction", 200);
 Improvements in the PROOF Session manager GUI. GUI does now reflect
sessions opened via the command line.
 New version of xrootd (200609281600).
 Improvements in Condor directed PROOF startup
 Removal of gROOT>Proof() startup API. PROOF is now always started via TProof::Open().
 Port xrootd to IBM Power5 64.
Improvements in THtml
Now generates XHTML 1.0 transitional compliant code.
If THtml knows a class A, but can't find its sources, it assumed that
it's a ROOT class, and the user was creating documentation for his/her
own classes. This fails if a user dares to have more than one lib.
THtml now checks the env var Root.Html.LibName, and creates a link using
that base URL, for all classes being defined in libLibName.*. I.e. if
that class A is defined in libLibName.so, and Root.Html.LibName is
../LibNameDoc, then THtml will create a link to ../LibNameDoc/A.html.
The class name / library name mapping is done with the help of rlibmap;
see the class reference for more info.
Many small improvements, most important ones:
 optional display of inheritated or nonpublic members. Developers probably want to see the nonprivate members hiding the base classes' ones, whereas users will probably prefer seeing only public members, including those derived from base classes.
 display very short inline methods.
 create links to ViewCVS
Added (optional) class diagrams using GraphViz's dot. The diagrams are:
 inheritance chart: list of all derived and all base classes, with links to their documentation
 inherited members: previously part of the PDF linked as "inheritance tree", shows the base classes' members (data and function), their access, and at what level they get overridden by a derived class, with links to the classes' documentation
 list of included files: shows which files get included by the header and by the source file
 list of dependent libraries: shows which libraries need to appear on the link line to resolve all symbols, with a link to the global chart of library dependencies
If javascript is disabled, only the inheritance diagram is visible.
Improvements in Pyroot
Work has been done to reduce the list of known annoyances, that up to now were
low priority because workarounds existed.
These include: improved latestartup to allow choosing batch mode; allowing the
"from ROOT import *" construct in multiple modules, and recovering state after
a failed load of a dynamic library.
Interpreter environment
Python 2.5 adds support for 64bit indexing into python containers, which
requires changes in all extension modules.
PyROOT has been updated with the needed modifications.
C++ language and pythonization
Looping over a std::map automatically unpacks pairs into a tuple (key, value);
string has been added to the list of std:: classes, and overloading priority
now distinguishes between ints and doubles.
Optimizations
Following TRint, fewer libraries are loaded on startup.
Improvements in Trees, I/O, Meta
 Make sure that
gROOT>GetClass("vector< std::pair< Char_t, UChar_t> >")
always find its dictionary (It is registered in the TClassTable as vector< pair< char,unsigned char> >).
 Replaced the message 'UNKNOW type, sopen=' with a more explicit message
and only issue it when it is actually revelant (i,e. not when reading in emulated
mode and the stl container containing the requested type is always
empty)
 Improved ROOT's handling of virtual inheritance by using directly the
offet information in CINT rather than the one in ROOT's list of bases classes.
 When looking up a data member by name in TClass::GetRealData()
add a match ignoring array dimensions to allow for schema
evolution where a fixedsize array changes size.
 When deleting an emulated object also delete the variable size array of int/float/etc..
 Removed all fixed length temporary strings used in the branch name parsing code.
 Cleaned up the treatment of fReadEntry in a TBranch/TBranchElement. It now consistently and predictably remembers the most recent entry number passed to a GetEntry() call. (This is in particular useful when dealing with TRef::Object being called from a streamer and need the BranchRef facility ; This fixes a problem seen by DZero)
 Fixed for SetBranchStatus when looking up branches in a friend tree.
 Rewrite of the SetBranchAddress method to lay down the ground work to insure the proper deletion of user objects allocated by the TTree.
 Fixed a couple of issue if the 'fast' tree cloning mode (the resulting files in those cases were hard read)
 Insured that in MakeClass/MakeSelector we consistently use the same name for the branch pointer variables.
 Update MakeClass/MakeSelector so that the resulting skeleton initialize the array of pointers
 Improved support for map<X,Y> when Y is a class template (for example map<int,vector<int> >
and we do not have the library for it (aka Emulated mode).
 Implemente TTree::GetEntries(const char *selection) which return the number of entries passing the selection
 Added a new sort option 'SortBasketsByEntry' to the fast TTree cloning.
With this option the branches' baskets will be reordered so that they
are in the order they will be read when processing the full tree.

TTreeFormula (and hence TTree::Draw) is now able to plot TString
and std::string obeject directly. The following
tree>Draw("mybr.mystring");
nows draw the same results as
tree>Draw("mybr.mystring.c_str()");
or
tree>Draw("mybr.mytstring.Data()");
i.e. an histogram whose labels are the string value of 'mystring'

TTreeFormula (and hence TTree::Draw) is now able to plot objects of
any class which has either AsDouble or AsString (AsDouble has
priority). So for such a class (for example TTimeStamp):
tree>Draw("myTimeStamp");
will plot the same as:
tree>Draw("myTimeStamp.AsDouble");
AsString can be returning either a char*, or a TString or an std::string
Interfaces to SQL data bases
 Support of date/time/date and time/timestamp data introduced in TSQLStatement.
All such data now can be accessed without text conversion.
The following methods can be used:
SetTime()/GetTime()  only time (hour:min:sec),
SetDate()/GetDate()  only date (yearmonthday),
SetDatime()/GetDatime()  date and time
SetTimestamp()/GetTimestamp()  timestamp with seconds fraction
For some of these methods TDatime type can be used as parameter / return value.
Be aware, that TDatime supports only dates after 19950101.
There are also methods to get separately year, month, day, hour, minutes and seconds.
 Support of binary data in TSQLStatement
Most of modern data bases support just binary data, which is
typically via SQL type name 'BLOB'. To access data in such
columns, GetBinary()/SetBinary() methods should be used.
The current implementation supposes, that the complete content of the
column must be retrieved at once. Therefore very big data of
gigabytes size may cause a problem.
Improvements in the XML classes
 TXMLEngine class (ROOT xml parser) in addition to normal xml nodes now can parse
xml processing instructions with syntax
and xml comments with syntax
 Comment line and style sheet definition (one special case of xml processing instruction)
can be inserted manually by the user with any text/xml editor or with new methods of TXMLFile
Bool_t TXMLFile::AddXmlComment(const char* comment);
Bool_t TXMLFile::AddXmlStyleSheet(const char* href, const char* type, ...);
 Arbitrary text line can be inserted on the top of xml file with this call:
Bool_t TXMLFile::AddXmlLine(const char* line);
Now this line can contain either comments or xml processing instructions, while
anything else will not pass xml syntax check.
MathCore
Changes for this release are:
 rename boost free functions to ROOT::Math::VectorUtil::boost , boostX, boostY and boostZ (using lower case) to avoid a conflict with the Boost classes.
 add these new free function in the namespace ROOT::Math::VectorUtil
 ProjVector(v,u) to find the component of the vector v along the vector u
 PerpVector(v,u) to find the component of the vector v perpendicular to the vector u
 Perp(v,u) to get the magnitude of the
 Perp2(v,u) to get the the magnitude square of the PerpVector(v,u)
 Phi_0_2Pi(phi) to transform a phi angle in the interval (0,2PI]
 Phi_0_2Pi(phi) to transform a phi angle in the interval (PI,2PI]
 add the LorentzVector::pt() member function
 Improvements in the iterator based methods for the Vectors and Rotation classes.
 An additional method for all Vector classes and Rotation classes has been added to retrieve the class content by using only the start position (begin) of the iterator (like LorentzVector::GetCoordinates(begin) or Rotation3D::GetComponents(begin) ). We keep still the safer method where both iterators (begin and end) are required .
 The iterator methods are now corrected to work not only for randomaccess iterator. They can be used for example with iterators from std::list or std::ostream_iterator (request 21311)
 Introduction of function interface classes to describe basic mathematical functions which can be used by the numerical algorithm. Previously these interfaces where present in MathMore. Now they have been revised and extended to include the description for multidimensional functions. For a detailed description, see the reference doc.
 The template classes, ROOT::Math::Functor , ROOT::Math::WrappedFunction and ROOT::Math::WrappedParam Function have been added to wrap any C++ callable object, including pointer to nonstatic member functions, in creating instances of object implementing the desired interface.
 The include file for the probability density functions (PDF) is called now PdfFunc.h. The file DistFunc.h defines all the statistical functions (probability density, cumulative distribution and quantile functions). When using the standalone library one should use instead the header file DistFuncMathCore.h.
 The cumulative distribution functions (lower integral of the PDF) and their complements (upper tail integral) have been renamed to have the extension _cdf and _cdf_c. (see the release notes for MathMore).
In addition the following bug fixes have been applied:
 Fix for conversions from Rotation3D to AxisAngle rotation in the case of a rotation angle of PI.
 Fix a bug when getting the Rotation3D components as 3D vectors (bug 21325)
 Correctly defined as const some member functions in the rotation classes (bug 21287)
 Fix a bug in setting the angle in the axial rotations.
 Fix the I/O for LorentzVector of Double32.
A new test has been added in mathcore/test for the I/O of 3D and 4D Vectors of Double32 and double types and for wrappers of MathCore Vectors. The test provides also the possibility to run with mixed ReflexCint dictionary if the environment variable useReflex is set.
More detailed description of the current MathCore release can be found at this location.
MathMore
From this release, MathMore requires a GSL version larger or equal 1.8.
The names of the statistical functions have been changed for clarity and to avoid ambiguities. The previous names are currently kept for providing backward compatibility.
 The cumulative distribution functions, lower tail integral of the probability density functions, have now the extension _cdf (before they had the extension _quant). The CDF for the normal distributions is called normal_cdf(x, sigma, mu).
 The complement of the cumulative distributions, upper tail integral of the PDF (called in statistics the survival function) have now the extension _cdf_c (instead of _prob). For example the normal survival function is called : normal_cdf_c(x, sigma,mu).
 The inverse of the cumulative distribution, called in statistics quantile function or percent point function, has now the extension _quantile (before was _quant_inv). The quantile of the normal distribution is normal_quantile(p,sigma).
 The inverse of the complement of the CDF is called _quantile_c (before was _prob_inv). The inverse of the normal survival function is normal_quantile_c(p,sigma).
The following picture gives an example of the various normal distribution functions.
This release contains in addition the following statistical functions (some of them are introduced in GSL only from version 1.8):
 Landau and beta probability density functions (landau_pdf, beta_pdf )
 cumulative distribution functions and their complement for the Poisson, Binomial and Beta distributions (poisson_cdf, binomial_cdf, beta_cdf )
 quantile functions and complements for the Beta and the Fdistribution (beta_quantile, fdistribution_quantile)
The headerfile DistFunc.h defines all the statistical functions (PDF, CDF and quantiles). The headers PdfFunc.h, ProbFunc.h and ProbFuncInv.h define separately the PDF, CDF and their inverse (quantiles). Since some of the PDF and CDF functions are also in MathCore, when the standalone MathMore version is used, the header files PdfFuncMathMore.h and ProbFuncMathMore.h must then be used.
Additional main changes for this release are the adoption of the new function interfaces, defined now in MathCore. We provide separate interfaces for basic functions, functions with gradient functionality and parametric functions. The nonbackward compatible changes are:
 The 1D generic function interface, ROOT::Math::IGenFunction is defined now in the header file "Math/IFunction.h" from MathCore. Forward declaration of the interfaces is possible only by using the header "Math/IFunctionfwd.h".
 We use directly pointers to doubles (double *) instead of std::vector<double> in methods like IParamFunction::SetParameters or GetParameters.
 We renamed the member function providing the derivative for 1D functions, IGradientFunction::Derivative(x). The function IGradientFunction::Gradient(const double *x, double * g) calculates the grsadient vector for the multidimensional functions.
Further additions are:
 New class, ROOT::Math::Minimizer1D, for performing minimization of arbitrary one dimensional functions. It based on the Goldensection or Brent algorithm implemented in GSL.
 Add a static methods ROOT::Math::Derivator::Eval for calculating the derivatives passing a reference of type ROOT::Math::IFunction
 Add support in ROOT::Math::Derivator using the new static methods for calculating the partial derivative of a multidimensional function and the derivative with respect to the parameter for a parametric function. Examples are provided in the test program mathmore/test/testDerivator.cxx.
 New wrapped functions for TF1 objects (ROOT::Math::WrappedTF1 and ROOT::Math::WrappedMultiTF1) to convert a TF1 (or TF2 or TF3) in a ROOT::Math::IFunction interface.
 Use the fast Ziggurat algorithm available from GSL 1.8 to generate random gaussian numbers with ROOT::Math::Random::Gaus.
More detailed description of this released MathMore version can be found here.
SMatrix
Only small changes for this release:
 Added the methods At(i,j) and At(i) for SMatrix and SVector returning the values at the given indices (starting from zero), following a request from CMS.
 Some fixes in the online documentation
Online documentation of the current released version of SMatrix can be found at this location.
Minuit2
No major changes for this release, only a couple of bug fixes.
For improving performances in case of minimization of very simple functions (like those used in the test stressFit.cxx, Minuit2 can be compiled with the option DMN_USE_STACK_ALLOC, by un commenting the corresponding line in the minuit2/Module.mk. In this case an optimized allocator for the Minuit2 objects is used and providing significant gain in performance. The drawback is that Minuit2 will not be anymore threadsafe.
Online documentation of the current released version of Minuit2 can be found at this location.
Unuran
An interface to a new package, UNU.RAN, (Universal Non Uniform Random number generator for generating non uniform pseudorandom numbers) has been introduced. UNU.RAN is an ANSI C library licensed under GPL.
It contains universal (also called automatic or blackbox) algorithms that can generate random numbers from large classes of continuous or discrete distributions, and also from practically all standard distributions. An extensive online documentation are available at the UNU.RAN Web Site.
The classes TUnuran, TUnuranDistr and TUnuranDistrMultiu have been introduced to use the UNU.RAN C library from ROOT and C++ from ROOT and using C++ objects. UNU.RAN can be used in two distinct ways:
 using the UNU.RAN native string API for predefined distributions (see UNU.RAN documentation for the string API):
TUnuran unr;
//initialize unuran to generate normal random numbers using a "arou" method
unr.Init("normal()","method=arou");
//......
// sample distributions
double x = unr.Sample();

Using a distribution object
 For 1D distribution the class TUnuranDistr can be used. A TUnuranDistr object can be created from two functions:
one providing the pdf (probability density function) and one the cdf (cumulative distribution function).
//1D case: create a distribution from two TF1 object pointers pdfFunc, cdfFunc
TUnuranDistr distr( pdfFunc, cdfFunc);
//initialize unuran passing the distribution and a string defining the method
unr.Init(distr, "method=hinv");
 For multidimensional distribution the class TUnuranDistrMulti must be used. In this case only the multidimensional pdf is
required
//MultiDim case from a TF1 (or TF2 or TF3) object describing a multidimensional function
TUnuranDistrMulti distrMulti( pdfFuncMulti);
// the recommended method for multidimensional function is "hitro"
unr.Init(distr, "method=hitro");
Functionality is also provided via the C++ classes for:
 using a different random number generator by passing a TRandom pointer when constructing the TUnuran class (by default the ROOT gRandom is passed to UNURAN).
 setting the domain of the distribution using TUnuranDistr::SetDomain
The UNU.RAN documentation provides a detailed description of all the available methods and the possible options which one can pass to UNU.RAN for both 1D and multidimensional distributions.
TH1
 Add also a new member function TH1::GetEffectiveEntries() , to be used for weighted histograms. Fixed a bug in the TH1::Divide function when the option "B" (Binomial statistics) was used and the histogram were filled with weights.
 Add new functionality to TH1::Rebin. An existing histogram with fix size bins can be
rebinned with variable size bins.
 The Option "same" can be specified to TH1::Draw if the pad/canvas is empty.
In this case the option is ignored.
 Fix TH1::GetMeanError() and TH1::GetRMSError() for weighted histograms. Use in that case the number of effective entries.
 Modify TH1::GetStats(), TH2::GetStats() and TH3::GetStats() to use underflow/overflow when the static flag fgStatOverflows is set
 Fix a problem of the statistics in the projected 1D histogram from a 2D (TH2) filled with weights. The number of entries in the projected histogram has been set to the number of effective projected entries.
 Add a new verison of the Chi2 Test. Note that TH1::Chi2TestX has been changed and requires an additional parameter, igood, which returns the status of the test. See below for a more detailed description of the algorithm.
test for comparing weighted and unweighted histograms
This new implementation is based on the papers " test for comparison of weighted and unweighted histograms" in Proceedings of PHYSTAT05 and "Comparison weighted and unweighted histograms", arXiv:physics/0605123 by N.Gagunashvili. This function has been implemented by Daniel Haertl in August 2006.
The algorithm computes also the normalized residuals which can be returned in an array from the TH1::Chi2Test and TH1::Chi2TestX methods. The possible options are:
 "UU" = experiment experiment comparison (unweightedunweighted). This is the default option
 "UW" = experiment MC comparison (unweightedweighted). Note that the first histogram should be unweighted
 "WW" = MC MC comparison (weightedweighted)
 "NORM" = to be used when one or both of the histograms is scaled (unweightedunweighted)
 by default underflows and overlows are not included
 "OF" = overflows included
 "UF" = underflows included
 "P" = print chi2, ndf, p_value, igood
 "CHI2" = returns chi2 instead of pvalue
 "CHI2/NDF" = returns chi2/ndf
The function TH1::Chi2TestX(const TH1* h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option, Double_t *res) requires now the parameter igood which returns the status of the comparison. For the possible value of igood see the TH1 class description.
Introduction
A frequently used technique in data analysis is the comparison of histograms.
First suggested by Pearson [1] the test of
homogeneity is used widely for comparing usual (unweighted) histograms.
This paper describes the implementation modified tests
for comparison of weighted and unweighted histograms and two weighted
histograms [2] as well as usual Pearson's test for
comparison two usual (unweighted) histograms.
Overview
Comparison of two histograms expect hypotheses that two histograms
represent the identical distributions. To make a decision pvalue should be calculated. The hypotheses of identity is rejected if pvalue is lower then
some significance level. Traditionally significance levels 0.1, 0.05 and 0.01 are used.
The comparison procedure should include an analysis of the residuals
which is often helpful in identifying the bins of histograms responsible
for a significant overall X^{2} value. Residuals are the difference between
bin contents and expected bin contents. Most convenient for analysis are the
normalized residuals. If hypotheses of identity are valid then normalized
residuals are approximately independent and identically distributed
random variables having distribution. Analysis of
residuals expect test of above mentioned properties of residuals.
Notice that indirectly the analysis of residuals increase the power of test.
Methods of comparison
test for comparison two (unweighted) histograms
Let us consider two histograms with the same
binning and the number of bins equal to r.
Let us denote the number of events in the ith bin in the first histogram as
n_{i} and as m_{i} in the second one. The total number of events in the
first histogram is equal to ,
and in the second histogram.
The hypothesis of identity (homogeneity) [3] is that the
two histograms represent random values with identical distributions.
It is equivalent that there exist r constants
p_{1},...,p_{r},
such that ,
and the probability of belonging to the ith bin for some measured value
in both experiments is equal to p_{i}.
The number of events in the ith bin is a random variable
with a distribution approximated by a Poisson probability distribution
for the first histogram and with
distribution for the second histogram.
If the hypothesis of homogeneity is valid, then the maximum likelihood
estimator of p_{i}, i=1,...,r, is
and then
has approximately a distribution [3].
The comparison procedure can include an analysis of the residuals which
is often helpful in identifying the bins of histograms responsible for a
significant overall X^{2} value. Most convenient for analysis are the
adjusted (normalized) residuals [4]
.
If hypotheses of homogeneity are valid then
residuals r_{i} are approximately independent and identically distributed
random variables having distribution.
The application of the test has restrictions related to the
value of the expected frequencies Np_{i}, Mp_{i}, i=1,...,r.
A conservative rule formulated in [5] is that all
the expectations must be 1 or greater for both histograms. In practical cases when expected frequencies are not known the estimated expected frequencies
can be used.
Unweighted and weighted histograms comparison
A simple modification of the ideas described above can be used for the
comparison of the usual (unweighted) and
weighted histograms. Let us denote the number of events in the ith bin in the unweighted histogram as
n_{i} and the common weight of events in the ith bin of the
weighted histogram as w_{i}. The total number of events in the
unweighted histogram is equal to and the total
weight of events in the weighted histogram is equal
to .
Let us formulate the hypothesis of identity of an unweighted histogram
to a weighted histogram so that there exist r constants p_{1},...,p_{r},
such that
, and the probability of belonging to the ith bin for some measured value
is equal to p_{i} for the unweighted histogram and expectation value of weight w_{i} equal to Wp_{i} for the weighted histogram.
The number of events in the ith bin is a random
variable with distribution approximated by the Poisson probability distribution
for the unweighted histogram.
The weight w_{i} is a random variable with a distribution approximated by
the normal probability distribution , where
is the variance of the weight w_{i}.
If we replace the variance with estimate (sum of squares of weights of events in the ith bin) and
the hypothesis of identity is valid, then the maximum likelihood
estimator of p_{i},i=1,...,r, is
.
We may then use the test statistic
and it has approximately a distribution [2].
This test, as well as the original one [3], has a restriction
on the expected frequencies. The expected frequencies
recommended for the weighted histogram is more than 25.
The value of the minimal expected frequency can be decreased down to 10 for
the case when the weights of the events are close to constant.
In the case of a weighted histogram if the number of events is unknown, then we can apply this recommendation for the equivalent number of events as
.
The minimal expected frequency for an unweighted histogram must be 1.
Notice that any usual (unweighted) histogram can be considered as a weighted histogram with events that have constant weights equal to 1.
The variance of the difference between the weight w_{i} and the estimated expectation value of the weight is approximately equal to:
The residuals
have approximately a normal distribution with mean equal to 0 and
standard deviation equal to 1.
Two weighted histograms comparison
Let us denote the common weight of events of the ith bin in the first histogram as
w_{1i} and as w_{2i} in the second one. The total weight of events in the
first histogram is equal to ,
and in the second histogram.
Let us formulate the hypothesis of
identity of weighted histograms so that there exist r constants p_{1},...,p_{r},
such that , and also expectation value of weight w_{1i} equal to W_{1}p_{i} and expectation value of weight w_{2i} equal to W_{2}p_{i}.
Weights in both the histograms are random variables with distributions which
can be
approximated by a normal probability distribution
for the first histogram and by a distribution
for the second. Here and
are the variances of w_{1i} and w_{2i} with estimators
and respectively. If the hypothesis of identity is valid,
then the maximum likelihood and Least Square Method estimator
of p_{i},i=1,...,r, is
.
We may then use the test statistic
and it has approximately a distribution [2]. The normalized or studentised residuals [6]
have approximately a normal distribution with mean equal to 0 and
standard deviation 1. A recommended minimal expected frequency is equal to 10 for the proposed test.
Numerical examples
The method described herein is now illustrated with an example.
We take a distribution
(1)
defined on the interval [4,16]. Events distributed
according to the formula (1) are simulated to create the unweighted
histogram.
Uniformly distributed events are simulated for the weighted histogram
with weights calculated by formula (1).
Each histogram has the same number of bins: 20.
Fig. 1 shows the result of comparison of the unweighted histogram with
200 events (minimal expected frequency equal to one) and the weighted histogram with 500 events (minimal expected frequency equal to 25)
Fig 1. An example of comparison of the unweighted histogram with 200 events
and the weighted histogram with 500 events: a) unweighted histogram;
b) weighted
histogram; c) normalized residuals plot; d) normal QQ plot of residuals.
The value of the test statistic
X^{2} is equal to 21.09 with pvalue equal to 0.33, therefore the
hypothesis
of identity of the two histograms can be accepted for 0.05 significant level. The behavior of the
normalized residuals plot (see Fig. 1c) and the normal QQ plot (see Fig. 1d) of residuals are
regular and we cannot identify the outliers or bins with a big influence on
X^{2}.
The second example presented the same two histograms but 17 events was added to
content of bin number 15 in unweighted histogram.
Fig. 2 shows the result of comparison of the unweighted histogram with
217 events (minimal expected frequency equal to one) and the weighted histogram with 500 events (minimal expected frequency equal to 25)
Fig 2. An example of comparison of the unweighted histogram with 217 events
and the weighted histogram with 500 events: a) unweighted histogram;
b) weighted
histogram; c) normalized residuals plot; d) normal QQ plot of residuals.
The value of the test statistic
X^{2} is equal to 32.33 with pvalue equal to 0.029, therefore the
hypothesis
of identity of the two histograms is rejected for 0.05 significant level. The behavior of the
normalized residuals plot (see Fig. 2c) and the normal QQ plot (see Fig. 2d) of residuals are not
regular and we can identify the outlier or bin with a big influence on
X^{2}.
References
[1] Pearson, K., 1904. On the Theory of Contingency and Its Relation to Association
and Normal Correlation. Drapers' Co. Memoirs, Biometric Series No. 1, London.
[2] Gagunashvili, N., 2006. test for comparison of weighted and
unweighted histograms.
Statistical Problems in Particle Physics, Astrophysics and Cosmology, Proceedings of PHYSTAT05, Oxford, UK, 1215 September 2005, Imperial College Press, London, 4344.
Gagunashvili,N., Comparison of weighted and unweighted histograms, arXiv:physics/0605123, 2006.
[3] Cramer, H., 1946. Mathematical methods of statistics. Princeton University Press, Princeton.
[4] Haberman, S.J., 1973. The analysis of residuals in crossclassified tables. Biometrics 29, 205220.
[5] Lewontin, R.C. and Felsenstein, J., 1965. The robustness of homogeneity test
in 2 × N tables. Biometrics 21, 1933.
[6] Seber, G.A.F., Lee, A.J., 2003, Linear Regression Analysis. John Wiley & Sons Inc., New York.
New package spectrum
A new package spectrum is introduced with its own library libSpectrum.
The classes TSpectrum and TSpectrum2 previously in libHist have been
moved to this new library.
Several enhancements to TSpectrum::Search
and TSpectrum::Background
with several new options. Same options in TSpectrum2.
New classes added to this package:
 TSpectrumFit:
Spectrum Fitter using algorithm without matrix inversion and conjugate gradient. method for symmetrical matrices (StiefelHestens method) .
 TSpectrumTransform:
Spectrum Transformer, it calculates classic orthogonal 1D transforms.
 TSpectrum2Fit:
Spectrum2 Fitter using algorithm without matrix inversion and conjugate gradient method for symmetrical matrices (StiefelHestens method).
 TSpectrum2Transform:
Spectrum2 Transformer, it calculates classic orthogonal 2D transforms.
 TSpectrum3:
Peak Finder, Background estimator, Markov smoothing and Deconvolution for 3D histograms.
Changes to the TMatrix classes
Previously, the matrix package contained a large amount of ASSERT
statements which are a nuisance for programs analyzing a series of
independent events like in highenergy physics .
Assert's were issued when for instance a division by zero was requested
or a matrix was invalid . Most algorithms made matrices/vectors invalid
after an error occured in an operation , like inversion of a singular matrix .
Unfortunately, not all assert's were accompanied by error messages .
This situation has been completely overhauled :
 All error conditions in the algorithms are now accompanied by error
messages .
 In all algorithms it is still asserted that vectors/matrices are
valid BUT only in very few cases is a matrix/vector made invalid :
for instance if memory is allocated with incorrect parameters .
 In case of division by zero, the division is skipped . In case of a
singular matrix, the inversion routine returns the original matrix .
In the past the result of an inversion could be checked through the
value of the returned determinant or checking whether the inverted matrix
was valid .
Since from now on, we never make the matrix invalid in this operation, the
latter check will not indicate a singular matrix anymore .
The decompostion classes TDecomp... have a backwardcompatible
change in the interface which makes detection of singularity easier :
old interface :
void Invert (TMatrixD &inv);
TMatrixD Invert ();
new interface :
Bool_t Invert (TMatrixD &inv);
TMatrixD Invert (Bool_t &status);
TMatrixD Invert () { Bool_t status; return Invert(status);
}
The returned status is kFALSE in case of singularity .
The old situation is easily reproduced by setting the ROOT variable
gErrorAbortLevel to kError . This cause an exception when there is an error
message (Error...) ., In the past the matrix would be made invalid which
would cause the next operation to throw an exception .
Reflex
Non backwards compatible API changes
 New directory
Reflex/internal
which contains header
files of classes which are not API but have to appear in the public
include area to allow e.g. forwarding functions from the
API.
ATTENTION Header files
in this directory should not be included by user programs because
they may move at any time into the src
 Fix the generation of multidimensional array names, which was done in
the wrong order.
Backwards compatible API changes (additions)
 New PluginService added. This service uses Reflex dictionary
information to create/use factories for plugin instanatiations. With
an additional executable "genmap" (in $ROOTSYS/bin) the rootmap files
for plugin libraries can be generated. More information can be found
in $ROOTSYS/reflex/src/PluginService.cpp or the online docu.
 The function
Type::HasBase(const Type &)
now returns a const Base & instead of
bool. In fact this is a change on the
API but should be still backwards compatible as a Base can be
checked for bool with it's conversion operator.
 New function
const Scope & Scope::SubTypeByName(const std::string &)
will return a sub type by it's qualified or unqualified
name. Similar functions. Similar functions for SubScope,
MemberTemplate and TypeTemplate have been also added.
 New function
const Scope & Type::PointerToMemberScope() const
to retrieve the scope of a pointer to member type.
 New function
const Type & Type::RawType() const
will return the underlying fundamental/struct/function type. E.g.
int[5]* > int
 New function
const Type & Type::FinalType()const
will return a type resolving all typedef information. This will also
work for multiple interleaved typedefs. E.g.
typedef int MYINT;
typedef MYINT[5] MYINT2;
typedef MYINT2* MYINT3;
// MYINT3 > int[5]*
 New functions
bool Type::IsPublic() const
bool Type::IsProtected() const
bool type::IsPrivate() const
to check the accessibility section a type lives in.
 New functions
bool Member::IsConst() const
bool Member::IsVolatile() const
to check cv qualifiction of a member. In fact this functionality was
already available when going to the type of the member.
 New function
Reflex::Shutdown()
This function can be
used to remove all memory allocation of Reflex in an ordered
way. This also includes the static memory Reflex allocates at
bootstrapping.
ATTENTION This function must
be called only as the very last one before the Reflex library get's
unmapped from memory and all dictionaries are unloaded.
 State pattern implemented for TypeTemplate and MemberTemplate
types. This is done via two new classes Type/MemberTemplateName
which hold the ownership of these types. Lookup of these entities
can be done via the
static const MemberTemplate & MemberTemplate::ByName(const std::string&)
function. Looping over all defined ones either with
static size_t MemberTemplate::MemberTemplateSize();
static const MemberTemplate & MemberTemplate::MemberTemplateAt(size_t)
or the iterator functions
static MemberTemplate_Iterator MemberTemplate::MemberTemplate_Begin()
static MemberTemplate_Iterator MemberTemplate::MemberTemplate_End()
static MemberTemplate_Iterator MemberTemplate::MemberTemplate_RBegin();
static MemberTemplate_Iterator MemberTemplate::MemberTemplate_REnd()
(similar for TypeTemplate).
 Commit of the new DictonaryGenerator class (by our summer
student Antti Hahto). This class allows the Reflex source code
generation of Reflex entities which are loaded into the
system. Class API
 New function
size_t Scope::SubScopeLevel() const
which will return the number of subscopes which the entity is
declared in.
 New functions
void Type::SetSize(size_t)
void Type::SetTypeInfo(const std::type_info&)
which allow the setting/changing of these attributes of a class.
 All API function returning Reflex object now return const & to
them instead object (this will spare one construction/destruction
per call thus improve speed).
 New API class "ValueObject" which takes ownership of an instance.
Changes in the source (patches)
 Added ownership model for Reflex entities. A scope owns all of
is members. A Type/Scope/Member own their attached
PropertyList. If a Reflex entity gets unloaded these will also get
unloaded.
 Unloading a dictionary plugin will now also unload the
information contained within. For MaxOS a dictionary has to be
linked as a "bundle", as "shared libraries" cannot be unloaded until
tear down of the process.
 The type_info of a Typedef object is set to the first object
which is not a typedef at first lookup.
 NameLookup improved. The state is now stored in the object
instead of passing function parameters. Faster handling of scopes.
 Performed memory leak checking with valgrind
 Escape "" for generation of dictionary shadow classes. This
will allow also the generation of templated classes with negative
template parameters.
 Fix a problem when getting the final type of a fundamental type (reported
by CMS).
 Fix a problem with implicit selection of enums (reported by LHCb)
https://savannah.cern.ch/bugs/?21368
 New function ToType/ToScope/ToMember added to Builder classes.
 Fix bug #20793. Build enums directly in the ClassBuilder, instead
of using the EnumTypeBuilder.
 Fix a crash in Class::HasBase() returning a temporary.
 New function Member::Id() returns a unique identifier of a Member.
 Implementation of fast properties, a property can be always looked up by the
same key in Type/Scope/Member. The lookup of a key can bey done by name "KeyByName(string,bool)"
where the bool is set to true will allocate a new key if it doesn't exist yet.
Keys can also be iterated over with the usual (Key_Begin, Key_End) or (KeyAt, KeySize).
 Hide a C++ name if necessary. E.g. for "typedef struct A {} A;". In this case
the hidden type will be concatenated with the string " @HIDDEN@", i.e. the reflection
name of the type changes.
Changes concerning dictionary generation via genreflex
 Added ability to select templated classes with typedef'd template
parameters (e.g. std::vector<MYINT>). This functionality is costly,
it can be turned off with the option "no_templatetypedefs".
 If a selection pattern was used to select a typedef, the information
which original typedef triggered the selection is printed.
 new option for genreflex "gccxmlopt" which passes options to
the gccxml invocation inside genreflex. Changes provided by David Quarrie.
 Added new DTD file for selection.xml syntax (selectin.dtd). This file can be
used to check the correctness of seleciton files. In a later stage
it will be used by genreflex to automatically check for syntactcal correctness.
 Check the gccxml version when invoking genreflex and print a warning
if it is not 0.60.
 The selection file option transient='TRUE' is now case
insensitive.
 Added cv qualification for data members
 Added access information (private/protected/public) for Types
 Fix for cv qualification of a generated name of a conversion
operator (e.g. operator const MyType & () const)
Cintex
Changes in the source (patches)
 fix bug #22213: Dictionaries generated implicitly for Root::Math classes don't always work
 fix bug #22192 Call to functions accepting "const &bool" fail
 fix bug #21356 A C++ function signature with (double&) would not work from PyROOT when Cintex is used.
 Adaptation for CINT, declaring all scopes of free functions  Declare return type,
which is a typedef to an unknown type, to CINT
 fix problem with return types of functions that are typedefs to unknown types
GUI
 File Dialog Improvements
 It is possible now to specify multiple root files to be opened
from the Open File dialog. When the check button 'Multiple files' is
selected, the multiple file selection is allowed in the file list of
the current directory. The files can be selected in a usual way: by
pressing the Shift key and defining the range of files, or by pressing
the Ctrl key and selecting different files. This new feature can be used
following way:
TGFileInfo fi;
new TGFileDialog(fClient>GetDefaultRoot(), this, kFDOpen,&fi);
if (fi.fMultipleSelection && fi.fFileNamesList) {
TObjString *el;
TIter next(fi.fFileNamesList);
while ((el = (TObjString *) next())) {
new TFile(el>GetString(), "update");
}
} else if (fi.fFilename) {
new TFile(fi.fFilename, "update");
}
 Added "modified" time field in TGFSContainer to show file modification
time in "details" mode.
 Added possibility to create a new directory from TGFileDialog.
 Added possibilities for sorting files by name, type, size, owner, group,
modified date and time in TGFileDialog by clicking on corresponding
header buttons.
 TGListView
 Added ability for resizing the space taken by each column in detailed list
view by clicking and dragging the borders between the column headers. That
allows users to see long file names entirely.
 Text Widgets
 Made possible to copy/paste text between TGTextEntry, TGNumberEntry and TGTextView
widgets and another applications using the middle mouse button and/or short cuts.
 Cascaded Menus
 Hot keys are functional and work properly.
 Sliders
 Added a 'grip' pixmaps on double and triple sliders to make them more
visible and automatically change mouse cursor shape when the pointer is
over the resizing regions of double and triple sliders.
 TGSpeedo
 This is a widget looking like a speedometer, with a needle, a counter
and a small odometer window. Three thresholds are configurable, with their glowing
color. A peak mark can be enabled, allowing to keep track of the highest value
displayed. The mark can be reset by rightclicking on the widget.
There are two signals are available:
 OdoClicked(): when user click on the small odometer window
 LedClicked(): when user click on the small led near the counter
Run tutorials/CPUMeter.C macro for a nice demo.
 TControlBar
 Menus
 Implemented functionality of a Chevron button button in ROOT menu bar.
It allows an easier use of any application created with too many titles
in the menu bar. For example, if a canvas window is too small and the
menu titles overlap each other of hide themselves, the Chevron button
appears as the rightmost menu title on the menu bar. By clicking on it,
a dropdown menu appears that has as entries all menu titles that cannot
fit the menu bar area when the canvas window is small. All canvas menus
are available and active as cascaded menus.
 New Fit Panel
This is the first prototype of the new fit panel GUI. Its goal is
to replace the old fit panel by providing more user friendly way for
performing, exploring and comparing fits.
To display the Fit panel follow the usual way  right click on a histogram
or a graph to pop up the context menu and then select the menu
entry "Fit Panel".
The new fit panel is implemented as a modeless dialog, i.e. when opened,
it does not prevent users from interacting with other windows.
It is a singleton application.
When the fit panel is activated, users can select an object for fitting in
the usual way, i.e. by leftmouse click on it. If the selected object is
suitable for fitting, the fit panel is connected with it and users can
perform fits by setting different parameters and options. In case, the
selected object was already fitted, we copy the used function and its
parameters from the previous fit.
Function choice and settings
 "Predefined" combo box  contains a list of predefined functions
in ROOT. The default one is Gaussian.
 "Operation" radio button group defines selected operational mode
between functions: Nop  no operation (default); Add  addition
Conv  convolution (will be implemented in the future).
 Users can enter the function expression in a text entry field.
The entered string is checked after Enter key was pressed. An
error message shows up if the string is not accepted. This first
prototype is limited and users have no freedom to enter file/user
function names in this field.
 "Set Parameters" button opens a dialog for parameters settings
(under validation testing).
Fitter settings
 Currently there are two model choices: Chisquare and
Binned Likelihood.
Fit options:
 "Linear Fit" check button sets the use of Linear fitter when is
selected. Otherwise the option "F" is applied if a polN is selected.
When performing linear fit 'Best errors', 'Improve results' and 'Set
parameters' are disabled.
 "Robust" number entry sets the robust value when fitting graphs.
 "No Chisquare" check button is witch On/Off option 'C'  do not
calculate Chisquare (for Linear fitter).
 "Integral" check button switch On/Off the option 'I'  use integral
of function instead of value in bin center.
 "Best Errors" sets On/Off the option 'E'  better errors estimation
using Minos technique.
 "Use range" sets On/Off the option 'R'  fit only data within the
specified function range with the slider.
 "All weights = 1" sets On/Off the option 'W' all weights set to 1,
excluding empty bins and error bars ignored.
 "Empty bins, weights=1" sets On/Off the option "WW"  all weights
equal to 1, including empty bins and error bars ignored.
 "Improve fit results" sets On/Off the option 'M' after minimum is
found, search for a new one.
 "Add to list" sets On/Off the option '+' add function to the list
without deleting the previous.
Draw options:
 "SAME" sets On/Off function drawing on the same pad.
 "No drawing" sets On/Off the option '0' do not draw function graphics.
 "Do not store/draw" sets On/Off option 'N' do not store the
function, do not draw it.
Print options:
 "Default"  between Verbose and Quiet.
 "Verbose"  prints results after each iteration.
 "Quiet"  no fit information is printed.
Sliders
settings are used if the option 'R'  use range is active.
Users can change min/max values by pressing the left mouse button
near to the left/right slider edges. It is possible o change both
values simultaneously by pressing the left mouse button near to its
center and moving it to a new desire position. The slider range is connected
to the displayed axis range in the pad and corresponds to the actual
settings after performing zoom/unzoom on the axis.
Fit button  performs a fit.
Reset  sets the GUI elements and related fit settings to the
default ones.
Close  closes this window.
Qt BNL Interface
OpenGL
 TGLViewer:
Added customizations of update/redraw behaviour:
 flag 'Bool_t fIgnoreSizesOnUpdate' that tells the viewer
not to check the size of the object in AddObject();
 member 'Color_t fClearColor' that allows user to select the
background color;
 method 'void UpdateScene()' thet forces the scene update via
calling 'fPad>Paint()';
 method 'virtual void RefreshPadEditor(TObject* changed=0)' that
allows updates to be sent to the builtin editor when the
internal state changes.
 Extend the TVirtualGL interface to support 16 & 32 bit display mode.
This is required for the new slicing algorithm (eg to run the tutorial
glbox.C under Windows in 16 bits display mode)
 TGLSAViewer:
Implemented virtual 'TGLSAViewer::RefreshPadEditor()'. In all
calls to 'TGedEditor::SetModel()' replaced third argument 'Int_t
event' from 'kButton1' to 'kButton1Down'.
 TGLViewerEditor:
Added widgets controlling 'fClearColor', 'fIgnoreSizesOnUpdate',
'fResetCamerasOnUpdate' and 'fResetCameraOnDoubleClick'; added
buttons for invoking 'UpdateScene()' and 'CameraHome()' methods.
 TGLScene:
Removed code setting the glClearColor in 'Draw()'.
New classes:
 TGLBoxPainter  implements "glbox" option for TH3, shows bin contents as
boxes, which sizes are proportional to bin content. "glbox1" is the same,
as previous, but with spheres instead of boxes. Slices (XOY/YOZ/XOZ)
are now drawn as sets of rectangles.
 TGLLegoPainter. Changes: removed all stuff, which works with gl
projections, modelview transformations, textures, etc.
 TGLPlotPainter. Added common parts of different painters:
generic Paint function, PlotSelected, etc.
 TGLOrthoCamera. Added operations, required by gl hist painters.
 TGLHistPainter. Class completely changed (previously known as
TGLPadHistPainter).
 TGLPlotBox. New class, draws back box for different kinds of plots,
highlights planes which are under cursor, makes some sizes calculations
(converts 3d into 2d coords) etc.
 TGLSurfacePainter. New class, for different surf options.
Supports cartesian, polar, cylindrical and spherical coords.
Slices (XOY, YOZ, XOZ), projections.
 TGLTF3. New class, draws TF3. No slices available now.
 TGLUtil. Added new auxilary classes
TGLLevelPalette, TGL2DArray, functions, required by different plot
painters,
TGLEnableGuard and TGLDisableGuard removed from RootGL namespace into
global namespace.
Dynamic slicing
Mods for box painter, adding dynamic slicing for TH3 hist.
try $ROOTSYS/tutorials/gl/glbox.C
TGLPolyLine
Line width now properly handled.
TASImage
 Make sure gif's are MS Photoviewer compatible.
 New version of libAfterImage. Added LZ compression to builtin
libungif, as patent is expired already. Allows to create compressed
GIF files in batch mode.
 Static method
TASImage::SetJpegDpi(const char *name, UInt_t dpi = 72) added.
This method allows to set DotPerInch image(printing) resolution for
Jpeg files.
 New method GetRgbaArray added. This method returns an array of color
values in RGBA format (R  red, G  green, B  blue, A alpha).
The array must be deleted after usage.
Animated GIF
Add possibility to create an animated GIF file from canvas
(in both GUI and batch mode).
It's possible to Print pad into an animated GIF file by specifying
the file name as myfile.gif+ or myfile.gif+NN ,
where NN is the delay for displaying subimages
during animation in 10ms units.
If NN is ommitted the animation will be infinite.
for (int i=0; i<10; ++i) {
// fill canvas for context
// ...
c1.Print("file.gif+"); // print canvas to GIF file
}// end loop
Other items

Fixes for few bugs in reading multiimage gif files

Several image formats can support subimages e.g.
GIF, TIFF, BMP, XCF, ICO etc. The famous ones are
animated GIF files.
Possiblity to read subimages from multiimage files added.
For example,
i1 = TImage::Open("anim.gif.0"); // read the first subimage
i2 = TImage::Open("anim.gif.1"); // read the second subimage
i4 = TImage::Open("anim.gif.3"); // read the forth subimage
 ASImage::Draw method takes into account the
gStyle>GetScreenFactor() when a new canvas displaing an image is created.
 Corrections in the implementation of the TImageDump::DrawBox method
Previous version produced wrong images in batch mode, i.e.
root b
root[] .x $ROOTSYS/tutorials/graphs/graph.C
root[] c1>Print("c1.gif")
 Fix bugs reported at http://root.cern.ch/phpBB2/viewtopic.php?t=4060
 dashed lines with line width set to 0 were not drawn.
 circles, ellipses were not drawn.
 The interface for TImage::DrawCircle(),
TImage::DrawEllipse() changed
If parameter "thick"<0  filled circle/ellipse is drawn
if "thick">0  the parameter specifies the thickness of line.
Basic Graphics
TGraph
 Several improvements in the exclusion zone algorithm (PaintPolyLineHatches):
 Some parts of the exclusion were sometimes drawn on the wrong side of the
graph.
 Special (simpler) case when the graph is vertical or horizontal.
 Make sure that two consecutive points are not equal (it produced a
division by zero)
 Improvement in the graph closing. The added point to close the graph was
sometimes on the wrong side of the curve.
 In DistanceToPrimitive() the test to see if "the point
(px,py) is not in
the graph area" was done too late. Therefore the TGraph
was picked outside
the pad limits. In particular it hide the TAxis in case of zoom.
TMultiGraph
New method: Add(TMultiGraph *multigraph, Option_t *chopt="");
it allows to add all the graphs in "*multigraph" in the current MultiGraph.
Example:
{
float x1[] = {1,2,3}; float y1[] = {4,7,6};
float x2[] = {3,5,6}; float y2[] = {0,9,4};
float x3[] = {7,8,9}; float y3[] = {1,2,4};
float x4[] = {0,6,5}; float y4[] = {5,2,7};
TGraph *gr1 = new TGraph(3,x1,y1);
TGraph *gr2 = new TGraph(3,x2,y2);
TGraph *gr3 = new TGraph(3,x3,y3);
TGraph *gr4 = new TGraph(3,x4,y4);
TMultiGraph *mg1 = new TMultiGraph();
mg1>Add(gr1); mg1>Add(gr2);
TMultiGraph *mg2 = new TMultiGraph();
mg2>Add(gr3); mg2>Add(gr4);
mg2>Add(mg1); // mg2 now contains gr1 gr2 gr3 and gr4
mg2>Draw("AL*");
}
TBox
Changes in TBox::Draw and TBox::PaintBox:
if the box has no fill style (ie fill style=0), the box contour is drawn
if the box has a fill style, the box contour is not drawn by default.
to force the contour to be drawn, specify option "l"
TGraphPolar
New version done by Matthieu Demaret (Summer Student). It includes:
 Paint the TGraphPolar title.
 Allows Polar coordinates in Radian, Degrees and Grad
 Radian coordinates are painted using reduced pi fractions (TLatex #pi).
 Graph clipping on polargram limits
 Labels orientation can be changed
 The radial axis is painted using TGaxis (before it was some internal
code doing text for each label. No tickmarks were drawn)
 Default constructor was missing.
 Radial divisions are optimized using THLimitsFinder::Optimize.
 DistancetoPrimitive and Execute event have been implemented. It is possible
to move interactively the radial axis.
 Help improvements
Example:
TPad
In TPad::PaintBox, implement a new option "l"
If this option is specified the contour of the box is also drawn
when the box has a fillstyle specified non null.
TGaxis
 Time axis:
 Takes into account the timezone offset for the current location.
 Daylight saving time change is now taken into account.
 Axis labels drawing:
With:
gStyle>SetLabelFont(131,"x");
gStyle>SetLabelFont(131,"y");
the axis labels in log scale showed up without the latex markup rendered
properly. 1000 appeared as the ascii "10^{3}", not the
rendered 10 with a superscript 3.
The following little script reproduces the problem:
{
gStyle>SetLabelFont(131,"x");
gStyle>SetLabelFont(131,"y");
TH1F h("h", "h", 100, 0, 1000000);
h.SetBinContent(10, 1000000);
h.SetBinContent(50, 100);
h.Draw();
c1>SetLogy();
c1>SetLogx();
}
TPie
New classe drawing a pie chart.
Example: $ROOTSYS/tutorials/graphics/piechart.C
void piechart()
{
// Pie chart example.
//Authors: Olivier Couet, Guido Volpi
Float_t vals[] = {.2,1.1,.6,.9,2.3};
Int_t colors[] = {2,3,4,5,6};
Int_t nvals = sizeof(vals)/sizeof(vals[0]);
TCanvas *cpie = new TCanvas("cpie","TPie test",700,700);
cpie>Divide(2,2);
TPie *pie1 = new TPie("pie1","Pie with offset and no colors",nvals,vals);
TPie *pie2 = new TPie("pie2","Pie with radial labels",nvals,vals,colors);
TPie *pie3 = new TPie("pie3","Pie with tangential labels",nvals,vals,colors);
TPie *pie4 = new TPie("pie4","Pie with verbose labels",nvals,vals,colors);
cpie>cd(1);
pie1>SetAngularOffset(30.);
pie1>SetEntryRadiusOffset( 4, 0.1);
pie1>SetRadius(.35);
pie1>Draw("3d");
cpie>cd(2);
pie2>SetEntryRadiusOffset(2,.05);
pie2>SetEntryLineColor(2,2);
pie2>SetEntryLineWidth(2,5);
pie2>SetEntryLineStyle(2,2);
pie2>SetEntryFillStyle(1,3030);
pie2>SetCircle(.5,.45,.3);
pie2>Draw("r");
cpie>cd(3);
pie3>SetEntryVal(0,.8);
pie3>SetLabelsOffset(.1);
pie3>Draw("3d t nol");
cpie>cd(4);
pie4>SetRadius(.2);
pie4>SetLabelsOffset(.01);
pie4>SetLabelFormat("#splitline{%val (%perc)}{%txt}");
pie4>Draw("nol");
}
THistPainter
 PaintBar take into account the value returned by gStyle>GetHistMinimumZero()
 ShowProjectionX and ShowProjectionY set the log scales on the projection
if they were set on the original histogram.
 Complete Paint() and PaintH3() helps.
 On TH3 histograms, the option "LEGO" works now like the option "BOX"
(previously it was not implemented).
 "option" decoding in SetShowProjection was wrong. For projections having
only one letter "x", "y" or "z" fShowOption had a random value.
 "TH2::ShowProjectionY TH2::ShowProjection3 reused the same canvas irrespectively of
the fact that they were invoked for 2nd histogram. Now several interactive projections
can be seen at the same time.
 Option "E" and "TEXT" combined produce now a
meaningful plot. Previously this combination wrongly produced a 3D
error plot superimposed on a 2D text plot.
Example:
TSpectrum2Painter
spectrumpainter is a new package for surface and contours drawing.
This new package is automatically called by THistpainter::Paint
when drawing a TH2 with the "SPEC" option. For more
details about the option, see
TSpectrum2Painter::PaintSpectrum.
Example:
{
// Examples showing how to use TSpectrum2Painter (the SPEC option)
TH2 *h2 = new TH2F("h2","h2",40,8,8,40,9,9);
Float_t px, py;
for (Int_t i = 0; i < 50000; i++) {
gRandom>Rannor(px,py);
Float_t random = gRandom>Rndm(1);
h2>Fill(px,py);
h2>Fill(px+4,py4,0.5);
h2>Fill(px+4,py+4,0.25);
h2>Fill(px3,py+4,0.125);
}
TCanvas *c1 = new TCanvas("c1","Illustration of 2D graphics",10,10,800,700);
c1>Divide(2,2);
c1>cd(1);
h2>Draw("SPEC dm(2,10) zs(1)");
c1>cd(2);
h2>Draw("SPEC dm(1,10) pa(2,1,1) ci(1,4,8) a(15,45,0)");
c1>cd(3);
h2>Draw("SPEC dm(2,10) pa(1,1,1) ci(1,1,1) a(15,45,0) s(1,1)");
c1>cd(4);
h2>Draw("SPEC dm(1,10) pa(2,1,1) ci(1,4,8) a(15,45,0) cm(1,15,4,4,1) cg(1,2)");
}
PostScript/PDF
 In DrawPolyMarker the line style and line width were not correctly reset.
 Text clipping in PostScript and PDF files is now correct.
Miscellaneous
 stressGraphics
 New test for transparent pad.
 Remove the PS file if a test succeed (keep it if it failed).
 TH1
TH1 Revision 1.302, (To allow, in TH1::Draw, the option "same" if a canvas does
not exist or is empty) had a side effect:
the macro $ROOTSYS/tutorials/hist/transpad.C did not work anymore.
Now, the condition to remove the option "same" is now more strict:
if gPad does not have the default range we keep the option.
 Tutorials
New macro gldemos.C. It displays help on the GL features and access all the
GL demos with a small GUI (like demos.C). GL macros have been updated also.
TGraph
Several improvements in the exclusion zone algorithm (PaintPolyLineHatches):
 Some parts of the exclusion were sometimes drawn on the wrong side of the
graph.
 Special (simpler) case when the graph is vertical or horizontal.
 Make sure that two consecutive points are not equal (it produced a
division by zero)
 Improvement in the graph closing. The added point to close the graph was
sometimes on the wrong side of the curve.
TMultiGraph
New method: Add(TMultiGraph *multigraph, Option_t *chopt="");
it allows to add all the graphs in "*multigraph" in the current MultiGraph.
Example:
{
float x1[] = {1,2,3}; float y1[] = {4,7,6};
float x2[] = {3,5,6}; float y2[] = {0,9,4};
float x3[] = {7,8,9}; float y3[] = {1,2,4};
float x4[] = {0,6,5}; float y4[] = {5,2,7};
TGraph *gr1 = new TGraph(3,x1,y1);
TGraph *gr2 = new TGraph(3,x2,y2);
TGraph *gr3 = new TGraph(3,x3,y3);
TGraph *gr4 = new TGraph(3,x4,y4);
TMultiGraph *mg1 = new TMultiGraph();
mg1>Add(gr1); mg1>Add(gr2);
TMultiGraph *mg2 = new TMultiGraph();
mg2>Add(gr3); mg2>Add(gr4);
mg2>Add(mg1); // mg2 now contains gr1 gr2 gr3 and gr4
mg2>Draw("AL*");
}
TBox
Changes in TBox::Draw and TBox::PaintBox:
if the box has no fill style (ie fill style=0), the box contour is drawn
if the box has a fill style, the box contour is not drawn by default.
to force the contour to be drawn, specify option "l"
TPad
In TPad::PaintBox, implement a new option "l"
If this option is specified the contour of the box is also drawn
when the box has a fillstyle specified non null.
TGaxis
PaintAxis takes into account the timezone offset for the current location.
This fixes the bug: http://savannah.cern.ch/bugs/?20056.
All standard time axis the tests are running correctly.
THistPainter
 PaintBar take into account the value returned by gStyle>GetHistMinimumZero()
 ShowProjectionX and ShowProjectionY set the log scales on the projection
if they were set on the original histogram.
 Complete Paint() and PaintH3() helps.
 On TH3 histograms, the option "LEGO" works now like the option "BOX"
(previously it was not implemented).
 "option" decoding in SetShowProjection was wrong. For projections having
only one letter "x", "y" or "z" fShowOption had a random value.
 "TH2::ShowProjectionY TH2::ShowProjection3 reused the same canvas irrespectively of
the fact that they were invoked for 2nd histogram. Now several interactive projections
can be seen at the same time.
PostScript
In DrawPolyMarker the line style and line width were not correctly reset.
stressGraphics
 New test for transparent pad.
 Remove the PS file if a test succeed (keep it if it failed).
TH1
TH1 Revision 1.302, (To allow, in TH1::Draw, the option "same" if a canvas does
not exist or is empty) had a side effect:
the macro $ROOTSYS/tutorials/transpad.C did not work anymore.
Now, the condition to remove the option "same" is now more strict:
if gPad does not have the default range we keep the option.
New tutorials
New macro gldemos.C. It displays help on the GL features and access all the
GL demos with a small GUI (like demos.C). GL macros have been updated also.
New features in the Geometry classes
Support for radionuclides
A new class TGeoElementRN was
introduced in this version to provide support for radioactive nuclides
and their decays. A database of 3162 radionuclides can be loaded on
demand via the table of elements (TGeoElementTable
class). One can make then materials/mixtures based on these
radionuclides and use them in a geometry:
root [1] TGeoManager *geom = new TGeoManager("geom",
"test radionuclides");
root [2]
TGeoElementTable *table = geom>GetElementTable();
root [3]
TGeoElementRN *c14 = table>GetElementRN(14,6); // A,Z
root [4]
c14>Print();
6C014
ENDF=60140; A=14; Z=6; Iso=0; Level=0[MeV]; Dmass=3.0199[MeV];
Hlife=1.81e+11[s]
J/P=0+; Abund=0; Htox=5.8e10; Itox=5.8e10; Stat=0
Decay modes:
BetaMinus
Diso: 0 BR: 100.000% Qval: 0.1565
root [5]
TGeoMaterial *mat = new TGeoMaterial("C14", c14, 2.0);
The following properties of radionulides can be currently accessed via
getters in the TGeoElementRN
class:
 Atomic number and charge (from the base class TGeoElement)
 Isomeric number (ISO)
 ENDF code  following the convention: ENDF = 10000*Z + 100*A + ISO
 Isomeric energy level [MeV]
 Mass excess [MeV]
 Half life [s]
 Spin/Parity  can be retreived with: TGeoElementRN::GetTitle()
 Hynalation and ingestion toxicities
 List of decays  TGeoElementRN::GetDecays()
The radioactive decays of a radionuclide are represented by the class TGeoDecayChannel and they are
stored in a TObjArray. A decay
provides:
 Decay mode
 Variation of isomeric number
 Q value for the decay [GeV]
 Parent element
 Daughter element
Radionuclides are linked one to each other via their decays, until the
last element in the decay chain which must be stable. One can iterate
decay chains using the iterator TGeoElemIter:
root [6] TGeoElemIter next(c14);
root [7]
TGeoElementRN *elem;
root [8] while
((elem=next())) next.Print();
6C014 (100% BetaMinus)
T1/2=1.81e+11
7N014 stable
To create a radioactive material based on a radionuclide, one should
use the constructor:
TGeoMaterial(const char *name, TGeoElement *elem, Double_t density)
To create a radioactive mixture, one can use radionuclides as well as
stable elements:
TGeoMixture(const char *name, Int_t nelements, Double_t density);
TGeoMixture::AddElement(TGeoElement *elem, Double_t weight_fraction);
Once defined, one can retrieve the time evolution for the
radioactive materials/mixtures by using one of the 2 methods:

void TGeoMaterial::FillMaterialEvolution(TObjArray *population,
Double_t precision=0.001)
To use this method, one has to provide an empty TObjArray object that
will be filled with all elements coming from the decay chain of the
initial radionuclides contained by the material/mixture. The precision
represent the cumulative branching ratio for which decay products are
still considered.
The population
list may contain stable elements as well as radionuclides, depending on
the initial elements. To test if an element is a radionuclide:
Bool_t TGeoElement::IsRadioNuclide() const
All radionuclides in the output population list have attached objects
that represent the time evolution of their fraction of nuclei with
respect to the top radionuclide in the decay chain. These objects
(Bateman solutions) can be retrieved and drawn:
TGeoBatemanSol *TGeoElementRN::Ratio();
void TGeoBatemanSol::Draw();
Another method allows to create the evolution of a given radioactive
material/mixture at a given moment in time:

TGeoMaterial::DecayMaterial(Double_t time, Double_t precision=0.001)
The method will create the mixture that result from the decay of a
initial material/mixture at time, while all
resulting elements having a fractional weight less than precision are
excluded.
A demo macro for radioactive material features can be found in
$ROOTSYS/tutorials/RadioNuclides.C
GDML
GDML Import/Export
The current Python implementation has been removed and replaced with a fully integrated C++ interface.
The TGDMLParse class imports GDML files into ROOT through the TGeoManager::Import("*.gdml") method.
The old python interface worked well. However, the import process was far too slow,
in comparison to the import of .C files into ROOT.
The new interface has shown great results, dependent on the geometry structure, of up to a
factor 10 decrease in time to import a GDML file.
Mathematical constants for the Import are now used from the TMath Class and are no longer
separately specified, providing consistency with ROOT.
The Python scripts remain for the Export of GDML, however this script has been slightly
modified and optimised to improve and decrease the Export time by up to a factor 15.
Modular GDML Import
GDML Files can now be imported in Modular Form using the 'file' tag.
The tag is used within the Physical Volume ('physvol') node, and replaces the replaces the
volume reference ('volumeref') tag.
By default the volume referenced instead will be the top (world) volume of the geometry file
specified in the file tag. Filenames are specified using the 'name' attribute of the File tag.
If the volume you wish to reference to the physical volume is contained within the specified
geometry file, but is not the top volume, this can be done using the 'volname' attribute of the file tag.
This attribute is optional and when not specified the top volume is defaulted. Files you use in
this tag have to be fully independent GDML files. Eg. They can be imported and visualised
individually if required. This is an example of how the tag appears:
< file name="abc.gdml" volname="volume123" />
New tutorials
 graphs/graphpolar.C
 graphics/piechart.C
 gl/gldemos.C
 gl/glbox.C
 gl/glrose.C
 gl/glsurfaces.C
 gl/gltf3.C
 image/hsumanim.C.C
 geom/RadioNuclides.C
 gui/buttonChangelabel.C
 gui/buttonsLayout.C
 gui/CPUMeter.C
 gui/guilabels.C
 gui/listbox.C
 gui/Slider3Demo.C
 gui/splitterHorizontal.C
 gui/splitterVertical.C
 gui/statusBar.C
 math/chi2test.C
 math/normalDist.C
 math/testrandom.C
 spectrum/spectrumpainter.C
 unuran/unuranDemo.C
ROOT page
 Class index  Top of the page