ROOT version 4.01/04 Release Notes

The ROOT Team is pleased to announce a new development release of ROOT version 4.01/04.

This new, backward compatible, version has major enhancements described below.

Binaries for all supported platforms are available at:

      http://root.cern.ch/root/Version401.html
Versions for AFS have also been updated. See the list of supported platforms:
      http://root.cern.ch/root/AFS.html

For more information, see:

      http://root.cern.ch
Ilka Antcheva,
Maarten Ballintijn,
Bertrand Bellenot,
Rene Brun,
Philippe Canal,
Olivier Couet,
Valeri Fine,
Gerri Ganis,
Andrei Gheata,
Mihaela Gheata,
Masaharu Goto,
Carsten Hof,
Anna Kreshuk,
Eddy Offermann,
Valeriy Onuchin,
Timur Pocheptsov,
Fons Rademakers

xrootd

xrootd, eXtended ROOT daemon. coded by Andy Hanushevsky of SLAC working for the BaBar collaboration. The xrootd will in the neat future replace the current rootd. xrootd has been written with very large scale in mind (many users, many files, redundancy, fail-safe, fall-over, load balancing, etc., etc.).

New Features in the Input/Output System

Extended support for I/O of STL collections

Very complex cases of STL collections, or collections of collections, etc has been implemented in collaboration with Markus Frank from LHCB. STL collections are also supported in TTree split mode.

The test program $ROOTSYS/test/bench.cxx,TBench.cxx has been extended to test STL collections of objects or pointers.

Extensions of the Automatic Schema Evolution

New class TVirtualCollectionProxy

An important step toward the implementation of the member-wise saving of STL containers. Mainly, the code does not require anymore the collection proxy to be able to provide a C-style array of pointer to its content. This avoid the problems of having to iterate twice through some collection and/or to have to keep in memory a version of this array. Concretely this also mean that the I/O routine will now be able to recurse through stl containers. Technically, this is done by templating TStreamerInfo::ReadBuffer and TStreamerInfo::WriteBufferAux (as well as the ReadBufferSkip And ReadBufferConv) so that you can use it directly with a char** or with a TVirtualCollection (to which we added an operator [] and removed the method GetPtrArray). In addition, we added 2 new method to TVirtualCollectionProxy: PushProxy and PopProxy that will allow to keep some state on where we are in the iteration for a collection when we recurse. (This is required for a reasonable implementation of the TVirtualCollection for std::list). Also (in an unrelated fix) we update TTreePlayer::Scan to properly display the columns when they are more expressions in the request than leaves in the tree.

implements MemberWise streaming for collection with a TVirtualCollectionProxy and whose content is splittable (i.e. guaranteed homogeneous). In this first implementation, objectwise streaming is still the default. To activate memberwise streaming, call the static function TStreamerInfo::SetStreamMemberWise(kTRUE);

Support for large Tree/TChain with more than 2 billion entries.

The implementation of this new feature has required changes in many places. Trees produced by this new version cannot be read by old ROOT versions. The new version can digest old ROOT files. Note that when creating a Tree, the default maximum size for a Tree is set to 1.9 GBytes. You can change this default value by calling:
        TTree::SetMaxTreeSize(Long64_t maxsize)

$ROOTSYS/bin/hadd

hadd can now merge files into a big file up to 100 Gbytes by default.

New TTree Features

Trees with circular buffers

Implement a first version of circular buffers for memory resident Trees.
      void TTree::SetCircular(Long64_t maxEntries)
where maxEntries is the maximum number of entries to be kept in the buffers. When the number of entries exceeds this value, the first entries in the Tree are deleted and the buffers used again. The implementation minimizes memory operations by swapping basket pointers and only shifting the data in the new first buffer. An example of a script using a circular buffer is shown below
	
	void circular() {
	     gROOT->cd(); //make sure that the Tree is memory resident
	     TTree *T = new TTree("T","test circular buffers");
	     TRandom r;
	     Float_t px,py,pz;
	     Double_t random;
	     UShort_t i;
	     T->Branch("px",&px,"px/F");
	     T->Branch("py",&py,"px/F");
	     T->Branch("pz",&pz,"px/F");
	     T->Branch("random",&random,"random/D");
	     T->Branch("i",&i,"i/s");
	     T->SetCircular(20000);
	     for (i = 0; i < 65000; i++) {
	        r.Rannor(px,py);
	        pz = px*px + py*py;
	        random = r.Rndm();
	        T->Fill();
	     }
	     T->Print();
	}

