Hi, You can not really use use TF1 in TTree::Draw (actually in the case your typed where x is the actual spelling of a tree variable, pTree->Draw("pf") would do what you expect). In root 3.05/07 you can use global function instead. Cheers, Philippee > -----Original Message----- > From: owner-roottalk@pcroot.cern.ch > [mailto:owner-roottalk@pcroot.cern.ch] > Sent: Friday, August 08, 2003 11:14 AM > To: Roottalk@Pcroot. Cern. Ch > Subject: [ROOT] Can I use TF1 in TTree::Draw() > > Hello, > Suppose I have a TF1 I create with > > TF1 *pf = new TF1("pf","[0]+[1]*sqrt(x)",0.,1000.) > > Is it possible to use pf it within a TTree::Draw() call? I've tried the > obvious, > e.g. > > pTree->Draw("pf(x)") where x float in pTree > > but, alas, it does not work like sqrt(). Is there a special syntax? What > about > the build-in formulas, e.g. pol5? Can I use these? > > I am using win32 version of root v3.05/5 on windows 2k. Thanks > > Ed Oltman
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET