Hey,
I try to get the coordinates of the center of a volume after a TGeoTranslation. But when I use the method GetOrigin it´s always return (0, 0, 0)… I think that GetOrigin return the origin of this volume but before the translation, I mean when it was created around the origin.
[code]
TGeoVolume *myBox = MakeBox(“myBox”, 0, 4, 4, 5 );
SetTopVolume(myBox);
myVolume= new TGeoVolume(“myvolume”, new TGeoBBox(2, 1, 0.5)); //volume is created around the origin
myBox->AddNode(myVolume, 1, new TGeoTranslation(1, 0, 1)); // this volume is translated
// I need the coordinates of the “center” of myBox after the translation
TGeoBBox panBox = (TGeoBBox)(myBox->GetShape());
Double_t OX=(panBox->GetOrigin()) [0];
Double_t OY=(panBox->GetOrigin()) [1];
Double_t OZ=(panBox->GetOrigin()) [2];
cout << " myBox origin " << OX << " " << OY << " " << OZ << endl;[/code]
Any help would be greatly appreciated
Thanks