Re: [ROOT] Some doubt in ROOT

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Feb 06 2004 - 19:08:04 MET


Hi,

Sudeep Chatterji wrote:
> 
> Hi Rooters,
>   We are going to organize a ROOT Tutorial in University of Delhi, India in the coming week. I have some questions regarding ROOT which are listed below.  Kindly help us in clearing our doubts.
> 
> 1) When we use Legend, why we use "p" option for Graphs and "f" and "l" option for functions.

see the description of TLegend at:
  http://root.cern.ch/root/htmldoc/TLegend.html
  http://root.cern.ch/root/htmldoc/TLegend.html#TLegend:AddEntry
see examples of TLegend in tutorials
FittingDemo.C, hbars.C, mlpHiggs.C, quantiles.C


> 2) What is Cycle number in the list of objects, when we use f.Map() command.

see chapter Input/Output in the Users Guide

you can download the full Users Guide or only the Chapter Input/Output from:
   http://root.cern.ch/root/doc/RootDoc.html

> 3) What is the diffrence between memory and disk?

The information on disk is preserved at the end of a session.

> 4) When we close a file, the objects in it are erased. Will the objects be erased both in disk as well as memory?

The info on disk is kept. The objects in memory associated to this file
are deleted. Please again read the chapter on Input/Output.

> 5) In the Chapter on Fitting Histograms, in the Section "Example:Fitting Multiple Sub Ranges" what does the following line mean                     total=new TF1("mstotal","gaus(0)+gaus(3)+gaus(6)",85,125)

You want to fit an histogram with a function that is the sum of 3 gaussians.
see chapter on "Fitting" in the Users Guide.
see also:
  http://root.cern.ch/root/htmldoc/TF1.html
  http://root.cern.ch/root/htmldoc/TFormula.html

> Please clarify the meaning of "gaus(0)+gaus(3)+gaus(6)".
> 6) In the Chapter on Tree, in the first example on "staff at CERN" what is the significance of following commands
>  sscanf(&line[0],"%d%d%d%d",.....);
>  sscanf(&line[13],"%d%d%d%d",....);
>  sscanf (&line[24],"%d%d%d",...);
> 

If you are working on a Unix system, try the man page for scanf
  man scanf
sscanf reads from a character string with a specified format into local
variables.
sscanf(&line[13],"%d%d%d%d",....); reads the string of characters starting at
address line[13] 4 integers.

> Are we reading data from line#0 to line #12, then from line #13 to 24? If so then how do we know that the data for four variables ends on line 12?
> 
> 6) In the Chapter on Physics Vectors under section TRotation, what is the meaning of the following command
> Double_t xx=r(0,0)
> What is the meaning of (0,0) in the above command?

TRotation is a matrix(i,j). r(0,0) access the first row, first colum of the
matrix)

Rene Brun

> 
> Thanks in advance,
> With best regards,
> Sudeep Chatterji



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET