[ROOT] setparameter problem

From: ivan brida (brida@fmph.uniba.sk)
Date: Thu Sep 05 2002 - 10:33:28 MEST


   hi rooters

this  is a simplified example of my code:

void main() {
  float a=1.0;
  TF1 *f = new TF1 ( "f" ,  "[0]",   1,   10);
  f -> SetParameter(0,a);

  float b = 10.0;
  TF1 *g = new TF1( "g",   "[0] * f",   1,   10);
  g -> SetParameter(0,10);

  TF1 *h = new TF1( "h",    "g",   1,   10);
}

the problem  is that the functions "g" and "h" are not equal, but h=b*g. 
 if I change the definition of "f":

  float a = 1.0;
  TF1 *f = new TF1 ( "f" ,  "[0]",   1,   10);
  f -> SetParameter(0,a);

to:

  TF1 *f = new TF1("f","1. *1.0",1,10)

then h=g. So I assume, that the error in my code is connected with 
"SetParameter".  why h!=g  in example above?

best regards

        ivan


-- 

         -----------------------------

                   *Ivan Brida*

         Department of Nuclear Physics <http://www.dnp.fmph.uniba.sk/>
Faculty of mathematics, physics and informatics <http://www.uniba.sk/mffuk/>
              Comenius  University <http://www.uniba.sk/webuk/>
                 Mlynska Dolina
                84248 Bratislava <http://www.bratislava.sk/>
                Slovak  Republic <http://www.slovensko.com/>

               brida@fmph.uniba.sk



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET