Hi Eric, A problem in TNode::Master2Local in a configuration like yours was fixed by Robert Hatcher on April 14 this year. Unfortunately, you do not indicate which version you are using. If you move to 3.05/05 or newer, I expect this problem to be solved. Rene Brun dumontei wrote: > > Hello, > > while trying to use TGeom (TNode,...) in AliRoot, I noticed a pb which > can be seen in this basic macro: > > { > gROOT->LoadMacro("loadlibs.C"); > loadlibs(); > TFile *file = new TFile("galice.root"); > if (!gAlice) > { > gAlice = (AliRun*)file->Get("gAlice"); > if (gAlice) printf("AliRun object found on file\n"); > if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); > } > > char namech[10]; > char name[10]; > > sprintf(name,"SLAT_N%d",slatnum); > > // Converting local -> master > Float_t local[3],local2[3], master[3]; > local[0] = x1; > local[1] = y1; > local[2] = 0; > TNode *node = gAlice->GetGeometry()->GetNode(name); > node->UpdateMatrix(); > node->Local2Master(local,master); > cout<<"local "<<local[0]<<" "<<local[1]<<" "<<local[2] << endl; > cout<<" master "<<master[0]<<" "<<master[1]<<" "<<master[2]<<endl; > node->UpdateMatrix(); > node->Master2Local(master,local2); > cout<<"local2 "<<local2[0]<<" "<<local2[1]<<" "<<local2[2] << endl; > } > > which give this outpout (this is not normal since we have to found the > same starting and ending values...): > > local 10 3 0 > master 75.7508 68.2644 986 > local2 9.73511 3.77195 1.63918e-15 > (int)1085958144 > > Maybe the same problem was describe in this ROOT Talk, but this question > had no answear: > > From: Volker Hejny (V.Hejny@fz-juelich.de) > Date: Tue Aug 28 2001 - 08:30:19 MEST > > Next message: Christian Holm Christensen: "Re: [ROOT] add > histogram" > Previous message: Rene Brun: "Re: [ROOT] add histogram" > Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > Hi all, > > I tried to use TGeometry and played with the transformation > function Master2Local and Local2Master. While the latter > worked properly, the other did not what I assumed. On > closer look I found, that the same matrix is used as > in Local2Master. Instead the transposed should be used. > > Best regards, > Volker > > -- > Dr. Volker Hejny Tel: 02461/616853 > ** > Institut f. Kernphysik Fax: 02461/613930 ** > > ---------------------------------------------------------------- ** ** > --- > Forschungszentrum Juelich GmbH, D-52425 Juelich ** > > Thanks a lot in advance, > > Eric
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET