Hi. I have got the following program and i would like to apply a fit. But
if i use the fit panel it doesn't accept my command. It says that (for
example)" Function pol1 is not 2-D". How can I fit my graph.Which
statement can I use?
Here is my program.
{
gROOT->Reset();
ifstream in;
in.open("data01.dat",ios::in);
Float_t x0,x1;
Float_t bins=4096,lower=-0.5,upper=4095.5;
// TFile *f=new TFile("2root.dat","RECREATE");
TH1F *h0=new TH1F("h0","1",bins,lower,upper);
// TH1F *h1=new TH1F("h1","",bins,lower,upper);
// h0->SetMaximum(30);
TNtuple *my_ntup = new TNtuple("name","title","x:y");
int lines = 0;
while(1)
{
if(!in.good())break;
if(x0<4095&&x0>480&&x1<4095&&x1>480)
my_ntup->Fill(x0,x1);
lines++;
}
cout << lines << "lines were read from file " << endl;
in.close();
my_ntup->Draw("y:x");
}
Cheers for help, Sam.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET