; aachen
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

aachen

VIEWS: 8 PAGES: 78

  • pg 1
									   The ROOT Project
Status & Developments

         Aachen
        1 February 2005


      René.Brun@cern.ch




         ROOT: Status & Developments   1
    ROOT in a nutshell
   An efficient data storage and access system designed to
    support structured data sets in very large distributed
    data bases (Petabytes).
   A query system to extract information from these
    distributed data sets.
   The query system is able to use transparently parallel
    systems on the GRID (PROOF).
   A scientific visualisation system with 2-D and 3-D
    graphics.
   An advanced Graphical User Interface
   A C++ interpreter allowing calls to user defined classes.
   An Open Source Project

                       ROOT: Status & Developments          2
    ROOT: An Open Source Project
   The project is developed as a collaboration between :
   Full time developers:
       6   people full time at CERN
       1   core developer at FermiLab
       1   core developer in Japan (Agilent Technologies)
       1   core developer at MIT
       1   mathematician at CERN sponsored by a US Finance Company
   Many contributors spending a substantial fraction of
    their time in specific areas (> 50).
   Key developers in large experiments using ROOT as a
    framework.
   Several thousand users given feedback and a very long
    list of small contributions.

                             ROOT: Status & Developments              3
    Project History
   Jan 95: Thinking/writing/rewriting/???
   November 95: Public seminar, show Root 0.5
   Spring 96: decision to use CINT
    Jan 97: Root version 1.0


   Jan 98: Root version 2.0
                                                10 years !!
   Mar 99: Root version 2.21/08 (1st Root workshop FNAL)
   Feb 00: Root version 2.23/12 (2nd Root workshop CERN)
   Mar 01: Root version 3.00/06
   Jun 01: Root version 3.01/05 (3rd Root workshop FNAL)
   Jan 02: Root version 3.02/07 (LCG project starts: RTAGs)
   Oct 02: Root version 3.03/09 (4th Root workshop CERN)
   Feb 04: version 4.00 (5th Root workshop SLAC)
   Dec 04: version 4.02 (current stable version)
   Feb 05: Developing 4.04 to be released in June (LCG/ROOT merge)


                                ROOT: Status & Developments           4
The ROOT web pages


   http://root.cern.ch
General Information and News
Download source and binaries
Howto & tutorials
User Guide & Reference Guides
Roottalk Digest & Forum
                ROOT: Status & Developments   5
Current ROOT structure & libs




            ROOT: Status & Developments   6
CINT: the C++ interpreter




           ROOT: Status & Developments   7
 My first session
root
       root [0] 344+76.8
       (const double)4.20800000000000010e+002
       root [1] float x=89.7;
       root [2] float y=567.8;
       root [3] x+sqrt(y)
       (double)1.13528550991510710e+002
       root [4] float z = x+2*sqrt(y/6);
       root [5] z
       (float)1.09155929565429690e+002
       root [6] .q


root                                           See file $HOME/.root_hist

       root [0] try up and down arrows

                          ROOT: Status & Developments                      8
   My second session
 root
        root [0] .x session2.C
        for N=100000, sum= 45908.6
        root [1] sum
        (double)4.59085828512453370e+004
        Root [2] r.Rndm()
        (Double_t)8.29029321670533560e-001
        root [3] .q

                                                                   session2.C
                                       {
                                             int N = 100000;
    unnamed macro
                                             TRandom r;
executes in global scope                     double sum = 0;
                                             for (int i=0;i<N;i++) {
                                                sum += sin(r.Rndm());
                                             }
                                             printf("for N=%d, sum= %g\n",N,sum);
                                       }

                                     ROOT: Status & Developments                    9
     My third session
   root
          root [0] .x session3.C
          for N=100000, sum= 45908.6
          root [1] sum
          Error: Symbol sum is not defined in current scope
          *** Interpreter error recovered ***
          Root [2] .x session3.C(1000)
          for N=1000, sum= 460.311
          root [3] .q
                                                                      session3.C
                                          void session3 (int N=100000) {
                                             TRandom r;
    Named macro                              double sum = 0;
Normal C++ scope rules                       for (int i=0;i<N;i++) {
                                                sum += sin(r.Rndm());
                                             }
                                             printf("for N=%d, sum= %g\n",N,sum);
                                          }


                                        ROOT: Status & Developments                 10
     My third session with ACLIC
  root [0] gROOT->Time();
  root [1] .x session4.C(10000000)
  for N=10000000, sum= 4.59765e+006
  Real time 0:00:06, CP time 6.890
  root [2] .x session4.C+(10000000)
  for N=10000000, sum= 4.59765e+006
  Real time 0:00:09, CP time 1.062

  root [3] session4(10000000)
  for N=10000000, sum= 4.59765e+006
  Real time 0:00:01, CP time 1.052
  root [4] .q
                                                                    session4.C
                                         #include “TRandom.h”
                                         void session4 (int N) {
   File session4.C                          TRandom r;
Automatically compiled                      double sum = 0;
  and linked by the                         for (int i=0;i<N;i++) {
   native compiler.                            sum += sin(r.Rndm());
Must be C++ compliant                       }
                                            printf("for N=%d, sum= %g\n",N,sum);
                                         }
                                      ROOT: Status & Developments                  11
       Macros with more than one function