Tree Friend Indices

The new class TTreeIndex replaces the previous TTree index code.

The class derives from the abstract interface TVirtualIndex. It provides the same functionality as the previous code, but in addition, it supports more complex cases.

When a Tree friend has a TTreeIndex (created as before via TTree::BuildIndex), the friend tree and the parent Tree do not need to have the same serial numbers. The friend tree may have less or more events.

When getting an entry in the parent tree, the corresponding entry in the friend will be computed via the index. Note that to support this new feature, the parent Tree does not need an index. Only the friend Tree must have an index. See comments in the TTreeIndex constructor.

TTree::BuildIndex() may be used with a major-name only.

New method TTree::BranchRef and new classes TBranchRef, TRefTable

Improvements in TTree::Scan

add the ability to format the output of TTree::Scan. The option parameter can now contains the following customization:
	       colsize=ss
	          Where 'ss' will be used as the default size for all the column
	          If this options is not specified, the default column size is 9
	       precision=pp
	          Where 'pp' will be used as the default 'precision' for the
	          printing format.
	       col=xxx
	          Where 'xxx' is colon (:) delimited list of printing format for
	          each column if no format is specified for a column, the default is
	          used.
	    For example:
	      tree->Scan("a:b:c","","colsize=30 precision=3 col=::20.10");
	    Will print 3 columns, the first 2 columns will be 30 characters long,
	    the third columns will be 20 characters long.  The
	    for the columns (assuming they are numbers) will be respectively:
	      %30.3g %30.3g %20.10g
  

New function TTree::ReadFile

	Long64_t TTree::ReadFile(const char *filename, const char *branchDescriptor)
	    Create or simply read branches from filename
	    if branchDescriptor = "" (default), it is assumed that the Tree descriptor
	       is given in the first line of the file with a syntax like
	        A/D:Table[2]/F:Ntracks/I:astring/s
	     otherwise branchDescriptor must be specified with the above syntax.
	   
	    A TBranch object is created for each variable in the expression.
	    The total number of rows read from the file is returned.
TNtuple::ReadFile has been modified to be consistent with TTree::ReadFile.

Browsing Class Methods

Axel Naumann has added code that allows the TBrowser to browse simple member methods (called "browsable" methods: public, not pure virtual, const, no args without default value, return type not void, and none of those Impl/DeclFile/IsA/... methods).

When TBranchElement::Browse is called, TBranchElement::GetBrowsableMethods creates a list of browsable methods, containing an object of type TMethodBrowsable for each browsable TMethod of the current BranchElement's object (or its clone) and all of its base classes. This list is needed for deleting these objects when the TBranchElement ceases to be. All these objects are added to the TBrowser in TBranchElement::Browse. TMethodBrowsable implements Browse, and calls TBranchElement::GetTree()->Draw(branchname.methodname).

If a method returns a class object (or a pointer to one) which is known to ROOT, fReturnClass is set. If that method is browsed, it expands to a folder, giving access to the returned class's methods.

Axel added an icon for methods - a leaf with a red exclamation mark (as in "execute!") for methods not returning a class, and a folder with an exclamation mark for methods returning a class.

Add a new option in TTreePlayer::UnbinnedFit

If option = "D" Draw the projected histogram with the fitted function normalized to the number of selected rows and multiplied by the bin width

Classes TH1, TH2

New Rebin methods for 2-d histograms

	
	- TH2 *TH2::RebinX(Int_t ngroup, const char *newname) 
	- TH2 *TH2::RebinY(Int_t ngroup, const char *newname)
	- TH2 *TH2::Rebin2D(Int_t nxgroup, Int_t nygroup, const char *newname):

TH1::SetBuffer enhancements

Upgrade the histogram buffer algorithm such that it can be used in a coming version of the rebinner of the TH1,2 editors. When the histogram buffer is active (TH1::SetBuffer has been called), the buffer is kept alive as long as the number of entries can be accomodated by the buffer. When calling the Draw/Paint functions, the histogram is reset and refilled from the buffer. The buffer is also preserved by the I/O operations.

