Re: [ROOT] Any easy to project a TF2 to a TF1?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 31 2003 - 09:28:08 MEST


Hi,

You can do the following:

ntp->Draw("(nneu>0)*neuecal[0]+(nneu>1)*neuecal[1]+(nneu>2)*neuecal[2]+(nneu>3)*neuecal[3]>>TotNeutralEnergy");

Rene Brun


On 
Thu, 31 Jul 2003, Yiqun Wang wrote:

> I wonder if there is an easy way to project a TF2 to TF1, by fixing either
> x or y? I searched the ROOTtalk site and went through the document, but
> could not find it. Basically, I would like to have something like, for
> example:
> 
> TF2 *f2 = new TF2("f2", "x*y/([0]**2+x**2+y**2)",-10,10,-10,10, 1);
> TF1 *f1 = f2->ProjectionX("_px", -1);  // i.e. y=-1.0
> 
> Is it easy to implement something like that?
> 
> Yiqun Wang
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET