Hi Corey,
Sure:
TGeoSphere* sph = new TGeoSphere("sph",0.,1.);
TGeoScale *scl = new TGeoScale(1.,1.,0.5);
TGeoScaledShape *ellipsoid new TGeoScaledShape("ell", sph, scl);
But you cannot draw directly the shape, make a volume out of it and put it in a simple geometry. You will actually "see" the ellipsoid correctly only in the GL view, not in the pad.
You can cut it with a box to implement the G4Ellipsoid, but I think Ivana has already the implementation.
Regards,
Andrei
Corey Reed wrote:
> Hi,
>
> I am using Root 5.24.00 on linux.x86_64.
>
> I am trying to convert some Geant4 code to use the Root classes.
> Unfortunately, some of the detector objects are defined by the
> G4Ellipsoid class.
>
> As far as I can see, there is no TGeoEllipsoid corresponding to
> G4Ellipsoid.
>
> I have tried making a sphere and setting the bounding box dimensions,
> but this does not seem to work:
>
> root [0] TGeoSphere* sph = new TGeoSphere("sph",0.,1.)
> root [1] sph->SetBoxDimensions(0.125,0.125,0.06)
> root [2] sph->Draw()
>
> (A simple sphere is still drawn; the box dimensions seem to be ignored.)
>
> Is it possible to stretch a sphere? Is there any other trick which would
> allow an ellipsoid to be made within TGeo?
>
> Thanks!
>
> - Corey
>
Received on Thu Feb 18 2010 - 09:32:31 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 18 2010 - 17:50:02 CET