Better Error calculation in TH1::Divide

Improve the calculation of errors in TH1::Divide with the binomial option. In the previous algorithm, when the bin contents of the two histograms were equal, the resulting error was null. In the new algorithm, the method used in TGraphAsymmErrors::BayesDivide is used to make a better error estimation.

Two new functions returning the error on the mean and RMS respectively

	Double_t TH1::GetMeanError(Int_t axis) const
	Double_t TH1::GetRMSError(Int_t axis) const

New options in THistPainter

An algorithm sent by Ernst-Jan Buis for plotting contours using the special projections for viewing skymaps or exposure maps has been introduced in THistPainter and associated classes.

In Hoption.h a new member HOption.Proj has been introduced

	   int Proj;        //  = 1 to get an Aitoff projection, usefull for skymaps or exposure maps..
	                    //  = 2 to get a Mercator ptojection
	                    //  = 3 to get a Sinusoidal ptojection
	                    //  = 4 to get a Parabolic ptojection
in THistPainter::Paint, the following options are supported:
   "AITOFF"     : Draw a contour via an AITOFF projection
   "MERCATOR"   : Draw a contour via an Mercator projection
   "SINUSOIDAL" : Draw a contour via an Sinusoidal projection
   "PARABOLIC"  : Draw a contour via an Parabolic projection

New function TPad::PaintFillAreahatches

In addition to the existing fill area patterns, the following hatch styles have been introduced (same convention as in PAW): They are visible in PS files with gv even with anti-aliasing on.
              FillStyle = 3ijk
  
      i (1-9) : specify the space between each hatch
                1 = 1/2mm  9 = 6mm
  
      j (0-9) : specify angle between 0 and 90 degrees
  
                0 = 0
                1 = 10
                2 = 20
                3 = 30
                4 = 45
                5 = Not drawn
                6 = 60
                7 = 70
                8 = 80
                9 = 90
  
      k (0-9) : specify angle between 90 and 180 degrees
                0 = 180
                1 = 170
                2 = 160
                3 = 150
                4 = 135
                5 = Not drawn
                6 = 120
                7 = 110
                8 = 100
                9 = 90

Improvements in the Linear Algebra package (thanks Eddy Offermann)

New class TRobustEstimator (thanks Anna Kreshuk)

Minimum Covariance Determinant Estimator

Fast Algorithm invented by Peter J.Rousseeuw and Katrien Van Dreissen "A Fast Algorithm for the Minimum covariance Determinant Estimator" Technometrics, August 1999, Vol.41, NO.3

What are robust estimators?

"An important property of an estimator is its robustness. An estimator is called robust if it is insensitive to measurements that deviate from the expected behaviour. There are 2 ways to treat such deviating measurements: one may either try to recongize them and then remove them from the data sample; or one may leave them in the sample, taking care that they do not influence the estimate unduly. In both cases robust estimators are needed...Robust procedures compensate for systematic errors as much as possible, and indicate any situation in which a danger of not being able to operate reliably is detected." R.Fruhwirth, M.Regler, R.K.Bock, H.Grote, D.Notz "Data Analysis Techniques for High-Energy Physics", 2nd edition

What does this algorithm do?

It computes a highly robust estimator of multivariate location and scatter. Then, it takes those estimates to compute robust distances of all the data vectors. Those with large robust distances are considered outliers. Robust distances can then be plotted for better visualization of the data.

How does this algorithm do it?

The MCD objective is to find h observations(out of n) whose classical covariance matrix has the lowest determinant. The MCD estimator of location is then the average of those h points and the MCD estimate of scatter is their covariance matrix. The minimum(and default) h = (n+nvariables+1)/2 so the algorithm is effective when less than (n+nvar+1)/2 variables are outliers. The algorithm also allows for exact fit situations - that is, when h or more observations lie on a hyperplane. Then the algorithm still yields the MCD location T and scatter matrix S, the latter being singular as it should be. From (T,S) the program then computes the equation of the hyperplane.

How can this algorithm be used?

In any case, when contamination of data is suspected, that might influence the classical estimates. Also, robust estimation of location and scatter is a tool to robustify other multivariate techniques such as, for example, principal-component analysis and discriminant analysis.

TMath enhancements

