hi mat, you were probably staring at it too long and someone just needed to have a fresh look at it! ;-> aren't you just mixing GeVs and MeVs? i changed k_mass to 0.49368 GeV and then it worked. ie. change Double_t k_mass=493.68; to Double_t k_mass=0.49368; // also in GeV, just like the phi cheers, patrick. On Thu, 21 Oct 1999, Matthew Martin wrote: > 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 > > > -------------------------------------------o------------------------------- Patrick Decowski | 24-504 | Home: (617)625-9352 Massachusetts Institute of Technology | Office: (617)253-9735 77 Massachusetts Ave | Fax: (617)253-1755 Cambridge, MA 02139-4307 | -------------------------------------------o------------------------------- http://web.mit.edu/decowski/www/home.html | e-mail: decowski@mit.edu -------------------------------------------o-------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:41 MET