root [0] .x session5.C >session5.log
root [1] .q

root [0] .L session5.C
root [1] session5(100); >session5.log
root [2] session5b(3)
sum(0) = 0
sum(1) = 1
sum(2) = 3
root [3] .q
                                                                   session5.C
                                       void session5(int N=100) {
                                          session5a(N);
    .x session5.C                         session5b(N);
                                          gROOT->ProcessLine(“.x session4.C+(1000)”);
 executes the function                 }
session5 in session5.C                 void session5a(int N) {
                                          for (int i=0;i<N;i++) {
                                             printf("sqrt(%d) = %g\n",i,sqrt(i));
                                          }
use gROOT->ProcessLine                 }
                                       void session5b(int N) {
to execute a macro from a                 double sum = 0;
 macro or from compiled                   for (int i=0;i<N;i++) {
          code                               sum += i;
                                             printf("sum(%d) = %g\n",i,sum);
                                          }
                                       }
                            ROOT: Status & Developments                                 12
Combining UI and GUI




                                root [0] .x session2.C
                                for N=100000, sum= 45908.6
                                root [1] sum
                                (double)4.59085828512453370e+004
                                Root [2] r.Rndm()
                                (Double_t)8.29029321670533560e-001
                                root [3] .q
          ROOT: Status & Developments                                13
The Histogram Package




          ROOT: Status & Developments   14
          The Histogram Classes

   Structure
                                                 1-Dim




                                    2-Dim



           3-Dim


                   ROOT: Status & Developments           15
Histograms




   class THStack
   Long list of functions in TH1
   Plenty of drawing options
   Filling with string variables
   Automatic binning
   TH1::SetBuffer
   TH1::GetRandom
   h3 = 3*h1 – h2



                               ROOT: Status & Developments   16
  Filling with strings

See tutorials
-hlabels1.C
-hlabels2.C
-cernstaff.C




                ROOT: Status & Developments   17
Peak Finder + Deconvolutions
by Miroslav Morach
                                                   TSpectrum




                     ROOT: Status & Developments               18
    Fitting                                                TMinuit

         TFumili                       TFitter


                 TVirtualFitter


TH1::Fit         TGraph::Fit                 TTree::Fit
bin chisquare       unbinned                         unbinned
bin likelihood      chisquare                        likelihood



                                                                  User
                       ROOT: Status & Developments                       19
Graphics




           ROOT: Status & Developments   20
                  Gui/Graphics strategy

                                                               High level
          User/Root GUI                                       pad graphics
      and Graphics classes
      Applications see only
       Abstract Interfaces
                                                        TVirtualPad
   Low level
screen graphics
    and GUI
                          TVirtualX                            TPad




  TGWin32          TGQt      TG??             TGX11          TGWin32GDK
                          ROOT: Status & Developments                        21
A Data Analysis & Visualisation tool




                  ROOT: Status & Developments   22
    Graphics : 1,2,3-D functions





             ROOT: Status & Developments   23
Full LateX
support on
screen and
 postscript



Formula or
 diagrams
  can be
edited with
the mouse




                                                TCurlyArc
                                                TCurlyLine
                                                TWavyLine
                                             and other building
                                                 blocks for
                                            Feynmann diagrams



              ROOT: Status & Developments                         24