New functions in TLorentzVector

Double_t Et2() const; // Transverse energy squared.
Double_t Et() const;  // Transverse energy.
Double_t Et2(const TVector3 &) const; // Transverse energy w.r.t. given axis squared.
Double_t Et(const TVector3 &) const;  // Transverse energy w.r.t. given axis.

Improvements in ACLIC

Implements autoloading for ACLiC. Essentially this means that a script that can be interpreted thanks to the fact that ROOT automatically loads dependent library, can now also be loaded via ACLiC (without the user explicitly loading the dependent library).

We added a new option to rootcint --lib-list-prefi=xxx. When used, it tells rootcint to read a list of rootmap files in xxx.in and output in xxx.out a list of libraries where the symbols in the header files can be found.

Also to keep track of the dependencies, the library produced by ACLiC are now explictly linked to all the libraries loaded in ROOT at the time (which now included the result of autoloading). This allow the resulting library to be also loaded in a new session (with the user loading any other library).

New features in TF1

The expression "gaus" is a substitute for
     [0]*exp(-0.5*((x-[1])/[2])**2)
To obtain a standard normalized gaussian, use "gausn" instead of "gaus". The expression "gausn" is a substitute for
     [0]*exp(-0.5*((x-[1])/[2])**2)/sqrt(2*pi*[2])
The "gaus" and "gausn" functions use now TMath::Gaus.

TGraph, TArrow, TH1 and TH2 Graphics editors

. The Editors for changing the attributes of TGraph, TArrow, TH1/TH2 and the rebinning of TH1/TH2 via the GUI have been implemented. Functionalities of the THEditors in detail:

New GUI MDI classes

new MDI (Multiple Document Interface) GUI classes. Ported from xclass 95. To see how this works and for example code see $ROOTSYS/tutorials/mditest.C.

Improvements in TASImage

ASImage (generic image manipulation library by Sasha Vasko) is now supported for all ROOT platforms. That allows to read,browse(via TBrowser) images of the following formats: XPM, PNG, JPG,XCF,PNM,PPM,BMP,ICO,CUR,GIF,TIFF,XBM write images into the following formats: XPM, JPG, PNG, GIF, TIFF That also allows to generate images (without X server) via XML scripts. For more information visit http://afterstep.sourceforge.net/afterimage/afterimage.php Check also rose_image.C, galaxy_image.C, img2pad.C tutorial macros.

The GUI Builder: new class TGuiBuilder

ROOT GUI Builder principles

You can start the builder from the canvas Inspect menu. With the GUI builder, we try to make the next step from WYSIWYG to embedded editing concept - WYSIWYE ("what you see is what you edit"). The ROOT GUI Builder allows modifying real GUI objects. For example, one can edit the existing GUI application $ROOTSYS/tutorials/guitest.C. GUI components can be added to a design area from a widget palette, or can be borrowed from another application. One can drag and and drop TCanvas's menu bar into the application. GUI objects can be resized and dragged, copied and pasted. ROOT GUI Builder allows changing the layout, snap to grid, change object's layout order via the GUI Builder toolbar, or by options in the right-click context menus. A final design can be immediatly tested and used, or saved as a C++ macro. For example, it's possible to rearrange buttons in control bar, add separators etc. and continue to use a new fancy control bar in the application. The following is a short description of the GUI Builder actions and key shortcuts: o Press Ctrl-Double-Click to start/stop edit mode o Press Double-Click to activate quick edit action (defined in root.mimes)

Selection, grabbing, dropping

It is possible to select, drag any frame and drop it to any frame

Key shortcuts

   o Del       - delete selected frame
   o Shift-Del - crop action
   o Ctrl-X    - cut action
   o Ctrl-C    - copy action
   o Ctrl-V    - paste action
   o Ctrl-R    - replace action
   o Ctrl-L    - compact layout
   o Ctrl-B    - break layout
   o Ctrl-H    - switch horizontal-vertical layout
   o Ctrl-G    - switch on/off grid
   o Ctrl-S    - save action
   o Ctrl-O    - open and execute a ROOT macro file.  GUI components created 
                 after macro execution will be emebedded to currently edited 
                 design area.   
   o Ctrl-N    - create new main frame

New Graphics 3-D classes TBuffer3D, TVirtualViewer3D and TViewerOpenGL

