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
- Add support for automatic schema evolution when a namespace is added
to a class. For example A is MyClass and B is MyNamespace::MyClass.
- Supports the case where the type of a data member
changed from [NamespaceA::]ClassName to [NamespaceB::]ClassName,
where both namespaces are optional.
- Implements the schema evolution to and from selected containers.
The following cases are currently implemented:
- TClonesArray object -> STL object containing the same type
- TClonesArray pointer -> STL pointer containing the same type
- STL object -> STL object containing the same type
- STL pointer -> STL pointer containing the same type
- STL split branches -> TClonesArray
- In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.
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
- TRefTable
When writing referenced objects, a table of parents of these
referenced objects is kept in the TRefTable
eg, when writing a Tree, the parent object is the TBranch
with the referenced object. In this case the TRefTable is activated
when filling the Tree. The information about the parents is kept
in a separate Tree branch, such that when dereferencing a TRef
the parent branch containing the referenced object can be loaded
automatically.
-
New class TBranchRef deriving from TBranch.
This is a special branch keeping the information about the
branch numbers having referenced objects.
The TBranchRef object is created by the new function
TTree::BranchRef
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)
- added new decomposition class TDecompBK: Bunch-Kaufman algorithm
this class is designed to decompose real symmetric matrices . Now
we can guarantee that inverse of a symmetric matrix is again
symmetric .
- As a consequence of the introduction of TDecompBK, we added
Invert(..) functionality to TMatrixD/FSym
Also added InvertFast to TMatrixD/FSym which uses Cramer
inversion for matrices <= (6 x 6) , resulting in large speedup
but less accuracy . The necessary routines are encapsulated
in the new TMatrixDSymCramerInv class .
Note of caution :
Unlike the other decompositions, Bunch-Kaufmann does not result
in a triangular matrix of which the determinant is trivially calculated
by multiplying the diagonal elements . As a consequence,
we have to invoke yet another decomposition when the user
requests the determinant .
So Invert() will be roughly twice faster than Double_t *det; Invert(det)
- Changed the algoritm for the Cholesky decomposition so that we
do not need to have a copy of the original matrix around !
After removal of class member fA, increased the version to 2
- Added sorting of eigen -values/-vectors to TMatrixDEigen .
They are now sorted according to Re^2+Im^2 of the (possible)
complex eigenvalues in descending order . TMatrixDSymEigen
already sorted . Since most users use TMatrixD instead of
TMatrixDSym, this will ensure backward compatiblity since
old root contained the symmetric algorithms in TMatrixD .
- Added rank 1 update algorihms : A += alpha * x y^T
(x and y are vectors)
to the non-sparse matrix classes (adding this to sparse
would make this matrix immediately dense :)
- Moved Invert fom TDecompBase to the different decomposition
classes . Reason is that some classes can decompose A(m,n)
where m > n . The result of Invert() is then a "pseudo-invert"
: A_pseudo = (A^T A)^-1 A^T .
- Added support to do in one operation A*B^T . A*B and A^T*B were
already available . This allows new constructors like
TMatrixD/F(a,TMatrixD/F::kMultTranspose,b)
- Introduced in TMatrixD/FSym 3 new similarity operations . They could
be done by brute-force multiplying the matrices but the final result
could then not take advantage that the matrix is symmetric . The
operations are:
TMatrixDSym &Similarity (const TMatrixD &n); // n * (*this)*n^T
TMatrixDSym &Similarity (const TMatrixDSym &n);// n_sym *(*this) *n^T
TMatrixDSym &SimilarityT (const TMatrixD &n); // n^T *(*this) * n
- removed bug in TMatrixFSym that prevented correct streaming :
Float_t *fElements; //![fNelems] elements themselves should be
Float_t *fElements; //[fNelems] elements themselves
It was ok in TMatrixDSym
- moved the protected and not streamed data member (this is an
interesting one!!!!)
Double_t fDataStack[kSizeMax]; //! data container
from the base classes to the actual classes .
The idea is and was that for matrices with less than kSizeMax+1 elements
no heap space is allocated and elements are stored on the stack .
This should result in signifant speed improvements for small matrices .
However, it became apparent (at least on my MacOSX G4) that it is only
effective when the data member is in the same class as its pointer fElements .
Moving this member necessitated also moving several (protected)
routines like New_m, Delete_m and Memcpy_m.
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
- TMath is changed from a class to a namespace.
-
The Median functions have been improved in speed (thanks Anna Kreshuk).
-
The following functions are either new or have a new prototype
that should be back compatible.
Double_t TMath::CauchyDist(Double_t x, Double_t t, Double_t s)
Double_t TMath::GammaDist(Double_t x, Double_t gamma, Double_t mu, Double_t beta)
Double_t TMath::LogNormal(Double_t x, Double_t sigma, Double_t theta, Double_t m)
Double_t BetaDist(Double_t x, Double_t p, Double_t q)
Double_t BetaDistI(Double_t x, Double_t p, Double_t q)
Double_t LaplaceDist(Double_t x, Double_t alpha=0, Double_t beta=1);
Double_t LaplaceDistI(Double_t x, Double_t alpha=0, Double_t beta=1);
// Min, Max of an array
static Short_t MinElement(Long64_t n, const Short_t *a);
static Int_t MinElement(Long64_t n, const Int_t *a);
static Float_t MinElement(Long64_t n, const Float_t *a);
static Double_t MinElement(Long64_t n, const Double_t *a);
static Long64_t MinElement(Long64_t n, const Long64_t *a);
static Short_t MaxElement(Long64_t n, const Short_t *a);
static Int_t MaxElement(Long64_t n, const Int_t *a);
static Float_t MaxElement(Long64_t n, const Float_t *a);
static Double_t MaxElement(Long64_t n, const Double_t *a);
static Long64_t MaxElement(Long64_t n, const Long64_t *a);
// Locate Min, Max element number in an array
static Long64_t LocMin(Long64_t n, const Short_t *a);
static Long64_t LocMin(Long64_t n, const Int_t *a);
static Long64_t LocMin(Long64_t n, const Float_t *a);
static Long64_t LocMin(Long64_t n, const Double_t *a);
static Long64_t LocMin(Long64_t n, const Long64_t *a);
static Long64_t LocMax(Long64_t n, const Short_t *a);
static Long64_t LocMax(Long64_t n, const Int_t *a);
static Long64_t LocMax(Long64_t n, const Float_t *a);
static Long64_t LocMax(Long64_t n, const Double_t *a);
static Long64_t LocMax(Long64_t n, const Long64_t *a);
//Mean, Geometric Mean, Median, RMS
static Double_t Mean(Long64_t n, const Short_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Int_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Float_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Double_t *a,const Double_t *w=0);
static Double_t Mean(Long64_t n, const Long64_t *a,const Double_t *w=0);
static Double_t GeomMean(Long64_t n, const Short_t *a);
static Double_t GeomMean(Long64_t n, const Int_t *a);
static Double_t GeomMean(Long64_t n, const Float_t *a);
static Double_t GeomMean(Long64_t n, const Double_t *a);
static Double_t GeomMean(Long64_t n, const Long64_t *a);
static Double_t RMS(Long64_t n, const Short_t *a);
static Double_t RMS(Long64_t n, const Int_t *a);
static Double_t RMS(Long64_t n, const Float_t *a);
static Double_t RMS(Long64_t n, const Double_t *a);
static Double_t RMS(Long64_t n, const Long64_t *a);
static Double_t Median(Long64_t n, const Short_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Int_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Float_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Double_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Long64_t *a, const Double_t *w=0, Long64_t *work=0);
static Short_t KOrdStat(Long64_t n, const Short_t *a, Long64_t k, Long64_t *work=0);
static Int_t KOrdStat(Long64_t n, const Int_t *a, Long64_t k, Long64_t *work=0);
static Float_t KOrdStat(Long64_t n, const Float_t *a, Long64_t k, Long64_t *work=0);
static Double_t KOrdStat(Long64_t n, const Double_t *a, Long64_t k, Long64_t *work=0);
static Long64_t KOrdStat(Long64_t n, const Long64_t *a, Long64_t k, Long64_t *work=0);
// Binary search
static Long64_t BinarySearch(Long64_t n, const Short_t *array, Short_t value);
static Long64_t BinarySearch(Long64_t n, const Short_t **array, Short_t value);
static Long64_t BinarySearch(Long64_t n, const Int_t *array, Int_t value);
static Long64_t BinarySearch(Long64_t n, const Int_t **array, Int_t value);
static Long64_t BinarySearch(Long64_t n, const Float_t *array, Float_t value);
static Long64_t BinarySearch(Long64_t n, const Float_t **array, Float_t value);
static Long64_t BinarySearch(Long64_t n, const Double_t *array, Double_t value);
static Long64_t BinarySearch(Long64_t n, const Double_t **array, Double_t value);
static Long64_t BinarySearch(Long64_t n, const Long64_t *array, Long64_t value);
static Long64_t BinarySearch(Long64_t n, const Long64_t **array, Long64_t value);
// Sorting
static void Sort(Int_t n, const Short_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Int_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Float_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Double_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Long64_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Short_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Int_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Float_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Double_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Long64_t *a, Long64_t *index, Bool_t down=kTRUE);
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
- New algorithm for TF1::Derivative with better precision.
- New functions TF1::Derivative2 and TF1::Derivative3 computing the second
and third derivative (from original code by Anna Kreshuk)
- gausn: a normalized gaussian
- landaun: a normalized landau
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.
- All draw options of TGraph, TArrow, TH1/TH2 can be set by using the Editors.
Changing histograms and graphs without typing any command makes it possible to
create the wished layout in a short time. Saving the histogram/graph via the Canvas Menu
as a macro, it can be used as a prototype.
- Becoming quite large the Editor is seperated in up to three Tabs. For the THEditors, the first
Tab Style is reserved for the widgets, which change the appearance of the according object.
Whereas the second Tab Binning provides the GUI elements to rebin the histogram.
- All the widgets, especially the sliders, will give immediate feedback in the Pad and also in the Editor.
Functionalities of the THEditors in detail:
- Style Tab:
- Change the title of the histogram.
- Switch from a 2D plot to 3D plot and vice versa.
- Change type, coordinate system, errors, contours and addons by selecting them from a ComboBox.
- Activate further draw options by setting check boxes.
- Set color and pattern for all drawn objects using special widgets.
- Binning Tab:
- Use Sliders and NumberEntryFields to set the number of bins in the rebinned histogram.
- For the last drawn ntuple the rebinned histogram will be automatically created from the original data stored in the ntuple.
- Press Apply or Ignore Button to adopt or reprobate the rebinned histogram.
- Change the origin of the histogram via a slider to see the binning effect on the data.
- Zoom into a special axis range by moving doublesliders.
- Activate "delayed drawing" CheckBox to see the changes on the histogram only after releasing the sliders.
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
- Click left mouse button or Ctrl-Click to select an object to edit.
- Press right mouse button to activate context menu
- Mutiple selection (grabbing):
- draw lasso and press Return key
- press Shift key and draw lasso
- Dropping:
- select frame and press Ctrl-Return key
- Changing layout order:
- select frame and use arrow keys to change layout order
- Alignment:
- draw lasso and press arrow keys (or Shift-Arrow key) to align frames
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
- transpad.C demonstrating the use of transparent pads.
- mathGammaNormal.C
- mathBeta illustrating the new functions TMath::BetaDist and TMath::BetaDistI
- mditest.C
- earth.C illustrating the new contour draw options
// "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
// from an original macro sent by Ernst-Jan Buis
The picture produced by the new tutorial earth.C is visible at
http://root.cern.ch/root/htmldoc/THistPainter.html#THistPainter:PaintContour
- latex4.C showing greek letters and variants.
The Greek characters table is now complete. Some of the Greek capital
letters were missing. Some special Greek letter, like varUpsilon, have
been added. The list is now:
#alpha #beta #chi #delta #varepsilon #phi #gamma #eta #iota #varphi
#kappa #lambda #mu #nu #omicron #pi #theta #rho #sigma #tau #upsilon
#varomega #omega #xi #psi #zeta #Alpha #Beta #Chi #Delta #Epsilon #Phi
#Gamma #Eta #Iota #vartheta #Kappa #Lambda #Mu #Nu #Omicron #Pi #Theta
#Rho #Sigma #Tau #Upsilon #varsigma #Omega #Xi #Psi #Zeta #varUpsilon
#epsilon
- nucleus.C showing with OpenGL a nucleus with a variable
number of protons and neutrons (default is 40,60).
ROOT page - Class index - Top of the page