Ellipse definition

Hi guys,

I need your help, if possible.
I used the G4Tubs class to construct a cylinder with a given radius and a given height.

Is it possible to replace the cylinder base (circumference) with an ellipse? Basically, what I need is the same geometry as a cylinder (see fgure below), but I want to replace the circle with an ellipse since I need r (radius) in one dimension and a smaller one in the orthogonal dimension.

Cheers,
Valeria
Cilindro

Maybe you need the Tube with an elliptical cross section: or the General Ellipsoid:

https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Detector/Geometry/geomSolids.html#constructed-solid-geometry-csg-solids

Yes, it works perfectly!

Thanks! :slight_smile: