Hi Stanislav, I thanks you for your help, I have do that you tell me, but not even this work.This time root tell me: Compiled for solaris. CINT/ROOT C/C++ Interpreter version 5.15.21, Dec 8 2001 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] .L ana_dali_mc.C root [1] ana_dali_mc mio root [2] mio.Loop() Error: Illegal Assignment to an undeclared symbol TLorentzVector&x FILE:ana_dali_mc.C LINE:304 *** Interpreter error recovered *** root [3] On Wed, 25 Sep 2002, Stanislav NESTEROV wrote: > > Hi Perfetto, > You should replace your line > > > Double_t delta_egamma(TLorentzVector x,TLorentzVector y) > > with > > > Double_t delta_egamma(TLorentzVector& x,TLorentzVector& y) > > > and all will be fine. > > Best regards, > Stanislav. > > On Wed, 25 Sep 2002, Perfetto Francesco wrote: > > > Hi ROOTers, > > I am sorry if this question is very too trivial, but I don't know where > > mistake. > > The problem is that, when call the my function "delta_egamma" in my > > program ,root tell me : > > > > root [0] .L ana_dali_mc.C > > root [1] ana_dali_mc mio > > root [2] mio.Loop() > > Error: Illegal Assignment to an undeclared symbol TLorentzVectorx > > FILE:ana_dali_mc.C LINE:304 > > *** Interpreter error recovered *** > > > > My program is: > > > > #define ana_dali_mc_cxx > > #include "ana_dali_mc.h" > > > > void ana_dali_mc::Loop() > > { > > > > if (!TClassTable::GetDict("Physics")) { > > gSystem.Load("$ROOTSYS/lib/libPhysics.so"); > > } > > ... > > Double_t pluto; > > TLorentzVector p4datetasys_pim,p4datetasys_pip,p4datetasys_piz; > > TTree *tmc = new TTree("tmc","Tree for montecarlo"); > > > > for (Int_t jentry=0; jentry<nentries;jentry++) > > { ... > > pluto = delta_egamma(p4datetasys_pip,p4datetasys_pim); > > tmc ->Fill(); > > } > > } > > > > Double_t delta_egamma(TLorentzVector x,TLorentzVector y) > > { > > Double_t delta; > > TLorentzVector pippo; > > > > pippo = x; > > mimmie= y; > > ... > > delta = pippo.Mag2(); > > > > return delta; > > } > > > > Someone can tell me how can I do that ?(where is my mistake ? ) > > > > Regards > > Francesco. > > > > > > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:11 MET