The 3-D graphics system has been redesigned to show more homogeneity between the various packages and the graphics drivers. A new OpenGL viewer has been created. It can be activated from the View menu of the canvas. See the Help button in the viewer.

Scene Properties

You can add clipping plane by clicking the checkbox and specifying the plane's equation A*x+B*y+C*z+D=0.

Colors

After you selected an object or a light source, you can modify object's material and light source color.

Light Sources

There are two pickable light sources in the current implementation. They are shown as spheres. Each light source has three light components : DIFFUSE, AMBIENT, SPECULAR. Each of this components is defined by the amounts of red, green and blue light it emits. You can EDIT this parameters: 1. Select light source sphere. 2. Select light component you want to modify by pressing one of radio buttons. 3. Change RGB by moving sliders

Material Rendering

Object's material is specified by the percentage of red, green, blue light it reflects. A surface can reflect diffuse, ambient and specular light. A surface has two additional parameters: EMISSION - you can make surface self-luminous; SHININESS - modifying this parameter you can change surface highlights. Sometimes changes are not visible, or light sources seem not to work - you should understand the meaning of diffuse, ambient etc. light and material components. For example, if you define material, wich has diffuse component (1., 0., 0.) and you have a light source with diffuse component (0., 1., 0.) - you surface does not reflect diffuse light from this source. For another example - the color of highlight on the surface is specified by: light's specular component, material specular component. At the top of the color editor there is a small window with sphere. When you are editing surface material, you can see this material applyed to sphere. When edit light source, you see this light reflected by sphere whith DIFFUSE and SPECULAR components (1., 1., 1.).

Objects Geometry editor

You can edit object's location and stretch it by entering desired values in respective number entry controls.

How to view detector geometries by default using the new GL viewer

TGeoVolume::Draw uses the TEnv variable Viewer3D.DefaultDrawOption as an option to draw. If this environment variable is defined in system.rootrc (or .rootrc), it is used to specify the default value when drawing a volume. For example, if this variable is set to "ogl", the TViewerOpenGL viewer will be used by default to draw TGeo objects instead of TPad.

class TApplication: Exiting from ROOT

The user can finally exit ROOT even if the system is crashing within the CINT clean-up routines. Namely, we now support:
       .qqqqq (or .QQQQQ) calls gSystem->Exit
       .qqqqqqq (or .QQQQQQQ) calls gSystem->Abort
This matches the corresponding CINT options:
        qqqqq     : exit process immediately
        qqqqqqq   : abort process

PyROOT improvements

There are improvements to most of the PyROOT functionality (by Wim Lavrijsen, as well as some completely new features. Most changes were initiated by user input and from the fallout of a basic, but real-life, ATLAS Z->ee analysis example.

Python/C++ language features

C++ namespaces, global pointer variables, global enums, static methods, and STL classes are now correctly handled. All pointers and references that enter python are now cast to the actual underlying object. Special cases, such as the gPad global are handled.

Foundation classes, such as TString, TList, TTree, etc., are enriched with member functions that implement the python protocols appropriate for their use. Some examples: all TSeqCollection derived classes can now be used in python style loops, sliced, searched, counted, etc. TTree instances can be browsed directly by accessing the leaves as if these were data members. The TF1 class got an additional contructor which accepts a python function. Thus, it is possible to plot python functions, and to use them to fit histograms.

Access to, and use of ROOT/CINT

Some of the basic ROOT/CINT commands (.q, .!, .x, .cd, .ls, and .pwd) are mimicked, CINT global scope variables are directly accessible, and interpreted classes can be instantiated, albeit through their default constructor only. The "from ROOT import *" language construct no longer uses the exception hook and it can safely be used in scripts. It is, however, still not recommended.

Code quality

Judicious use of caches, laziness, and a tighter memory management have improved speed and lowered the amount of memory usage. Better checks for null pointers and array boundaries reduces crashes and worse problems in end-user python sessions.

To build, it is no longer necessary to configure ROOT with the --enable-explicitlink option, which helps portability. Linkage problems with auto-loading have been resolved for the most popular platforms: Linux, MacOSX, and Win32. The public interfaces have comments that work with the automatic documentation generation.

New tutorials



ROOT page - Class index - Top of the page