ROOT 3D Graphics
                     The ROOT basic 3D shapes




                                                   Simple Box




 R.Brun 1 Feb 2005   ROOT: Status & Developments
Alice           3 million nodes




        ROOT: Status & Developments   26
       ROOT 3D Graphics
R. Brun (CERN), O. Couet (CERN), M. Gheata (ISS), A. Gheata (ISS), V. Onoutchine (IFVE), T.Pocheptsov (JINR)




                                                                                                                                             Text …………………




                                                Atlas




                      R.Brun 1 Feb 2005                                                                        ROOT: Status & Developments
GUI




      ROOT: Status & Developments   28
    Available Widgets
   Complete set of widgets:
      label, icon, button, check button, radio

       button, picture button, button box, list box,
       combo box, list view, icon view, number
       entry, text entry, text view, text edit, tree
       view, tab view, scrollbar, slider, menubar,
       popup menu, cascading menu, statusbar,
       toolbar, message dialogs, file selection dialog,
       progress bars, tooltips, ...


                     ROOT: Status & Developments     29
Basic Widgets




          ROOT: Status & Developments   30
    Advanced Widgets
   Color selector dialog: TGColorDialog




                    ROOT: Status & Developments   31
GUI Examples




           ROOT: Status & Developments   32
GUI Examples –
Histogram Browser




          ROOT: Status & Developments   33
More GUI Examples –
Period System




         ROOT: Status & Developments   34
Object Editors




            ROOT: Status & Developments   35
Histogram Editor




           ROOT: Status & Developments   36
Object Editors (rebinning)




            ROOT: Status & Developments   37
Input/Output




          ROOT: Status & Developments   38
           Evolution of ROOT I/O
1995
          Hand-written Streamers
          Streamers generated via rootcint
          Support for Class Versions
          Support for ByteCount
          Persistent class Dictionary written to files
          rootcint modified to generate automatic Streamers              3.00
          Support for Automatic Schema Evolution
          Can generate code for “DataObjects” classes in a file
          Support for complex C++ cases                           3.01

          Can read files without the classes
                                                        3.02
          Persistent Reference pointers
          Support for foreign classes       3.04
          Full support for STL
2005                               4.02
                                  ROOT: Status & Developments                39
                Object Persistency
                  (in a nutshell)
   Two I/O modes supported (Keys and Trees).
   Key access: simple object streaming mode.
      A ROOT file is like a Unix directory tree

      Very convenient for objects like histograms, geometries,

        mag.field, calibrations
   Trees
      A generalization of ntuples to objects

      Designed for storing events

      split and no split modes

      query processor

   Chains: Collections of files containing Trees
   ROOT files are self-describing
   Interfaces with RDBMS also available
   Access to remote files (RFIO, DCACHE, GRID)
                             ROOT: Status & Developments          40
                  ROOT I/O : An Example

                            Program Writing
 TFile f(“example.root”,”new”);
                                                                  demoh.C
 TH1F h(“h”,”My histogram”,100,-3,3);
 h.FillRandom(“gaus”,5000);
 h.Write();

                  Program Reading
                                              demohr.C
 TFile f(“example.root”);
 TH1F *h = (TH1F*)f.Get(“h”):
 h->Draw();
 f.Map();

20010831/171903   At:64         N=90      TFile
20010831/171941   At:154        N=453     TH1F           CX =   2.09
20010831/171946   At:607        N=2364    StreamerInfo   CX =   3.25
20010831/171946   At:2971       N=96      KeysList
20010831/171946   At:3067       N=56      FreeSegments
20010831/171946   At:3123       N=1       END

                                         ROOT: Status & Developments        41
                                         Objects in directory
                                            /pippa/DM/CJ
                                                 eg:
A Root file pippa.root                   /pippa/DM/CJ/h15
  with two levels of
     directories
           ROOT: Status & Developments                    42
    Self-describing files
   Dictionary for persistent classes written to the file when closing the
    file.
   ROOT files can be read by foreign readers (eg JavaRoot (Tony
    Johnson)
   Support for Backward and Forward compatibility
   Files created in 2003 must be readable in 2015
   Classes (data objects) for all objects in a file can be regenerated via
    TFile::MakeProject



     Root >TFile f(“demo.root”);
     Root > f.MakeProject(“dir”,”*”,”new++”);


                           ROOT: Status & Developments                   43
Automatic Schema Evolution




          ROOT: Status & Developments   44
Auto Schema Evolution (2)




          ROOT: Status & Developments   45
  File types & Access in 4.02/xx
              user


Local
 File
              TFile     TTreeSQL
X.xml      TKey/TTree
                                 TSQLServer
          TStreamerInfo
                                  TSQLRow
                                 TSQLResult
 http      rootd/xrootd
                                            Oracle
          Dcache Castor                     MySQL
Local
 File                                       PgSQL
X.root    RFIO      Chirp                   SapDb
              ROOT: Status & Developments            46
                                           Memory <--> Tree
                                Each Node is a branch in the Tree
                                                                                      Memory
0                                                     T.GetEntry(6)
    1
        2
            3
                4
                    5
                        6
                            7
                                8
                                 9
                                     10
                                      11
                                        12
                                         13
                                           14
                                            15
                                              16
                                               17                                   T.Fill()
                                                 18




                T
                                                      ROOT: Status & Developments              47
    Tree example Event (write)
                                                             All the examples
void demoe(int nevents) {                                    can be executed
    //load shared lib with the Event class                   with CINT
                                                             or the compiler
    gSystem->Load("$ROOTSYS/test/libEvent");
                                                             root > .x demoe.C
    //create a new ROOT file
                                                             root > .x demoe.C++
    TFile f("demoe.root",”new");

    //Create a ROOT Tree with one single top level branch
    int split = 99; //try also split=1 and split=0
    int bufsize = 16000;
    Event *event = new Event;
    TTree T("T","Event demo tree");
    T.Branch("event","Event",&event,bufsize,split);

    //Build Event in a loop and fill the Tree
    for (int i=0;i<nevents;i++) {
       event->Build(i);
       T.Fill();
    }

    T.Print();   //Print Tree statistics
    T.Write();   //Write Tree header to the file
}
                               ROOT: Status & Developments                      48
    Tree example Event (read 1)
void demoer() {
   //load shared lib with the Event class
   gSystem->Load("$ROOTSYS/test/libEvent");

    //connect ROOT file
    TFile *f = new TFile("demoe.root");

    //Read Tree header and set top branch address
    Event *event = 0;
    TTree *T = (TTree*)f->Get("T");
    T->SetBranchAddress("event",&event);

    //Loop on events and fill an histogram
    TH1F *h = new TH1F("hntrack","Number of tracks",100,580,620);
    int nevents = (int)T->GetEntries();
    for (int i=0;i<nevents;i++) {
       T->GetEntry(i);                        Rebuild the full event
       h->Fill(event->GetNtrack());                 in memory
    }

    h->Draw();
}
                         ROOT: Status & Developments               49
8 leaves of branch
     Electrons
                                         A double-click
                                         to histogram
                                            the leaf


  8 Branches of T


           ROOT: Status & Developments                    50
       The Tree Viewer & Analyzer




A very powerful class
     supporting
   complex cuts,
     event lists,
 1-d,2-d, 3-d views
     parallelism




                        ROOT: Status & Developments   51
                                 Tree Friends
                                                          Entry # 8
                          0
                           1
                            2
                             3
                              4
01                             5
                                6                                      0
  23                             7                                      12
                                  8                                       3
    45                                9                                    4
                                      10                                    56
      67                                11                                    7
        89                               12                                    89
                                          13
         10                                14                                   10
                                                                                 11
          11                                15                                    12
           12
            13                               16                                    13
             14                               17                                    14
                                                                                     15
              15                               18                                     16
               16
                17                                                                     17
                                                                                        18
                 18




                 Public                             Public                                   User
                  read
                                                     read                                Write

                                         ROOT: Status & Developments                                52
         Tree Friends
                      Collaboration-wide
                          public read
Analysis group                                      user
  protected                                        private                        Processing time
                                                                                independent of the
                                                                                 number of friends
                                                                                 unlike table joins
                                                                                    in RDBMS

                                                                 x



   Root > TFile f1(“tree1.root”);
   Root > tree.AddFriend(“tree2”,“tree2.root”)
   Root > tree.AddFriend(“tree3”,“tree3.root”);
   Root > tree.Draw(“x:a”,”k<c”);
   Root > tree.Draw(“x:tree2.x”,”sqrt(p)<b”);




                                                  ROOT: Status & Developments                         53
PROOF and GRID(s) interface




          ROOT: Status & Developments   54
Batch/Interactive models
  Need experiment framework                          Need only
    +widely available tools                     widely available tools


     Batch              Interactiv                     Interactiv
   Production               e                              e
   Simulation             batch                         Chaotic
 reconstruction           model                         analysis




                  ROOT: Status & Developments                            55
      GRID: Interactive Analysis
               Case 1
   Data transfer to user’s laptop
   Optional Run/File catalog                               Optional
                                                            run/File
   Optional GRID software                                  Catalog

 Analysis scripts are interpreted
or compiled on the local machine

                                                            Trees
                                                Remote
                                              file server
                                               eg rootd
                                                            Trees
                             ROOT: Status & Developments               56
        GRID: Interactive Analysis
                 Case 2
    Remote data processing
    Optional Run/File catalog                              Optional
                                                            run/File
    Optional GRID software                                 Catalog
      Analysis scripts are interpreted
    or compiled on the remote machine


                                                            Trees
                                              Remote
                     Commands, scripts
                                            data analyzer

                         histograms            eg proofd
                                                            Trees
                              ROOT: Status & Developments              57
        GRID: Interactive Analysis
                 Case 3
    Remote data processing
    Run/File catalog                                           Run/File
    Full GRID software                                         Catalog


   Analysis scripts are interpreted
or compiled on the remote master(s)
                                                            slave
                                                                    Trees
                                                                     Trees
                                                            slave     Trees
                                                                       Trees
                Commands, scripts       Remote              slave
                                      data analyzer
                                                            slave
               Histograms,trees         eg proofd
                                                            slave   Trees
                                                                     Trees
                                                            slave
                                                                      Trees
                                                                       Trees
                              ROOT: Status & Developments                  58
    Parallel ROOT Facility
   The PROOF system allows:
      Parallel analysis of trees in a set of files

      Parallel analysis of objects in a set of files

      Parallel execution of scripts

    on clusters of heterogeneous machines
   Its design goals are:
      Transparency, scalability, adaptability

   Prototype developed in 1997 as proof of concept, full
    version nearing completion now



                       ROOT: Status & Developments          59
                                               #proof.conf
                                               slave node1
           Parallel Script Execution           slave node2
                                               slave node3
              Local PC                         slave PROOF
                                             Remotenode4                 Cluster
                            stdout/obj
             root        ana.C               proof
                                               proof               TFile
                                                                                   *.root
                                                      node1
              ana.C
                                               proof
                                                                                   *.root
$ root                                                node2         TNetFile

         tree->Process(“ana.C”)
root [0] .x ana.C
root [1] gROOT->Proof(“remote”)                proof             TFile             *.root
root [2] chain->Process(“ana.C”)                      node3


proof = master server
proof = slave server
                                               proof             TFile             *.root
                                                      node4
                                   ROOT: Status & Developments                              60
Google: a good model
    Make it simple




                                          Simple interface
                                        Available everywhere
                                         Hidden Parallelism
                                           Distributed DB
                                         Don’t know a priori
                                          the data location
                                                 Fast

          ROOT: Status & Developments                          61
I did not talk about




            ROOT: Status & Developments   62
    Currently in ROOT 4.02
   SQL interface (MySQL, Oracle, postgres,sapdb)
   Threads
   Networking
   Mass Storage interfaces (Dcache,Castor,Chirp..)
   Mathlibs, Physics vectors
   Linear Algebra
   The geometry package
   Virtual MonteCarlo
   Interfaces to event generators
   The GUI Builder
   Neural Network
   Image processing
   PyRoot (The ROOT/Python interface)
   Carrot: ROOT web interface
                          ROOT: Status & Developments   63
Current developments (4.03/4.04)
        (in June release)




          ROOT: Status & Developments   64
    Consolidation
   Robustness
   Zillions of tiny details
   User support




                      ROOT: Status & Developments   65
    OpenGL interface
   A lot of effort invested in the GL interface
   Real Time navigation in complex detectors with
    millions of physical volumes. Show only what
    makes sense
   Invisible, translucent, variable precision
    rendering
   Dynamic particles
   High quality output
   GUI

                   ROOT: Status & Developments       66
    Mathlib
   Consolidation of TMath (now a namespace)
   Improved algorithms
   Robust Fitters (from the R package)
   Outliers, cluster finders
   Interface with a subset of GSL
   Collaboration with SEAL/Math




                   ROOT: Status & Developments   67
    Image processing
   Collaboration with Sasha Vasko for the
    development of libAfterImage
   Fast graphics (also in batch): an alternative to
    X11.
   Will be used by Carrot for execution of remote
    scripts and fast interactive graphics on the web.
   Could be used for fast image manipulation
    (better than large scatter plots)



                    ROOT: Status & Developments     68
    xrootd
   Joint development with BaBar
   Robust and efficient distributed file server with
    load balancing.
   Could be integrated with Castor.
   Integration with PROOF
   Requires consolidation of authentication and
    security.
   Implementation of read-ahead for ROOT Trees.


                    ROOT: Status & Developments     69
    PROOF
   Add support for all features currently available
    in ROOT Trees (friends, event lists, selectors)
   Special (but growing case) of one client, one
    server with no slaves
   Stateless connections with multiple PROOF
    objects in the same ROOT session (long and
    short queries).
   View/Import results of batch queries
   Save ROOT/PROOF session with resume
    capabilities.
   Interfaces with GRID services.
                     ROOT: Status & Developments       70
    GUI
   Continuous improvements.
   More & more objects edited via the GUI.
   GUI objects persistent.
   Currently the GUI can be saved as a C++ script.
    We would like to save it as a canvas.root too.
   More features in the GUI Builder (+ doc)




                   ROOT: Status & Developments    71
    SQL Interface
   RDBMS access via a set of abstract base classes
      TSQLServer, TSQLResult and TSQLRow

   Concrete implementations for MySQL and Oracle
    exist
      TMySQLServer, TMySQLResult and

       TMySQLRow
      TOracleServer, TOracleResult and

       TOracleRow


                   ROOT: Status & Developments   72
         New TTreeSQL class
                                                                          Connect to an existing db
TTreeSQL tree(const char *db,const char* uid,…)
tree.Print(), Browse, Scan, etc
tree.Draw(“var1:var2”,”varx <0”)                                               Create the data base on
                                                                                        server


TTree query style converted to SQL

                                  TTreeSQL tree(“mysql://localhost/test”,”nobody”,”new”);
                                  Event *event = new Event;
 Columns created using
    the normal split              tree.Branch(“top”,”Event”,&event);
       algorithm.                 tree.Fill();
  Blobs created below
          split.                  tree.AutoSave();


                                                                        A TSQLRow is filled and sent
                                                                              to the server
                                          ROOT: Status & Developments                                    73
    CINT
   Masa Goto is now releasing a new version of
    CINT with better C++ support, in particular for
    namespaces and scoping rules.
   Only the byte code option supported




                    ROOT: Status & Developments       74
          ROOT and the LCG projects
                decisions
     Architects strategy Applications
       forum              manager                             User -
                                                                           ROOT
                                                             provider


                                                                        Applications
  SPI      POOL       SEAL       PI          Simulation                    area
project    project   project   project         project consultation       meeting




                       LCG & ROOT in 2002,2003,2004



                          But substantial changes this month….

                               ROOT: Status & Developments                        75
   PH/SFT group reorganisation

                                         New SFT
  GRID                     ROOT                                    SIMU
              use
  POOL

              use                                      use
catalogs                                                            G4
collections   move to


  storage
                        Merged dict                     move to    VMC
   SEAL                  and pgm
              move to
   dict                  mathlib                                  generators
   pgm
                         ROOT: Status & Developments                           76
    Final remarks
   1965:   CERNLIB
   1975:   HBOOK and other packages
   1985:   start of PAW project
   1995:   start of ROOT project
   2005:   ROOT & LCG common developments
   2015:   ??




                    ROOT: Status & Developments   77
    ROOT: 2005-20XX
   Strong support from CERN/FNAL
   System will be consolidated, continuously
    developed.
   Better and better UI and GUIs, including web.
   More and more support for parallel distributed
    computing.
   What about C++ ?




                    ROOT: Status & Developments      78

								
To top