120 likes | 289 Views
Recent Developments in ROOT. LCG Applications Area meeting 31 October 2007 Ren é Brun CERN. ROOT in 2007. Atlas, CMS, LHCb still using 5.14 (December 2006) with patches (5.14.00i) PRO version 5.16 released in June 2006. DEV release 5.17.02 in August DEV release 5.17.04 (October 15)
E N D
Recent Developmentsin ROOT LCG Applications Area meeting 31 October 2007 René Brun CERN
ROOT in 2007 • Atlas, CMS, LHCb still using 5.14 (December 2006) with patches (5.14.00i) • PRO version 5.16 released in June 2006. • DEV release 5.17.02 in August • DEV release 5.17.04 (October 15) • PRO release 5.18.00 scheduled for December 12 • A very long list of improvements and new features since version 5.14. See: • http://root.cern.ch/root/Version516.news.html • http://root.cern.ch/root/Version517.news.html Recent developments in ROOT
Version 5.16 • Huge memory gain in CINT • Restructuring of libCore to minimize footprint • I/O in a separate library • New class TEntryList • Many devs in MathCore, Smatrix, random numbers • PROOF: moving to production in Alice • GUI: many new things, eg drag&drop protocol • Fitpanel • TGhtml (a mini web browser). See, eg • http://root.cern.ch/root/html/TAttFill.html • http://root.cern.ch/root/html/TLatex.html • TWebFile can use a standard httpd • Viewing TH2, TF2 with GL Recent developments in ROOT
Version 5.17 • One rootmap per shared lib instead of one for all. • Plug-in Manager simpler and powerful • I/O & Trees: a long list of improvements • Extensions of Double32_t and new type Float16_t • PROOF: Better packetizer, priority manager, disk quotas • Many developments in MathCore, Roofit, TMVA • GUI: Impressive list of new features & improvements • New TBrowser architecture • Spider plots, Parallel coordinates • Many developments in the GL core to optimize events displays (raw data in particular) • A long list of new tutorials Recent developments in ROOT
Double32_t and Float16_t • A double in memory is written to disk with 3 possible methods: • a,-double is converted to a 32 bits float • b,-double [xmin,xmax,nbits] is converted to an integer • c,-double[0,0,nbits] is converted to a float with a one byte exponent and nbits mantissa. • Same process for a 32 bits float in memory, but only cases b and c supported. • See example in $ROOTSYS/tutorials/io/double32.C Recent developments in ROOT
Double32_t declarations The following cases are supported for streaming a Double32_t type depending on the range declaration in the comment field of the data member: • In case A fNormal is converted from a Double_t to a Float_t • In case B fTemperature is converted to a 32 bit unsigned integer • In case C fCharge is converted to a 2 bits unsigned integer • In case D the array fVertex is converted to unsigned 10 bits integers • In case E fChi2 is converted to a Float_t with 6 bits precision • In case F the fNsp elements of fPointvalue are converted to unsigned 2 bit integers A- Double32_t fNormal; B- Double32_t fTemperature; //[0,100] C- Double32_t fCharge; //[-1,1,2] D- Double32_t fVertex[3]; //[-30,30,10] E- Double32_t fChi2; //[0,0,6] F- Int_t fNsp; Double32_t* fPointValue; //[fNsp][0,3] Recent developments in ROOT
More Details • The range specifier has the general format: [xmin,xmax] or [xmin,xmax,nbits] • [0,1] • [-10,100]; • [-pi,pi], [-pi/2,pi/4],[-2pi,2*pi] • [-10,100,16] • [0,0,8] • if nbits is not specified, or nbits <2 or nbits>32 it is set to 32 • if (xmin==0 and xmax==0 and nbits <=14) the double word will be converted to a float and its mantissa truncated to nbits significative bits. • IMPORTANT NOTE Lets assume an original variable double x: When using the format [0,0,8] (ie range not specified) you get the best relative precision when storing and reading back the truncated x, say xt. The variance of (x-xt)/x will be better than when specifying a range for the same number of bits. However the precision relative to the range (x-xt)/(xmax-xmin) will be worst, and vice-versa. The format [0,0,8] is also interesting when the range of x is infinite or unknown. Recent developments in ROOT
The double32.C tutorial class DemoDouble32 { private: Double_t fD64; //reference member with full double precision Double32_t fF32; //saved as a 32 bit Float_t Double32_t fI32; //[-pi,pi] saved as a 32 bit unsigned int Double32_t fI30; //[-pi,pi,30] saved as a 30 bit unsigned int Double32_t fI28; //[-pi,pi,28] saved as a 28 bit unsigned int Double32_t fI26; //[-pi,pi,26] saved as a 26 bit unsigned int Double32_t fI24; //[-pi,pi,24] saved as a 24 bit unsigned int Double32_t fI22; //[-pi,pi,22] saved as a 22 bit unsigned int Double32_t fI20; //[-pi,pi,20] saved as a 20 bit unsigned int Double32_t fI18; //[-pi,pi,18] saved as a 18 bit unsigned int Double32_t fI16; //[-pi,pi,16] saved as a 16 bit unsigned int Double32_t fI14; //[-pi,pi,14] saved as a 14 bit unsigned int Double32_t fI12; //[-pi,pi,12] saved as a 12 bit unsigned int Double32_t fI10; //[-pi,pi,10] saved as a 10 bit unsigned int Double32_t fI8; //[-pi,pi, 8] saved as a 8 bit unsigned int Double32_t fI6; //[-pi,pi, 6] saved as a 6 bit unsigned int Double32_t fI4; //[-pi,pi, 4] saved as a 4 bit unsigned int Double32_t fI2; //[-pi,pi, 2] saved as a 2 bit unsigned int Double32_t fR14; //[0, 0, 14] saved as a 32 bit float with a 14 bits mantissa Double32_t fR12; //[0, 0, 12] saved as a 32 bit float with a 12 bits mantissa Double32_t fR10; //[0, 0, 10] saved as a 32 bit float with a 10 bits mantissa Double32_t fR8; //[0, 0, 8] saved as a 32 bit float with a 8 bits mantissa Double32_t fR6; //[0, 0, 6] saved as a 32 bit float with a 6 bits mantissa Double32_t fR4; //[0, 0, 4] saved as a 32 bit float with a 4 bits mantissa Double32_t fR2; //[0, 0, 2] saved as a 32 bit float with a 2 bits mantissa Write a Tree with a variable per branch. Then see absolute and relative precision Recent developments in ROOT