Hi Rooters, I've been trying to get the following macro to work for sometime now with zero success. Double_t Open_fcn(Double_t *x, Double_t *par){ Float_t xx =x[0]; Double_t phi_mass=1.02; Double_t k_mass=493.68; Double_t Ek_CM,Pk_CM; Double_t beta; Double_t gamma=5.0; Ek_CM=phi_mass/2.0; Pk_CM=TMath::Sqrt( (Ek_CM*Ek_CM)-(k_mass*k_mass) ); beta=TMath::Sqrt( 1.0-TMath::Power( gamma,-2.0 ) ); Double_t f=(TMath::ATan(Pk_CM*TMath::Sin(xx)/(gamma*(Pk_CM*TMath::Cos(xx)+beta*Ek_CM)) ) + TMath::ATan(Pk_CM*TMath::Sin(xx)/(gamma*(Pk_CM*TMath::Cos(xx)-beta*Ek_CM)) )); return f; }//Open_fcn void draw_it() { TF1* open_dist = new TF1("open_dist",Open_fcn,0.0,3.14159,0); TCanvas* c1 = new TCanvas("c1","Opening angle dists",10,10,1200,950); c1->cd(); open_dist->Draw(); } I load it into memory, and then execute the draw_it() function, and I get the following error: Error in <TGaxis::PaintAxis>: wmin (-0.000000) == wmax (-0.000000) root [2] Error in <TGaxis::PaintAxis>: wmin (-0.000000) == wmax (-0.000000) how can I get it to work? cheers Mat
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:41 MET